From the course: After Effects CC 2022 Essential Training

Mocha AE planar tracking - After Effects Tutorial

From the course: After Effects CC 2022 Essential Training

Start my 1-month free trial

Mocha AE planar tracking

- [Instructor] In addition to the point tracking tool we saw previously, Mocha AE is another tracking tool that can be used for more difficult shots. The same tool used to easily create animated masks, can also be used to follow a defined texture as it moves throughout the duration of the shot. This results in better tracking with less effort. Let's see how this works. In this shot, Mocha was able to track the side of the van even though it's off screen at the start of the shot. That's something a point tracker would easily fail at solving. It's Mocha's strength of tracking planar surfaces that helps separate it from other trackers. So let's see how we can do this. Here in this 03 composition, we have the same shot. Let's step into Mocha AE, by first right-clicking on our footage, coming over to effect. Boris FX Mocha, Mocha AE. Let's double-click this to open up the effect controls. And before we hit the button to step into Mocha AE, let's make sure that our resolution is set to full. By doing this, we give Mocha all the pixels available in our footage to come up with the best track. Now that we've done that, let's select our button and go into Mocha AE. Here inside of Mocha, I'm using the Essentials workspace. And what we want to do is scrub our footage to find a good frame, where we have the side of our van. Somewhere in here looks pretty good. Now what I'll do is come over here to my X spline tool. And with it selected, I can start drawing my shape. And while I'm doing this, I can actually hold down Z on the keyboard to temporarily switch over to a magnifying glass. And I'll drag upwards to zoom in. And I can also hold down X to temporarily switch over to a hand tool, and that allows me to pan around in my shot. When I let go, I'll be back into the X spline tool and I can continue drawing. And so I'm drawing out a shape that isolates just the side of the van. Now to close out this path, I'll just right-click and that completes the path. We have a brand new layer one here. And let's rename this van. Let me zoom out here. And now what we can do is make sure that we have our perspective feature enabled. This tells Mocha to track translation, scale rotation, skew, and perspective. You'll note that we have a new key frame here. And all this top bar is red, telling us that we don't have any tracked information. So now that we have our texture defined, let's track backwards. Okay, that looks pretty good. If at any point any of this track goes sideways, we can certainly stop where it fails and redraw our mask. And that will add a brand new key frame and a brand new texture to sample. And once you've done that, you can track backwards again and pick up where you last left off. All right, now we have tracked information here with this purple or blue line. And I'm going to pick up right here and track forward. Okay, it looks like our path has successfully tracked along with the side of our van. But now what we need to do is actually check the integrity of the track itself. This mask information isn't our track. Our track actually lives down here, under the show surface. You can see that we have a brand new interface here with these four corner points. And if I drag these out, you can see these a little bit easier. And this is actually the four corner points that will make up our corner pin information back in After Effects. So this is our surface. Now what we need to do is accurately place this onto our van surface, so that we can see it follow along properly. And one way that we can do that is getting help by the way of this grid. If I enable this show grid, this gives us an idea of our planar surface. So I'm going to carefully maneuver our corner points to the side of our van here. And I'm going to use that grid as a reference as to how well this fits in with the perspective of the shot. Actually, let's move forward here. And what I'll do is zoom in and use the ground plane here as a guide as well. Okay, I'll call that good for now. Okay, now what we can do is come over here to this layer properties. And under this insert clip dropdown, we can change this from none to either a grid or this logo. In here, now you can see that we have this Mocha logo as a stand in for anything that we'll insert back in After Effects. Let's come over here to view and toggle this show overlays feature. And now you can see all of our interface disappears and we have only our logo insert in there temporarily. So let's zoom out a bit and let's review the shot, and see how well it tracks. Okay, and I think that might be good enough. Let's come out of this by Xing out. Mocha's going to ask us if we want to save this information which, of course, we do. We'll say Save. And now here in After Effects, let's twirl down our tracking data for Mocha. And let's create the track data. Mocha is going to ask us what layer we want to pull information from. And since we only have that one van layer, we'll say OK. And now we have a bunch of key frames here inside of After Effects, which we can then use to transfer over to another layer. You can see now, here we have our tracking information, our corner point pins for the side of the van there. So let's go back into our project window and let's grab this AE type composition. Now what I want you to notice is that here in the project window, it reads 3840 by 2160 is the dimensions of that. Which just so happens to match this composition that we're working in. It's important to have those two dimensions the exact same, in order for the corner pinning information to work properly. And under the Mocha AE effect, let's change our export option from corner pin to corner pin support motion blur. And now we just need to target our first layer and apply the export. And there it is, we have our layer one tracking along with the side of our van. It is a little small, but we can fix that easily. One way is to scale up the contents inside of our pre-comp, but here's another approach. Let's come over here to layer one, and we already have our corner pin effect. We need to add in a second effect. Let's right-click here and go down to distort, transform. But we want to make sure that we put this transform before our corner pin. And that way, we can scale up our layer before we corner pin it. And that's important, otherwise you'll get some undesired results. Okay, I think that's large enough. We might nudge this up just a tad bit, somewhere in here. And lastly, what I'll do is turn on the motion blur for our layer one. And make sure that our global for the entire composition is enabled as well. And just like that, we have some motion blur introduced into our layer. And it's tracking along with the van. Now just as a finishing touch, let's change our blending mode here from normal to multiply. And that'll help this element sit in the scene a little bit better. And that's how we can use Mocha AE to extract accurate tracking data from footage with the power of planar tracking.

Contents