Skip to main content
Participant
December 9, 2021
Answered

Reverse this expression on Type

  • December 9, 2021
  • 2 replies
  • 385 views

I folowed this ( https://www.youtube.com/watch?v=LRazU7uNgD0 ) tutorial which allowed me to get a really nice bouncy text animation using this expression:

 

freq = 1;
decay = 7;
duration = 0.10;
retard = textIndex*thisComp.frameDuration*2;
t = time - (inPoint + retard);
startVal = [100,100,100];endVal = [0,0,0];
if (t < duration){
linear(t,0,duration,startVal,endVal);
}else{
amp = (endVal - startVal)/duration;
w = freq*Math.PI*2;
endVal + amp*(Math.sin((t-duration)*w)/Math.exp(decay*(t-duration))/w);}

 

I wondered if it's possible to start the animation from the end of the text and not the start and speed up the animation.

I have attached an example below - I want the bottom line to start from the 'g' and go in just like the top line starts from the 'a' and goes in. 

 

 

Appreciate any input. 

 

 

This topic has been closed for replies.
Correct answer Dan Ebberts

To get it to go backwards, I think you just need to change this line:

retard = textIndex*thisComp.frameDuration*2;

to this:

retard = (textTotal-textIndex)*thisComp.frameDuration*2;

 

2 replies

Dan Ebberts
Community Expert
Dan EbbertsCommunity ExpertCorrect answer
Community Expert
December 9, 2021

To get it to go backwards, I think you just need to change this line:

retard = textIndex*thisComp.frameDuration*2;

to this:

retard = (textTotal-textIndex)*thisComp.frameDuration*2;

 

Participant
December 11, 2021

That worked great.

Thank you.

Mylenium
Legend
December 9, 2021

Simply revert the text animator or change the t variable to reference the end time by ways of outPoint-retard or something like that. Speeding up the animation simply depends on the parameters defined at the beginning for decay, frequency and duration (per character). Simply play around with them.

 

Mylenium