Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Bounce 3D layer at specific time

  • Bounce 3D layer at specific time

    Posted by Erik Lingerfelt on July 20, 2014 at 4:09 pm

    Hello Dan, everybody…

    It’s been a while since I’ve been here…

    So, I’ve searched all over and tried several expressions to do what I want, but it just doesn’t work.

    I got Dan’s Bounce with (his also) timeToStart I found around here, but the layer it’s attached to (position) won’t budge.
    I trie using the inPoint option also, and dragging the layer to show at 2 seconds – for which I removed all the “time” options, leaving only the raw Bounce expression… and still it doesn’t move. What I notice is that the expression starts over at 0 and by the time it get’s to 2 seconds, THEN I see a little movement.

    I hope I was clear on this.
    What can I do ?

    Thanks.
    Erik

    timeToStart = 2;
    t = time - timeToStart;
    if (t > 0){
    veloc = 10;
    amplitude = 700;
    decay = 5.0;
    y = amplitude*Math.cos(veloc*time)/Math.exp(decay*time);
    value + [0,y,0]
    }else
    value;

    Erik Lingerfelt replied 11 years, 9 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    July 20, 2014 at 4:33 pm

    Try changing this line:

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

    to this:

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

    Dan

  • Erik Lingerfelt

    July 20, 2014 at 4:42 pm

    Hummmmm, yes! Thanks Dan!
    That worked for the bounce at set time.

    Now, as predicted, I need the layer to stay off screen until the bounce kicks in.

    I tried setting the last line to a value offscreen, but didn’t work…. 🙁

    Erik

  • Dan Ebberts

    July 20, 2014 at 5:40 pm

    Does the starting/maximum amplitude value put it off screen? If so, this should be all you need:

    timeToStart = 2;
    t = Math.max(time – timeToStart,0);
    veloc = 10;
    amplitude = 700;
    decay = 5.0;
    y = amplitude*Math.cos(veloc*t)/Math.exp(decay*t);
    value + [0,y,0]

    Dan

  • Erik Lingerfelt

    July 20, 2014 at 5:43 pm

    Yes, indeed!

    What a cleanup in the code, huh ? 🙂 NICE!
    All I needed was the timetostart line…

    Thanks a lot, Dan. You ARE the one! 😀

    Erik

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