Dive into the world of 3D animation with our detailed After Effects tutorial that guides you through animating marine life and adding depth of field.
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.
Note: These materials are provided to give prospective students a sense of how we structure our class exercises and supplementary materials. During the course, you will get access to the accompanying class files, live instructor demonstrations, and hands-on instruction.
Topics covered in this After Effects tutorial:
Animating Layers in 3D Space, Adding Depth of Field
Exercise Preview
Exercise Overview
In this exercise you’ll animate marine life and add depth of field.
Getting Started
-
You should still have Your Name - Working with 3D.aep open in After Effects. If you closed it, re-open it now by going to File > Open Project then Desktop > Class Files > After Effects Class > Working with 3D. We recommend you finish the previous exercise (5A) before starting this one. If you haven’t finished it, do the following sidebar.
If You Did Not Do the Previous Exercise (5A)
- If a project is open in After Effects, go to File > Save, then File > Close Project.
- Go to File > Open Project and navigate to Desktop > Class Files > After Effects Class > Working with 3D > Finished Projects.
- Double–click on Working with 3D - Ready for Marine Life.aep.
- Go to File > Save As > Save As. Name the file Your Name - Working with 3D.aep and save it to Desktop > Class Files > After Effects Class > Working with 3D (replacing the file if it’s already there).
Animating Layers in 3D Space
Lights and cameras aren’t the only type of layers that can be animated in 3D space. We can animate footage layers as well, just as we did when they were 2D layers. Their properties just look a little different now.
In the Timeline, show the Puffer Fish, Shark, and Whale layers by clicking in their eye column.
-
Select the Puffer Fish layer.
Hold Cmd (Mac) or Ctrl (Windows) and click on the Shark and Whale layers.
Press P to reveal Position for all 3 layers.
- Press Cmd–Shift–A (Mac) or Ctrl–Shift–A (Windows) to deselect all layers.
- Move the playhead to the beginning of the Timeline.
-
Select the Puffer Fish layer.
- Set the Puffer Fish layer’s Position to 1240, 830, 0
(just outside of the camera’s view) - Click the Position stopwatch .
- Set the Puffer Fish layer’s Position to 1240, 830, 0
-
Move the playhead to 5;00
- Change the Puffer Fish layer’s first position value (x–position) to -250
-
Scrub the playhead back to the beginning of the timeline and watch the puffer fish move across the screen.
You can also see the change in position in the Top view.
Move the playhead to the beginning of the timeline.
-
Select the Shark layer.
- Change the Shark layer’s Position to -800, 297, 700
- Click the Position stopwatch .
-
Press K to jump the playhead to the next visible keyframe at 5;00
- Change the Shark layer’s first position value (x–position) to 1750
Scrub the playhead back to the beginning of the timeline and watch the shark move across the screen.
Move the playhead to the beginning of the timeline.
Select the Whale layer.
-
Hold Shift and hit S to add Scale to the displayed properties.
- Change the Whale layer’s the 3rd Position value (z-position) to 1320
- Change the layer’s Scale to 75
- Set the Whale layer’s first two position values so you have 2100, 659, 1320
- Click the Position stopwatch .
-
Press K to move the playhead to the next visible keyframe at 5;00
- Change the Whale layer’s first position value (x–position) to -1000
Scrub through the timeline to see the whale move across.
Fine Tuning the Timing of the Marine Life
Currently all the creatures cross the scene at the same time, but let’s make them end up in the center when the camera crosses their 3D focal plane.
Move the playhead to 0;27 (when the camera crosses the plane of the Puffer Fish).
Select the Puffer Fish layer.
-
In the timelime, drag the Puffer Fish layer’s colored bar to the left until the Puffer Fish is almost in the center of the Active Camera view.
Notice that the first keyframe along with the beginning of the layer is now hidden somewhere before the start of the timeline. Unlike in video editing programs like Premiere Pro, After Effects allows layers to start before the timeline does.
Move the playhead to 2;23 (when the camera crosses the plane of the Shark).
Select the Shark layer.
-
Drag the Shark layer’s colored bar a little to the right until the shark is almost centered (slightly to the left of center) in the Active Camera view.
Move the playhead to 4;15 (when the camera crosses the plane of the Whale).
Select the Whale layer.
-
Drag the Whale layer’s colored bar to the right until the whale’s head is almost centered in the Active Camera view.
Move the playhead to 5;00 when the whale’s body should be completely covering the text.
-
Select the text layer.
- Press
[
to slide the beginning of the layer to the playhead.
- Press
-
Scrub through the timeline, or use the Spacebar to preview the animation.
The text layer is now hidden for most of the animation and is only revealed after the whale passes by.
-
Select the Puffer Fish layer.
Hold Cmd (Mac) or Ctrl (Windows) and click on the Shark and Whale layers.
Cmd ~ (Mac) or Ctrl ~ (Windows) to hide all properties on the selected layers.
Keep those layers select, and move the playhead to the end of the timeline.
With the 3 layers still selected, hit Option–
]
(Mac) or Alt–]
(Windows) to set the Out Point of the selected layers to the playhead position.-
Move the playhead to 12;00
- Press N to move the end of the work area bar to the playhead.
Choose File > Save or hit Cmd–S (Mac) or Ctrl–S (Windows).
Adding Depth of Field
At the moment, every layer is completely in focus regardless of its distance from the camera. This is because the depth of field feature of the camera layer is currently disabled. Depth of field is distance between the nearest and furthest objects that are sharp and in focus. By using depth of field, your animations you can give your animations a better sense of depth and also emphasize certain layers over other.
-
Move the playhead to 0;27
This is just about where the camera’s focus distance crosses over the puffer fish.
Select the Camera 1 layer.
Hit AA (hit A twice) to reveal the layer’s Camera Options.
To the right of Depth of Field click the word Off (so it changes to On).
-
Change the Aperture to 200
Notice that the layers that are closer to or further away from the camera than the fish is are now blurry and out of focus. The amount of blurriness increases as they get further away from the Focus Distance.
NOTE: If you want to make the out of focus layers more blurry, you can adjust the Blur Level property.
Press Cmd ~ (Mac) or Ctrl ~ (Windows) to hide the properties.
At the bottom right of the Composition panel, click on the Select view layout menu (which current says 2 Views) and choose 1 View.
-
Use the Spacebar to preview the animation. This preview should take longer to build because depth of field requires more system resources to render. If you want to speed up the preview, at the bottom left of the Composition panel is a Resolution/Down Sample Factor Popup that should say (Full). Try changing that to Half or lower.
Notice that each marine animal is in focus as the camera passes it. Their animation was timed specifically for this.
You’re done, so choose File > Close Project.