Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression that automates to duration

  • Expression that automates to duration

    Posted by Win Edson on February 27, 2023 at 4:10 pm

    Hi everyone,

    I’m trying to create a mogrt in After Effects (for use in Premiere) where text animates on via the Y axis, and then animates off on the Y axis. Basic stuff.

    But I don’t want to create controls that enable the user to type in numbers for when this will happen. I want it to automate to the length of the mogrt in the timeline. So the animate in always occurs at the start, and the animate out always occurs at the end of mogrt clip. Does this make sense?

    The users of this template have requested not to have to type in duration times, they just want to pull the mogrt to the size they want.

    I’m hoping there’s an expression that can help me out with this. I’ve seen an auto fade expression that does this, but not one that works with positioning.

    Thanks,

    Win

    Mac User- AE 23.2.1

    Premiere – 23.2.0

    Win Edson replied 3 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    February 27, 2023 at 5:46 pm

    There are a number of ways to do it, depending on how you’re doing the in/out animation. If you’re using 2 in keyframes and 2 out keyframes, you could do something like this to tie the animation to the layer’s in and out points:

    if (time < (inPoint + outPoint)/2){
    t1 = key(1).time;
    t2 = key(2).time;
    v1 = key(1).value;
    v2 = key(2).value;
    linear(time,inPoint,inPoint+t2-t1,v1,v2);
    }else{
    t3 = key(3).time;
    t4 = key(4).time;
    v3 = key(3).value;
    v4 = key(4).value;
    linear(time,outPoint-(t4-t3),outPoint,v3,v4);
    }

    If you’re animating in and out via expression, you’d have to alter those to incorporate the in and out point timing.

  • Win Edson

    February 28, 2023 at 1:18 pm

    Thanks so much for this Dan. The expression works perfectly in After Effects. Unfortunately it doesn’t translate to the MOGRT in Premiere. But it turns out there’s a built in feature in AE I wasn’t aware of (it’s years old, so my fault!). It doesn’t even involve expressions, so I posted in the wrong forum (again my fault)

    In case anyone reading this was trying to accomplish the same thing as myself, here’s what I did.

    The feature I needed was the ‘Responsive Design Time’ (found under Composition) I quickly created an intro and outro, sized it to my animation and exported the MOGRT.

    Now the end user can just resize the graphic in the timeline and the speed of the Animate Ins and Outs don’t change.

    Thanks,

    Win

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