ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Movement bounce expression inPoint,outPoint

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Muhammad Mont
Movement bounce expression inPoint,outPoint
on May 3, 2020 at 1:39:27 pm

Can any one one help with expression for position makes object bounce inPoint and outpoint
I have one for scale but can't edit it position
Thanks


Return to posts index

Dan Ebberts
Re: Movement bounce expression inPoint,outPoint
on May 3, 2020 at 11:13:18 pm

What do you have for scale?

Dan



Return to posts index

Muhammad Mont
Re: Movement bounce expression inPoint,outPoint
on May 3, 2020 at 11:26:15 pm

I have this, it's your expression as usual
Want edit it for position , come from out of comp and land with bounce then go out with bounce as well.

rate = 500;
rampDur = value[0]/rate;
freq = 3;
decay = 5;
w = freq*Math.PI*2;

if (time < (inPoint+outPoint)/2){
if (time < (inPoint + rampDur)){
s = linear(time,inPoint,inPoint+rampDur,0,value[0]);
}else{
t = time - (inPoint+rampDur);
s = value[0] + rate*Math.sin(t*w)/Math.exp(t*decay)/w;
}
}else{
if (time > (outPoint - rampDur)){
s = linear(time,outPoint-rampDur,outPoint,value[0],0);
}else{
t = (outPoint - rampDur) - time;
s = value[0] + rate*Math.sin(t*w)/Math.exp(t*decay)/w;
}
}
[s,s]


Return to posts index


Dan Ebberts
Re: Movement bounce expression inPoint,outPoint
on May 3, 2020 at 11:35:37 pm

Something like this maybe:


rate = 500;
rampDur = value[0]/rate;
freq = 3;
decay = 5;
w = freq*Math.PI*2;

if (time < (inPoint+outPoint)/2){
if (time < (inPoint + rampDur)){
x = linear(time,inPoint,inPoint+rampDur,-width/2,value[0]);
}else{
t = time - (inPoint+rampDur);
x = value[0] + rate*Math.sin(t*w)/Math.exp(t*decay)/w;
}
}else{
if (time > (outPoint - rampDur)){
x = linear(time,outPoint-rampDur,outPoint,value[0],thisComp.width+width/2);
}else{
t = (outPoint - rampDur) - time;
x = value[0] + rate*Math.sin(t*w)/Math.exp(t*decay)/w;
}
}
[x,value[1]]


Dan



Return to posts index

Muhammad Mont
Re: Movement bounce expression inPoint,outPoint
on May 3, 2020 at 11:42:01 pm

Really you are an amazing man,
Working like magic,
Thank you very very much 😊


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]