Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Y rotation incrementally

  • Y rotation incrementally

    Posted by Criis Daw on January 22, 2007 at 2:55 pm

    I havent really got a clue about how to do this , although i know it must be simple all my somewhat impotent attempts have failed. It seems a perfect situation for using a simple expession (and learning a little about how to write them ) if any kind soul is prepared to help me.
    Here goes.

    I have a Character in 3D which i want to rotate by -180 on the y axis (revealing the character behind it). The rotation is over say 5 frames. Then I wish to hold this postion for 15 frames and rotate through -180 again.Then hold then rotate for about 10 seconds on total . Whilst it would be easy to keyframe it manually adding -180 each time it seem ideal for writing an expression, BUT how ??????

    Thanks

    MP

    Criis Daw replied 19 years, 3 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    January 22, 2007 at 3:52 pm

    How about just keyframe one complete cycle and then use a loopOut(“cycle”) expression?

    Dan

  • Criis Daw

    January 22, 2007 at 4:15 pm

    DOH !!!

    thanks Dan, sometimes it just seems more fun to overcomplicate things.

    Loop out cycle works fine. But if say my complete rotation was in smaller increments how could i save myself the keyframing. I lokked at the answers below to animating the hand of a clock but it didnt help me much.

    Anyway many thanks

    Chris

  • Dan Ebberts

    January 22, 2007 at 5:09 pm

    OK – say you wanted it to rotate -30 over 5 frames, hold hold 15 frames, repeat forever. Something like this should do the trick:

    rotateAmount = -30;
    rotateFrames = 5;
    holdFrames = 15;
    f = Math.round(time/thisComp.frameDuration);
    period = Math.floor(f / (rotateFrames + holdFrames))
    phase = f%(rotateFrames + holdFrames);
    rotateAmount * period + linear(phase,0,rotateFrames,0,rotateAmount)

    Dan

  • Criis Daw

    January 22, 2007 at 5:57 pm

    Thank you very much

    i will look into this

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