Track Matte Animations - Make Layers Appear and Disappear
Welcome to this brand new section of the After effects course in this section, I'm going to be going over a number of skills and effects that you should know how to do in after effects because they come up so often they don't really fit in with other sections about shapes or starting out your animations or three D. Or things like that. So I'm putting together them here because before we move on to those more advanced real world situations, I want you to know these ones. So the first one we're going to be looking at is how to make objects or text really any layer appear out of thin air like this and by knowing this sort of effect, you can do something like this where it appears as if it's coming out of a line and you actually know how to create a line like this and you actually already know how to create the animation for the line like this. It's a little bit trickier than what we've done before. But let's walk through this entire animation. What this is basically called is a track matt...
e animation. Alright, so start a new composition, you can name it, whatever I'll call it. Track matte 1920 by 10 80 pixels duration, five seconds is perfect. Let's start out with our background command. Why? For Mac users control y for pc users, I'll call this background and so now we have this background layer and I'll just lock it so we don't do anything to it. Next let's add some text. So I'll just take my text tool type in the middle, Say hello now with this, let's make sure that it is aligned to the center horizontally and vertically. And you can see that I'm using open songs and bold. Open songs is a free font you can find online before we actually animate this text. I want to talk about track mats, so to explain this, it's best if I just walk you through it. So take your rectangle tool, make sure that you have a fill set. You don't need a stroke. So you can turn stroke to zero and create a rectangle that covers your text like so doesn't matter what color it is. Alright, so this is basically a shape that we're going to have our hello text peer into. There's another column that I want you to look at in your timeline called track matte. And if you don't see that it might be because your screen is too small. And there will be a button down here that says toggle switches, modes, click that button to make sure that the track matte column appears. Change that for the hello layer from none to alpha matte. And make sure that your shape layer is above your Hello text. So select alpha matte shape layer one and I can just rename this actually track matte. Alright, so what happened was the track matte actually turned off but we're still using it because if we take our text with our selection tool, click on it and move it around. Look what happens the text appears where this rectangle is but not where it isn't. So now you can imagine we're just going to animate from down here to up here. So let's do that. So bring up your position for the Hello at one second let's set the position key frame where it is now and then say let's make it slide in from the left actually if we want. So let's drag to the left and I'm holding shift down so it locks to that sort of line and now we can play through and we have this text popping on, we can do our things like adding motion blur, enabling motion blur. F nine for easy ease. Go into our graph editor at our pop, you're all very accustomed to this. These are just the techniques that I use to make my animations look a little bit more dynamic and so now you can see that text popping in. Cool. So how do we make it pop in from a line? Well, we just have to put a line right at this point over here. So the easiest way to create a line is with the pen tool. So take the pen tool, set the stroke to say 10 pixels and now I just create a line, click at the top and then shift, click at the bottom so that it creates a straight vertical line and now we have that line going across there If we want to make sure that it's perfectly horizontally centered or vertically centered. Rather click the align tab and click the vertical center alignment. So now we have our text coming out of this line which is a pretty typical effect you see in modern commercials and modern videos. How do we animate this line on? Do you remember what we did in the last section? It's called a trim path animation. So under our line. So let's just title this line. Let's go in and add trim paths. If you drop down the trim paths menu and we have our start and end percentage instead of animating from 0 to 100. What we're going to do is actually set a key frame right now how it is for both the start and the end values. So that's at one second and then if we go back in time and actually we're going to play around with the timing of this. But if we go back here, Let's move the end percentage to 50, Which moves the line to the midpoint between these two points and then the start to 50. So now in between here let me just turn off our text so I don't see that for a second we have this line growing on. I'm going to add easy ease, make these a little bit faster, add motion blur to this. Then I'm also going to see when our text starts to appear. Oh let's turn on our text layer so our text appears right as the line is growing. Maybe I wanted to go a little bit later. I'll just click the text layer and drag to the right a little bit whoops, that's the track matte. The text later drag to the right, just a few frames. So now we have this line popping on and hello text sliding on and we can quickly maybe make this line disappear once the hello text has gone through the line by copying and pasting are starting and ending key frames copy paste. And now let's go forward and we can copy and paste these second ones. You'll notice something that's a little weird with the motion with the second one and we'll see if we go into our graph editor that the timing is a little off and that just happens when you copy and paste key frames. So if you want to add that pop we can select the key frames, drag them in, make sure that we have them both selected for both the start and the end. So I'll just click the start ones, add a little pop just dragging in the handles for both key frames. Okay, so if I select both of them by shift clicking, they should look pretty similar now if we play through pops on pops off. Pops on. Pops off. You'll notice though right here. It's kind of weird that you have you probably can't see it, but I can see the line right here, you know, that's just a little glitch in after effects. If I turn off motion blur, it's not there. But with motion blur, it's on, I don't know it necessarily why it's still there, but to get rid of it, I can just trim the right side of this layer. I can either click and drag this to the left, so then it just disappears after this frame right here. Or if I undo that there's a keyboard shortcut that I want you to know option right bracket, so option, right bracket or alt, right bracket. For Windows, users will trim the clip from the right side. If I want to trim from the left side, I can do option left bracket, see how that worked, undo. Option left bracket. So that's a quick way to trim layers. So now we have that animation. Cool, right, that's a track matte animation. You can do a lot of cool stuff with that in the next lesson, we're going to learn about pre compositions