Join Andy Needham for an in-depth discussion in this video Rotoscope the finger in Mocha, part of After Effects: Compositing a Cell Phone.
- [Voiceover] Now we need to think about tracking this phone screen, and as I mentioned previously, we're going to use mocha. Mocha is the Academy Award winning Planar Tracking technology developed by Imagineer Systems and is my go-to app for screen replacements. The good thing about After Effects is there's a version of Mocha, called mocha AE, has been bundled with the software since 2008, so way back in the CS4 days. If you don't know how to use mocha, don't worry. I'll walk you through the steps to get this task completed.
And then, if you wanna further your knowledge you can check out mocha 4 Essential Training with Ben Brownlee or the other courses focused on mocha on the library. So, in our phone camp let's select the layer that we want to track in mocha, which is our phone layer here, and we'll go to the Animation menu and choose Track in mocha AE by clicking this, it will fire up mocha. If you have mocha Pro or mocha Plus it should open that version up but they all function in much the same way.
So here we have the New Project dialogue and we'll just leave everything at the defaults. Looks good to me. So I'm gonna click on OK. Let's just make our frame a bit bigger and we can just begin working. So, the way mocha works is it works in layers. And so, the closest thing to the camera is usually the top most layer. So, we'll have to keep an eye on that in our Layer Controls panel over here. What we need to do, if we play through the sequence, is mask out every time the finger crosses the screen, we need to mask that out and these are only very short interactions so it shouldn't be too much of a difficult task, but we need to do that so that we can tell mocha to ignore that movement when we come to track the screen.
So, let's start by finding our first finger interaction which would be a little swipe . Okay. So we're gonna take it from maybe the middle of where it is. So, what we'll do is we'll use the X-Spline tool and I'm gonna create a rough shape around the finger and press the X key and this will allow us to move around and I think that much.
I'm just clicking around to make points and you can press either the C key or right click to finish the shape and then if you grab one of the handles you can then round off those points. So what we'll do is we can leave all these settings as they are for now, and we're gonna track backwards. Just keeping an eye on the mask, we can either go frame by frame or continuously.
That's enough, way more than we need. So, what we can do is just bring this back and we'll make our in-point for this layer here, so we'll just press this button, and then I can go over to the key frame that we set earlier, when we drew the spline, and I'm gonna track forwards now. I'm just gonna do it another frame. Now the finger has cleared the frame, we can ignore that. So, we'll just set an out-point and that's all we have to do for each one.
So, we'll go through and also-- Actually, what I wanna do is when we create a new layer, I'm gonna turn off the tracking for this layer. So let's just keep organised and we'll call this Swipe left then we know where we're up to and now we can scrub along and we'll see where the next one is, which is around here. So, as before, we found a good amount of pixels and I'm going to draw out another X- spline, it's just clicking those points really rough, and something like so.
Gonna right click to close the shape and just round it off a bit, and in fact if you right click and drag on those points you'll take all of them at the same time. So let's track backwards. And that clears the frame and if we just create an in-point get back to our key frame, track forwards. That one lingers for a bit, and you can see the finger changes shape so, one thing to note, we can go back to roughly where we want it to be and I'm actually gonna bring in the spline so this creating a key frame and when the finger changes shape I'm just going to adjust some of these points.
That might not be entirely necessary but we'll just track forward. And now we've cleared the frame and we can just set an out-point for that layer. That's our Swipe right. So, I'm gonna get through this doing the exact same thing for the taps and the other swipes and we'll be back once we're done. We brought our footage into mocha, using a very simple workflow in After Effects and we have created rough roto shapes for each interaction the finger makes.
By tracking each swipe and tap, we can now tell mocha to exclude those pixels from the calculation it makes when we track the screen.
Here, Andy Needham shows how to take the app mockup created in the companion course, After Effects: Creating a Mobile App Interface, and composite it into live-action footage of a smartphone. The final product is an animated promo video that helps visualize how the app will be used on a real device. Andy also covers storyboarding, tracking, keying, color correction, and a few audio tips. By the end of the course, you'll have more experience with the screen replacement workflow in After Effects and have a web-ready deliverable ready to share with the world.
- Planning with a storyboard
- Filming the phone
- Importing the live-action footage in After Effects
- Retiming the animation
- Tracking the shot in mocha AE
- Keying the screen with Keylight
- Adding an animated logo
- Rendering the shot
- Color correcting the composite