From the course: After Effects Weekly
Controlling text styling with expressions - After Effects Tutorial
From the course: After Effects Weekly
Controlling text styling with expressions
- [Instructor] Welcome to after effects weekly. Evans Stern here, with the result of last week's episode, when we've converted text to sand using only built in effects. Now, this looks great, but we can make it even more flexible and versatile as well as easy to use by tying all three text layers to a single one. This way, we can control all the instances of the texts from one layer, and it will allow us to create a motion graphics tablet, also known as a MoGraph file out of this. I'll do all of these using a relatively new expressions options in after effects. Those expressions will give you control for the font, the style and anything you need for a live text layer. So, our first call for action is to actually check the project settings. I'll click on this little button eight BPC, which is going to take me to the project settings with the color tab selector. So we'll switch to the expressions one and I'll make sure that I'm using the newer Java script expressions engine, this way we won't get any errors. All right, I'll click okay and the next thing that I want to expose in the timeline is under the original text, the source text. Now, since I have a limited space here, I want to isolate only the things that I'm going to use. So I'll double tap on the letter S so SS as in sequence, will solo select only the property that I'm after. Then I'll do the same thing for the next layer and for the moment I'll switch off the visibility for the lower one. So again, I'll drill down the settings, I'll make sure to select the source text and I'll double tap the letter S. Now let's hold down the option here on the Mac the alt on the windows side and click on the stopwatch, which will enable an expression for this text. I'm going to use the peak week and first I'm just going to point to the source text of the upper layer. This is going to be our main text layer, and this is going to print these expression, which is telling after effects to use whatever text source or source text we have over here and plug it in this layer. So let's see how this works, I'll click to select the original one and then I'll double click on the little T here, which is going to select the text itself, and maybe also open up the character upon it, just so we can see this is the font that I'm using, and then I'll make sure the composition panel is active and I'll type something else so let's do the word dissolve, and we can see that everything looks fine, meaning that it's actually replacing the word for the second instance as well. However, if I returned to the timeline, click to select these texts, then let's reach back to the selection tool just to make sure that I'm actually selecting the entire text and for some reason, I can't really see the layer boundaries, so I'll go to the view menu and make sure that show layer controls is active, all right. Now, I can try out different fonts from the character partner. So let's go with something else, doesn't really matter which one, just to show you the problem. If I'm going to change it to a different font then the other layer, which is still connected via expression is still going to use the original font. All right, so this is the problem that I want to solve here. I'll undo the last step, this is not necessary. It's just something that will help us to check that everything is okay, and then I'll return to the expression here. I'll highlight it, scroll down just to make sure that they have enough space, because I need to write at least three lines here. So for the moment I'll park my cursor over here, and I'm going to add a period. Then I'll click on these expression language menu and over here under texts, we have some new properties. So you can see from the list, all the things that you can choose. Now, in my case, I'm after the style, which is actually outside of the properties list. So I'm just going to select it and after effects is going to type it for me. Now, this means that now it's actually going to take the text, the source text, and the style. However, this is not enough and just to prove my point, I'll click outside and you can see that it will take the style just to show you, I'll return to the previous one and change it to a different font. Let's try this one, but it's not going to actually obey the text source, which means that in this line, we are still seeing the previous word, which is the disintegrate word. So we need to tie both of them together and to do it, we'll need to actually tell after effects to include both the source text, as well as the style and of course you can add as many properties as you need assuming you can see them over here in the character palette. So this is how it works. I'm going to go to the beginning here, and I'm going to define this line as a variable and I'll call it look. So look will be equal to whatever I written over here and then I'll go to the end and add a semi-colon and then I'll go to the start again. I'll add another line in front of it, so this one will be the source and again, I'm just using it as a variable here, and I can basically do the same thing that I did before meaning that I'll peak weep the source text, I'll add the semi-colon and then I'll add a third line here and I'll write down, look.set text. So you need to just start to type it after effects will help you and inside these apprentices, I need to type down the word source. So I'm just going to select it from the list and that's it. So now after effects knows that it needs to take both the source text as well as the style. What I'll do here is select the word source text for the second layer, then go under edit and choose copy expression only. I'll switch on the visibility for the third instance, I'll select it and I'll basically just paste the same expression. And now we can see that everything is going to obey the same rules so if I'll switch to a different font, let's try this one, which is kind of ridiculous in this case, but you can see that indeed it works. So if you need to tie this together, you have control for both properties. Now you can use this system to add more text properties if you want to inherit let's say the color, size, ledding basically everything you are seeing here inside the character palette. Now those expressions are a little bit geeky, and if you need more help with them, what I recommend is to go to the main search panel over here and type down, edit text style, then press enter and this is going to take you to your default browser, where you can see the results, and then you need to click on the second one in my case and this is going to show you all the options with some pre-made expressions that you can basically just copy and paste from this page. Now, I love the fact that Adobe opened up this option and made it much more easy to use. I think it is so beneficial, especially when you want to publish this as a MoGraph file from after effects to premiere pro.
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Controlling text styling with expressions7m 55s
-
(Locked)
Using variable fonts5m 28s
-
(Locked)
Working with SVG fonts4m 36s
-
(Locked)
Libraries integration7m 43s
-
Using behaviours8m 49s
-
(Locked)
Cylinder lines logo9m 49s
-
(Locked)
Fixing color over time4m 4s
-
(Locked)
Rendering to .mp46m 24s
-
(Locked)
Removing noise5m 9s
-
(Locked)
Wipe with border4m 52s
-
(Locked)
Particle text dots9m 50s
-
(Locked)
LED screen effect5m 37s
-
(Locked)
Motion trails8m 11s
-
-
-
-
-