Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Getting the value of motion blur on a layer

  • Kevin Camp

    September 13, 2010 at 8:25 pm

    thisComp.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 pm

    Do 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 pm

    you 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 am

    Kevin,
    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.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy