ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Align Paragraph Text to middle of box?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
cowcowcowcowcow
Dean Bergmann
Align Paragraph Text to middle of box?
on Aug 27, 2009 at 2:07:02 pm

Alright, this one is giving me headaches, and I can't find any documentation at all on this.

When I create a Paragraph Text box in AE CS3, the text I enter automatically hugs the 'top' of the drawn paragraph area.

I know by aligning it 'center' it will go to the center of the box (horizontally), but still hug the top.. is there any way to middle justify (vertically) the text within the paragraph box so that when I enter more lines it would grow from the center?




Return to posts index

Dave LaRonde
Re: Align Paragraph Text to middle of box?
on Aug 27, 2009 at 3:13:32 pm

Y'know, I don't think I've ever even gave that a thought.

I simply make a text layer, set it to center justify, and type away. Ninety-nine times out of a hundred I have to position the text anyway for aesthetic reasons, so I just play with the completed layer's position property.

Dave LaRonde
Sr. Promotion Producer
KCRG-TV (ABC) Cedar Rapids, IA


Return to posts index

Dean Bergmann
Re: Align Paragraph Text to middle of box?
on Aug 27, 2009 at 5:00:18 pm

Unfortunately, we're doing automated scripts that enter text from an external source that allows us to do unmonitored renders and projects.. But the problem is that the text length is variable, and putting stuff in a bounded box (paragraph text) allows things to remain neat...

It just needs to be vertically centered.. and.. it's just not there.


Return to posts index


Kevin Camp
Re: Align Paragraph Text to middle of box?
on Aug 27, 2009 at 7:13:09 pm

there isn't an option for vertical alignment in after effects (or photoshop, and i've occasionally wished for it in both).

you can't even easily create an expression to change the y-position of the text layer if it were to go to multiple lines, since the height of a text layer returns the comp's height rather than the height of just the text layer.

the best way i can think of to try and get this to work would require the text file to have line breaks to break it into lines that would fit within the text block (or maybe an expression in the source text property yo do this), then you could create an expression that would count the line breaks and offset the y-position according to the number of breaks it finds... it's a bit beyond my expression capabilities, but someone in the ae expressions forum may be able to help you...

Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW


Return to posts index

pedro proenza
Re: Align Paragraph Text to middle of box?
on Aug 28, 2009 at 6:53:16 pm

in aftereffects you do it manualy, with rulers and guides.
in photoshop it can be done automatically. with marquee tool, select the area you want, click on the move tool and the align tool is available..

cheers


Return to posts index

pedro proenza
Re: Align Paragraph Text to middle of box?
on Aug 28, 2009 at 7:06:19 pm

hi! again

i just found a way to do it easier.

create a new solid, make composition size (put below all the layers).
Now select the text layer you want and the new solid. the align tool stays available, now you click "horizontal center alignment" and "vertical center alignment". parent the text layer to the solid and do a reset transform in the solid layer.
i think its easy

cheers again


Return to posts index


Dean Bergmann
Re: Align Paragraph Text to middle of box?
on Aug 28, 2009 at 7:54:14 pm

this works in one case only, but we're talking about having a set size paragraph area, that will never change, but the TEXT will change.

Imagine if you will, a 16x9 comp, and on the left side we have a paragraph box that's the height of the comp, but say only 30% of the width.

What I want to do in this is have the text in that paragraph box be centered vertically, and if I add more text, it'll stay centered vertically and expand upward and downard in that box. (And no, i am not talking the vertical text tool).

The reason I can't just do an align layer or 'use photoshop' is that we use an external script to enter text based on a client's needs, so we can't go repositioning the actual layer manually when it's supposed to be an automatic solution.



Return to posts index

cowcowcowcowcow
Kevin Camp
Re: Align Paragraph Text to middle of box?
on Aug 28, 2009 at 8:16:34 pm

excellent methods pedro.

however, dean was looking for a way to vertically align the text completely hands free... they are using an automated script that is placing the text into the layer and rendering the comp without an operator -- i assume using adobe's media encoder as the render engine/queue.

many broadcast graphics systems have features for vertical alignment (top/bottom/middle), but adobe does not... yet. an expression would be a good way to handle it, but it won't be a simple expression... it would most likely be two expressions, one to add line breaks to the source text, then another to evaluate the number of line breaks and make adjustments accordingly.

Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW


Return to posts index

pedro proenza
Re: Align Paragraph Text to middle of box?
on Aug 28, 2009 at 7:35:31 pm

hi again and again

just see the easiest way to do
select the layer you want and start draging to the center of composition, press shift+ctrl, and it puts in the center

cheeerrs


Return to posts index


pedro proenza
Re: Align Paragraph Text to middle of box?
on Aug 29, 2009 at 10:46:59 am

ooops, i need glasses here, i'm readind bad

sorry..


Return to posts index

scott tupper
Re: Align Paragraph Text to middle of box?
on Apr 22, 2010 at 4:51:27 pm

Dean,
I have the exact same issue. Did you ever find a solution?



Return to posts index

Dean Bergmann
Re: Align Paragraph Text to middle of box?
on Apr 22, 2010 at 5:40:14 pm

nope :( here's hoping CS5 has the ability!


Return to posts index


Richard Clabaugh
Re: Align Paragraph Text to middle of box?
on Jan 17, 2013 at 2:18:32 am

Curious if anyone finds an answer to this. I'm doing title cards for a film and need them all centered both vertically and horizontally, even though they are of different lengths and sizes. Thus both the cards for...

Directed By
Director's Name

and the care for...

Produced By
Producer A. One
Producer B Two
Producer C. Three

BOTH cards must be centered. I've got 26 cards like this and aligning them each manually seems prone to errors. I'm sure someone must have a simple and easy way to do this as I'm sure it's a common task.


Return to posts index

Cristian Andrei
Re: Align Paragraph Text to middle of box?
on Jul 1, 2013 at 10:31:26 pm

I'm very curious about this problem. How come nobody has found a solution to this?

I'm facing this problem and I don't have any idea how to handle it.

Is there any script out there that can help solve this issue?

Please, if anyone can help with this post a reply or point out to a path where a solution can be found.

Thanks!


Return to posts index

Cristian Andrei
Re: Align Paragraph Text to middle of box?
on Jul 9, 2013 at 6:37:31 pm

Anyone? :-s


Return to posts index


Robert Paynter
Re: Align Paragraph Text to middle of box?
on Jul 19, 2013 at 2:56:04 pm

I need this badly.

Any new info?

Adobe?


Return to posts index

Cristian Andrei
Re: Align Paragraph Text to middle of box?
on Jul 19, 2013 at 5:15:30 pm

Looks like this is a wall. :|


Return to posts index

Paul Marshall
Re: Align Paragraph Text to middle of box?
on Sep 30, 2015 at 6:29:33 pm

Over 2 years later and even I'm now looking for a solution!


Return to posts index


Kalle Kannisto
Re: Align Paragraph Text to middle of box?
on Oct 1, 2015 at 5:41:59 pm

Use this for text layer position after aligning it to the center:

S = thisLayer;
x =transform.position[0];
y =transform.position[1];
rect =S.sourceRectAtTime(time,false);
y_offset = rect.height/2;
[x,y-y_offset]


Return to posts index

Richard Clabaugh
Re: Align Paragraph Text to middle of box?
on Oct 10, 2015 at 10:20:40 pm

Kalle, it appears you are suggesting an expression based solution, which is fine, except I am unclear on the implementation. Could you please elaborate on this with an example, as in "type this expression into this place."

I think we were hoping for a simple command or keystroke solution that would consistently "center" a text box, but I'm open to anything that works here as this problem continues to come up in work and I'm SURE it's not hard.


Return to posts index

Kalle Kannisto
Re: Align Paragraph Text to middle of box?
on Oct 13, 2015 at 5:28:54 pm

Copy the expression to the text layer's Position property.


Return to posts index

Enrique Rovira
Re: Align Paragraph Text to middle of box?
on Feb 26, 2016 at 5:14:36 pm

Thanks Kalle, this worked for me!

Only I had to take out the: /2
on the: y_offset = rect.height;
To ensure the lower margin of the text stayed on the same place.

After applying the expression my text jumped slightly but you can still manipulate the x and y values for the position to adjust the text layer.


Return to posts index

Paul Levin
Re: Align Paragraph Text to middle of box?
on Mar 28, 2016 at 4:30:15 am

Kalle and Enrique,

Y'all just saved me a HUGE hassle, Kalle for the expression, and Enrique for showing me how to bottom justify.
For anyone with money to spend, iexpressions has scripts for bottom and center justification.
I like Kalle's version better, the price is right. :)


Return to posts index

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