Skip to main content
Known Participant
March 2, 2023
Answered

No motion blur on scale attribute calculated with expression

  • March 2, 2023
  • 2 replies
  • 1300 views

I have a footage layer with the scale calculated using an expression. As it stands the expression makes for a 200% zoom over just 12 frames. Motion blur is set to ON for both the layer and global settings, however the scale-up results in no motion blur at all. 

 

For resting purposes, removing the expression, and manually baking-in a 200% zoom over 12 frames, corrects the problem. All of a sudden there is motion blur. 

 

Would love to get this working with the expression. 

 

Any one have any ideas or advice?

This topic has been closed for replies.
Correct answer Dan Ebberts

My guess is that your Current Frame slider is giving you a stepped result, like you would get if it was driven by an expression like this:

timeToFrames(time)

If you instead drive it with continuous values (like keyframing from 0 to 12) you should see the motion blur.

2 replies

Mylenium
Brainiac
March 2, 2023

Yeah, we need to see the code. Sounds like you are simply quantizing the value steps somehow, in which case of course there would be no motion blur.

 

Mylenium

Known Participant
March 2, 2023

Sure here's the code:

currentFrame = thisComp.layer("vars").effect("Current Frame")("Slider");
totalFrames = thisComp.layer("vars").effect("Zoom Duration (Frames)")("Slider");
t = currentFrame/totalFrames; // time

A = 100; // starting scale
finalScale = A + thisComp.layer("vars").effect("Zoom Amount")("Slider");
B = finalScale; // ending scale
C = finalScale; // ending scale

s = (1-t)*(1-t)*A + (2*(1-t)*t*B) + (t*t*C); // hard coded easy ease math

if (currentFrame >= totalFrames) {
	result = [finalScale,finalScale];
} else {
	result = [s,s];
}
result;

 

Dan Ebberts
Adobe Expert
March 2, 2023

What's the expression?

Known Participant
March 2, 2023

Code here: 

currentFrame = thisComp.layer("vars").effect("Current Frame")("Slider");
totalFrames = thisComp.layer("vars").effect("Zoom Duration (Frames)")("Slider");
t = currentFrame/totalFrames; // time

A = 100; // starting scale
finalScale = A + thisComp.layer("vars").effect("Zoom Amount")("Slider");
B = finalScale; // ending scale
C = finalScale; // ending scale

s = (1-t)*(1-t)*A + (2*(1-t)*t*B) + (t*t*C); // hard coded easy ease math

if (currentFrame >= totalFrames) {
	result = [finalScale,finalScale];
} else {
	result = [s,s];
}
result;
Dan Ebberts
Dan EbbertsCorrect answer
Adobe Expert
March 2, 2023

My guess is that your Current Frame slider is giving you a stepped result, like you would get if it was driven by an expression like this:

timeToFrames(time)

If you instead drive it with continuous values (like keyframing from 0 to 12) you should see the motion blur.