Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Need an expression for a hand clock that start in a regular speed, then start to speed up

  • Need an expression for a hand clock that start in a regular speed, then start to speed up

    Posted by Avi Granit on November 6, 2013 at 9:36 pm

    I find it hard to find a specific expression for this kind of clock, that will start running on a regular speed then will start speeding up till its goes crazy fast. I want to make hands for all three parameters – hour,minute and second. would be awesome if anyone can help!! THANKS!!!!!!

    Xavier Gomez replied 12 years, 10 months ago 2 Members · 1 Reply
  • 1 Reply
  • Xavier Gomez

    November 8, 2013 at 5:40 pm

    Hello,
    You should tell more about the animation duration, the time range of your clock etc…
    I think the easier way to do it is to add a slider control that will represent the clock time in seconds, animate it from time_min to time_max with few key frame as you wish, then pickwhip that slider to your text and convert the number in seconds to a string hh:mm:ss using a similar expression as for a normal clock.

    Another possibility is to make a normal clock (apparently you have an expression for that), precomp and time remap, but that may generate some blur.

    If you absolutely want an expression that does everything you can use something like this:

    function f(x){ x=x.toString(); while (x.length<2) x="0"+x; return x;};

    startTime_display=0,
    startTime_ae=inPoint,
    t=time-startTime_ae;
    a= 0.1, b=0.5, c=0.8;
    t= startTime_display + t*(1+a+ t*(b+c*t));

    hh = Math.floor(t/3600);
    t-=hh*3600;
    hh=f(hh);

    mm = Math.floor(t/60);
    t-=mm*60;
    mm = f(mm);

    ss = f(Math.round(t));

    hh + ":"+ mm + ":" + ss;

    But it might be difficult to find the correct values for a,b,c (small positive nubers) to obtain what you want. All of them zero gives a normal speed clock.

    Xavier.

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