ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Position two text boxes side by side with same margin

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Johan Liljeroos
Position two text boxes side by side with same margin
on May 29, 2019 at 9:05:45 am

Hi,
I'm trying to make a lower third template in After Effects (preferably an Essential graphics template for Premiere). Name on first row and then Title and Company on second row. Title and Company should have different fonts so I need two different text boxes side by side with constant margin between them. How do I do?


//Johan


Return to posts index

Tomas Bumbulevičius
Re: Position two text boxes side by side with same margin
on May 29, 2019 at 12:40:15 pm

Hey Johan. There are quite a few scenarios, but in general:

1. Create a null and add two Sliders, where one will control X padding, and other for Y.
2. Create two Text layers and two rectangular shape layers.
3. Inside the shape layers rect size, add expression similar to this, based on your layers/controllers names:

textLayer = thisComp.layer(1);
textS = textLayer .transform.scale[0] / 100;
textW = textLayer .sourceRectAtTime(time,true).width*textS;
textH = textLayer .sourceRectAtTime(time,true).height*textS;
boxW = textW+thisComp.layer('control').effect('box-xPadding')('Slider');
boxH = textH+thisComp.layer('control').effect('box-yPadding')('Slider');
[boxW, boxH]
}


Where textLayer should be your main text layer's index.
4. Apply this expression to second shape's size as well, and change textLayer index to your subtitles one.
5. You will have to adjust positioning of the layers and their anchor points as well as add another slider to control the gap between them.

I assume in the forum there is already a fully working solution, so searching could help.

Find out more:
After Effects Tutorials: motion design, expressions, scripting.
Boxer - Dynamic Text Boxes Template with a Live Preview


Return to posts index

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