Dynamic Text Reveal: Responsive template / MOGRT design using expressions | Edaqa Mortoray | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Dynamic Text Reveal: Responsive template / MOGRT design using expressions

teacher avatar Edaqa Mortoray, Programmer, Chef, Writer

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

6 Lessons (19m)
    • 1. Introduction

    • 2. Static Text Reveal

    • 3. Dynamic Mask Size

    • 4. Dummy Animation

    • 5. Link Animation

    • 6. Recap

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

Create shapes that match the size of text using Adobe After Effects expressions.

In this class, I'll show you how to animate the revealing of a dynamic text string. This allows the text to change, including the font or size, and have the animation automatically update. It'll let you create responsive essential graphics templates, and is a springboard to more complex interactions.

You'll learn how to use expressions to match the size of mask to a text element. I'll also show you a handy technique to add an animated easing to an expression using a placeholder object.

I'll go through these steps in the process:

  • Classic setup with text reveal
  • Calculating the text size and mask scale
  • Creating a placeholder animation
  • Linking it all together

If you need a short introduction to expressions first, watch my class Introducing After Effects Expressions.

Follow me, as I'll continue to publish classes building on these skills.

Also, if you're like me, you're getting a bit lost with all those assets, clips, and folders, check out my friend Sonja's class on being efficient in After Effects.



Meet Your Teacher

Teacher Profile Image

Edaqa Mortoray

Programmer, Chef, Writer


Hi, I'm Edaqa, a programmer, writer and chef.

For over 20 years, I've been following a diverse and exciting career path. My journey traces through several countries, filled with great people and culture. I've dedicated my time to numerous startups, and an abundance of side projects.

There's so much I'd like to share with all with you -- from programming to cooking, to the unusual creative endeavours.

I want my classes to give you the confidence you need to succeed, and the curiosity required to make the most of life.

Join me in my continuing adventures.

Recently I wrote a book "What is Programming", a dive into the fascinating profession.

I've also taken up the mantle of food stylist, as I started Edaqa's Kitchen last year. Perhaps soon ... See full profile

Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Introduction: I. I'm an animation and graphics program, and I'm having fun with adobe after effects expressions. I not be emotion graphic designer, but I do know code, and I want to show you all sorts of cool things you can do with expressions. Text. It's in all your lower thirds, your captions and your title cards. It's a key aspect to templates for both after effects and pre Muir. To make it work, you need responsive designs. When the text changes, your design and animation have to change with it. In this class. I'll show you how to get the size of the text using it, an expression. Then we'll use this to dynamically reveal that text. You only need a middle amount of expressions experience to take this course I'll go through everything step by step joy, how to calculate the text size, how to set up the animation and how the link everything together. All right, let's get started 2. Static Text Reveal: All right, let's first create a project to do a text review without using any expressions how we might set this up and after a fix, as is great composition. Make it five seconds long when she's a full sizes and that are very much. And the first thing we do is is to create some text. And we should probably increase the size of this a little bit here so you can see what we want to reveal. Gonna put this about in the middle of the screen. We want to reveal it from left to right. So the typical way of revealing Texas we create a masking layer, you know, create a mask that covers this entire text, and we're going to animate this size, this mask over five seconds. We're going to animate the scale of it. Should you do it. The end first for the end scale will be 100. The end and at the stared will set the scale to zero. Well, let's kill the extraction so well, unlike those, and keep the wide 100 for both. So we have that why I unfortunately have the anchor in the wrong place. So let's move the anchor point on this one. Let's move the anchor point over to the left. And so now it expands from left to right. And then we would take the text layer and make it to Alfa Matt off the shape layer. So would animate the revealing off this text. This is a standard way to create a text reveal we're revealing anything. This approach has obviously several problems of it. What happens if I modify the text something short? Of course we can't see it right now, so then you would be in first. Now it's something short, but the animation goes long beyond the reveal. So it's not the quite nations too long. And if we made something a lot longer, add more text to the end. You can't see, they will back now, our animation won't be far enough. The mask won't be big enough to expand towards it. And so we don't get the full reveal. We'd have to go back to the shape layer and edit the size of it so we can view it ankle and you'd have to expand this to get the bigger size Hi again. And now you real more the text. Obviously, you don't wanna have to modify these shapes all the time. As you are defending text has become problematic. You'd want to reveal to adjust to this size off the text. You may also want to add some key frames German, so it bounces. Or it has on easing intern easing out. And that made it difficult to do if you have to manually adjusted every time the text changes, the warren does. We're looking away to tithe size all this reveal mask to another element and to the text. 3. Dynamic Mask Size: All right, let's get started on this first when he was working with example, a text revealed is, I want to show how to tie the mats or the mask to the size of the text to do this and do a few things first. I have the mat here and I turned off the masking. So it's covering it, and I can reduce the A pass ity on it, and this lets us see the text behind it. We want to tie it to the text size, so it's good to see that way. And I generally has turned off. The Manning was manually force, and now it's off because we're gonna be working with expressions on these layers. I'm going to get the layers and names as well. For example, a text layer I'm going to call its title text. This is a common name, perhaps for a lower third and the shape layer. I'm gonna go ahead and rename it to Mask. We'll see where these names are. Important as we work with the expressions or take the mat. I wouldn't modified scale, so it has a scale now and has a size, and the size doesn't really matter. We're gonna resize it to the size of the text, so going to go to scale and we're gonna add an expression to the scale and then modify the expression. I'm going to copy the whole expression in and then explain it piece by piece. The first part is we have to get access to the title text layer and this is why we're ruining the title text that has a clear name. Here we use is with this confident layer title text. And this refers to this title text later and we're using a function called source wrecked at time. And this will actually turn the size of source inside that layer. And it's a bit confusing, sometimes in after effects. What's the size? What's the source? But for text, you need to use a source wrecked a time and then all we want is the width of this. And I have a Sinus to a variable called text. So the text is now our text with, you know, we also need to know our with our witness for this mask and so we can refer to it as this layer. We don't have to give it a name is referring to this layer and source reacted time the same function. So we get the original size of this and we get the width. It's now we have the with off the text and the natural with of our layer. Now to calculate what scale it should have been called a full scale text divided by our width. And that'll give the relative scale that we need to make the mask the same size as the text layer. No one finally was multiplied by 100 because scale in the adobe effects, unfortunately represented as percent in the expressions will see why going on that. This is actually a problem. It's okay in the u Y to use percentage, but in the expression it becomes a bit of a problem. But for now, just remember the value you give back from scale HASA B percent. So I multiplied by 100 and we don't want to multiply the heights. So we're gonna keep it 100% scale. And now we can see that the text the Masters seem says it takes it's a little bit offset. It will get to that in just a second if you want to see now? I could take the text, and I'm using a script called RT. Edit. Text will provide a link for that to make it easier to modify the text click on the text text. Now I can make it a bit longer. Hunger would set the text and you notice the mask exchanges size. You trust me, it's the same length right now. We can try and move it over a little bit. It won't be quite right. I'll get to that in the seconds. Or I could make the text shorter and we see that the mask adjusted signs Let's go back to some text to reveal. So now we know that the scale is dynamic. So as the text changes size, Maskell change size as well. Well, you could also do it in this title. Texas make sure works. You can change size the fonts as well, and the mask also changes size. We're not changing the height of its we're just changing the with of it. And so as we change the font size, the mask will change size as well. Now there's a little bit there about the edges here. I mentioned that it didn't quite line up and I moved it over. Text can be tricky. The borders attacks the extenders and all of these things may result in text not being 100% at the ends of the extends to the blurring or anti leasing. Additionally, adobe aftereffects objects are going to many layers and many transforms. It could be very difficult to get all the origins and all the transforms lined up perfectly with these two problems combined is what I tend to do is I move the mask a little bit to the left not very far, maybe about five pixels. And then we're going to add padding in so back in my expression for the scale, I'm going to add a padding and I'm gonna say it's going to be five for about five pixels. They moved, and then all I do is I treat the text to be wider and I do this with a sub expressions of the text, plus patting times to cause patting on both ends. And now this becomes a full size the text. It will adapt if that's and so now my box expands beyond the ends. This technique will be useful for many other things as well, if you actually have borders and additional padding. But if you just have plain text, it's also nice leads. But a few pixels in there just to not worry about specifics off that font. Okay, let me zoom back out. No, let's actually go back to making it reveal. So now we have the L from that's and it's there now. But remember to change the opacity back up a swell. So now we actually have that mad mask. However, there's no animation to it. We wanted to actually anime the reveal. 4. Dummy Animation: for the revealing We're gonna nor the text in the mask for a moment, and we're going to create another box or another mask and create that mass somewhere at the top. And I would say this is about halfway. This is about the typical size of the mask that we want. This is going to be a dummy object I'm gonna rename that directly is a dummy, objects. We'll hide that. It won't be part of the final animation. This is the one that we will control the key frame animation up first. I'm just gonna set the anchor points to where it should be. Grant me from the left and for that dummy, I want to change its scaling now. I wanted to end it 100% legal right to the end of the five seconds we turn on the scaling right there, we're gonna unlinked the sizes. If they didn't go back to the start, they want the week to start of the zero. So that gives a very basic reveal. This, of course, isn't much fun. We can do this easily in other ways, so let's put a curve on that. So for the curve I'm gonna make it a auto busy on the one end. Well, just that after we need this and we want to smooth roll outs on the other side, I'll do Eazy e's on this so it eases out and we could change this best you hear a little bit now we have the animation. It comes in quickly and slowly. This is the speed that we want our text review at, regardless of the size, and this is just a dummy object. All it does is it lets you work on the animation without touching the objects involved in the actual revealing. This could be very helpful because sometimes you were walking with expressions. It could be complicated to work with the key frame, animation and expressions at the same time. So by using a dummy object, we could disconnect to that object for the animation and then other ones hold expressions. And then we can also use this object in many ways. Many objects to refer to ST one 5. Link Animation: Now we want to go back to the expression for this scale off the mask. We don't have to sit Damascus here again, and we don't modify that and I'm gonna paste in the code and explain to you what I'm changing here. So after the full scale, I'm gonna have this bound to equals this competently or dummy. So I'm looking at the dummy object. That's the dummy object up there and binding to it. It just so I have a reference to this layer. It's convenient way to do it. You'll see. If you used earlier multiple times, it's better to sign into variable first. And instead of full scale, I'm gonna create a final scale. So we know the full scale is the size of the text, the amount we have to scale to be the right size of the text. But that's always 100%. It's not animated, but this dummy we knew animates at scale. We know it's scale animates between zero and 100. That specifically why I chose you 100 the actual size. The object is irrelevant because I'm looking just a the scale and the key frames you're gonna animate that scale in the easing that we wanted. So we take the bounds to the object or dummy. Look at the transform and the scale. We take scale zero because we're only interested in the X scaling. And now, instead of final scale working, multiply it by full scale. So it has to be both of them. And this is some basic math of multiplying relative values. If they both of 100 albeit 100. If I the one that zero Tapia zero and that'll scale size now. I mentioned before about the problem with scale being 100 in after effects. And this is a case where comes up This scale value here is actually between zero and 100. That's why you don't need times 100 down here, but you will learn and further scripts. It's far better converted out of a percent first and say this is a relative value and then added back later. Otherwise, you'll end up having cases what, sometimes 100 sometimes not. So I recommend within this script always make it a relative value, normalized being 01 That means dividing by 100 when you reach the scale and only converting back to percentage when you output into aftereffects. Now those two are linked. If we animate, we could see our text reveals with the curve we've chosen above, and this one the size of this one's irrelevant. Don't play the skating too much now because you can add new key frames. But if you do want to modify the size, you can just pay attention to keep frames the size of the text size a massive relevant. If you go back the text, we say, add more text to reveal and set the text now well, see it's there, and it also animates that so Texas lengthy text doesn't matter and also with the text. As I said, you can modify the size. We could make it bigger if we really wanted in your will. It will still animate that, and we can also make it smaller, a bit too small. You can't see it, but just a show. And again the size of the dummy doesn't matter, and the mask is hidden, so we can't see if if you want to see the mass expanding insides. We could also see that, okay, and that's has it. That's how we create the dummy, and we link our masked to that dummy to get an animation through the key frames that we want. The killed will be posted in the notes, the projects, and you can look at it there and play around with it. Make sure that you understand it in the various bits of it. Ask questions if you're unsure and I'll do my best answer. 6. Recap: and that's it. That wasn't that much work. We have dynamic unrevealing text based on a key frame animation. Just a quick recap. We have the one text layer, and that's the part that's actually has a texture review. We have the mask layer, which we hide in the mask over you, all the text, and we have the dummy later, which defines the animation. Most of the work is done inside the mask layer in particulars, expression for the scale and this scale those two things. It sets the size of the mask to the text layer and also tracks the animation off the dummy layer to produce the combined effects for the text review. The size of the text does not matter. As we change the size of the text, the reveal animation will stay the same, and if we change the text itself, it will also stay the same. This technique can be used in your templates to a user edible text, but keep your animations at the correct positions. I'll provide the source code below in the notes. You have all of that. Ask questions if you want, and I'll have a full of course showing how you can add additional animations on here, such as a ruling ball to the text review. So be sure to follow me and watch my other videos. Be sure to export your animations and upload them in the class. We like to see what you did with it. Okay, Thanks for watching and enjoy your animations.