Copy link to clipboard
Copied
Hi,
I'm new to AE and ran into a problem I'm not sure has a fix.
I created a lower third graphic that has a line for the person's name and a 2nd line for their title. We wanted the first name to be regular case and the last name to be in bold. When I export as a .mogrt file then import into Premiere the name defaults to regular case, and it doesn't look like that can be changed in Premiere. Is there a way to do this, or does a text layer have to be all in the same font style?
Thanks
Looks like you'll require three text layers - one for FIRST, another for LAST and another for TITLE. And Rick's right in that you'll need to offset LAST from the right edge of FIRST and you'll want to use sourceRectAtTime.
The solution is to offset the LAST layer from the right edge of the FIRST layer.
Paste this Expression into the Transform>Position of the LAST layer -
-------------------------------
// declare target layer
t = thisComp.layer("First Name");
// declare the offset value in pixels
offse
...Copy link to clipboard
Copied
Without any info on what fonts you used nobody can really tell you much. Of course faux caps and other stuff may get lost if it's not part of a genuine font but rather enforced font decorations. Conversely, certain intermediate weight fonts may simply not show up because automatic font grouping may not work. Impossible to say. You really have to provide much more info.
Mylenium
Copy link to clipboard
Copied
Thanks for your reply.
I probably didn't explain the problem very well.
Let's say you have a text layer that says John Smith and you want "John" to be in Helvetica Regular and "Smith" to be in Helvetica Bold. You export as a .mogrt file so that the name can be changed when you import it into the Essential Graphics panel in Premiere. However, when you place the .mogrt file into your timeline in Premiere the entire name "John Smith" is now in Helvetica Regular, it didn't keep the last name in bold. In the Premiere's Essential Graphics panel I tried selecting just the last name and changing it back to Bold, but it changes the entire name to Bold. Does this make more sense?
Thanks
Copy link to clipboard
Copied
Oh. When you're building the mogrt, you'd need two text layers: one for bold, one for regular.
Copy link to clipboard
Copied
I was afraid of that, and unfortunately it won't work for what I'm doing. Thanks for your reply.
Copy link to clipboard
Copied
You should be able to use the sourceRecAtTime method to adjust the spacing between words. You would just have to enter each word separately. I don't have time to do it for you but it should not be very complicated.
Copy link to clipboard
Copied
That sounds like what I'm looking for, but since I have no idea what that is, it's obviously out of my skill level, but thanks.
Copy link to clipboard
Copied
Dave's right. You just need two text layers in AE; one for each text styling.
Copy link to clipboard
Copied
Here's what I'm trying to do. I want the Name, the Title, and the length of the red Title box all to be editable in Premiere.
I'm working with a videographer who does his editing in Premiere. In the past he would create static lower third graphics in Photoshop, import it into Premiere, and then just fade them in and out as needed, and each time he had a name/title change he had to go back into Photoshop. My plan was to provide him a single .mogrt file that he could import in then change the name/title all within Premiere. However, if the first name is in regular on one layer and the last name is in bold on another layer, what happens when you have different length first and last names? I need the last name to adjust with the first name. Putting them on separate lines won't work, as far as I can see.
Copy link to clipboard
Copied
Looks like you'll require three text layers - one for FIRST, another for LAST and another for TITLE. And Rick's right in that you'll need to offset LAST from the right edge of FIRST and you'll want to use sourceRectAtTime.
The solution is to offset the LAST layer from the right edge of the FIRST layer.
Paste this Expression into the Transform>Position of the LAST layer -
-------------------------------
// declare target layer
t = thisComp.layer("First Name");
// declare the offset value in pixels
offsetXpos = 50;
// declare sourceRect
tRect = t.sourceRectAtTime();
// get location of right edge of target layer
tBR = t.toComp([tRect.left+tRect.width,tRect.top+tRect.height]);
// apply offset to xPosition of target layer and set yPosition to equal that of the target layer
[tBR[0] + offsetXpos,t.position[1]]
---------------------------
Copy link to clipboard
Copied
Roland nailed it. I have a couple of animation preset sets that I use for this kind of thing all the time.
Copy link to clipboard
Copied
Thanks Roland, I tried to follow this, but it didn't work and I kept getting errors. I'm going to mark this as answered because I'm sure this is the correct solution, it's just over my skill level as a beginner.
Copy link to clipboard
Copied
I've uploaded an AEP (latest version of AE) which includes both Text Layers. I'm hopeful you are able to get going with the AEP as a starting point.
I should have stated earlier that both Text Layes should be left-aligned. This is based on the design requirements you suggested. Also, once you've got this mini rig going, the FirstName Text Layer acts as a parent for the position of the LastName Text Layer.
http://www.broadcastGEMs.com/mediastreamer/sourceRect_Offset_Pos_2TextLayers.zip
If you face any errors, you should post what these are and someone should be able to assist you.
Copy link to clipboard
Copied
Thanks Roland!
I actually replied back to you yesterday, but for some reason it didn't send, that I went back into my file and figured out what I did wrong with your code and got it to work. I was THRILLED!
However, I ran into another snag and wondered if you had a solution.
Same file, I wanted the name to look like it slides out of the vertical red bar moving left to right. I set up a mask and everything worked great, including your code. I set the file up using a short name (say "Joe Smith"), and moved the right side of Smith right behind the vertical red bar. Imported the .mogrt into Premiere, worked great, everything was editable, retained the bold last name like I wanted. But, when I retyped a longer name (say "George Washington") part of the last name is already visible before the animation even runs. If I go back into AE and slide the name even farther to the left to allow for long names, then short names moving in at a different speed since they are positioned farther to the left of the vertical red bar and left edge of the mask. Any fix for this?
Thanks
Copy link to clipboard
Copied
I'm not seeing a screenshot of how you set up the comp but it sounds like you did not tie the position of the names to the sourceRecAtTime. The idea is to get the position of each text area to move.
Select all layers, press uu to reveal all modified properties and post a screenshot. I don't have time to download Roland's example and look at it right now.
Copy link to clipboard
Copied
Screen shot of LT:
Screen shot of properties:
And my Expression:
// declare target layer
t = thisComp.layer("First Name");
// declare the offset value in pixels
offsetXpos = 20;
// declare sourceRect
tRect = t.sourceRectAtTime();
// get location of right edge of target layer
tBR = t.toComp([tRect.left+tRect.width,tRect.top+tRect.height]);
// apply offset to xPosition of target layer and set yPosition to equal that of the target layer
[tBR[0] + offsetXpos,t.position[1]]
Copy link to clipboard
Copied
Here's the updated AEP (and Expressions). The Expression you've applied to the LAST TEXT Layer doesn't require a change. I've added an Expression to the FIRST TEXT LAYER.
What's important to note is I've added two Slide Controls to the FIRST TEXT LAYER. These sliders adjust the xPosition of the first and last keyframe - I hope it's clear when you open the AEP and venture about.
I've also used the Vertical Bar in the script - specifically, I've used its position as a starting point to offset the FIRST TEXT LAYER. So, be mindful of this since your Vertical Bar's name will likely be different from what's in my Expression. Just look for the variable, startPos and either pickwhip to the correct layer or simply type over, in the Expression, the name I've used in the Expression.
I've also used a Null Layer as a controller for the animation. So, you'll need this. In short, changing the spacing and speed of the two keyframes I used will change the speed of the text animation. This is probably something strange and very likely not recommended but it's worked well for me in numerous similar scenarios.
http://www.broadcastGEMs.com/mediastreamer/sourceRect_Offset_Pos_2TextLayers_autoanimate01.zip
Copy link to clipboard
Copied
I REALLY appreciate you helping out with this, and certainly understand if you don't have time to continue, but if you do...
Two things.
1. I opened your file and exported the text source for the first and last names as a .mogrt and imported into Premiere. When I retype a longer first name it ends up way to the right of the vertical bar (see screen shot below)
2. I tried to apply all your setting to my file, everything seems to be working except for some reason the last name is sitting lower than the first name. I tried raising it's Y position, but it won't let me. Is there something needs changed in the expression? (see screens shots below)
Thanks
Copy link to clipboard
Copied
It looks like the Anchor Point for the two Text Layers are not identical - this is a strict requirement. The SECOND TEXT LAYER's yPosition is linked to the FIRST TEXT LAYER's yPos. Hence, you can't move it independently. All you need to do is to use the Anchor Point Tool to ensure the yValue of the Anchor Point is identical for both Text Layers.
As for the text placed at the right, ensure you have the two Slider Controls in the FIRST TEXT LAYER placed into the Essential Graphics Panel (EGP). My code seems to be a bit off for the initial xPosition.. Regardless, you'll still want the two sliders which will come in handy for other similar exploits.
Copy link to clipboard
Copied
I thought about that and checked it, but the anchor points are in the same place and you can see in the screens shots below that they are the same. Both names are aligned until I copy and paste in the Position Expression for the last name, then it drops down. I can't figure out what's causing that to happen.
BEFORE Expression is added:
AFTER Expression is added:
Here's the Expression for both layers
(This is on the first name layer)
FIRSTlayer = thisLayer;
LASTlayer = thisComp.layer("Last Name 2");
fRect = FIRSTlayer.sourceRectAtTime();
lRect = LASTlayer.sourceRectAtTime();
startPos = thisComp.layer("RedVertBar").transform.position[0];
KF01 = [startPos - (fRect.width + lRect.width) + effect("Adjust 1st KF")(1), value[1]]
KF02 = [lRect.width + fRect.width + effect("Adjust 2nd KF")(1), value[1]]
Scalar=thisComp.layer("Scalar").transform.scale[0];
linear(Scalar,0,100,KF01,KF02)
(This is on the last name layer)
targetLayer = thisComp.layer("First Name");
tRect=targetLayer.sourceRectAtTime();
targetLayerTL=targetLayer.toComp([tRect.left+tRect.width,tRect.top]);
targetLayerBR=targetLayer.toComp([tRect.left+tRect.width,tRect.top+tRect.height]);
xPosOffset = 30;
[targetLayerBR[0]+xPosOffset,targetLayerBR[1]]
Copy link to clipboard
Copied
Ah! Sorry about that. Do this -
Change the last line of the script for the LAST NAME LAYER from this -
[targetLayerBR[0]+xPosOffset,targetLayerBR[1]]
to this -
[targetLayerBR[0]+xPosOffset,layer("First Name").transform.position[1]]
--------------------------
HTH
Copy link to clipboard
Copied
Got this error:
Copy link to clipboard
Copied
It works here.
Ensure you have the layer names spelt out correctly.
Copy link to clipboard
Copied
You can see everything is spelled correctly. (see below)
Maybe I just need to start over from scratch.
Anyway, I really appreciate you trying to help.
Thanks
Copy link to clipboard
Copied
Thanks for your patience and appreciation. Those of us who help out here truly love AE and their users and assisting users is a great way to build up a community for any software.
Anyways ... we're almost there. I see that I missed adding - thisComp; to the front of the second array value. So ... the last line should be this - I HOPE!!! 🙂
[targetLayerBR[0]+xPosOffset,thisComp.layer("First Name").transform.position[1]]
ps- try to reply quick cos it's almost 1AM where I'm at and I'd like us to be able to wrap this up ASAP.