Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Text scaling overshoot

  • Text scaling overshoot

    Posted by Mil Malchiodi on January 29, 2014 at 6:26 pm

    I’m trying to animate a text, that have to scale up from 0 to 100 percent. I want each character to scale sequentially (first the number one, then numer two….). Is there an expression for it?

    I think that the expression I need it’s between this one:

    freq = 3;
    decay = 5;
    t = time – inPoint;

    startVal = [0,0];
    endVal = [100,100];
    dur = 0.1;
    if (t < dur){
    linear(t,0,dur,startVal,endVal);
    }else{
    amp = (endVal – startVal)/dur;
    w = freq*Math.PI*2;
    endVal + amp*(Math.sin((t-dur)*w)/Math.exp(decay*(t-dur))/w);
    }

    and this one:

    freq = 3;
    decay = 5;
    maxDelay = 1.0;

    seedRandom(textIndex,true);
    myDelay = random(maxDelay);
    t = time – (inPoint + myDelay);
    startVal = [100,100];
    endVal = [0,0];
    dur = 0.1;
    if (t < dur){
    linear(t,0,dur,startVal,endVal);
    }else{
    amp = (endVal – startVal)/dur;
    w = freq*Math.PI*2;
    endVal + amp*(Math.sin((t-dur)*w)/Math.exp(decay*(t-dur))/w);
    }

    The first one gave me scale, but all characters scale at the same time, and the second one, it’s not correct, ’cause I don’t need it to be random.

    Sorry if you already talk about this in the forum, but I didn’t find it.
    Thanks a lot

    -MiL-

    Mil Malchiodi replied 12 years, 3 months ago 2 Members · 3 Replies
  • 3 Replies
  • Mil Malchiodi

    January 29, 2014 at 7:58 pm

    Hey George! First of all, thanks so much for the help!

    I did what you told me, we are closer to what I want, but not exactly.
    I animated the scale (animator scale) from 0 to 100. Once I paste the expression, even if it says “0” the first keyframe starts before 0.

    I changed a few values of the expression, but didn’t find the way to start in 0.
    The layer inpoint it’s at the first keyframe. Hope the image helps.

    -MiL-

  • George Goodman

    January 29, 2014 at 8:11 pm

    Sorry, previous post I made was wrong.

    I think this is what you’re looking for:

    Add a scale animator to your text
    Add an expression selector
    Delete the range selector
    Set the scale of the animator to 0
    Keyframe the amount from 100-0
    Add the expression to the amount

    Play with the position of the keyframes and the values in the expression to get thedesired results

    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 = 2.0;
    decay = 2.0;
    valueAtTime(time-tDelay) + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
    }else{
    value;
    }

    “|_ (°_0) _|”

    Sincerely,

    George

  • Mil Malchiodi

    January 29, 2014 at 8:38 pm

    Cool!!!
    The last one was the correct one!

    Thanks sooo much George!!

    -MiL-

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