Motion Tracking – Screen Replacement
Master Professional Screen Replacement with Motion Tracking
Core Technologies in This Tutorial
MochaAE Integration
Professional planar tracking software built into After Effects. Provides industry-standard motion tracking capabilities for complex screen replacement projects.
Planar Surface Tracking
Advanced tracking method that follows flat surfaces through 3D space. Essential for realistic screen replacements that maintain perspective and distortion.
Corner Pin Technology
Four-point tracking system that maps corners of screens. Enables precise positioning and realistic motion blur for professional results.
This exercise demonstrates tracking device screens in Mocha AE for replacement with images or video files. You'll work with both laptop and mobile phone footage to master different tracking scenarios.
Workspace Setup Requirements
Ensures consistent panel arrangement for following tutorial steps
Provides optimal screen real estate for tracking precision
Critical for accurate tracking data and proper screen replacement
When tracking, it is necessary to make sure that the dimensions of the video you are going to track match those of your composition. Mismatched dimensions will cause tracking failures.
MochaAE Application Process
Select Video Layer
Choose the layer containing the footage you want to track for screen replacement
Apply Mocha AE Effect
Search for and double-click Mocha AE in the Effects & Presets panel
Launch Mocha Interface
Click the Mocha logo in Effect Controls to open the dedicated tracking application
In motion tracking, occlusion describes situations where other elements cover the object you're trying to track. This is common in device tracking when hands, fingers, or other objects move in front of the screen.
MochaAE Tracking Workflow
Create Tracking Layer
Draw a spline around the element you want to track, creating a layer in Mocha terminology
Position Planar Surface
Align the four corners of the planar surface exactly with the screen corners you want to replace
Configure Pixel Usage
Adjust Minimum % Pixels Used for optimal balance between precision and processing speed
Execute Tracking
Run the track and monitor for drift, stopping to adjust if the layer moves significantly
While the tracking layer can and usually should be larger than the screen you are trying to replace, the planar surface needs to match the screen exactly. The planar surface forms the shape and positioning of the replacement screen.
Position your Reference Points on distinctive visual features surrounding your screen area. These points must be easily identifiable throughout your footage and don't need to fall within the planar surface boundaries.
Advance your playhead to the final frame of your tracked sequence and make precise adjustments to correct any reference point drift that has accumulated.
Navigate to the temporal midpoint between your reference frame and end frame, then make additional corrections as needed. This iterative refinement process progressively improves tracking accuracy.
Continue this subdivision process—placing adjustment keyframes between existing ones—until you've eliminated visible drift throughout your sequence.
Validate your adjustments using the Insert Clip preview option to observe how your planar surface behaves throughout the timeline. This real-time feedback helps identify areas requiring additional refinement.
Save your refined project using Cmd–S (Mac) or Ctrl–S (Windows), or through File > Save Project.
Close the Mocha interface to return to After Effects, where you'll apply your tracking data to replacement content.
Transform Types Comparison
| Feature | Transform Type | Points Used | Best For |
|---|---|---|---|
| Translation | 1 point | Position changes only | |
| Scale/Rotation | 2 points | Size and angle changes | |
| Shear | 3 points | Vertical/horizontal warp | |
| Perspective | 4 points | Full corner pin adjustments |
Configure the Layer Export To property to target your pre-composed screen content, ensuring the effect targets the Source properties of that layer.
Click Apply Export to transfer the tracking data from Mocha to your After Effects composition. This creates the dynamic link between your tracking and replacement content.
Preview your timeline to verify the tracking application. Your pre-composed layer should now follow the device screen movement precisely, maintaining perfect registration throughout the sequence.
NOTE: If tracking appears incorrect, you can delete the applied Corner Pin effect, return to Mocha for adjustments, and reapply the tracking data. This non-destructive workflow allows for iterative refinement.
Key Takeaways