ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Reverse Adobe expression at the end of the comp

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Maëlle Jumel
Reverse Adobe expression at the end of the comp
on Aug 23, 2017 at 9:38:56 pm

Hello!
I have this text expression to make the text appear smoothly. I would like for the text to go back as it went in. At first I thought I could just duplicate the layer and reverse it. But I'm certain it's possible to do this with the expression, so here I am posting to ask if anyone knows how to do this ☺ Thank you!

delay = .1;
myDelay = delay*textIndex;
t = (time - inPoint) - myDelay;
if (t >= 0){
freq =2;
amplitude = 100;
decay = 8.0;
s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);
[s,s]
} else {
value
}


Asus Windows 10 PC
Intel Core i5 6300HQ CPU 2.30GHZ
RAM 8GB
Nvidia GeForce GTX 960M
After Effect CC 2014 13.0.0.214


Return to posts index

Dan Ebberts
Re: Reverse Adobe expression at the end of the comp
on Aug 23, 2017 at 10:08:05 pm

Play around with this:


delay = .1;
myInDelay = delay*textIndex;
myOutDelay = delay*(textTotal -textIndex + 1);
tStart = inPoint + myInDelay;
tStop = outPoint - myOutDelay;
if ((time < tStart) || (time > tStop)){
t = 0;
}else{
if (time < (tStart + tStop)/2){
t = time - tStart;
}else{
t = tStop - time;
}
}
freq =2;
amplitude = 100;
decay = 8.0;
s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);
[s,s]



Dan



Return to posts index

Maëlle Jumel
Re: Reverse Adobe expression at the end of the comp
on Aug 24, 2017 at 3:39:01 pm

Thank you Dan, this totally did the trick! Sorry I'm a newbie, could you tell me what the t represents in the expression? I understand the basics of JS

Asus Windows 10 PC
Intel Core i5 6300HQ CPU 2.30GHZ
RAM 8GB
Nvidia GeForce GTX 960M
After Effect CC 2014 13.0.0.214


Return to posts index


Dan Ebberts
Re: Reverse Adobe expression at the end of the comp
on Aug 24, 2017 at 5:20:12 pm

For the in animation, t represents the time elapsed since the start of the animation. For the out animation, t represents the time remaining.

Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]