ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

How do you force multiple variable text layers to have the exact same start point on the x axis? or sourceRectAtTime with ease animation

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Firuz Daud
How do you force multiple variable text layers to have the exact same start point on the x axis? or sourceRectAtTime with ease animation
on Apr 29, 2020 at 5:57:46 pm
Last Edited By Firuz Daud on May 1, 2020 at 11:26:13 am

I'm updating my question because no one seems to like it. I think my problem is that text in after effects has slightly different anchor points depending on a lot of things, like the font, the characters, etc. I want them to line up exactly to the pixel on the x axis no matter what is written or what the font is. How would I do that? My original question, example and project are below.

What I'm trying to do is have a series of text boxes come in from off camera and settle in one line. By using sourceRectAtTime one can paste whatever you want into the box and then the box grows to fit the text. I have that stuff working.

The start point will always be variable because it depends on how long the line of text is. But I don't want to use keyframes because I'm working with people who are very unfamiliar with after effects. I just want them to be able to paste their text in and it works. So I'm using an ease expression along with sourceRectAtTime so that the line of text starts minus however many pixels it is. I have that working, but I think it's wrong. For whatever reason now the stupid boxes don't line up. I am really bad at this kind of thing. I've watched a few tutorials about expressions and sourceRectAtTime but I'm confused about why the text anchor point is always different. Here is a video that illustrates what I want to do and what the problem is.







And I'm also attaching the project.

Movement


s=thisComp.layer("TEXT_1”);
w=s.sourceRectAtTime().width;
h=s.sourceRectAtTime().height/2;
l=s.sourceRectAtTime().left;
t=s.sourceRectAtTime().top;

ease (time, inPoint + 0, inPoint + 1.8,[l-(w+50),400], [l+100,400]);



Anchor point left justified

a=thisLayer.sourceRectAtTime();

Height=a.height;
Width=a.width;
Top=a.top;
Left=a.left;

x=Left;
y=Top+Height/2;

[x,y]



Box Thing
Size Expression
s=thisComp.layer("TEXT_1");
w=s.sourceRectAtTime().width;
h=s.sourceRectAtTime().height;

[w+50,h]

Position Expression
s=thisComp.layer("TEXT_1");
w=s.sourceRectAtTime().width/2;
h=s.sourceRectAtTime().height/2;
l=s.sourceRectAtTime().left;
t=s.sourceRectAtTime().top;

[w+l,h+t]


Return to posts index

Geraldine Green
Re: How do you force multiple variable text layers to have the exact same start point on the x axis? or sourceRectAtTime with ease animation
on May 1, 2020 at 12:58:01 pm

Following. Similar issues have come up quite a bit where I work too.


Return to posts index

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