Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
In order to create depth of field in an After Effects project, you must first have a camera because it's cameras that control the depth of field. Now, if you're unfamiliar with the term depth of field, it basically controls what's in focus along the z-axis in relation to the camera. So let's go ahead and add a camera to our project. Make sure you have your timeline or composition panel active, and then go up under the layer menu and choose new camera. In the camera settings for this camera, I want to choose a two node camera for now, and we'll use the 50 millimeter preset. Make sure enable Depth of Field is selected. let's look down here at the bottom.
The first setting I want you to make an adjustment to is the f-stop. Now, those of you who are familiar with DSLR cameras or photography in general will be familiar with the term f-stop. The smaller the number, the more shallow the depth of field. So, let's change our f-stop from 5.6 to 1.8. That's going to give us as a very shallow depth of field. Now we can also adjust the aperture and the blur level. But we'll do that inside the composition. If your project isn't set to pixels, click on the pull down and make sure it's set to pixels. This way, we can kind of pay attention to the zoom level. See, the zoom level show me how many pixels apart my camera has to be from an object for it to be in focus.
Notice the zoom matches the focus distance. So I'm going to click OK. Now since we've created our camera in the scene, let's create some objects that are offset in z space. Because currently we just have the word PASS and these video layers. And they're at slightly different planes, but I really want to accentuate things. Let's start by clicking on these dashes over here on the left side. You can also just click on Layer six. With the dashes selected, I'm going to press W to grab my rotation toll, and then you can hover over the X-axis in the Composition panel and then click and drag. You can drag either down or up but I want these lines to go ahead and draw out a sense of depth along the z-axis.
Now press V on your keyboard to grab your selection tool and click on the x-axis and just drag over along the right. Just to simplify the scene so we don't get distracted with everything else. We'll just work with these dashes and the word pass. So let's click on pass and we'll shift click on dashes. So we have both layers selected in the layer panel. And then we can go ahead and click the solo button to solo those two layers. Just so we have more than one word. Let's deselect our two layers and just click on layer 9 so that's the only thing we have selected. Press Cmd + D on the Mac or Ctrl + D on Windows to duplicate. And let's hover over the Z axis.
If we click and drag on the Z axis we can move our new word back in Z space. Just to reposition it in the scene, I'm going to click on its Y-axis to move it up, and I'll click on its X-axis to move it over towards the other lines. I want to go ahead and just click anywhere in the canvas to deselect our second word. As you can see, we've already created depth of field. This back word is actually slightly out of focus. Now I want to accentuate that, and show you another way that you can actually control depth of field, so let's get the proper perspective of our scene by going to the pull down here on the right side of the composition panel.
Let's change the view from one view to two views horizontal. Now if you don't have the top view already selected on the left side, go ahead and click on the left side and make sure you have the top view active from the pull-down. You can zoom in and out just by scrolling with your mouse wheel, or pressing the Period key or Comma keys to zoom in and out. Now, if you can see your camera, go ahead and click on it so we can see the view of that camera. Now I going to press the Spacebar and click and drag to sort of reposition in the scene and you may have to zoom out a little bit.
As I'm looking at the scene if we click on this line here that's going to show me my first Pass layer. Now just so I can bring the other one more into the scene, I'm going to click on the other pass layer in the active camera view and I can see it here in the top of my view. I'm going to click and drag that forwards in my scene. And then let's go ahead and click on our other word pass and just drag that a little closer in the scene. Now I can more clearly see what we're working with. If you select the camera, notice I have the center line. That points at the point of interest.
I can click on that center point of interest and frame it up on this first word pass. If I want to rack focus between the first word pass and the second word pass, we could go ahead and animate the focus distance. In order to do that, we need to lock the focus distance to our point of interest. We can do that by going up to the Layer Menu. As long as we have our camera layer selected, you can go down to camera. And choose Link Focus Distance to Point of Interest. Now the camera focus is locked to that point of interest. And if I zoom in a little closer here, I'm going to press the Spacebar and reposition, here you can see I have this plane in the field. If I click and drag on my point of interest, I can move my focus from one word to the other.
Now I'm not seeing much of a difference. So lets select our Camera Layer, and press AA to open up it's options. Lets increase the blur level. I'm going to click and drag on the blur level. And we'll drag it up to around 362%. Now I'm going to zoom in on my Active Camera View. So now you can more clearly see the blur that we've set. Now let's go back to the top view and I'm going to click on layer one to select the camera. That'll bring up my point of interest. When I click on the point of interest, I can push it back in the scene towards our second word pass.
Notice how the focus is following that move. So when it comes to enabling depth of field inside of After Effects, you want to go ahead and make sure you have depth of field enabled on your camera. Then it's a matter of just making sure that you lock that focus distance to something that you could easily position through the scene. With your camera layer selected you can always go up on your layer. Go to Camera, an link your focus to the distance of the point of interest. Or, if you're really trying to push things, you could link the focus distance to a specific layer, and then animate that layer moving through the scene.
And thus, animating your focus distance that way.
Get unlimited access to all courses for just $25/month.Become a member
93 Video lessons · 33464 Viewers
135 Video lessons · 67759 Viewers
79 Video lessons · 23805 Viewers
350 Video lessons · 108077 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.