Activity › Forums › Adobe After Effects Expressions › Getting the value of motion blur on a layer
-
Getting the value of motion blur on a layer
Posted by John Percival on September 13, 2010 at 2:26 pmIs there any way to get the current value of motion blur applied to a layer? Any help would be fantastic!
John Percival replied 15 years, 8 months ago 2 Members · 6 Replies -
6 Replies
-
Kevin Camp
September 13, 2010 at 8:25 pmthisComp.shutterAngle will give you the shutter angle of the comp, which is what determines the amount of motion blur that a layer gets when moving (when motion blur is enabled).
i’ve used that in conjunction with directional blur to create a fake motion blur to match that of the comp’s motion blur.
Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW -
John Percival
September 14, 2010 at 4:49 pmDo you have a sample of this? I am confused on where to apply thisComp.shutterAngle
Also, thisComp.shutterAngle will only return a static number based on the comps settings, say 180. What I was looking for is getting the value of blur on an object in the comp from its start and end point. My guess some logic is needed…
Any help would be great.
Thanks,
John -
Kevin Camp
September 14, 2010 at 9:04 pmyou would need to factor in the speed of the layer.
this should work in the directional blur, blur length property to approximate the amount of motion blur that the layer would get if motion bur was enabled for the layer:
position.speedAtTime(time) * thisComp.shutterAngle / 13500;
to get the direction of the blur to match the motion, you’d need something like this in the blur direction property:
p1 = position.valueAtTime(time-thisComp.frameDuration);
p2 = position.valueAtTime(time);
n = sub(p2,p1);
radiansToDegrees(Math.atan2(n[1],n[0]))-90;i’m not sure how helpful this is if you are not using it in a similar way… what are you trying to achieve?
Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW -
John Percival
September 15, 2010 at 12:28 amKevin,
This is wonderful, really great work on this. This is exactly what I needed. It’s going to take me a bit to figure out the blur direction expression but it works really well on both X and Y axis! Thank you so much for taking a crack at this.Oh and one more question, where did you get the value of 13500?
Thanks again,
John -
Kevin Camp
September 15, 2010 at 2:37 am[John Percival] “where did you get the value of 13500?”
trial and error 😉
by the way, it will only work in xy… no z, so no 3d (unless it only moves on the xy plane)
Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW -
John Percival
September 15, 2010 at 1:43 pm[trial and error ;-)] – Words to live by!
Thank so much, Kevin it was spot on. To be honest, it would be really nice to see Adobe expose a value for motion blur for situations like this in the future.
Reply to this Discussion! Login or Sign Up