Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Absolute Fade-Out

  • Posted by James Murphy on August 22, 2011 at 9:22 pm

    This might have been asked and answered before, but I can’t find it, so I apologize for any redundancy.

    Is there an expression that would allow a layer to fade in/out at the beginning/end, even if I change its length? That way if I duplicate a layer and make it longer or shorter, the fade would stick with it without having to change keyframes.

    Thanks in advance.

    Dan Ebberts replied 14 years, 11 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    August 22, 2011 at 10:02 pm

    This should work. Set fadeInDur and fadeOutDur to the durations you need.


    fadeInDur = 1;
    fadeOutDur = 2;

    if (time < (inPoint+outPoint)/2)
    ease(time,inPoint,inPoint+fadeInDur,0,100)
    else
    ease(time,outPoint-fadeOutDur,outPoint,100,0);

    Dan

  • James Murphy

    August 23, 2011 at 1:26 pm

    Nice. Thanks!

    How do I get it based on frames and not seconds?

  • Dan Ebberts

    August 23, 2011 at 1:54 pm

    This should work:


    fadeInFrames = 15;
    fadeOutFrames = 30;

    fadeInDur = fadeInFrames*thisComp.frameDuration;
    fadeOutDur = fadeOutFrames*thisComp.frameDuration;

    if (time < (inPoint+outPoint)/2)
    ease(time,inPoint,inPoint+fadeInDur,0,100)
    else
    ease(time,outPoint-fadeOutDur,outPoint,100,0);

    Dan

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