We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
TLDR: Where should I perform long calculations for filling sequence_data, given that sequence data is read only in the render thread and I don't want to hang the UI thread? Should I just ditch sequence data in favour of the new compute cache (as it can be written to in the render thread) or will I be waiting some time for AE users to update to an AE version which supports compute cache?
Basically I'm doing something similar to françois_leroy in this thread:
Having read the documentation on sequence_data and getting at least as confused as francois I came hunting on the forum and I'm glad I found his question.
In terms of sequence data - transfer is only one way - from the UI thread to the render thread. I had assumed that in the render thread I could do my long physics calculations without the UI becoming unresonsive and I could do them incrementally as later frames get rendered. But given the data flow is only one way, this isn't possible, so I'm not sure where to do my physics calculations without the UI becoming unresponsive.
In the latest SDK, it seems compute cache has been brought in to (eventually) replace Sequence_data. It looks like this is a better system all round and it can be called in the render thread. However, am I correct in assuming that it will only be available in the latest version of AE? Will I need to support (and learn to use) both Sequence_data and ComputeCache while everyone catches up?
question: if you need to calculation done only for rendering and only during render time, why bother storing it in the UI copy of the sequence data? you could calculate it during render time and suffice with having it shared beween the different render threads.
am i making false assumptions here?
That is something that I had considered - but it seems like I am essentially reinventing the compute cache.
Compute Cache seems like an excellent new feature for exactly this scenario - assuming my users will have support for itin their version of AE.
And I would also have to keep track of the different instances of my plugin, because the calculations would depend upon the values of the controls - even with a single render thread, isn't this therefore just reinventing the sequence_data?
Oh, have I missunderstood the sequence_data across threads?
I was thinking that the sequence data was read only - but are you saying that I can modify the sequence data in the render thread, and then it will remain in the render thread for future render calls? I seem to remember reading in the docs or in a post here that sequence data is synced "only at specific instances". Surely if it is synced at any instance, then my sequence data is at risk of being wiped out - or are those specific instances well documented somewhere?
Sorry for the multiple replies. Various pennies are slowly dropping in my brain (hope that phrase makes sense in your part of the world!)
read only in the render thread that is
it's read only in the sense that you can't change the memory handle passed in the in_data with a new one in the out_data. that's by design so the different threads could simultaneously read it, worry free. as for it's content, it's up to you. you'll need to make sure the different threads don't step on each other's toes though...