Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Clock escapement with expressions

  • Clock escapement with expressions

    Posted by Declan Smith on December 7, 2012 at 2:15 pm

    I’m rapidly going around in circles (as is my cog that I am trying to animate). I want to animate, using expressions, the motion of an escapement mechanism. So I have a pendulum motion which rocks between -5 & +5 degrees. The point at which I want the wheel to move is between -1 and +1 degrees. Each time the pendulum falls in this range I want the wheel to free rotate 20 degrees, then stop until the return journey of the pendulum, then move another 20 degrees and so. So in short I am looking to trigger, move a bit, hold previous value, move a bit, hold etc. I can get the trigger and free rotate working, but not the holding of previous value.

    Declan Smith
    https://www.madpanic.tv
    After Effects CS5.5/ FCS3 / Canon 7D / Canon XL2 / Reason / Cubase

    “it’s either binary or it’s not”

    Declan Smith replied 13 years, 8 months ago 1 Member · 1 Reply
  • 1 Reply
  • Declan Smith

    December 7, 2012 at 2:55 pm

    I’ve solved it. Not sure what I was doing wrong by after walking away and having a large strong coffee, the world righted itself. One of the other issues I was facing was not supply radians to Math.sin which gave me a bit of a headache as well.

    The multiplier for time is 40 as I have two movements per second each of 20 degrees.

    pangle=effect("PendulumSwing")("Angle");
    mtime=time * 40;
    if ( pangle >=-1 & pangle <=1 ) {
    mtime;
    } else {
    Math.round((mtime)/20)*20;
    }

    Declan Smith
    https://www.madpanic.tv
    After Effects CS5.5/ FCS3 / Canon 7D / Canon XL2 / Reason / Cubase

    “it’s either binary or it’s not”

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