3D Camera Tracker
[ Lecture Outline ] [ Lab Exercise ] [ Homework Project ]
The 3D Camera Tracker feature is used to combine real-world footage with computer-generated 3D text or visuals, even 2D stuff too.
Basic Tracking
Useful for simple tracking tasks. Fast to work with. Can be used to track the position of a single feature in some footage, or up to four features at once in order to also determine perspective, scale, rotation.
The basic steps are:
(1) Track feature (2) Apply the results to a Target (a layer or effect property.)
All tracking data is 2D. When applying tracked perspective to a target layer, the Corner Pin effect is used to simulate 3D depth. This effect is actually a 2D effect.
3D Camera Tracking
Handy for more complex tracking. Generally used for tracking arbitrary surfaces of stationary objects in a moving shot, and then applying that track data to 3D properties of layers.
For example, in a handheld shot of a city, buildings, parked cars, and sleeping people would “track well” because they’re stationary, but moving cars and people would not. We could track some surface of a building and then put a 3D layer at that spot in 3D space.
The basic steps are:
(1) Analyze Clip / “Solve The Camera” (2) Find a “target plane” amongst the track points (3) Create a 3D Null and Camera (4) Copy/Paste properties (like position) from the 3D Null Layer onto some other 3D property (e.g., another layer’s 3D position property.)
Masking Out Moving Objects
With the 3D Camera Tracker, moving objects like people, cars, etc. can confuse the tracking analysis. It’s important to try and remove moving objects from the shot using techniques like masking, animated masking, mask tracking, rotobrush, etc.
Shadow Catcher
You can use the “Create Shadow Catcher” to create a special horizontal layer that only displays shadows.
Connecting 2D Layers To 3D Tracking Data
Sometimes you need to use the 3D Camera Tracker’s tracking data to control properties of a 2D layer. The 3D points in the tracking data need to be converted to 2D space on each frame. Expressions can help here.
First, enable expressions on the 2D property that will be the “target” of the 3D data. For example, we might choose the Bulge Center property of a the Bulge effect.
Then add the following expression:
// Use a variable to make an 'abbreviation' for the 3D Null Layer: my3dLayer = thisComp.layer( "nameOf3DNull" ); // Do the same for that layer's anchor point: my3dAnchorPoint = my3dLayer.anchorPoint // Convert the 3D point to 2D space my2dPoint = my3dLayer.toComp( my3dAnchorPoint ); // Last line is the value that the property will use: my2dPoint;
The expression above can also be written a lot more concisely, like this:
// Use a variable to make an 'abbreviation' for the 3D Null Layer: my3dLayer = thisComp.layer( "nameOf3DNull" ); // Convert the 3D point to 2D space. Last line will be value used for property. my3dLayer.toComp( my3dLayer.anchorPoint );
Or simply:
my3dLayer = thisComp.layer( "nameOf3DNull" ); my3dLayer.toComp( my3dLayer.anchorPoint )
But, when starting out it can be helpful to be overly verbose with scripting.