Know the Basics: After Effects Part 8: Motion Tracking

Today we're going to take a look at how we can use motion tracking to calculate the position data of an object, and use it accordingly within After Effects...

Previous tutorials

Know the Basics: After Effects Part 1: Interface
Know the Basics: After Effects Part 2: Timeline
Know the Basics: After Effects Part 3: Effects
Know the Basics: After Effects Part 4: Titles
Know the Basics: After Effects Part 5: Animation
Know the Basics: After Effects Part 6: Masking
Know the Basics: After Effects Part 7: Color Grading

Motion Tracking can seem quite scary but in reality After Effects provides us with the necessary tools to track objects within footage over time. These tools may not be as advanced as third party plugins but I've found them to be useful the majority of the time, and especially for simple projects. We'll learn how to track an object and then apply some text to that object so that it looks like the text is following the object throughout the video.

Step 1: What is Motion Tracking?

Motion tracking enables you to take some footage which has a moving camera or moving objects and to 'solve' the movement to give you data which represents that movement. After Effects has some built in tools which enable you to do this right out of the box. We're going to track some footage to see how this works in real life.

Motion tracking is so powerful. Get to grips with it and it'll open up a wealth of possibilities

Motion tracking is so powerful. Get to grips with it and it'll open up a wealth of possibilities

Step 2: The tracker panel

The built in tracking tools can be accessed using the Tracker window. Make this visible using the 'Window' part of the main menu. This contains a variety of options that lets you either track the camera or motion. You can also stabilize motion using these tools. Finally, the data of the 'solve' can either be applied to the current layer or to a new layer using the 'Motion source' drop-down.

Use the Tracker panel to motion track your footage

Step 3: Track camera part 1

To track your camera simply select that layer in your timeline and hit the button which says 'Track Camera'. It's as simple as that! When you do that you'll notice that the composition window now has a blue bar telling you that it's analysing the footage. If you want more detail on how far it's progressed then you can head over to the 'Effect controls' window. That will tell you how many frames have been completed.

Track your camera using the simple 'Track Camera' panel

Track your camera using the simple 'Track Camera' panel

Step 4: Track Camera part 2

It's important to note that at this stage you are completely free to continue using After Effects. Depending on the complexity and length of the footage, the track may take a while so it's helpful that we're able to continue working. I usually continue setting up my assets that I'm going to use in conjunction with the tracking data.

Track your camera using the simple 'Track Camera' panel

Step 5: Create camera

Once you've tracked the camera you need to create a virtual camera which moves in the same way as the real camera did. You can do this by going to the 'Effect Controls' window and the '3D Camera Tracke' effect. You'll see a 'Create Camera' button. Click this and you'll see a new layer appear on your timeline. Any 3D layers that we create will now use this camera.

Create a camera so that we can create objects in 3D space

Create a camera so that we can create objects in 3D space

Step 6: Create text

Let's create a piece of text to sit on the ground. We do that by making sure that the effect 'Show Track Points' is set to '3D Solved'. Sometimes you have to move between the 2 options to get them to display. With the points visible in the composition simply right-click on one of the points and hit 'Create Text'. This will add a 3D text layer. You can then go into it and adjust its size and so on.

Create text in the same position as one of the track points

Create text in the same position as one of the track points

Step 7: Create null

If you follow the same process as the previous step then you can also create a null object. This is useful if you want multiple layers to link themselves to the null. Do this by setting the parent of your layer, the text for example, to the null object. The parent is set for each layer on the timeline.

Create a null object to link multiple layers to it

Create a null object to link multiple layers to it

Step 8: Warp Stabilizer

If you head back to the Tracker panel then you'll notice that one of the buttons is 'Warp Stabilizer'. You can use this to stabilize your footage. It goes through the same process as the tracking in terms of analysing first. Use this if you have some footage which is just too shaky. Please note though that it is good but it can't necessarily smooth everything as much as you would like!

Stabilize your footage using the Warp Stabilizer

Stabilize your footage using the Warp Stabilizer

Step 9: War Stabilizer Properties

If you head over to the 'Effect Controls' window then you'll see the 'Warp Stabilizer VFX' effect. This lets you adjust how smooth you want the footage to be. There are also a host of other settings which I rarely touch but enable you to fine tune the stabilization.

Adjust the properties to fine tune your stabilization

Step 10: Conclusion

What I love about the tracking tools inside of After Effects is how simple the tools are. They've increased in stability over the years and I'm grateful for that! Let your imagination free for how you could use this. The most common is probably in motion graphics where artists will have graphics follow objects in the live footage. This is massively used in films where CG needs to be blended in seamlessly with live action.

Blend CG and live action using the built in tracking tools

Blend CG and live action using the built in tracking tools

Top tip: Export 3D camera tracker data to CINEMA 4D

Maxon.net enables you to download a plugin for exporting camera tracking data from After Effects to CINEMA 4D. With it installed simply go to 'File' followed by 'Export' and 'Cinema 4D Exporter'.

Export your tracking data out to programs like CINEMA 4D

Export your tracking data out to programs like CINEMA 4D

Related links

For more from Paul Hatton, check out C A Design Services
Download After Effects
Check out Video Copilot for plug-ins
Find some useful scripts for After Effects
Know the Basics: After Effects Part 1: Interface
Know the Basics: After Effects Part 2: Timeline
Know the Basics: After Effects Part 3: Effects
Know the Basics: After Effects Part 4: Titles
Know the Basics: After Effects Part 5: Animation
Know the Basics: After Effects Part 6: Masking
Know the Basics: After Effects Part 7: Color Grading