Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
One of the nicest features in After Effects CS4 was that it came bundled with mocha for After Effects. Mocha is a great motion tracker from the company called Imagineer Systems. Well, After Effects CS5 comes bundled with mocha version 2. However, I know a lot of you're jumping straight from CS3 to CS5, and frankly, it took me awhile to get into mocha. So before we delve in too far, first I'd like to give you a quick tutorial on how to do a motion track with mocha, then we'll discuss the new features like mocha shape. Mocha exists in the same folder as After Effects.
Twirl open the folder and double- click mocha for After Effects, and start. It has a very different user interface than After Effects, but really it's not that hard to get used to after a while. I'm going to go up to File > New Project. Choose my clip that I wanted to motion track. If it's an image sequence, just pick the first one in the sequence. Click Open. Decide where I want to save my mocha project file to. In this case, I want to go up a couple levels and save it in the same folder as my After Effects project. There we go.
Be careful of the options. It does include by default the number of frames that was in your sequence, but the frame rate might default to something you don't like. For example, I note this particular sequence is a 23.976, not 10 frames a second. If you have interlaced material, you must separate fields now. You cannot separate fields after you've gotten past this New Project screen. So if you're working with interlaced material, heads up. I'll click OK, and here is my footage inside mocha.
It starts with its own Autokey frame mode on. It's very useful in mocha. I would go ahead and leave it on. So I drag through and I make the decision that I'd like to put some more graffiti on one of these walls. Perhaps,this segment right here. And you'll notice immediately, it doesn't have too many distinct features. It's looking at the entire surface, an entire plane it can identify and track throughout a scene. Okay, I'm going to track this wall. Let's pick a frame where it's most visible, and it seems to be most visible, well frankly right here at the end.
That's where I get to see most of that wall. So, I'll start my tracking shape here. Mocha offers traditional Bezier splines, but also its own X-Spline tool that I actually kind of like using for this sort of work. Now, I don't need to be very precise. I just need to loosely define this wall surface that I want to track. I'll go up here, and that should do it, and close off my mask. X-Splines have tension on their corners. Go down for a very rounded corner or pull back for a very sharp corner.
In this case, I can go ahead and pull back and get a fairly sharp edge, and you'll see mocha will even zoom in for me to show me what that looks like. I'm going to turn off that Zoom window for now because I don't need it. Alright! Now I have this wall surface and part of my problem is during my track, which I haven't done yet, this man runs across that wall surface. If you know from traditional tracking, any obscuration like that will throw off your track. So before I track, I'm going to make an exclusion mask around him saying, don't track this guy.
I can go ahead and make that on the same layer as I defined my surface to track, but a better workflow is to deselect and put this exclusion on its own layer. Again, I'll use X-Splines. I'll just do something pretty rough around him, just to help me mark where to exclude him while he is running. There, there, there, there and close off my mask. I'll drag my Current Time Indicator back in time, and see at what point does he really kind of go outside of the mask, while he is in front of wall.
I'll go ahead and change my shape. Since I have Autokey frame mode on, it automatically places keyframe for me. This is an Autokey frame mode that works. I like it. I don't need to mask him too tightly, but I do want to have the maximum amount of that wall from mocha to track. So I don't want to make the exclusion larger than I need to, but neither am I doing rotoscoping here. I don't need to be overly tight around him. All right, let's just make another rough keyframe back here earlier in time, to maybe about right there.
And I'm sorry that you're having to watch all this, because watching someone else mask is in the league of watching paint dry. But this will give you an idea of what you need to go through to make this work. Pull that down there, beyond the wall surface there. I don't care about the back of him that much. I get tighter on to his head. By getting a little bit tighter on him, at least I am giving mocha more information to not exclude and to enter and track. And go back earlier, and he is outside of that wall.
I don't need to worry about it. And I'm going to do just a little bit of touch up here in the middle, just a couple extra keyframes to tighten things up. You can select multiple points and move them at the same time. You could right-click on a point, select all the points in the spline, and even get a Moving Tool to pick up and move the whole mask at once as well. I'll go back to my Pick tool, which is akin to the After Effects Selection tool, and tighten up little bit more on him. Oops, there is his foot.
Don't want to miss his foot. There we go. A little tighter on the knee and the hand here, give mocha more to track. Okay, that's basically all I need to make this track work. I'm going to go back to my starting frame. I want to track from here backwards to where I have originally defined this wall surface. I'm going to turn off tracking for my exclusion layer, so that I'm tracking just my layer that's defined the wall surface, and say Track Backwards. And mocha will go through and automatically track this footage.
Rather than looking for individual points, it's trying to track the entire plane that's defined by my first mask outline. And you'll see that even as this guy goes in front of the layer, mocha does a pretty good job of keeping this mask where it needs to be. And we come out on the other side intact. And we'll finish up the track with just a few more frames. And there we go.
I'll turn off the visibility of my exclusion mask for now, so it doesn't distract me, drag through, and pretty good. Notice that mask was initially down the central line of this dark stripe in the wall, and it stays there throughout. Now that I have tracked something inside mocha and I have basic underlying tracking data, next I want to make a surface. A four corner surface to corner pin my new information on to. So, I turn on the surface, and I want to go ahead and drag these guys into position.
Again, let's put my time marker at a good point here, and say that I'm defining the corners of this wall as being up there, down here in this dark corner and again, I'm going to use this dark street down this concrete to kind of define the edge there, come across there. If I'm not sure if I have my Perspective right, mocha has got another tool for that, Grid. When I have got my grid turned on, I can see how well it tracks the supposedly fine surface of that wall.
And I could increase my grid resolution. And here is one funny thing about mocha. Rather than having a typical scrubber, by default, you actually drag out a rotation like this to increase or decrease values. It takes a little bit to getting used to, but actually it's kind of handy. Okay, now that I've got my grid in place, I can more intelligently drag my surface to line up with what I think is a good parallax for this wall. And this graffiti doesn't need to be perfect, but it gives me a good reference.
So that's where I start, drag through time, and the grid really shows me how well things are tracking or not tracking during the course of this shot. That's holding up pretty well. If I wanted to really tweak out this track, there is this whole AdjustTrack tab underneath here. And Imagineer does have a good tutorial online about how to do an AdjustTrack. But for now, this is a good starting point. I am just wanting to give you a quick lesson. Okay, I have my track. I have my surface.
Time to export. Export Tracking Data. Now I'm working with an early version of mocha. You'll probably see different choices in these, but the one to go for is After Effects Corner Pin (supports motion blur). This is one of the improvements they've made in version 2, which is bundled with After Effects CS5. Rather than just providing four corners, they are now tracking the center of the surface, and that motion now is what can give motion blur inside After Effects.
I'll select with motion blur, copy to my Clipboard, and save my project to be safe, and now let's toggle over to After Effects. I'm going to go open up my mocha starter, and here is my same footage again. Okay, I need something to put on to that wall, and I have measured that it's in the whereabouts some 900 or so pixels tall, 300-400 wide, and I've actually created a precomp that includes my graffiti roughly in that shape. This is the precomp I want to slap on that wall.
You can prepare artwork however you like. I'll go back to my Tracking Starter, drag in my wall addition, and now paste my mocha data onto this new surface. Initially, it may not line up. Let's go ahead and move it later in time. That's because the footage layer that I tracked has different dimensions than the footage layer I'm corner pining. Quite common. All you need to do is reveal the anchor point, A is the shortcut, and just scrub your guy, your graffiti, whatever you want to put on that wall, over into place.
I'm going to putting it up a little bit higher like that, scoot him over a little bit, maybe put him in a blend mode like Overlay to blend him in that wall better. I'm going to press U to reveal my keyframes and you'll see I have both Corner Pin data, and also Position, Scale and Rotation. Again, the mocha is placing a plane and with the Export Motion Blur option, it's giving me Position keyframes so that I can enable motion blur for this layer. And just very quickly, I want to switch to switches, turn on Motion Blur for this layer, and turn on Motion Blur for the overall composition, and you'll see that now my guy is blurred as we track through this scene.
Now press 0, queue up a quick RAM preview here. And that's not too bad of an initial track. I could have refined it further in mocha, but this is just to give you a rough idea of how to use the program. Now in this particular shot, since this guy is running in front of my new layer, I'm going to need to do some rotoscoping work to make him block out or exclude my new graffiti when he runs in front.
And there is number of ways of doing that. You can hand mask it, or if you watched the previous chapter, you can use the new Roto Brush to quickly create a matte based on this guy and his black suit to have him cut out your new layer behind, just use it as a track matte. So, that's the basics of how to track in mocha. Now, let's get on to what's new, mocha shape, and some ways of handling motion blur.
Get unlimited access to all courses for just $25/month.Become a member
93 Video lessons · 33527 Viewers
135 Video lessons · 67808 Viewers
79 Video lessons · 23831 Viewers
350 Video lessons · 108099 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.