In our last motion-tracking tutorial, we showed you how to use the traditional Point Tracker in After Effects. This is very useful if you want to track scaling and rotating movements, or movements that go left and right or up and down. But if you have footage that has perspective and parallax changes, then the Point Tracker simply won’t cut it. The good thing is, After Effects comes with its own 3D Tracker, which is really good for these types of shots.
Here’s an aerial view of Herod’s Roman fortress in Masada, Israel, filmed by Pond5 artist jpworthingtonmedia. I want to put an element on top of the plateau, but as you can see, there’s a lot of perspective change, since the camera is flying around the fortress.
To use the 3D Camera Tracker, simply select the layer you want to track, then choose “Track Camera” on the animation menu or by right-clicking on the layer itself.
This applies the 3D Camera Tracker on the layer and will start analyzing the clip. The amount of time for the analysis to finish depends on the length, frame rate, and resolution of your video. However, this is a background process, so you can still work on your other composition while the analysis is running.
You can check the progress of the analysis in the Effect Control panel:
When the analysis is done, After Effects will solve the camera movement, which basically means that it’s trying to reverse-engineer the original camera used in the scene. It will try its best to match the focal length and how the camera moves.
When camera solving is done, select the effect, and you’ll see that there are lots of multicolored tracking points scattered all over your scene. Each of these trackers is attached to a part of your scene and can be used in compositing.
Define the Ground Plane and Origin by selecting a set of tracking points. This will cause the bullseye target to appear, showing where the plane will be, based on the selection. Right-click and choose “Set Ground Plane and Origin.”
AE’s origin is set to 960, 540, 0. By defining a Ground Plane and Origin, you’ll make the Z-plane of the scene 0,0,0 for all X, Y, and Z axes. This helps a lot when you work with 3D programs, because their coordinate system is also 0,0,0.
After setting the Ground Plane and Origin, right-click on the bullseye and choose “Create Text and Camera.”
After Effects will create a camera that matches the original camera move of the scene and a new text layer. Note that you’re not limited to only text — you can create other things based on the list that shows up when you right-click on the bullseye. For this tutorial, however, we’ll be sticking to text to keep everything simple.
First, we need to adjust the text, because it’s lying down. Select the text layer in the timeline and press R to show the rotation properties. Change the value of the X-axis to 90 degrees.
Check your track by doing a RAM preview. Here’s what I have so far. You can see that the text is perfectly attached to the ground:
If you want to add other elements into the scene, you just need to select a group of at least three trackers in an area, right-click, and choose either Text, Solid, or Null. You can choose Null or Solid and parent elements to it. Press Shift while parenting layers so that AE places the layer in the exact same position as your Null or Solid.
For illustration purposes, I chose to add three more solid layers in different areas of the scene. You can see that all of them are perfectly tracked:
When adding new layers to the composition, make sure that you turn on the 3D Layer switch. Otherwise, it won’t move with the camera.
Here’s an example of the scene with a cruise ship composited on to it. (The 3D model is by Pond5 artists WarlockBrothers.) Compositing the ship is beyond the scope of this tutorial, so I won’t be covering it this time, but we’ll get there eventually!
That’s the basics of applying the 3D Camera Tracker and using the data from it. And as you can see, it’s relatively simple and easy to use — and it saves you a lot of time from re-tracking different elements in your scene.
Stay tuned for more motion-graphics and AE tutorials! Anything particular you’d like to learn? Let us know in the comments!