Join Todd Kopriva for an in-depth discussion in this video Overview of the mocha AE interface and workflow, part of After Effects CS5.5: Motion Tracking and Stabilization.
In this video, we use Mocha AE or Mocha for After Effects to attach a layer to this cliff to make it look as if the layer is painted onto the cliff. Specifically, we'll be attaching this smiley face as a piece of graffiti painted on the cliff to see how this is going to look. Let's do a quick preview here, just going to stick the smiley face right there and have it follow the motion and perspective change of the cliff.
All right, so first of all we need to track the motion of the cliff, and to do this we are not going to use the Point Tracker in After Effects to do the corner pinning. We are going to use Mocha AE. Mocha AE is a stand alone application, so it's not a plugin. It's an application that we have to open separately. We'll import a movie file into it, analyze that movie file, and then send the motion tracking information back to After Effects to use on a layer, based on that same movie file. So, let's send our Footage item that the cliff layer is based on over to Mocha. right-click or Ctrl+Click on the Mac OS, to reveal the layered source in the Project panel, and I see that it's this item here. And if I want to find that in Windows Explorer, I Right Click or Ctrl+Click on Mac OS and choose Reveal and Explore or Reveal and Finder. And here I see cliffwideangle.mpeg.
Now, this actually turns out to be a bit of a problem, because Mocha can't import all of the kinds of files that After Effects can import. And I happen to know that it can't import .mpeg files. Actually, switch over to Mocha and try. I'm going to press Alt Tab, go to Mocha, here's the Mocha interface. Notice it looks quite a bit different than After Effects, but don't worry it's actually not as complex as it looks. We'll be doing some very simple things here. First thing that we want to do File > New Project > Import A Clip.
So, we go to choose, and we don't see our cliff movie here, we'll only see these .mov files. And here if we look at, Drag this a little bit to the side so that we can see it better, we can actually see a list of all the things that Mocha can import. It's a pretty good list, but it doesn't happen to include the .mpeg file that we have. It can import .mpeg files but that's different.
So, rather than give up all we have to do is go over to After Effects and transcode our movie file into something that Mocha can use. So we'll cancel out of this and for the moment, cancel out of this and switch back to After Effects. If you want to simply transcode an item that's in the Project panel, you can open the Render Queue. And just Drag the item straight into the Render Queue. And for my Output Module, I'm going to choose Lossless, and it will go to clip3.avi.
Now, I'm not actually going to render this right now, because that will take a while, and I don't want to bore you. So, let's just switch over to where I've already output a file like this. Go to File > New project > Choose, and I actually went ahead and made a lossless AVI already. So, let's open that one, and there we go, all of the defaults should be fine.
It's basically telling us what frame rate it's going to use and so on. They're all going to match the item we imported, so no reason to change it. Yes, we're going to overwrite the existing file because I've already done a project with the same name. Here we are, Drag the current time indicator just to watch the movie a little bit in Mocha. And we want to attach our smiley face right over here.
And all that you really need to do in Mocha, unlike setting points to track, is just draw a boundary around the region that you want to track. You can use (UNKNOWN) I'll use (UNKNOWN) You don't really need to know the difference between (UNKNOWN) for this purpose. Imagine the makers Mocha recommends (UNKNOWN) are more conventional in graphics design. So sometimes people are more comfortable with them just clicking, drawing a rectangular region around this mossy patch.
And when I click on the first vertex, it closes the path, very much like in other tools that you're probably used to. And there, my region is defined. And now, let's track it. So, because we're at the beginning of the timeline we can track forward either one frame or all the way forward. I'm just going to trust Mocha and hit Track Forward, and we see the progress down here. We also get an indication of progress up here. And I'm just keeping an eye on things to make sure that it seems to be tracking, which it does, it's tracking very well. And it looks like it's done.
One way that you can preview the result is to click this Planar Grid, and then hit Play. It'll bounce back and forth previewing by sticking that grid to the area that you've tracked. Looks pretty good to me so I'll stop the preview. And now, the next thing to do is to export the tracking data. The tracking data is exported in a format that might Be somewhat unusual to you.
Export it to the clipboard, so that you can Paste in After Effects. So you won't be getting a file. You'll just be getting some data on your clipboard. So Export Tracking Data > Format > After Effects corner pin. It's going to be creating keyframe information on our clipboard for the corner pin effect. You can also use this with the Red Giant software RG warp and you can use Mocha Import into the script by (INAUDIBLE) that allows you to use this data in a variety of ways.
We'll talk a little bit more about that later. So, Copy to clipboard and now Move over to After Effects, Alt+Tab, go back into my composition. Here, on my white solid layer, turn the visibility of that solid layer on, all I have to do is Paste > Ctrl+V or Cmd+V on Mac OS. And there, there it is. Now, my white solid layer already has a blending mode associated with it.
If this were normal, you'd just see the white solid layer. Notice that it also only has partial opacity. So, if we put this back up to 100%, you can see it as just a white solid. So let's go ahead and preview it. Looking like this just so we can see how it sticks, and then let's put its opacity back down to 50%. And change its blending mode back to multiply, and then preview that result.
And there we go, we have a layer that is following the motion of the perspective tracked object quite well. Look, it may look intimidating, but it's actually very simple to use for things such as this. Let's look at how that layer looks. What kind of data we pasted in there? So press U with the layer selected to show all Animated Properties, and we'll just see that it's a bunch of keyframes on the Corner Pen effect.
So the corner Pen Effect was applied with all of these keyframes. This shows that we could have done very much the same thing in After Effects had we been able to find. Really good tracking points on here that wouldn't have slipped, but its really hard to find high contrast tracking points on a surface such as this and Mocha just makes it a lot easier.
- Overview of motion tracking
- Manual motion tracking
- Planning and shooting for motion tracking
- Motion-tracking utilities from third parties
- Motion tracking with the point tracker
- Motion tracking with mocha-AE
- Stabilizing motion