Activity › Forums › Adobe After Effects Expressions › InPoint OutPoint based expression
-
InPoint OutPoint based expression
Posted by Federico Ponce on February 12, 2014 at 8:46 pmHello am trying to figure out how to control position and transparency based on the layer’s in and out point. Any pointers would be greatly appreciated!
Thanks
Torben Christensen replied 11 years, 2 months ago 4 Members · 9 Replies -
9 Replies
-
Dan Ebberts
February 12, 2014 at 9:13 pmThat’s a little vague, but maybe this example will help. This is an auto fade-in/fade-out based on in and out points:
fadeDur = .5;
if (time < (inPoint+outPoint)/2)
ease(time,inPoint,inPoint+fadeDur,0,100)
else
ease(time,outPoint-fadeDur,outPoint,100,0)Dan
-
Federico Ponce
February 12, 2014 at 10:42 pmThanks for replying!
What I need is very simple but I can’t seem to figure it out. Basically I want a layer to translate on X in lets say 20 units (ease in) and then translate out (ease out) -20 units. But I want that translate operation to be controlled by the length of the layer so no matter how long the layer is it will always translate the 20 units. Basically I want to learn how to make the in and out points drive Position/Rotation
Thank you!
-
Dan Ebberts
February 12, 2014 at 11:35 pmYou could modify the fade in/out expression to something like this for position:
moveDur = .5;
moveDist = [20,0];
if (time < (inPoint+outPoint)/2)
ease(time,inPoint,inPoint+moveDur,value,value+moveDist)
else
ease(time,outPoint-moveDur,outPoint,value+moveDist,value)Dan
-
Federico Ponce
February 12, 2014 at 11:37 pmThis is what I came up with:
// Fire and Ice present: Accutimer Xposition automator v01xStart = -44.7;
xLand = 324.2;
xEnd = -44.7;t = .2 //Amount of time for animation
landIn = inPoint+t;
landOut = outPoint-t;x = easeOut(time, inPoint, landIn, xStart, xLand);
if (time >= landOut){
x = easeIn(time, landOut, outPoint, xLand, xEnd);
}[x];
-
Federico Ponce
February 12, 2014 at 11:51 pmThanks for replying!
In the expression below, how do I stipulate t with specific number of frames rather than the .2 value
xStart = -44.7;
xLand = 324.2;
xEnd = -44.7;t = .2 //Amount of time for animation
landIn = inPoint+t;
landOut = outPoint-t;x = easeOut(time, inPoint, landIn, xStart, xLand);
if (time >= landOut){
x = easeIn(time, landOut, outPoint, xLand, xEnd);
}[x];
-
Dan Ebberts
February 13, 2014 at 12:22 amsomething like this:
f = 6; // number of frames
t = framesToTime(f);Dan
-
Federico Ponce
February 13, 2014 at 12:28 amthat’s perfect, thank you!
Here is the final code:
// Fire and Ice present: Accutimer Xposition automator v01yStart = 940;
yLand = 864;
yEnd = 940;f = 6; // number of frames
t = framesToTime(f);landIn = inPoint+t;
landOut = outPoint-t;y = easeOut(time, inPoint, landIn, yStart, yLand);
if (time >= landOut){
y = easeIn(time, landOut, outPoint, yLand, yEnd);
}[y];
-
Dmitry Gavriliuk
February 28, 2014 at 12:47 amHello Dan.
This is what I’m looking for!
But how can I do a position movement more smoothly? Now it’s not so EasyIn and EasyOut. Need more influence.
Thanks.xStart = 3200;
xLand = 960;
xEnd = - 1400;f = 10;
t = framesToTime(f);
landIn = inPoint+t;
landOut = outPoint-t;x = easeOut(time, inPoint, landIn, xStart, xLand);
if (time >= landOut){
x = easeIn(time, landOut, outPoint, xLand, xEnd);
}
y = value[1];[x, y];
-
Torben Christensen
March 20, 2015 at 11:53 am[Dan Ebberts] “You could modify the fade in/out expression to something like this for position:
moveDur = .5;
moveDist = [20,0];
if (time < (inPoint+outPoint)/2)
ease(time,inPoint,inPoint+moveDur,value,value+moveDist)
else
ease(time,outPoint-moveDur,outPoint,value+moveDist,value)Dan”
What if I want to control which axis it moves on? In my case, I want it to move on Y-axis instead of X-axis. Thanks.
Reply to this Discussion! Login or Sign Up