Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Bounce out expression needed

Tagged: 

  • Bounce out expression needed

    Posted by Khalil Chikh on July 13, 2025 at 9:05 am

    Hi all,
    I am looking for bouncing back or bounce out expression, I already have bounce in expression which good, but I need one for bouncing out
    this is the one I am using for bounce in

    amp = .1;

    freq = 2.0;

    decay = 5.0;

    n = 0;

    time_max = 4;

    if (numKeys > 0){

    n = nearestKey(time).index;

    if (key(n).time > time){

    n–;

    }}

    if (n == 0){ t = 0;

    }else{

    t = time – key(n).time;

    }

    if (n > 0 && t < time_max){

    v = velocityAtTime(key(n).time – thisComp.frameDuration/10);

    value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);

    }else{value}

    Thank you

    Dan Ebberts
    replied 9 months, 3 weeks ago
    2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    July 13, 2025 at 9:50 pm

    That one is difficult to run backwards (if that’s what you meant) because there’s no definite end point, but maybe something like this would be useful:

    val = value;
    if (numKeys > 1){
    n = nearestKey(time).index;
    if (key(n).time > time) n--;
    if ((n > 0) && (n < numKeys)){
    d = key(n+1).time-key(n).time;
    dv = key(n+1).value-key(n).value;
    t = (time-key(n).time)/d;
    val = key(n).value + dv*t*t*(2.70158*t - 1.70158);
    }
    }
    val

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