Planar Tracking with Mocha in After Effects
Planar tracking with Mocha AE allows you to track flat surfaces in motion footage to attach graphics, perform screen replacements, or stabilize shots. This guide provides a direct, step-by-step workflow for launching Mocha from within Adobe After Effects, drawing your tracking splines, setting the planar surface, solving the track, and applying the resulting data to target layers.
1. Apply Mocha to Your Footage
Select the layer containing your footage in the After Effects timeline. Go to Effect > Boris FX Mocha > Mocha AE to apply the effect. In the Effect Controls panel, click the prominent Mocha button to launch the Mocha interface in an external window.
2. Choose the Proper Frame and Tool
Scrub the timeline in Mocha to find a frame where the target surface
is clearly visible and unobstructed. Select the X-Spline Pen
Tool (shortcut: Alt+G /
Option+G).
3. Define the Tracking Area
Draw a spline around the planar surface you want to track. Keep the following in mind:
- The surface should have visible texture, contrast, and stay relatively flat (e.g., a phone screen, a wall, or a floor).
- Do not track the entire object if edges warp; track only the rigid plane.
- If moving objects (like hands or pedestrians) cross over your plane, create a separate layer above your tracking layer to act as an exclusion matte for those occlusions.
4. Align the Planar Surface and Grid
Click the Show Planar Surface button (S
icon) and the Show Planar Grid button in the top
toolbar.
- A blue rectangle will appear. Adjust its four corners to match the exact boundaries of the object you want to replace (such as the four corners of a screen).
- The grid helps visually confirm whether Mocha correctly understands the plane's tilt and perspective.
5. Configure Track Motion Options
In the Track tab located at the bottom left:
- Under Motion, choose which transformations Mocha should calculate: Translation (T), Scale (S), Rotation (R), Shear (S), and Perspective (P). Enable Perspective if the camera moves around the object in 3D space.
- Set the Min % Pixels Used (typically 50% to 90% depending on footage quality).
6. Track the Footage
Use the tracking controls beneath the viewer:
- Click Track Forward (or Track Backward, depending on your starting frame).
- Watch the planar grid. If it slips, stop the track, adjust the spline to capture better texture, and resume tracking.
7. Save and Return to After Effects
Once the tracking is complete, press Ctrl+S (Windows) or Cmd+S (macOS) to save your project inside Mocha, then close the Mocha window.
8. Apply Tracking Data in After Effects
Back in After Effects:
- Open the Tracking Data section within the Mocha AE effect in the Effect Controls panel.
- Click Create Track Data... and ensure the layer you tracked is selected (marked with a gear icon), then click OK.
- Choose your Export Option:
- Corner Pin (Support Motion Blur): Best for direct screen replacements on a solid or pre-composed layer.
- Transform: Best for attaching text or general graphics using position, scale, and rotation.
- Set the Layer Export To dropdown to your target layer (or a Null Object).
- Click Apply Export. Your target layer will now adhere to the tracked surface throughout the timeline.