Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

How to create off-screen image buffer with SDK and draw to it?

Engaged ,
May 20, 2020 May 20, 2020

Hi gang;

 

I've used other SDK's where this is very possible. Is it possible with the After Effects SDK?

 

I'd like to create an image buffer to work with, draw to it, and then copy the data to the After Effects peview buffer. This would be helpful so that I can copy parts of a sequence from various different frames into that one image. I was looking through the SDK examples but didn't really find anything relevant.

 

Any suggestions? Please let me know if I've made myself unclear and I can try to provide more details!

 

Thanks,

-Richard

TOPICS
SDK
766
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 20, 2020 May 20, 2020

it's very much possible.

we're talking about 2 concepts here:
1. get inputs from different layers and at different times.

both the effect's own layer and other layers are accessed via a layer param. every effect has a default layer param (index 0) which is used to checkout the input.

to get images from other times, lookup "WIDE_TIME" in the SDK docs.

 

2. using intermediate buffers.

AE hands the effect an output buffer to fill. HOW that buffer is filled is up to you. you don't have to operate dir

...
Translate
Community Expert ,
May 20, 2020 May 20, 2020

it's very much possible.

we're talking about 2 concepts here:
1. get inputs from different layers and at different times.

both the effect's own layer and other layers are accessed via a layer param. every effect has a default layer param (index 0) which is used to checkout the input.

to get images from other times, lookup "WIDE_TIME" in the SDK docs.

 

2. using intermediate buffers.

AE hands the effect an output buffer to fill. HOW that buffer is filled is up to you. you don't have to operate directly on it. you can do whatever you want and then copy data into that buffer. an AE buffer has a pointer named "data" which is the base address for the image pixels, and another variable called "rowbytes" which denotes the number of bytes in a row. (it's not necessarily sizeof(PF_Pixel)*width; (it's sometimes referred to as "stride" in other APIs)

in any case, use whatver method you want to draw, either directly into the handed output, or to another buffer and copy the end result to the output.

you can create AE native buffers as intermediates if you like. thery're referred to as "worlds" in the SDK docs.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 20, 2020 May 20, 2020
LATEST

Hi Shachar;

 

Thank you very much for that thoughtful and detailed answer. It makes sense and I'm going to try these two suggestions.

 

Kind regards,

-Richard

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines