ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Text Auto Fade Out Expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Natalie Jane
Text Auto Fade Out Expression
on Jul 9, 2018 at 4:39:11 pm

Hello Creatives,

Hopefully a simple expression help request! I often use text expressions to have text fade on, either with Characters, Words or Lines as set by the Based On drop-down, from the layer in point with a delay function to control the speed of that (example further below).

However, I'm stuck on how to then have an the text fade out too based on the layer out point, ideally as a separate expression so I can set the Based On to something other (typically Lines). Any suggestions greatly appreciated!

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


Return to posts index

Kalleheikki Kannisto
Re: Text Auto Fade Out Expression
on Jul 10, 2018 at 6:48:41 am

There's a lot of code there that has nothing to do with a simple fade, rather meant for a bouncy animation.

A simple fade at the end point of a text layer could be achieved like this (expression selector):

fadetime = 1; // how long an individual letter takes to fade out
delay = .04; // the delay between consecutive letters fade
myDelay = 1*fadetime+delay*textIndex; // calculate the delay for current letter
t = (time - outPoint) + myDelay; // relative time value for current letter
t*(100/fadetime) // final selection percentage value


Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Natalie Jane
Re: Text Auto Fade Out Expression
on Jul 10, 2018 at 8:15:18 am

Thanks for that Kalleheikki, that works for me! Yes, it was indeed an adaptation from a text bounce expression.

One thing I'd like added to this expression is an ease out, would you happen to know a way to achieve that? Whilst fine, currently the text fades out a little too sharply at the start.


Return to posts index


Kalleheikki Kannisto
Re: Text Auto Fade Out Expression
on Jul 10, 2018 at 5:52:26 pm

The fade should ease if you take out the last line and replace with

linear_t=t*(100/fadetime); // final selection percentage value in linear scale
ease(linear_t, 0, 100, 0, 100) // final selection percentage value eased


Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Natalie Jane
Re: Text Auto Fade Out Expression
on Jul 11, 2018 at 10:37:11 am

Thank you so much Kalleheikki, that works a treat, much obliged! 😄


Return to posts index

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