Motion Tracking Basics
Welcome to this new section of the Aftereffects course. This section is all about motion tracking. What is motion tracking? Well basically it's attaching effects, graphics titles really any layer that we want in our timeline to something moving inside of a video clip. So take this as an example, we have this text that's moving along with this moving little bottle, little bird feeder thing and it's attached to this so it moves with it. No, I didn't do anything manually. I didn't add position key frames or anything like that manually to track this and move it in this manner. I just did let after effects do the work. Another example is like this one where the text is actually moving along with the video clip, its in the environment of that video clip and the camera actually pans over this title as if it's panning over this ferris wheel or going across this ferris wheel. So both of these are things we're going to learn in this section, starting with more of a simple position tracking like ...
this. So you can open up this project file if you want. It's called motion tracking and it has the two projects that I've already set up or you can follow along and build it with us just by importing the bird and ferris wheel video files that are available in the video folder of the project resources first. Let's take the bird and add it to a new composition. Like I do with any video clip that I'm adding to after effects. Then I have to decide what part of this clip do I want to track, I'm just going to take the first five seconds. So it's a little bit more manageable to composition trim comp to work area. Now we just have this five second clip. You'll notice on the right hand side that you have this tracker panel. So go ahead and open that up. If you don't see that, go up to window, click on tracker without anything selected. You can't really do much with this. But when I click the video clip in our timeline, all of these buttons are clickable. Now this is a quick way to warp, stabilize or stabilize the motion of your camera, which is what we did through the effects and presets earlier in this class. But what we're going to be using in this menu is the track motion button. So with your clip selected, click track motion. You'll notice two things one, it opened up the layer panel. This is similar to the rotoscoping lectures of this class where we're diving into this individual layer, it's not the composition, but it's kind of like you're diving into this individual layer to do some more work. You'll also notice that this track .1 has appeared and I'll zoom in so we can see clearly what is going on. So in this track .1, you have two boxes and then this little plus sign the inner box is what we're going to put on our video clip to track, we can move this trackpoint around by clicking inside the inner box and moving it around notice that if I click the little plus sign in the middle, we can't move around the box that moves around that track point. So to move around this actual tracker, click on the inner side of this box, but not on the plus sign. And if you're zoomed out, that can be really hard to get right in there. So I do encourage you to zoom in to a point where it's a lot easier. Now, the inner box is what we're going to put on the aspect or the point in our video that we want to track. So let me zoom out really quick again. So we can track a lot of things, we can track this bottle, we can track this wire up here. We can track parts of the bird, we could try to track really anything but the way this tracker works and what we're doing right now is that it is able to track points that have a lot of contrast in them. So what does that mean? It has a lot of bright and dark spots, that's how it tells if it's moving or not. So, if we go through this clip, you'll notice that if we're tracking, let me actually just zoom in and show you as I do it. So if I take this square and we put it over here on this point, say we want to track this edge of this little bird feeder and you'll notice that when I click and move it, you get this sort of zoomed in version of the square to make it easier to see what you're tracking. Now we're telling after effects, we want to track this point. And so when we move forward it's going to see that this point is moving and it's easy to see that because there's a lot of contrast. There's some bright parts, there's some dark parts. Also the background is very clean, there's no camera movement so it's going to be able to track this very easily. The other thing you can do with this is you can make it larger so we can increase the size of the trackpoint the inner square by clicking the inner edges or the corners and dragging out and you'll notice when I do that. The outer square also increases in size. Now why would we do this? Sometimes when you're trying to track something, the small square just doesn't work because it's not getting enough information to be able to track its literally looking at all the pixels with inside this little square and it's seeing how things are moving from frame to frame to frame. And that's how it tracks, increasing the size of the square will help but it will also take longer to process because it's looking at more pixels. So it's a balancing act and you do have to be patient. Sometimes if you make this rather large. Now that's the inner square, what about this outer square? Well this outer square helps the inner square figure out where it should go. So think of the inner square as the specific point you want to track with that little plus sign in the middle, put that where you wanted to track. And then the outer square helps tell the inner square where to go. So when I move this, the outer square sees that. Okay, well part of this has moved we need this to move to the right and that's just because things are changing in this outer square as well as in the inner square. I know it's a little confusing but as you play around with it, you'll notice that if the outer square is really small, the tracking won't be as good as if you make it a little bit larger, especially if you have camera movement and there's not, there's a lot more detail. This is very very easy clip to track because the background is all blue. The other thing to note while you're trying to track things is that it's easier to track things when they're in the frame the entire time. So you might be thinking well I want to track this bird's eye. Well that's going to be very difficult. You can do it manually, you can try to do it. But because the bird is moving its head around and here you don't even see the eyeball and the colors while there's contrast right here with the dark of the eye and then the outside is bright with the motion and it's just going to be a lot harder. Having higher resolution video helps like 4K. But it's still going to be difficult. So when you're starting out, try to find something in your frame that stays in your frame for the whole clip and is not covered up by something. It's not covered up by anything in the foreground. It doesn't turn around that kind of thing. All right. So enough sort of preface ng all this. Let's move this to the point we want to track. So say we want to just track the edge of this like so I've moved my square over that. What do we do? Well, we go back to our tracker section two of these things. We can skip for now the current track, which is tracker one, you can have multiple tracks, tracking points on any video clip. The track type which is transformed which is what we're going to leave it. How this changes. And then there's three checkboxes for position, rotation and scale. Right now we're just tracking the position the motion of this little bird feeder. If the camera was moving either zooming in moving in or out or kind of rotating left or right. We would have to do this rotation and scale but we'll get to that in a future lesson and then for edit target and options just leave that. Now we get to the good stuff analyze. So you have these four buttons. One is to analyze one frame backwards. The next one is to analyze backwards and it automatically goes through your whole video. The next one is to analyze forward the whole video and then the last one is analyzed one frame at a time with this clip. We can just analyze the whole thing at one time and you'll see what happens when I click this button, notice what happens with this box, you'll notice that it moves along with this point and you see that it's doing a really good job sticking with it. And that's because it has a lot of good information to track. If I was trying to track just a part of this bottle, a part of the sky, something like that. That doesn't have as much contrast or data. It would be a lot harder, awesome. So now we have tracked the motion. What do we do next? Well that's coming up in the next lesson. When we apply what we've just tracked to a new null object and then we apply that to any other layer