Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

mocha tutorial

From: After Effects CS5 New Creative Techniques

Video: mocha tutorial

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.

mocha tutorial

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.

Show transcript

This video is part of

Image for After Effects CS5 New Creative Techniques
After Effects CS5 New Creative Techniques

35 video lessons · 17927 viewers

Chris Meyer and Trish Meyer
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed After Effects CS5 New Creative Techniques.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

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.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.