Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How can i Easy Ease my Keyframes in Bounce expression ?

  • How can i Easy Ease my Keyframes in Bounce expression ?

    Posted by Ashraf Khan on November 22, 2017 at 12:53 am

    Below is the bounce ball expression, how can i easy ease keyframes at the end ?

    Expression:

    e = .9;
    g = 3000;
    nMax = 5;

    n = 0;
    if (numKeys > 0){
    n = nearestKey(time).index;
    if (key(n).time > time) n–;
    }
    if (n > 0){
    t = time – key(n).time;
    v = -velocityAtTime(key(n).time – .001)*e;
    vl = length(v);
    if (value instanceof Array){
    vu = (vl > 0) ? normalize(v) : [0,0,0];
    }else{
    vu = (v < 0) ? -1 : 1;
    }
    tCur = 0;
    segDur = 2*vl/g;
    tNext = segDur;
    nb = 1; // number of bounces
    while (tNext < t && nb <= nMax){
    vl *= e;
    segDur *= e;
    tCur = tNext;
    tNext += segDur;
    nb++
    }
    if(nb <= nMax){
    delta = t – tCur;
    value + vu*delta*(vl – g*delta/2);
    }else{
    value
    }
    }else
    value

    Ashraf Khan replied 8 years, 5 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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