Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions bounce text effect

  • bounce text effect

    Posted by Ermal Koci on December 18, 2017 at 6:06 pm

    Hello,

    I was looking at the bounce code from Dan, and couldn’t wrap my head around it (maybe mr. Dan should make an extensive tutorial about expressions like these)
    the expressions takes the value from layer keys and bounces that value back.
    How do you convert this expression so that it doesn’t use keys but text Amount values from text “Animators”?

    Thanks.

    e =0.7;
    g = 3000;
    nMax = 12;

    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(startVal )*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

    Ermal Koci replied 8 years, 6 months ago 2 Members · 2 Replies
  • 2 Replies
  • Andrei Popa

    December 19, 2017 at 8:13 am

    Is this what you are looking for?
    delay = .03;
    myDelay = delay*textIndex;
    t = (time - inPoint) - myDelay;
    if (t >= 0){
    freq =3;
    amplitude = 100;
    decay = 6.0;
    s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);
    [s,s]
    }else{
    value
    }

    The expression is not mine, I have it from a project I bought a long time ago, so I guess its an anonimous author.

    Andrei
    My Envato portfolio.

  • Ermal Koci

    December 26, 2017 at 4:45 pm

    Yeah,
    I have seen this script before. Problem is that this is not exactly bounce, is more an “overshoot” effect. Bounce should bounce to an invisible plane and return, with the frequency going smaller until it stops.
    Thanks.

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