Skip to main content
April 1, 2026Kalika Kharkar Sharma/15 min read

Cellphone Commercial: 4-Point Tracking in mocha AE

Master Professional Motion Tracking with Mocha AE

Core Technologies You'll Master

BorisFX Mocha AE

Professional planar tracking software that installs with After Effects. Specializes in tracking surfaces rather than individual points for superior accuracy.

4-Point Corner Pin Tracking

Advanced tracking technique that monitors all four corners of a surface, essential for realistic screen replacements and perspective matching.

Planar Surface Detection

Revolutionary approach that tracks flat surfaces using X-splines and planar surface definitions for precise motion analysis.

Topics Covered in This After Effects Tutorial:

BorisFX Mocha for Planar Tracking, Drawing the Outer & Planar Surfaces, Tracking & Refining in Mocha, Compositing the Screen, Luma Mattes Vs. Alpha Mattes, Manually Tracking in AE

Exercise Preview

preview t mobile compositing

Project Setup Requirements

1

Navigate to Project Files

Access Desktop > Class Files > After Effects Level 2 Class > Cellphone > Finished Clips to preview the final result

2

Open Working Project

Ensure yourname-Cellphone.aep is open in After Effects with previous exercises 3A-3B completed

3

Alternative Setup

If starting fresh, open Cellphone-Ready for 4-Point Tracking.aep and save as yourname-Cellphone.aep

Exercise Overview

With the blue screen successfully removed from Janet's phone in the previous exercise, we're ready to elevate the visual by compositing compelling content onto the device screen. This exercise focuses on replacing the blank screen with the Cellphone logo—a technique that's fundamental to modern motion graphics and visual effects work.

While our earlier exercise demonstrated single-point tracking for basic movement, this project requires a more sophisticated approach. We need to track all four corners of Janet's phone screen simultaneously, accounting for the subtle rotations, perspective changes, and hand movements that occur throughout the shot. This level of precision demands planar tracking—a technique that excels where traditional point tracking falls short.

To achieve professional results, we'll leverage Mocha AE, the industry-standard planar tracking application that ships with After Effects. Mocha's surface-based tracking algorithm provides the accuracy needed for seamless screen replacements, even when dealing with partial occlusions and subtle perspective shifts.

Previewing What You'll Make in This Exercise

  1. On the Desktop, navigate to Class Files > After Effects Level 2 Class > Cellphone > Finished Clips and double–click Cellphone Phone Screen Replacement.mov.

  2. Play the video and observe how the Cellphone logo seamlessly replaces the blue screen, maintaining perfect perspective and position throughout Janet's hand movements. Notice how the replacement content appears naturally integrated with the device, matching the screen's angle and responding to every subtle motion.

  3. You should still have yourname-Cellphone.aep open in After Effects. If you closed it, re-open it now. We strongly recommend completing the previous exercises (3A–3B) before starting this one, as they establish the foundational keying work. If you haven't finished them, do the following:

    • Open Cellphone-Ready for 4-Point Tracking.aep (from the Cellphone > Finished AE Projects folder).
    • Save the file as yourname-Cellphone.aep in the Cellphone folder.

Using Mocha AE for Planar Tracking

After Effects' native tracking tools, while capable, weren't designed for the precision demands of four-corner screen replacement. The built-in tracker excels at single-point operations but struggles with the complex mathematics required for accurate planar tracking. This is where Mocha AE transforms your workflow.

Mocha AE specializes in planar tracking—a sophisticated technique that leverages the abundance of flat surfaces in our visual world. Rather than hunting for individual tracking points like a traditional tracker, Mocha analyzes entire surface patterns, tracking planes instead of points. This approach provides superior stability and accuracy, especially when dealing with perspective changes, partial occlusions, or surface details that would confuse point-based trackers.

The fundamental difference lies in the tracking philosophy: while point trackers search for high-contrast features to follow, planar trackers examine surface textures and patterns across broader areas. This makes Mocha particularly effective for screen replacements, sign tracking, and architectural elements—all common tasks in professional motion graphics work.

  1. If you do not have Cellphone-MAIN open in the Timeline already, open it now.

  2. Double–click the [3-Janet-CUphone] layer to open it in its own composition tab.

  3. In your Composition viewing panel, change your Resolution to Full. This is crucial—tracking at reduced resolution introduces interpolation errors that compromise accuracy and can cause drift over time.

  4. Select the hands layer in the Timeline.

  5. Go to Animation > Track in BorisFX Mocha. This applies the Mocha effect to your selected layer and prepares it for planar tracking analysis.

  6. In your Effects Control panel, locate the Mocha AE CC effect, and click the Mocha icon to launch the application.

  7. If a Registration window appears, click Register Later to proceed without registration.

  8. If prompted about anonymous usage data collection, click Collect to help improve the software.

  9. Welcome to Mocha AE's interface. Before diving into tracking, let's understand the essential workflow that separates amateur from professional results:

    • Define the search area: Create a mask that encompasses the tracked region plus surrounding context—similar to After Effects' outer search region, but more intelligent.
    • Define the planar surface: Draw a precise inner shape that defines the exact plane geometry you want to track. This is where Mocha's power becomes apparent—it understands surface perspective, not just point movement.
    • Execute the track: Process the footage either globally or frame-by-frame, depending on complexity and desired precision.
    • Refine the results: Review and manually adjust problematic frames using keyframe refinement—a critical step often overlooked by beginners.
Critical Resolution Setting

Always set your Composition viewing panel to Full resolution before tracking. Tracking at less than Full resolution will produce imprecise results that compromise the entire project.

After Effects vs Mocha AE Tracking

FeatureAfter Effects NativeMocha AE
Tracking MethodPoint-based trackingPlanar surface tracking
4-Point CapabilityLimited accuracySpecialized excellence
Surface RecognitionBull's eye point focusEntire surface analysis
Wobble HandlingStruggles with rotationExcels at perspective changes
Recommended: Use Mocha AE for any project requiring 4-point tracking or surface replacement

Drawing the Outer & Planar Surfaces

Successful planar tracking begins with intelligent surface definition. The outer spline tells Mocha where to search for trackable detail, while the inner planar surface defines the precise geometry of your target plane. Getting this relationship right is fundamental to tracking success.

  1. Ensure you're working in the optimal interface configuration. At the upper left-hand corner of the interface, to the right of the Tools, click the workspace dropdown and confirm it's set to Essentials. This workspace provides all necessary tools without interface clutter.

  2. Select the Create Rectangular X-Spline Layer tool from the Tools panel. X-Splines use control points positioned outside the mask boundary, providing superior curve control compared to traditional Bezier masks—particularly valuable for organic shapes and precise adjustments.

  3. Draw a rectangular selection around the entire phone, including Janet's fingers and surrounding area. Don't worry about perfect placement initially—we'll refine the shape in the next steps. The key is capturing sufficient surrounding detail for Mocha's pattern analysis.

  4. Notice that Layer 1 appears in the Layers panel at the upper left. This represents your tracking mask and will contain all associated tracking data.

  5. If you need to start over, simply select the layer name in the Layers panel and press Delete on your keyboard.

  6. Switch to the Pick Tool (equivalent to After Effects' Selection tool) to refine your X-spline. Position the control points so they encompass the phone plus adequate surrounding area—roughly 20-30% additional space beyond the phone's edges provides optimal tracking context.

    Professional tip: Drag the control points at the base of the blue handles to adjust position. The blue boxes at the handle ends control corner roundness—useful for matching organic shapes but typically unnecessary for rectangular screens.

  7. Master these essential navigation shortcuts for efficient workflow:

    • Zoom: Hold Z and drag upward to zoom in, downward to zoom out. Unlike After Effects, this provides precise, controllable magnification.
    • Pan: Hold X and drag to navigate around the frame. Avoid using Spacebar—Mocha uses different keyboard shortcuts than After Effects.
Your X-spline rectangle should look sort of like this:

mocha ae rect box

  1. Now we'll define the planar surface—the precise screen geometry that Mocha will track. Below the Track section on the left panel, click the Show planar surface button mocha show planar surface tool.

  2. A blue rectangle appears representing your planar surface. Use the Zoom tool (hold Z and drag up) to magnify the phone screen area for precise alignment.

  3. Use the Pan tool (hold X) to center the phone screen in your view.

  4. Confirm the Pick tool mocha pick tool is selected for precise corner positioning.

  5. Carefully align each corner of the blue planar surface rectangle with the corresponding corner of the blue screen area. Precision here directly impacts your final composite quality—slight extensions beyond the screen boundary are acceptable, but insufficient coverage will create visible tracking errors in your final output.

X-Spline Creation Workflow

1

Set Essentials Workspace

Click dropdown in upper left corner next to Tools and ensure Essentials workspace is selected

2

Create Outer Boundary

Use Create Rectangular X-Spline Layer tool to draw box around entire phone including fingers

3

Refine Spline Points

Switch to Pick Tool and adjust points by dragging at base of blue handles, not the blue boxes

4

Define Planar Surface

Click Show planar surface button and adjust blue inner box to match exact screen corners

Mocha Navigation Shortcuts

Hold Z key and drag up to zoom in, drag down to zoom out. Hold X key and drag to pan around the view. Never press spacebar as shortcuts differ from After Effects.

Executing the Track & Refining Problematic Frames

Tracking execution requires understanding both the technical process and common failure points. Janet's hand periodically obscures phone corners throughout the shot, creating tracking challenges that separate professional workflows from amateur attempts. We'll address these systematically.

  1. In the Track Motion Options within the Essentials panel, ensure Perspective is enabled. This allows Mocha to account for the subtle perspective shifts that occur as Janet's hand moves, providing more accurate corner pin data for your screen replacement.

  2. Position the playhead at the Timeline's beginning (look for the green arrow marker at the bottom of the viewing panel). Starting from frame one ensures consistent tracking data throughout your sequence.

  3. Click the Track Forwards button mocha track forwards to begin automatic tracking analysis.

  4. Monitor the tracking progress carefully. When you notice the blue planar surface becoming misaligned with the screen corners (particularly the bottom corners), immediately click the STOP TRACK button (square icon). This prevents Mocha from compounding tracking errors across subsequent frames.

  5. Return to the beginning by dragging the white playhead to the green arrow at the Timeline's start:

    mocha playhead beginning

  6. Attempt to realign the planar surface corners with the phone screen. You'll quickly discover the core challenge: Janet's hand completely obscures the bottom two screen corners in multiple frames, making traditional four-corner tracking impossible in these areas.

  7. Here's a professional solution: modify your tracking strategy to focus on visible surface area. Drag the bottom-left and bottom-right spline points upward, reducing the search area to approximately the top half of the phone. Leave the planar surface (blue box) at its original full-screen position. This approach lets Mocha track the visible portion while extrapolating the complete screen geometry:

    X spline adjustment rev

  8. With the modified search area, click Track Forwards mocha track forwards again to process the entire sequence.

  9. The results should be significantly improved! While some frames may still require refinement for perfect corner alignment, the overall tracking quality should be much more stable. This demonstrates why experienced motion graphics artists adapt their tracking strategy to the footage rather than forcing inappropriate techniques.

  10. Return the playhead to the beginning (green arrow position) to begin the refinement process.

  11. Zoom in on the bottom phone screen area using the Z key technique to examine tracking accuracy at a pixel level.

  12. Use the Pick tool mocha pick tool to make minor alignment corrections to any misaligned corners. These adjustments create keyframes that improve tracking accuracy across the sequence.

  13. Zoom out (hold Z and drag downward) to see the complete phone screen context.

  14. Switch to the Classic workspace using the dropdown menu at the upper left. The Classic interface provides advanced tracking refinement tools essential for professional-quality results, including detailed keyframe management and track adjustment capabilities that aren't available in the simplified Essentials workspace.

Note: The Classic interface offers comprehensive customization and adjustment tools for challenging tracking scenarios—which represents the majority of real-world projects. Professional motion graphics work rarely involves perfect, unobstructed tracking subjects.

Precision Track Adjustment

Professional tracking workflows rely on strategic keyframe placement rather than frame-by-frame manual adjustments. The goal is identifying critical "drift frames" where automatic tracking deviates most significantly, then adding corrective keyframes that influence surrounding frames through interpolation.

  1. Create a tracking log using either paper or a digital document. Scrub through your tracked sequence and note frame numbers where the planar surface drifts significantly from the screen corners. Your specific "problem frames" may differ from our examples based on your X-spline configuration and planar surface positioning, but the correction methodology remains consistent.

  2. Locate the Current Frame display at the bottom left (the middle number in the three-number group). This provides precise frame reference as you navigate the timeline using the white playhead.

  3. Navigate to frame 96 (or your first identified drift frame) where tracking accuracy begins to degrade noticeably.

  4. In the bottom-left parameter area, click the AdjustTrack tab. This panel manages keyframe-based tracking corrections for footage that's already been analyzed—a crucial tool for achieving broadcast-quality results.

  5. Click the Set Master All button to create a master keyframe at this frame position. This establishes a reference point for your corrections.

  6. Advance to frame 99 (or your next problematic frame). You can navigate by dragging the playhead or double-clicking the current frame number, entering your target frame, and pressing Return/Enter.

  7. To enhance alignment accuracy, enable visual reference guides. In the Layer Properties panel (left side), locate the menu next to Insert Clip and select Grid8x8. This overlay helps identify even subtle misalignments that might be missed during normal viewing.

  8. Zoom in to examine the bottom screen corners at high magnification, where tracking drift is typically most apparent.

  9. Using the Pick tool mocha pick tool, make precise adjustments to any misaligned corners. Notice that green arrow keyframes automatically appear on the timeline, indicating successful keyframe creation for your corrections.

  10. Disable the grid overlay by setting the Insert Clip menu back to None for normal viewing.

  11. Continue to frame 118 and repeat the corner alignment process, focusing on maintaining consistent screen geometry across the sequence.

  12. This precision work is essential for professional screen replacement. The subtle nature of phone movement means small tracking errors become highly visible in the final composite, especially when the replacement content has geometric elements or text that viewers can use as alignment reference.

  13. Systematically review your sequence from the beginning, zooming as needed and using the Pick tool mocha pick tool to refine corner positions. Quality tracking requires patience—rushing this step will be evident in your final output.

    Professional tip: To modify existing keyframes, position the playhead directly over the keyframe marker. You can verify correct positioning by checking that the Delete keyframe icon mocha key minus at the bottom right is active (not grayed out).

  14. Once satisfied with your tracking quality, save your work using File > Save Project. This preserves all tracking data and keyframe adjustments.

  15. Exit Mocha AE by clicking the red button in the upper left corner, or navigate to File > Exit Mocha AE to return to After Effects.

Compositing the Phone Screen Content

Now we'll apply Mocha's tracking data to create a seamless screen replacement. This process involves transferring the precise corner-pin data from Mocha to your replacement content, ensuring perfect geometric registration throughout the sequence.

  1. Return to After Effects and confirm you're working in the 3-Janet-CUphone composition tab.

  2. Select the [ExclamationPt-HDsize] layer (the logo composition) and navigate to its in-point using the bracket keys or timeline navigation.

  3. Enable visibility for this layer by clicking its eye icon eye icon look through. This reveals the content that will replace the phone screen.

  4. Screen replacement requires your content to match the composition dimensions for accurate corner-pin application. Check the current composition settings using Cmd–K (Mac) or Ctrl–K (Windows) to confirm the 1920 × 1080 px dimensions.

  5. Click Cancel to close the composition settings.

  6. Double-click [ExclamationPt-HDsize] in the Timeline to open it in a new composition tab for content adjustment.

  7. Select the ExclamationPt-Portrait layer within this composition.

  8. Apply Layer > Transform > Fit to Comp to scale the content appropriately. The fitted content should match the aspect ratio of our phone screen (9:16 portrait orientation), ensuring proper display proportions when corner-pinned to the tracked screen area.

  9. Close the ExclamationPt-HDsize tab to return to the main 3-Janet-CUphone composition.

  10. Select the hands layer and open its Effect Controls panel to access the Mocha tracking data.

  11. In the Mocha AE CC effect, expand the Tracking Data section and click Create Track Data to prepare the tracking information for export.

  12. In the layer selection window, enable the sprocket icon for the layer containing your tracking data (typically Layer 1 from your Mocha session).

  13. Back in Effect Controls, configure the Export option dropdown to Corner Pin (Supports Motion Blur). This export format provides the four-corner coordinate data necessary for screen replacement while maintaining motion blur compatibility for natural-looking results.

  14. Set the Layer Export To dropdown to 1-ExclamationPt-HDsize and click Apply Export. This transfers all tracking keyframes to your replacement content layer.

  15. With [ExclamationPt-HDsize] selected, press U to reveal all keyframed properties. You should see corner pin keyframes for every frame of your tracked sequence—evidence that Mocha's tracking data has been successfully applied.

  16. Scrub through the timeline to verify that the logo content maintains proper alignment with the phone screen throughout the sequence. The tracking should appear stable and natural, with the content responding to every subtle movement and perspective change.

Troubleshooting: If Your Phone Screen Tracking Doesn't Perform as Expected

Tracking complex handheld device footage can be challenging even for experienced professionals. If your custom tracking data doesn't meet quality standards, don't consider it a failure—use our provided reference data to understand proper tracking characteristics and continue with the exercise.

  1. Before importing reference data, remove existing keyframes from the [ExclamationPt-HDsize] layer. Ensure the keyframes are visible, then select Corner Pin and press Delete.
  2. Disable animation for Position, Scale, and Rotation by clicking their respective stopwatch icons stopwatch blue to remove unwanted keyframes.
  3. Collapse the layer properties, then re-expand them and click Reset next to Transform to clear all transformations.
  4. Navigate to Class Files > After Effects Level 2 Class > Cellphone > mocha and open 3-Janet-CUphone-Noble.txt.
  5. Select and copy all text content from this reference file.
  6. Return to After Effects and position the playhead at the Timeline beginning.
  7. With the [ExclamationPt-HDsize] layer selected, paste the reference tracking data.
  8. Scrub through the sequence to verify proper tracking alignment and natural motion characteristics.
  • You may notice that Janet's hands appear to pass behind the logo when they should be in front of the phone screen—an obvious compositing error that breaks the illusion. We'll correct this using a matte technique.

  • Drag the phone matte layer to the top of the layer stack in the Timeline.

  • Enable the phone matte layer's visibility by clicking its eye icon eye icon.

  • Scrub through the sequence to examine the matte layer. The black areas represent regions that will be hidden (Janet's hands), while the white area defines the visible phone screen region. This grayscale matte will control which parts of our composite remain visible.

  • Notice this layer is already configured as a

  • Key Takeaways

    1Mocha AE excels at planar tracking where After Effects native tracking struggles, particularly for 4-point corner tracking scenarios
    2Always work at Full resolution in After Effects when tracking - lower resolutions produce inaccurate results that compromise the entire project
    3X-spline creation requires two components: an outer boundary encompassing the tracking area and an inner planar surface defining the exact replacement zone
    4When tracking fails due to obstruction, modify the X-spline to track only visible portions rather than forcing a complete area track
    5Manual keyframe adjustment in Classic workspace is essential for professional results - identify problem frames and add correction keyframes strategically
    6Corner Pin export with Motion Blur support provides the most professional tracking data transfer from Mocha to After Effects
    7Luma mattes use brightness values instead of transparency, making them ideal for high-contrast black and white mask layers
    8Complex movements with rotation, scaling, and perspective changes push tracking software to its limits and require careful technique selection

    RELATED ARTICLES