Depth of field blur in CS5.5 and later

show more Depth of field blur in CS5.5 and later provides you with in-depth training on Video. Taught by Chris Meyer and Trish Meyer as part of the After Effects Apprentice 11: 3D Space show less
please wait ...

Depth of field blur in CS5.5 and later

In this movie we're going to explore a feature known as Camera Depth of Field Blur. It's a feature where layers in 3D Space can be selectively sharp or blurred out of focus, depending on their distance from the 3D camera. Now this feature has existed in After Effects since the very day it got 3D Space. However, it used to take forever to render, and didn't look all that good. As of After Effects CS5.5, this feature has been significantly upgraded. So I'm going to demonstrate it using 5.5, but I will mention where things differ in earlier versions.

If you have access to the Exercise Files, open up the Comp 05b-Depth of Field*starter. Ideally, you want to be working in two views, horizontal or vertical. If you have a large display, try to rearrange the frame that your comp panels are in until you can view your comps at 100% magnification. Now in my case, I don't have a big enough screen. So I'm going to take advantage of a preference hidden away that will improve my display.

You will notice that when I have to shrink down my Comp panels to some unusual number like 72.5%, that the outlines of many my layers look a bit on the crunchy or aliased side. We want to see these at full fidelity when working with Camera Depth of Field Blur. So either force to these views to be 100% or go on to Preferences > Previews and change Viewer Quality from Faster to More Accurate.

This will take a little bit more time to calculate, but it will give you a much cleaner display in your comp panels when you're at numbers other than 100%. If you have a slow computer a compromise is More Accurate Except RAM Preview, so your previews calculate faster. But I have a reasonably fast machine, so I'm going to choose More Accurate. Watch what happens over here in the Comp panel as soon as I click OK. Things are rendered more smoothly now and are nicely anti-aliased. In this composition I have a two node camera. We can see the back of the camera and its point of interest, moving through an arrangement of layers. I'm going to move to this comp marker at around 1:06 in the composition.

Double-click the Camera layer to see its camera settings. And here you'll get a more pictorial view of how Film Size, Angle of View, and Depth of Field interact. If you're trying to simulate the way a real camera works, change the Units popup to millimeters, as this is how most film, camera sensors, etc. are measured. After Effects defaults to a film size of 36 millimeters. To see the effects of Depth of Field Blur enable Depth of Field in this dialog.

I'm going to disable Lock to Zoom for now. This will allow me to freely edit the Focus Distance. Initially for this camera setting I have a Zoom, or lens length, of 173 millimeters, give or take. Down here you have some settings that you may recognize from real cameras, for example, F-Stop. I'm going to set this to a smaller number such as four, which produces a relatively shallow depth of field. The Blur Level is basically how much the Depth of Field effects are magnified or reduced.

100% simulates a real camera. Later on I'm going to bump this up just to exaggerate the Depth of Field blur effects. When you're done, click OK. In my Active Camera view, you'll notice already that some layers are getting a little bit blurred while others are still sharp. But to get a really good idea which layers are going to be in focus or out of focus, switch to your second view and make sure it is set to Top, or whatever perspective gives you the best view of your camera and the layers. I'm going to select the Camera layer and type AA, two As in quick succession, to reveal all of its camera specific parameters.

And I'm going to go ahead and resize the frame that my timeline is in to make sure I see all of its camera parameters. Normally this strong line indicates the zoom distance or the length of my lens. However, now that I turned off the preference that would link Focus Distance to my zoom, I can start scrubbing this parameter. When I do so watch what happens in this display. You will see a second pink plane appear which indicates where my focal plane is located, in other words what layers will be exactly in focus.

And as I scrub this value, you'll see over in the Active Camera display different layers go in and out focus. If I want this foreground node to be in focus, I'll click on it to select that layer, so I can see which one it is over here in my Top view, and scrub my Focus Distance until it lines up with that layer. Now you'll see it's perfectly sharp, while the layers that are further away from this focal plane are now out of focus. And as I drag the current time indicator through my timeline, you'll see how different layers come into and go out of focus as this camera and its focal plane moves through our composition.

Particularly here at the end where our hero frame is in focus, but it is out of focus earlier in the camera movement. You can manually set this focus distance, you can animate this focus distance, or as of After Effects CS 5.5 or later you can take advantage of a couple new menu commands that allow you to automate setting the Focus Distance, and that's what I'll discuss in the next movie.

Depth of field blur in CS5.5 and later
Video duration: 5m 47s 4h 49m Intermediate Updated Dec 06, 2012


Depth of field blur in CS5.5 and later provides you with in-depth training on Video. Taught by Chris Meyer and Trish Meyer as part of the After Effects Apprentice 11: 3D Space

After Effects
please wait ...