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

How to control motion blur amount when using Transform World?

Engaged ,
May 10, 2022 May 10, 2022

Copy link to clipboard

Copied

Hi gang;

 

Slowly but surely I am getting motion blur to work in my plugin. 

 

I've got it working but it seems to be at a default extreme level. When I compare it to a default layer moved with motion blur, it is much more extreme. Browsing through the SDK I came across this:

Effects handle their own motion blur, using PF_InData>shutter_angle along with PF_InData>shutter_phase. The plug-in must set PF_OutFlag_I_USE_SHUTTER_ANGLE so After Effects knows it needs this information. They must check out their own parameters at other times to examine their change over the shutter interval.

 

I assume shutter_angle and shutter_phase will allow me to control the degree of motion blur. However, there is once again no example anywhere to show how to achieve this or how it works. I took a look at the old CCU example (prior to CS5) but no dice...

 

Can anyone help me out and give me some tips or examples on how to use shutter_angle and shutter_phase? If that is even what I should be using to control the degree of motion blur?

 

Thank you,

-Richard

TOPICS
SDK

Views

309

Translate

Translate

Report

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 , May 10, 2022 May 10, 2022

Hi Richard

The amount of motion blur is determined by the difference in the two matrices you used in transform world. If it's based on your params, I use the following code:

 

    // measured as a decimal: 1.0 = 360 degrees or 1024 steps
    PF_FpLong shutterPhaseF     = FIX_2_FLOAT(in_data->shutter_phase);
    PF_FpLong shutterDurationF  = FIX_2_FLOAT(in_data->shutter_angle);
 
    A_long shutterDurationSteps = shutterDurationF * in_data->local_time_step;
    A_long shutterPhaseSteps    = shutterPhaseF
...

Votes

Translate

Translate
Engaged ,
May 10, 2022 May 10, 2022

Copy link to clipboard

Copied

Hi Richard

The amount of motion blur is determined by the difference in the two matrices you used in transform world. If it's based on your params, I use the following code:

 

    // measured as a decimal: 1.0 = 360 degrees or 1024 steps
    PF_FpLong shutterPhaseF     = FIX_2_FLOAT(in_data->shutter_phase);
    PF_FpLong shutterDurationF  = FIX_2_FLOAT(in_data->shutter_angle);
 
    A_long shutterDurationSteps = shutterDurationF * in_data->local_time_step;
    A_long shutterPhaseSteps    = shutterPhaseF * in_data->local_time_step;
    A_long previousTimeStep     = in_data->current_time + shutterPhaseSteps;
    A_long nextTimeStep         = previousTimeStep + shutterDurationSteps;
 
Checkout the motion blurred params at previousTimeStep and nextTimeStep.

Votes

Translate

Translate

Report

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 11, 2022 May 11, 2022

Copy link to clipboard

Copied

Hi James!

 

Thank you so much for taking the time to post this and provide an explanation. It helped tremendously and I was able to control the degree of motion blur based on your explanation. 

 

Thanks again!

-Rich

Votes

Translate

Translate

Report

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 11, 2022 May 11, 2022

Copy link to clipboard

Copied

LATEST

No worries Richard 🙂

Votes

Translate

Translate

Report

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