Skip to main content
Inspiring
June 4, 2024
Question

Sequential frame requirement in Effect Plugins

  • June 4, 2024
  • 1 reply
  • 1684 views

Was wondering if anyone has any samples or ideas regarding effect plugins that require other frames for processing?

From what I understand, it isn't really possible to force AE to render sequentially, which is unfortunate, as in my case the processing requires processing from start->end sequentially. 

Is there a way to tell AE to "try to render this later" if it doesn't have the data it needs? 

Put simply, its a heavily optical flow based effect, that has to take into account the entire sequence, not just neigboring frames. (otherwise I know that could be a simple checkout) 

This topic has been closed for replies.

1 reply

Community Expert
June 5, 2024

in general, the "sequential" render scheme doesn't play well into AE's rendering pipeline.

you could:

1. do a series of input checkouts for any arbtirary time regardless of the time of the currently rendered frame (as shown in the "Checkout" sample project. but i guess you already know that.

the donwside being that if the user skips to some distant frame, the checkout time for all previous frames can be insufferable.

2. you could do your processing asynchronously, and therefore sequentially. for exmpale, AE's camera tracker does it's thing on a separate thread and applies the result on the main the thread once done.

3. if during a render you report back to AE that the plugin is out of memory, AE will ignore the result in the output buffer and will not consider that frame rendered. however, that would cause ram previews to stop rendering.

Inspiring
June 5, 2024

Asynchronous processing seems like it would probably be the way to go--
I've familiar with this in AEGP's, but not so much with Effect plugins?
Any suggestions on that?
Also, might it be possible to trigger this processing via button press?

 

Community Expert
June 5, 2024

you'd probably want to implement the async processing on an AEGP. however, an effect plugin can also act as an AEGP! you can just call the same aegp registration callbacks on an effect and have it receive idle_hook calls. just note that these calls will not be associated to any specific instance. it will act exactly like a separate AEGP that is unaware of it hosting plugin.

 

as i already know that you know, interacting with AE can only be done during idle hook on the main thread. aquire frames during these time slots using the render suite, and then pass them to some other thread for processing to reduce the ui thread's blocking to a minimum. you know the drill.

yes, the overall process will be slower than if you blocked the main thread and went to town will frame checkouts, but hey, it's an acceptable compromise between performance and user experience. (IMHO)

 

as for launching that process with a button, it's very much possible. create a button control and make it supervised. you'll receive a call to your "user changed param" function, from which you can trigger the process.