Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Text Auto Fade Out Expression

  • Text Auto Fade Out Expression

    Posted by Natalie Jane on July 9, 2018 at 4:39 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
    }

    Natalie Jane replied 7 years, 10 months ago 2 Members · 4 Replies
  • 4 Replies
  • Kalleheikki Kannisto

    July 10, 2018 at 6:48 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

  • Natalie Jane

    July 10, 2018 at 8:15 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.

  • Kalleheikki Kannisto

    July 10, 2018 at 5:52 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

  • Natalie Jane

    July 11, 2018 at 10:37 am

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

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