-
Creating perfect in and out overshoot or bounce With the text expre’ selector
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!!