ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Adjustable start point of lower third animation

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Niels Coeleman
Adjustable start point of lower third animation
on Apr 24, 2019 at 12:46:45 pm

Hi!

I'm working for almost three years now in video editing and occasionally motion graphics, but am still fairly new to expressions in After Effects.

We made a lower third for a client, but now I would like to transform this After Effects file to an Essential Graphic, so I don't need to open After Effects each time this client orders a new video. It's going pretty well, however I came across one problem I can't seem to tackle
.
You can see the lower thirds in action here: https://i.imgur.com/c3cvGbz.gif

The text box resizes as it should and the end point of the animation is also fixed, however I would like to be able to change the startpoint of the animation accordingly to the width of the textbox.

As you can see in my example, if the text becomes too long, the shape layer is already visible before the start of the animation.

Is it possible to change the starting point of my animation to match the width of the text boxes and still keep the endpoint fixed?

P.S.: I'm not a native English speaker, so my apologies for possible wrong usage of technical terms. ;-)

I control the animation with a slider control and this expression on the X position of the text box:
thisComp.layer("Null 3").effect("Position")("Slider")

Not really necessary for my question but for the text boxes I used the following (there are probably better ways):
On size:
s=thisComp.layer("Naam");
x=s.sourceRectAtTime(time-s.inPoint,true).width;
y=180;
[x+100,y]

On position:
content("Rectangle 1").content("Rectangle Path 1").size/2


Return to posts index

Kalleheikki Kannisto
Re: Adjustable start point of lower third animation
on Apr 26, 2019 at 7:41:56 am

Yes, it certainly is. If your keyframes are "1" and "2", where the text position is final at "2", you want to interpolate the position over time between keyframe "1" and "2" so that the offset at "1" is minus the width of the rectangle [using sourceRectAtTime() ]. Linear() would do it, and Ease() expression would allow you to add an ease to the movement.

The linear() part of the expression would be along the lines of:

...
linear(time, keyframe(1).time, keyframe(2).time, endpos-rectwidth, endpos)


That would be the last line in the position expression, you would have to retrieve and/or calculate the variables that go into it first.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Niels Coeleman
Re: Adjustable start point of lower third animation
on Apr 26, 2019 at 2:41:19 pm

I managed to do it with a simple easeOut expression.

Because we used two different fonts with two overlapping text boxes, I also had to use an if/else statement.

It may have been done in a way easier manner, but I'm really happy it's working like it was originally designed (except maybe for the rather harsh ease out 😅)

Thanks anyway!

a = -220-thisComp.layer("Textbox Company").sourceRectAtTime().width;
b = -220-thisComp.layer("Textbox Name").sourceRectAtTime().width;
x = easeOut(time,0,0.68,a,0)
y = easeOut(time,0,0.68,b,0)
if(thisComp.layer("Textbox Company").sourceRectAtTime().width>thisComp.layer("Textbox Name").sourceRectAtTime().width)x else y;


Return to posts index

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