Expression to scale text, by word with selector, with an inertial scale bounce.


#1

I’m semi new to the expression game. I’ve frankensteined some expressions together but am at a complete loss how I can get them working with my range selector so I can animate the effect per word. Below is where I’ve gotten the expression thus far. Essentially, I’m making an ae template that will be used for the intro of several projects. I need to have one line of text 3-6 words that will scale up from the base of each word in sequential order. Each word also needs to have an inertial scale bounce to it.

In other words, the word is scaled up from 0% to 120% then bounces back down to 100%. Then the next words in the sentence. Since this is a template for an ongoing project I’m unsure of how many words each sentence will have. As mentioned it will be under 6.

Any help would be greatly appreciated!!

    freq =3; 
    amplitude = -100; 
    decay = 5; 
    
    s = amplitude*Math.cos(freq*time*2*Math.PI)/Math.exp(decay*time);
    scale + [s,s]

#2

Got some help from Dan on CreativeCow

Try this. Add a Scale Animator and set its Scale value to 0. Add an Expression Selector and delete the Range Selector. Set the Expression Selection Based On property to Words. Use this expression for the Amount property:


freq = 3;
decay = 7;
delay = .15;
dur = .07;

myDelay = (textIndex-1)*delay;
t = time - (inPoint + myDelay);
startVal = 100;
endVal = 0;

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