Explore this detailed tutorial on using the Mocha AE effect in After Effects for motion tracking transformations in video elements, complete with step-by-step instructions and vivid visual aids.
This exercise is excerpted from Noble Desktop’s Adobe After Effects training materials and is compatible with After Effects updates through 2023. To learn current skills in After Effects with hands-on training, check out our After Effects Bootcamp, Motion Graphics Certificate, and video editing classes in-person and live online.
Topics covered in this After Effects tutorial:
Planar Tracking, Tracking Transform Properties, Mocha AE Plugin,
Exercise Preview
Exercise Overview
In this exercise you’ll use the Mocha AE effect to track a video elements transform properties and apply them to another layer.
Previewing the Final Video
- Let’s see a preview of what you’ll be making. If you’re in After Effects, keep it open but switch to your Desktop.
- On the Desktop, navigate to Class Files > After Effects Advanced Class> Motion Tracking - Transform > Preview Movie and double–click Logo Replacement.mp4.mp4.
- Also preview Magic Hand.mp4.
-
Notice the following:
- There are graphics placed into a video.
- The graphics seem following the movement of the surface they are attached to.
Replay the video if you need to, and close it when done.
Setting Up the Workspace
In After Effects, go to Window > Workspace > Standard.
Choose Window > Workspace > Reset “Standard” to Saved Layout.
-
If the After Effects window does not fill the screen, maximize it:
Mac: At the top left of the window, click the green button (the third button). Windows: At to the top right of the window, click the Maximize button (the middle button).
Getting Started
In After Effects, if you have a project open, choose File > Save.
Choose File > Close Project
-
In your new project, choose File > Save As > Save As and:
- Name the file Your Name - Logo Replacement.aep and
- Save it into Desktop > Class Files > After Effects Advanced Class> Motion Tracking - Transform.
Set Up
When tracking it is necessary to make sure that the dimensions of the video you are going to track match those of your composition.
When creating a project from scratch, follow these instructions:
Drag your main video (the one you want to track) into the empty Timeline panel or onto the Create a New Composition button.
Rename the layer so that you can remember this is the one you want to track.
Applying the MochaAE Effect
MochaAE is an effect and as such can be found in the Effects & Presets panel as well as the Effect menu. Once applied it can open a copy of the MochaAE plug–in that runs inside of After Effects.
Select the video layer that you want to track.
In the Effects & Presets panel type Mocha into the search field.
Double–click on the Mocha AE effect.
In the Effect Controls panel click on the Mocha logo to open Mocha.
Tracking in MochaAE
Mocha is made by BorisFX not Adobe so the terminology, keyboard commands, and even concepts like layer are different from After Effects.
The basic process for tracking in MochaAE:
- Create a spline (like an AE mask) and this creates a layer.
- Track the footage and if necessary make adjustments to layer or properties while tracking.
- If necessary adjust track when complete.
In Mocha, locate the frame where you can best see the element you want to track.
Create a layer around the element you want to track.
Reveal the Planar Surface and make sure it’s positioned in the middle of the element you are tracking.
If necessary, adjust Minimum % Pixels Used.
Track the layer.
Save the Mocha project and return to AE.
Applying Tracking Data to a Layer
Once you have tracked using MochaAE you still have to take that tracking data and apply it to a layer in your After Effects composition.
Back in the After Effects interface create a null object layer
Select your tracked layer and in the Effect Controls panel locate the Tracking Data properties.
Click the Create Tracked Data button and press OK.
Set Export Option to Transform.
Set Layer Export To to the null layer you created earlier and make sure the effect is set to target the Source properties of the layer.
Click Apply Export.
Parenting Layers
Add your graphic layer to your composition and position it relative to the element you tracked.
Set the null object (the same one you applied the tracking data to) as the parent for your graphic layer.
Save your file.