Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Posted by Sonia Li on September 5, 2017 at 9:47 pm

    Hi everyone! I’m new at using expressions and After Effects, so bear with me here.

    I am having trouble figuring out how to use the speed expression. I have a Math.sin(time)*10 expression that someone kindly helped me with, and I’d like to add speed to the animation. Currently, the animation moves back and forth in a limited range, but I cannot change the speed without keyframe. I’d like to avoid keyframe to gain more flexibility.

    Would love some pointers. Thanks so much!

    Best,
    Sonia

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

    September 5, 2017 at 10:23 pm

    If you just want to be able to set the speed to some other value, you could do something like this:

    s = effect(“Slider Control”)(“Slider”);
    Math.sin(time*s)*10

    where setting the slider to 5, for example, would make it oscillate 5 times as fast.

    If you want to animate the speed, that’s a more difficult issue, and you should probably check this out:

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

    Dan

  • Sonia Li

    September 6, 2017 at 6:41 pm

    Dan, thanks so much for this! I tried putting the expression into Rotation but it gave me an error. Sorry, please bear with me, I’m very new at this. Not sure where I can put in this expression. Thanks again!

  • Dan Ebberts

    September 6, 2017 at 6:46 pm

    That expression is for the Position property.

    Dan

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