Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Reverse Adobe expression at the end of the comp

  • Reverse Adobe expression at the end of the comp

    Posted by Maëlle Jumel on August 23, 2017 at 9:38 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

    Niek De korte replied 8 years, 5 months ago 3 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    August 23, 2017 at 10:08 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

  • Maëlle Jumel

    August 24, 2017 at 3:39 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

  • Dan Ebberts

    August 24, 2017 at 5:20 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

  • Niek De korte

    March 5, 2018 at 2:32 pm

    Hi Dan,

    I’m trying to figure out how this expression would work on lets say the scale or position of a regular layer, but I can’t seem to find a solution. Do you have any suggestions?

    Regards, Niek

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