Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression to allow keyframing of RATE/SPEED of rotation.

  • Expression to allow keyframing of RATE/SPEED of rotation.

    Posted by Gabriel Aronson on May 17, 2012 at 7:47 pm

    Hi everyone!
    First time posting on creative cow today. I asked this question already in the main forum, but realized this may be a better place to post this… here goes:

    This one’s got me and my colleagues stymied.
    I’m trying to create an expression (keyframable using a slider control) that will animate the speed of rotation on an object.
    The actual rotation value of the object is not as important to me as the RATE of rotation.
    I started something using time multiplied by a slider but my quandary is that when I set my slider to zero, I don’t want my rotation to go back to zero.
    I want it to stop rotating, to hold at that value.
    I tried creating some sort of identity switch using a second slider but got nowhere. Something tells me I’m on the wrong path.

    Any help would be much appreciated!

    Thanks!
    -Gabe

    Gabriel Aronson replied 14 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    May 18, 2012 at 1:56 am

    Unfortunately, there isn’t an easy way to control speed.

    You need to convert your speed control values to total degrees rotated. One way to do that is to integrate (as in calculus) your speed control over time. In practical terms, that means calculating the area under the graph of your speed control. It’s relatively straight-forward (but certainly not trivial) if you limit yourself to linear keyframes.

    If you ease your keyframes, then you’re forced to use the brute-force method of calculating the area under the curve frame-by-frame, which amounts to adding together (for all previous frames) the slider value times the frame duration. The drawback there, of course, is that the farther you get into the comp, the longer the calculation takes at each frame (because you have to look at all previous frames).

    Sorry if you were expecting a simple answer…

    Dan

  • Gabriel Aronson

    May 18, 2012 at 3:01 am

    Thanks Dan!
    I was hoping for a simple answer, but not expecting one, seeing as I couldn’t find anything about it anywhere on the net!

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