After Effects Tutorials / Video Editing

How to Track With Mocha AE and Make a Screen Replacement

Track with mocha ae
Published 17 April 2021

Last updated on 8 December 2022

If you have never used it before, Mocha AE offers a great way to track shots with minimal effort. The planar tracking program from Boris FX comes together with After Effects. That is right — you already have it! If you want to learn how to track with Mocha AE and make a screen replacement, you are in the right place.

After Effects offer other good methods for tracking, such as the point tracker, and the 3D Camera Tracker. However, there will be times when these two will not deliver good results. 

Mocha AE is a completely different animal than the two tracking tools in AE. It offers many tracking solutions for shots close to impossible to track. With it, you can also cut out moving subjects from a shot. Next time, when a stranger walks inside your frame, you can simply cut him out!

Quick Guide

To track with Mocha AE and make a screen replacement, follow these steps:

Step 1: With the video selected, launch the Mocha AE plugin.
Step 2: Create a Spline around the screen, adjust the planar surface exactly to the boundaries of the screen, toggle on the perspective option, and start tracking.
Step 3: Inside AE, create tracking data from the Mocha AE plugin and apply it to the footage you want to stick to the screen.
Step 4: Make the final adjustments and color corrections and render the new video footage.

Pro Tip: Make sure the planar surface exactly fits the screen you want to replace — that will be the exact shape of the new screen. If there will be small deviations from the actual screen, jump back in the Mocha AE plugin window and make small adjustments using keyframes.

Tracking with Mocha AE

Launch Mocha AE

With the video selected, go to Animation and select “Track in Boris FX Mocha”. In the Effect Controls window, press on the Mocha logo to launch the  Mocha AE plugin.

Track with mocha ae
Track with mocha ae

When you first launch Mocha AE, it will ask you to register. You can do it later or right now, you can use it either way.

How to Use Mocha AE for Basic Planar Tracking

In the Essentials view, select the X-Spline layer creator tool and draw an outline around the screen you want to track; it doesn’t have to be exact. Next, toggle on “Show planar surface” and fit the blue corners of the blue rectangle to the screen, just like in the image below.

Track with mocha ae

To start tracking, press the track-forward button from the bottom left corner; it is shaped like a triangle. Pay attention to the blue rectangle. It has to follow the screen precisely; any deviation or shake will appear in the final result.

If the tracking is shaky or bad overall, change the view mode to Classic. You can either adjust it manually with keyframes or increase the percentage of pixels used for the tracking. Depending on the footage, there will be situations where you will have to use both.

Adjust the Tracking in Mocha AE With Classic View

After you change the view to Classic, go to the time where the tracking is bad and adjust it with keyframes. The keyframe system works just like in After Effects, try not to make the keyframes close to each other. 

If you are using Mocha AE to track a screen and you want to adjust it, use Adjust Track together with keyframes and move the corners where they should be.

To add or remove keyframes, press on the key-shaped icon and navigate between keyframes with the left-right triangles. 

Ws8lqvuhcju7wkwvwvxxbpyzt04zdjycx3ivmsjvvl4ipowwx1s3enjul5gfgiemqbumbasdqls9rqoca2hc8ziixab n1nlsdbgmti0dum5ywvgdfo3j6tjslk9ff5noxpzsbee
You can also do this operation in the Essentials view. However, I recommended using Classic view because here you can track frame-by-frame. This feature will enable you to better troubleshoot the tracking in comparison to automatic tracking forward.

Sometimes you can avoid this by simply increasing the percentage of pixels used and Smoothing Level, modifying the Search Area angles, and making sure Large Motion is checked.

20iqfnovyyxrdnydf1zdy5p fcdki 85rf24gv3yehdlzegck au2e8o3qc8jwflg1r2xn kdudgza09pxseqlniwf3tifauym6vhtobtpbm oba 6ednmeuff3v4t ojrb8i9n

Try to avoid moving reflections inside the screen you want to track, this will ruin the tracking.

Save the project and close the window.

Apply Mocha AE Tracking Data Inside After Effects

Ok, I will assume you are done with the previous steps and you have a smooth, steady track. Go back in After Effects, select the screen replacement footage, and drop it in the same composition as the original footage. The screen replacement footage must have the same resolution as the composition, otherwise, the image will be stretched.

Select the original footage and go to Effect Controls and expand the Tracking Data column from the Mocha AE plugin.

Create tracking data in mocha ae

Click on Create Track Data, select the Mocha AE layer that has the tracking data, and press ok.

You are not yet done! Make sure you are on the first frame of the timeline, go to Layer Export To, choose to export to the screen replacement footage, and click Apply Export. Your tracking data should be applied and the screen replaced.

By default, the Export Option is set to Corner Pin, set it to Corner Pin(Support Motion Blur). Now you can enable motion blur for this layer and it will make the integration easier. 

The Transform export option will import all the usually transform options, but not the corner point data, making it an option used for other types of tracking operations, not a screen replacement.

Corner pin tracking data

This is it! Now you know how to use Mocha AE and how to troubleshoot the faulty tracking results. Mocha AE is the free version of this program, you can buy Mocha PRO for more amazing features! I worked with both versions and I can say for sure that the paid version is really worth the money.



About Author

After spending 6 years in the post-production studio, Mihai decided to share his insights on video editing and computers.