Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions InPoint OutPoint based expression

  • InPoint OutPoint based expression

  • Federico Ponce

    February 12, 2014 at 8:46 pm

    Hello 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

  • Dan Ebberts

    February 12, 2014 at 9:13 pm

    That’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 pm

    Thanks 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 pm

    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

  • Federico Ponce

    February 12, 2014 at 11:37 pm

    This is what I came up with:

    // Fire and Ice present: Accutimer Xposition automator v01

    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];

  • Federico Ponce

    February 12, 2014 at 11:51 pm

    Thanks 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 am

    something like this:

    f = 6; // number of frames
    t = framesToTime(f);

    Dan

  • Federico Ponce

    February 13, 2014 at 12:28 am

    that’s perfect, thank you!

    Here is the final code:

    // Fire and Ice present: Accutimer Xposition automator v01

    yStart = 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 am

    Hello 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.

Viewing 1 - 10 of 10 posts

Log in to reply.

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