How to Use Depth of Field in After Effects
Depth of field in Adobe After Effects adds cinematic realism to motion graphics and visual effects by blurring elements outside a designated focal plane. This guide covers how to set up 3D layers, create a camera, enable depth of field, adjust critical camera properties like aperture and focus distance, and animate focus pulls for professional-looking compositions.
Step 1: Enable 3D on Your Layers
Depth of field only affects 3D layers.
- Select the layers in your timeline that you want to exist in 3D space.
- Click the 3D Layer switch (the cube icon) for each layer.
- Position your layers at different Z-depths (Z-axis coordinates) so there is spatial separation between the foreground, midground, and background.
Step 2: Create and Configure a Camera
To use depth of field, your composition requires a dedicated camera layer.
- Go to Layer > New > Camera (or press
Ctrl + Alt + Shift + Con Windows /Cmd + Opt + Shift + Con Mac). - Choose either a One-Node Camera or a Two-Node Camera depending on your animation workflow.
- Check the box labeled Enable Depth of Field.
- Select a preset (such as 35mm or 50mm) and click OK.
Step 3: Access Camera Options
If depth of field was not enabled during setup, or if you need to adjust its intensity:
- Expand the Camera layer in the timeline.
- Twirl open Camera Options.
- Ensure Depth of Field is set to On.
Step 4: Adjust the Essential Depth of Field Settings
Controlling depth of field relies primarily on three parameters:
- Focus Distance: This determines the exact distance from the camera lens to the point in 3D space that remains completely sharp.
- Aperture: This controls the depth of the sharp area. Higher aperture values create a shallower depth of field (more pronounced background and foreground blur), while lower values keep more of the scene in focus.
- Blur Level: This scales the intensity of the blur generated by the aperture. Leaving this at 100% provides physically accurate results based on the lens, but increasing it exaggerates the blur effect.
Step 5: Accurately Set the Focal Plane
Setting focus visually is easiest using multiple views:
- Change your composition view from 1 View to 2 Views - Horizontal using the view layout dropdown below the preview pane.
- Set one view to Active Camera and the other to Top.
- In the Top view, locate the camera wireframe. The line crossing the camera’s line of sight represents the Focus Distance.
- Scrub the Focus Distance value until that crosshair directly intersects the target layer.
Alternatively, you can automatically focus on a specific layer:
- Select the Camera layer and the target layer.
- Go to Layer > Camera > Link Focus Distance to Layer to attach the focal plane directly to that object via an expression.
Step 6: Create a Rack Focus Animation
To shift focus between two objects over time:
- Move the playhead to the starting frame.
- Set a keyframe on the camera's Focus Distance property focused on your first subject.
- Move the playhead forward in the timeline.
- Adjust the Focus Distance so the focal plane aligns with your second subject.
- Apply Easy Ease (
F9) to the keyframes to ensure a smooth, natural transition between focal points.