Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Analog clock with inertial bounce on second hand

  • Analog clock with inertial bounce on second hand

    Posted by Adhish Yajnik on October 31, 2013 at 12:33 am

    Hi everyone,

    I’ve got an analog clock with an expression to make the seconds hand ‘tick’ every second. I’d like to add an inertial bounce to the motion of the seconds hand, but can’t seem to make any of the bounce expressions on the web work with a property that’s being driven by expressions rather than keyframes.

    Any idea how I might be able to give the seconds hands a little bounce every time it ticks without having to keyframe the ticking of the seconds hand itself?

    Thanks!

    wholeSecond = Math.floor(time);
    rotateDuration = 0.05;
    anglePerSecond = 6; // 360 / 60
    startAngle = wholeSecond * anglePerSecond;
    linear(time, wholeSecond + 0.95, wholeSecond + 1, startAngle, startAngle + anglePerSecond);

    Jason Jantzen replied 12 years, 1 month ago 4 Members · 3 Replies
  • 3 Replies
  • Declan Smith

    October 31, 2013 at 12:36 pm

    I did a similar thing on the clock hand of my VTClock tutorial. The expression below is the rotation control for the second hand. The second hand only moves on the whole second, but overshoots by a small amount, then one frame later, goes back to where it’s supposed to be. I converted time to frames to control this. Note that you may need to change the statements to suit your own frame rate:

    ttf=timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false);
    compFrameRate=25;
    angle=Math.floor(ttf/compFrameRate)*6;
    if (ttf % compFrameRate == 0) {
    angle+=.5;
    } else if (ttf % compFrameRate ==1) {
    angle-=.5;
    }

    Declan Smith
    https://www.madpanic.tv
    After Effects CS6/ FCS3 / Canon XLH1 / Canon 7D / Reason / Cubase

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

  • Gerard Bowden

    October 31, 2013 at 2:24 pm

    Thanks for this, I was struggling to figure this out.

  • Jason Jantzen

    April 3, 2014 at 10:52 pm

    Hey Declan, I love this expression, but is there a way to have it start at the layer in point and stop at the layer out point? I’m having a tough time with a particular comp that has a lot of expressions and splitting layers just screws things up.

    Jason Jantzen
    vimeo.com/jasonj

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