Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Using a slider to vary time between keyframes within a loopOut

  • Using a slider to vary time between keyframes within a loopOut

    Posted by Reuben Isaac on October 16, 2013 at 2:43 am

    Hello, I have an animation of a bird flapping its wings in 3D space. The various parts of the bird have 6 or 9 keyframes (depending on the part) on the Y Rotate over 15 frames to create a flap cycle. Each Y Rotate has a loopOut cycle expression so that the single cycle will be repeated.

    What I want to do is create a slider that will increase the duration of the flap cycle in order to easily animate the bird landing and taking off. Is there a way to do this?

    Thanks in advance.

    Reuben Isaac replied 12 years, 7 months ago 3 Members · 6 Replies
  • 6 Replies
  • Mitch Mann

    October 16, 2013 at 12:52 pm

    You could just multiply the time by the slider amount. That would work for using a different speed, but you’d run into weird problems if you animated the slider value.

  • Reuben Isaac

    October 16, 2013 at 1:49 pm

    Well that is what I was intending to do in order to make it slow down.

  • Mitch Mann

    October 17, 2013 at 2:11 pm

    Yeah, the problem there is that when you change a multiple of time with a slider, it’ll give you that new different multiple counted up from the beginning. So it’ll work fine when its always that same number, but when you change it, it’ll recalculate weirdly from the beginning and result in strangely skipping frames. Its not cumulative unfortunately. Maybe Dan has a solution, I don’t know.

  • Reuben Isaac

    October 17, 2013 at 4:33 pm

    I tried doing it a different way by creating a sin wave with the expression below

    freq = 1
    amp = 80
    amp*Math.sin(freq*time*2*Math.PI);

    This creates and oscillating motion which will work for the individual parts of the bird. From here I thought I could simply add the slider to the freq and control it that way. This almost works but yet falls short. If I keyframe the slider so it goes from 0 to 1 it will start with low frequencies and increase to a higher frequency, however, the frequency will be higher than 1. As soon as it hits the 1 keyframe it will level out to the proper frequency.

    Similarly, when dropping from a frequency of 2 to 1 it will start at 2, drop to 0 and then instantly go back up to 1.

    So maybe there is another place to add the slider.

  • Dan Ebberts

    October 17, 2013 at 7:08 pm

    If you haven’t see this, it may help explain what you’re up against:

    https://www.motionscript.com/articles/speed-control.html

    There are solutions, but nothing simple.

    Dan

  • Reuben Isaac

    October 17, 2013 at 9:53 pm

    Dan, I got something for you

    From hence forth you shall be called King Dan, lord of the after effects.

    That solution worked PERFECTLY.

    Thank you so much!

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