This video presents a comparison of planar and point tracking.
- [Narrator] So why would you use mocha when mocha is a planar tracker, which means it tracks a planar surface or planar pattern through 3D space. That offers many advantages over more standard point tracking. Let me show you a comparison. Here I am in After Effects. I'm going to set up a new project. In the project panel, I'll right mouse button click, go to import, file, and go to my 00_Introduction folder, and in the Footage folder, there's a City folder. I'm going to grab the first frame of this image sequence and so long as the sequence button is clicked, I can bring it in as a single unit, so import.
I want to make sure this is 24 frames per second, which it is. Then we'll drag this down to the timeline to make a new composition. Let me zoom out. So here is a shot of a city, and let's say I want to do something a little bit more difficult. Let's say I wanted to track this building here, and that will cause some problems, because the building goes out of frame. Also it's a relatively low contrast building in terms of how it compares to the background. Let's try a more standard tracking method.
With the layer selected, I'm going to go to Animation, Track Motion. Look at the tracker tab here, and I'm going to use corner pin tracking, that'll give me four track points. We'll switch track type to perspective corner pin, and I'll get four of those little trackers. Let me zoom in. So each one of those track points will track a pattern within the pattern part of the box. Even though they're connected by a rubber band, they don't understand what's going on in three dimensions.
It simply tracking each pattern in 2D. That's fine for many types of tracking, but for complex things like this shot, it's not going to work very well. Let me go ahead and set the points here, move these over to the building. I want to be ambitious and try to track the top left, it should track okay. Top right, a little bit more difficult, not much contrast. And down below, again, not a lot of detail here.
And maybe the left side here, and see what happens. Let me zoom out and we'll track. We'll track forward, and so so. I've lost the bottom left one, and the two right ones just stop when they come to the edge of the frame. So it's having problems with the low contrast patterns, and it's definitely having a problem with the building going out of frame. Again, the patterns it's tracking aren't related, simply four separate points.
Now, that works for corner pin because a new layer would be distorted to fit those corners, but it's not working in this situation. So, let's try mocha. I'm going to hide the tracker, and then go back to Layer, and apply the mocha Pro affect. Mocha pro. Okay, and launch mocha through this effect, it loads the footage. Now I'm going to show you the tracking process really quickly, and we'll talk about it in more detail as we go through this course.
I'll grab the X spline, draw a loose shape over that part of the building with four points, right mouse button click to finish the shape. Now, I'll define the entire side of the building as a planar surface I can track forward. It's going to track. It's actually tracking all the pixels in that shape as if it was a planar surface. It picks up the scale change, perspective change, and it tracks out of frame.
Now I can export the data. Before I do that though, I want to turn on the hidden planar surface with this button right here, with the S, and this is where the corner pin data will be situated. In other words, whatever I apply the corner pin data to, we fit to the shape. I can zoom in, use my Z key to zoom in, and use my pick tool to move the corners of this planar shape, and I'll match it to the corners of the building.
And this is related to my spline shape, so it just follows along. You can see it just does the right thing. I'll move this over a little bit to the left, like this, and now I can export it. I can export my tracking data right here. Export, in this case, as an After Effects corner pin, copy to clipboard, return to After Effects. Now, this is a special mocha Pro plug-in version, so I can simply save this project as updated data, and then kill the window, and then return to After Effects.
After Effects understands what's going on in terms of pasting that data, so I can make a new layer that I want to distort with a corner pin, like a solid. With that layer selected, go to Edit, Paste and pick up the data from the clipboard, paste. I'm going to go back to my composition, and indeed, that full resolution solid is distorted down to the corner pin location based on the mocha planar surface.
If I zoom in, and play it back, you'll see it tracks just fine, including going out of frame. So, a planar tracker, like mocha, is very robust. It can handle very difficult situations, and is fairly easy to set up.
- Setting up the application
- Organizing projects
- Creating spline shapes
- Tracking in mocha
- Using tracking data for different tasks
- Masking occlusions
- Using offset tracking
- Rotoscoping fundamentals
- Creating complex mask shapes efficiently
- Stabilizing footage
- Correcting for lens distortion in footage
- Generating a 3D camera solve
- Working with mocha VR