ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

After Effects to Premiere Live Text Template

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Chris Gallagher
After Effects to Premiere Live Text Template
on May 4, 2017 at 3:57:43 pm

Hello,
I'm just getting started using Live Text in Premiere and was wondering what would be the best way to create a text layer that has varying sizes of text in one line. For example, and endpage with tune in where the day and date are one size but the time is smaller.
Attached is a sample.
Any advice would be appreciated.
Thanks



Return to posts index

Kevin Camp
Re: After Effects to Premiere Live Text Template
on May 4, 2017 at 6:54:36 pm

since you won't be able to control the font (to make that change from bold to regular weight) you'll have to make those separate text layers, and then you'll need to use the sourceRectAtTime() function to dynamically adjust the x-positions of the text layers.

in premiere, you'd end up with at least 3 text fields: day, eastern time and pacific time. (if the 'et', 'pt' and separator are always the same, they wouldn't need to be editable).

try this:

set up your 6 text layers in the following layer order, and to keep the math simpler, make them all left justified:
  1. day
  2. time (eastern)
  3. et
  4. separator
  5. time (pacific)
  6. pt

you can have other layers above o bellow this group, but not in-between (well, you can put them in-between, but you'll need to adjust the following expression).

make sure all of them are on the same y value and then add this expression to each of those text layers except the 'day' layer:
pad = 20; // value in pixels
target = thisComp.layer( index - 1 )
rect = target.sourceRectAtTime();
x = target.position[0] + rect.width + pad;
[ x, value[1] ]

adjust the 'pad' value as needed for each layer, but each text layer should now dynamically follow the layer before it. if you change the text, the layers should change x-positions accordingly.

Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index

Kevin Camp
Re: After Effects to Premiere Live Text Template
on May 4, 2017 at 6:59:47 pm

i should have noted that the expression does not account for scale of the layers, so as you adjust the size of the text layers, use the point size controls in the character settings, not the scale property of the text layer.

Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index


Chris Gallagher
Re: After Effects to Premiere Live Text Template
on May 4, 2017 at 9:18:36 pm

Really appreciate the quick response.
Looks like it works pretty well. Would it also be possible to do the same thing but always keep things in the center of the screen?


Return to posts index

Kevin Camp
Re: After Effects to Premiere Live Text Template
on May 4, 2017 at 11:41:39 pm

yes, but it gets kind of messy...

you need to total up the widths and padding values of all 6 text layers, divide that by 2 and then subtract that from half the comp width....

try this (i can't test it right now, but I think it will be close, just change the pad values to reflect your expression settings):
pad1 = 20;
pad2 = 20;
pad3 = 20;
pad4 = 20;
pad5 = 20;
totPad = pad1 + pad2 + pad3 + pad4 + pad 5;
totWidth = sourceRectAtTime().width;
for ( i = 1; i < 5; i++ ) {
totWidth = totWidth + thisComp.layer( index + i ).sourceRectAtTime().width;
}
thisComp.width / 2 - ( totPad + totWidth ) / 2


Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index

Kevin Camp
Re: After Effects to Premiere Live Text Template
on May 5, 2017 at 1:53:12 pm

i should have mentioned that the expression would go in the position property of the first layer ('day' layer).

And here is a corrected expression:
pad1 = 20;
pad2 = 20;
pad3 = 20;
pad4 = 20;
pad5 = 20;
totPad = pad1 + pad2 + pad3 + pad4 + pad5;
totWidth = sourceRectAtTime().width;
for ( i = 1; i < 5; i++ ) {
totWidth = totWidth + thisComp.layer( index + i ).sourceRectAtTime().width;
}
x = thisComp.width / 2 - ( totPad + totWidth ) / 2;
[ x, value[1] ]


Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index


Chris Gallagher
Re: After Effects to Premiere Live Text Template
on May 5, 2017 at 1:56:59 pm

Brilliant. Thank you very much. This works great.


Return to posts index

Chris Gallagher
Re: After Effects to Premiere Live Text Template
on Sep 21, 2018 at 6:42:32 pm

This is working great but was wondering if there's a way to adjust the kerning/tracking between the ET/PT and the time?
Thanks


Return to posts index

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