Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions “Inertial Bounce” expression in text layer

  • Dan Ebberts

    October 4, 2011 at 9:45 pm

    The first expression derives its amplitude and timing from the velocity at the most recent keyframe. What would trigger your text animation?

    Dan

  • Peter Zeet

    October 4, 2011 at 9:59 pm

    mm, right now I was testing it on a new comp, just with a text layer… and just animating the x rotation animator (setting it to 90, and then animating the “amount” param.)
    I`m guessing I`m totally mistaken with this approach…

  • Dan Ebberts

    October 4, 2011 at 10:48 pm

    Try setting the x rotation to 90, and keyframing the Amount from 100 to 0 (over about 10 frames). Then apply this Amount expression:


    delay = .1;
    tDelay = delay*textIndex;
    n = 0;
    if (numKeys > 0){
    n = nearestKey(time-tDelay).index;
    if (key(n).time > time) n--;
    }
    if (n == 0){
    t = 0;
    }else{
    t = time - key(n).time - tDelay;
    }

    if (n > 0){
    v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
    amp = .05;
    freq = 4.0;
    decay = 2.0;
    valueAtTime(time-tDelay) + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
    }else{
    value;
    }

    See if that gets you close.

    Dan

  • Peter Zeet

    October 4, 2011 at 11:10 pm

    wo! it works like a charm, many thanks!!

  • Derek Deal

    February 3, 2012 at 5:46 pm

    this thread has been insanely useful!

    I am having an issue with Dan’s solution though where the characters are reacting before the peak of their action. Especially if the amplitude is higher than say 1. Any ideas on why that would be?

  • Paul Belliveau

    December 12, 2012 at 6:38 pm

    Hi Dan,

    I’m trying to duplicate this effect and when I drop in the script I get an error:

    “Class ‘global’ has no property or method named ‘textIndex'”

    Any suggestions? Thanks!
    P

  • Dan Ebberts

    December 12, 2012 at 7:34 pm

    Did you apply the expression to the Amount property of an Expression Selector? That’s the only place it will work.

    Dan

  • Paul Belliveau

    December 12, 2012 at 11:17 pm

    That’s the part that tripped me up. Got it now. Thanks, Dan!

  • Andres Torres

    May 21, 2015 at 4:54 pm

    I agree..this expression is insanely useful!

    I’d like to alter the expression to begin with the last letter and end
    on the first letter.

  • Eduardo Oliveira

    February 24, 2016 at 5:23 pm

    i have managed to find the problem in the expression. the corrected version should be like this:

    delay = .1;
    tDelay = delay*textIndex;
    n = 0;
    if (numKeys > 0){
    n = nearestKey(time-tDelay).index;
    if (key(n).time > time) n--;
    }
    if (n == 0){
    t = 0;
    }else{
    t = time - key(n).time;
    }

    if (n > 0){
    v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
    amp = .05;
    freq = 1.0;
    decay = 2.0;
    valueAtTime(time-tDelay) + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
    }else{
    value;
    }

Page 2 of 3

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