Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Creating perfect in and out overshoot or bounce With the text expre’ selector

  • Creating perfect in and out overshoot or bounce With the text expre’ selector

    Posted by boaz halperin on August 28, 2024 at 7:08 pm

    Hi everybody, i recently started to build personal presets for text animators based on in and out of the layer, my aim is to create just throw and go preset that you just pick a value for the animator and it works by itself well i made it succefully till i got to the overshoot in the expression selector,

    based on the expressions from motion script site (https://www.motionscript.com/articles/bounce-and-overshoot.html) i used dan’s expression technic and it works just fine with some sliders i added to manually control every effect to each layer, so till now everything work great

    but! since i want to also make that the same effect will take allso the layer out in animation i wonder how can i work it out with the same expression

    well it works by a decaying synwave

    This is the expression:

    freq = effect(“Speed”)(“Slider”);

    decay = effect(“decay”)(“Slider”);

    maxDelay =effect(“delay”)(“Slider”);

    delayAddOn=effect(“delay”)(“Slider”)

    seedRandom(textIndex+delayAddOn,true);

    myDelay =textIndex/(0.1+maxDelay);

    t = time – (inPoint + myDelay);

    startVal = [100,100];

    endVal = [0,0];

    dur = 0.2;

    if (t < dur){

    linear(t,0,dur,startVal,endVal);

    }else{

    amp = (endVal – startVal)/dur;

    w = freq*Math.PI*2;

    endVal + amp*(Math.sin((t-dur)*w)/Math.exp(decay*(t-dur))/w);

    }

    now i tried to reverse it by changing the last line instead of making the math.exp divided i made it double like this (and offcourse changed the end value and the start value and changing the inpoint to outpoint like THIS:

    freq = effect(“Speed”)(“Slider”);

    decay = effect(“decay”)(“Slider”);

    maxDelay =effect(“delay”)(“Slider”);

    delayAddOn=effect(“delay”)(“Slider”)

    seedRandom(textIndex+delayAddOn,true);

    myDelay =textIndex/(0.1+maxDelay);

    t = time – (outPoint – myDelay);

    endVal = [100,100];

    startVal = [0,0];

    dur = 0.2;

    if (t < dur){

    linear(t,0,dur,startVal,endVal);

    }else{

    amp = (endVal – startVal)/dur;

    w = freq*Math.PI*2;

    endVal + amp*(Math.sin((t-dur)*w)*Math.exp(decay*(t-dur))/w);

    }

    and well it works! BUT the sywave and the end doesnt stop working!! and the animation just disapears as the layer outpoint reaches, are there and ideas how to make the synwave get to the first value without having endless movement? Thanks ahead alot!!

    Dan Ebberts replied 1 week, 4 days ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    August 28, 2024 at 7:41 pm

    This might not be exactly what you’re looking for, but it might be helpful. If I was going to modify the animated text overshoot example on my site to animate out at the out point, I’d change this:

    freq = 2;
    decay = 5;
    delay = .15;
    dur = .12;
    myDelay = (textIndex-1)*delay;
    t = time - (inPoint + myDelay);
    startVal = 100;
    endVal = 0;
    if(t < dur){
    linear(t,0,dur,startVal,endVal);
    }else{
    amp = (endVal - startVal)/dur;
    w = freq*Math.PI*2;
    endVal + amp*(Math.sin(t*w)/Math.exp(decay*t)/w);
    }

    to this:

    freq = 2;
    decay = 5;
    delay = .15;
    dur = .12;
    startVal = 100;
    endVal = 0;
    if (time < (inPoint + outPoint)/2){
    myDelay = (textIndex-1)*delay;
    t = time - (inPoint + myDelay);
    }else{
    myDelay = (textTotal-textIndex)*delay;
    t = outPoint - (time + myDelay) - thisComp.frameDuration;
    }
    if(t < dur){
    linear(t,0,dur,startVal,endVal);
    }else{
    amp = (endVal - startVal)/dur;
    w = freq*Math.PI*2;
    endVal + amp*(Math.sin(t*w)/Math.exp(decay*t)/w);
    }

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