Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How to “un-synchronize” a bunch of “jack-in-the-boxes”

  • How to “un-synchronize” a bunch of “jack-in-the-boxes”

    Posted by Sean Siegler on May 2, 2008 at 6:44 pm

    So I am trying to make some text “bounce” on screen, using Dan Ebberts “Jack-in-the-box” expression:

    veloc = 35;
    amplitude = 30;
    decay = 1.0;
    y = amplitude*Math.cos(veloc*time)/Math.exp(decay*time);
    value + [0,y]

    It works just fine (bounce-wise), however, I am applying this to to about 12 lseperate ayers of text, with each layer appearing 5 frames after the previous one.
    I want each layer to bounce in relation to when they appear on screen, however, in this instance, they are all bouncing in synch, as if they were one layer.

    I have tried tweaking this script and the only way I can get them to not all bounce together is to change the decay. However, that doesn’t really work because I want them to have the same motion, just not at the same time.

    I am guessing this is pretty easy to fix, but I can’t seem to get it, so I am here to ask the experts!

    Any advice?

    Thanks!

    Sean Siegler replied 18 years, 3 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    May 2, 2008 at 7:24 pm

    Do the text layers have different in points? If so, this should work:

    veloc = 35;
    amplitude = 30;
    decay = 1.0;
    t = time – inPoint;
    y = amplitude*Math.cos(veloc*t)/Math.exp(decay*t);
    value + [0,y]

    Dan

  • Sean Siegler

    May 2, 2008 at 7:51 pm

    Yes they do all have different in points, and yes this works!

    I just thought I’d note here that the 1st version you posted (which I got in am email from CC) with this line,

    y = amplitude*Math.cos(veloc*(time-inPoint))/Math.exp(decay*time);

    certainly did the trick.

    However, the version that was posted with this bit,

    t = time – inPoint;
    y = amplitude*Math.cos(veloc*t)/Math.exp(decay*t);

    also works, but makes the bounce much much larger (along the y axis).

    I had tried using “(time-inPoint)” myself, but couldn’t figure out where to put it. Thanks for the help. This clears up much and explains even more.

    -Sean

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