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

PF_ParamDef vs PF_LayerDef

Explorer ,
Dec 01, 2024 Dec 01, 2024

Hi everyone!

I'm a newbie AE plugin developer, and I would like someone to shed some light on some confusing things for me. I'm developing a plugin where the user chooses a layer from the composition via UI dropdown.

 

The layer is then checked with PF_CHECKOUT_PARAM before my custom function. I use new_world to reduce the resolution/size so that when I finally use transform_world in my custom function (which is in a loop), it doesn't have to iterate over all the input pixels. (I hope I was clear enough about this and that this is the correct way to go about things.)

In my custom function, I need to PF_CHECKOUT_PARAM again for every iteration (the plugin basically repeats the input, something like motion blur) and access in_data->current_time and similar data. The issue is, I need transform_world to use PF_LayerDef since I'm working with the scaled-down layer from new_world, but I also need to use PF_ParamDef from the layer to get current_time, time_step, etc. The only solution I can think of is to use PF_COPY(&param_def.u.ld, &layer_def, NULL, NULL), but that slows everything down in an unacceptable way (10x slower). Any help would be much appreciated.

TOPICS
SDK
114
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

Engaged , Dec 06, 2024 Dec 06, 2024

Hi Mikik

I think using smartFX and the prerender checkout_layer will be much more performant. You can choose exactly which pixels you need rather than just receiving the entire layers buffer each time. As you mention a motion blur type effect, you can also choose which source time the pixels should be from. 

Translate
Engaged ,
Dec 06, 2024 Dec 06, 2024

Hi Mikik

I think using smartFX and the prerender checkout_layer will be much more performant. You can choose exactly which pixels you need rather than just receiving the entire layers buffer each time. As you mention a motion blur type effect, you can also choose which source time the pixels should be from. 

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
Explorer ,
Dec 19, 2024 Dec 19, 2024
LATEST

Hi James, thank you very much for your reply! Appreciate it!

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