Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Wiggle frequency based on velocity

  • Wiggle frequency based on velocity

    Posted by Arvin Bautista on January 18, 2018 at 3:20 am

    Love Dan Ebbert’s explanation for why wiggle and sine expressions go weird when you keyframe them:
    https://www.motionscript.com/articles/speed-control.html

    However, his solution (the linear keyframe integrator) seems to only work when the frequency is manually keyframed.

    I’m looking to affect frequency automatically based on the layer’s speed, specifically, a “head bob” that bobs more frequently as the camera moves faster. FWIW, the camera’s position will be manually keyframed.

    Obviously I would want the frequency to ramp up/down smoothly.

    Any solutions to this? Thanks!

    Arvin Bautista
    Greasy Pig Studios
    Los Angeles, CA
    https://www.greasypigstudios.com

    Arvin Bautista replied 8 years, 3 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    January 18, 2018 at 7:14 am

    I think you’ll need to combine a couple of techniques. You can use the frame-by-frame integrator (https://www.motionscript.com/articles/speed-control.html#frame-by-frame) to integrate the camera’s speed, using position.speedAtTime(), and then apply some multiple of that total as the time parameter to your wiggle. Should be straightforward (although slow), but I haven’t tried it.

    Dan

  • Arvin Bautista

    January 20, 2018 at 2:21 am

    I think I got it to work, but as you warned in your article, it’s just way too slow to do it using the frame by frame integrator. I’m just going to take the camera’s speed value and convert it to keyframes, and use the linear integrator on that. The camera velocity doesn’t jump around so much that I can run a smoother to reduce the number of keyframes if I wanted, and the wiggle doesn’t have to be 100% accurate, that this is a good enough solution.

    Thanks!

    Next question: is there a way to get an object’s rotation “velocity”? I wanted to link the camera’s Z rotation to the velocity of its Y rotation, in order to simulate a banking/head tilt when the camera turns its head. I’d need it to rotate left or right depending on which way the camera is turning, obviously.

    Arvin Bautista
    Greasy Pig Studios
    Los Angeles, CA
    https://www.greasypigstudios.com

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