How to center align text in After Effects

Опубликовано: 04 Октябрь 2024
на канале: David Lindgren
93,381
1k

🎁 FREE browser extension to grow your YouTube channel:
https://www.tubebuddy.com/davidlindgr...

Center aligning text in Adobe After Effects is pretty simple IF you do it horizontally. I'm going to show you how you can center align your text horizontally and vertically, so that when you change the text, it's still in the middle.

The first thing you do is to create your text layer.
Right click in the timeline window, go to New and then Text.
Type your text and don't click "Esc" when you are done.
Unlike Illustrator and Photoshop, clicking "Esc" after typing a text will actually undo your changes to the text, which can be a bit confusing. Instead, click somewhere in the timeline window if you want to deselect the text.

Now, select the text layer, go to the Paragraph window and click "Center text" to center align the text to the Anchor point. If you change the text now, it will still be center-aligned horizontally but if you add another row to your text, it will not be centered vertically.

The way to fix this is with 1 effect and 2 expressions.

First, go to the Effects window and search for "Separate XYZ Position".
Drag and drop that effect onto your text layer.
Now, go to Transform and hold down the "Opt"-key while clicking the little stopwatch next to Position.
This will open up a text field where you can add an expression.

Copy and paste "Expression 1" and paste it in this text field.

1️⃣ Expression 1:
value + [effect("Separate XYZ Position")("X Position"), effect("Separate XYZ Position")("Y Position"), effect("Separate XYZ Position")("Z Position")]

Now do the same thing with "Anchor point". Hold "opt" and click the stopwatch. Copy and paste "Expression 2" into this text field.

2️⃣ Expression 2:
s=sourceRectAtTime();[0,s.top-45+s.height/2]+value

The last step now is to select the text layer and then go to the "Align" window and align the text layer to the center vertically.

Now, your text should be perfectly aligned to the middle, no matter what you type in there.

I hope you liked this video and if you want to see more quick tutorials just like this one, please subscribe to the channel and check out my playlists about After Effects, Premiere Pro and Final Cut.

Keep learning and have a great day!

**********

RESOURCES:

📈 🧠 Want to become a better Content Creator?
Get resources, digital products and BTS content here:
►   / davidlindgren89  

🎵🎞 Want music for your videos?
Get 2 extra months 🎁 of Artlist for free:
► https://artlist.io/David-121249

💻💡 Want to learn more about Adobe Premiere Pro?
Check out my playlist with short tutorials:
►    • How to move clips with the keyboard i...  

✈️🗽 Want to follow a Content Creators journey?
Check out my playlist where I document my way to towards Vayner Media, NYC:
►    • Project Vayner - Weekly vlog  

🧰🛠 Want to know what camera gear I use?
Check it out here:
► https://kit.co/DavidLindgren89

**********

GEAR I USE (AND RECOMMEND):

🚁 Drone: DJI Mavic 2 Pro ► https://amzn.to/37v7Hbw
💻 Laptop: Macbook Pro 15" ► https://amzn.to/2WqI7ic
Laptop stand ► https://amzn.to/3a8ufAh
Crisp device stand for laptop/ipad ► https://amzn.to/30Wku2T
🎧 Headphones: Doqaus ► https://amzn.to/3RjlSFV
🪝 Headphone-hanger under my desk ► https://amzn.to/3didCSp
⌨️ Keyboard ► https://amzn.to/2yW0N0i
🖱 Trackpad ► https://amzn.to/35W2nvj
📷 Camera: Lumix GH5 ► https://amzn.to/2YWMD9N
Lens: 14mm F2.5 ► https://amzn.to/2xZoHYA
Lens: 25mm F1.7 ► https://amzn.to/2zsSl8Q
Lens: 12-60mm F3.5-5.6 ► https://amzn.to/2YWoQqO
Budget tripod: Velbon M43 ► https://amzn.to/306ft7U
🎛 Stream deck ► https://amzn.to/2BDkETp
🎤 Wireless mic: Sennheiser AVX-MKE2 Lavalier Pro Set ► https://amzn.to/2WpXk2Y
🎤 Budget microphone: Takstar SGC-598 shotgun mic ► https://amzn.to/3Y0Mwpm
🎤 Condenser Microphone ► https://amzn.to/2T3CUuH
💡 Portable handy ringlight ► https://amzn.to/39ZfRu9
💡 Handy portable rechargeable lights ► https://amzn.to/40bjTY9
Handy adapters: USB 3.0 to USB C ► https://amzn.to/2WVgo8z
USB C Hub (all-in-one) ► https://amzn.to/2LqAnXe
Adapter: HDMI to USB ► https://amzn.to/2AsFfcp
Cable bag ► https://amzn.to/2WpVKyi
Super-usable cable straps for everyday use ► https://amzn.to/2yTKTn9
🖨 Labelling machine ► https://amzn.to/3fnbaex

**********

📲 CONNECT WITH ME HERE:

►    / davidlindgren89  
►   / davidlindgren89  
►   / davidlindgren89  
►   / davidlindgren89  
►   / davidlindgren89  
►   / davidlindgren89  

**********

DISCLAIMER: This video and description might contain affiliate links, which means that if you click on one of the product links, I'll receive a small commission. This helps support the channel and allows me to continue to make videos like this. Thank You for your support! 🙏
(All links are my genuine recommendations.)