Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How to start animation at last letter with Amortype 2.0 ??

  • How to start animation at last letter with Amortype 2.0 ??

    Posted by Guido Giardino on February 16, 2017 at 2:36 pm

    Is there a way to start the animation from the last letter?? Invert the sequence of the letters order like the “Shape: Ramp up/down” of the range selector does?

    My problem is that when I only set the position X in the preset, the animation is different when the position X has a positive number than when is negative.

    Please help!

    Many thanks!

    freq = effect("Frequency")("ADBE Slider Control-0001");
    decay = effect("Decay")("ADBE Slider Control-0001");
    if(effect("Random Time")("ADBE Checkbox Control-0001")==0){
    retard = textIndex*thisComp.frameDuration*effect("Offset")("ADBE Slider Control-0001");
    }else{
    seedRandom(index*textIndex,timeless=true);
    retard = random(0,1);}
    t = time - (inPoint + retard);
    startVal = [100,100,100];
    endVal = [0,0,0];
    duration = effect("Duration")("ADBE Slider Control-0001");
    if (t < duration){
    linear(t,0,duration,startVal,endVal);
    }else{
    amp = (endVal - startVal)/duration;
    w = freq*Math.PI*2;
    endVal + amp*(Math.sin((t-duration)*w)/Math.exp(decay*(t-duration))/w);
    }

    Ilya Sire replied 7 years, 3 months ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    February 16, 2017 at 5:39 pm

    I think you could add a new variable, like this at the top of the expression:

    idx = textTotal – textIndex + 1;

    and then replace textIndex with idx in the rest of your expression.

    Dan

  • Guido Giardino

    February 16, 2017 at 8:15 pm

    HI! If somebody needs the answer for this post, Dan Ebberts solve the issue!! I want him to be my best friend forever!

    By accident I click on “report post” and his answer gone away!

    Many thanks, Dan! Amazing!!

    idx = textTotal - textIndex + 1
    freq = effect("Frequency")("ADBE Slider Control-0001");
    decay = effect("Decay")("ADBE Slider Control-0001");
    if(effect("Random Time")("ADBE Checkbox Control-0001")==0){
    retard = idx*thisComp.frameDuration*effect("Offset")("ADBE Slider Control-0001");
    }else{
    seedRandom(index*idx,timeless=true);
    retard = random(0,1);}
    t = time - (inPoint + retard);
    startVal = [100,100,100];
    endVal = [0,0,0];
    duration = effect("Duration")("ADBE Slider Control-0001");
    if (t < duration){
    linear(t,0,duration,startVal,endVal);
    }else{
    amp = (endVal - startVal)/duration;
    w = freq*Math.PI*2;
    endVal + amp*(Math.sin((t-duration)*w)/Math.exp(decay*(t-duration))/w);
    }

  • Ilya Sire

    February 3, 2019 at 1:52 pm

    Hi,
    Thank you for this question and solution,
    i just found this post which is start from left or random,
    How can i start it from the center?

    Thanks

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