Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
When you shoot images with a real camera, there is an effect called depth of field that's present in all photographs. This refers to the amount of subject matter that is perfectly in focus, starting from the foreground and traveling backwards into the image. Depth of field can add tremendous amounts of realism to any scene if used correctly in 3D. 3D renders though are not produced by real cameras and as a result they don't have this effect. Fortunately the programmers of both CINEMA 4D and After Effects have given us the tools to create this effect right inside of After Effects. The depth of field that I'd like to create in this image is going to be based on the platform as the central focus point for the image.
So I'd like to have things that are going backwards into the image out of focus as they get further and further away from the platform. We created when we rendered from CINEMA 4D something called the depth pass and we're going to use that depth pass to drive an affect here in After Effects. So let's go into the MMM-001 composition and that is right here. And the MMM-002 composition is the camera shake, and I'm going to rename that right now because that's a little bit confusing. So I'll select this composition, I'm going to hit Return on the keyboard, and I'll change that to MMM-001- Shake, as in camera shake.
Now I can tell those two compositions apart. So inside of the MMM-001 composition, as this is where I want to add the camera shake, so let's raise the timeline up a bit. Inside the MMM-001 composition is where I want to add the depth of field effect, and the Depth of Field is going to be based on the depth pass from CINEMA 4D, but I know from previous experience that sometimes I like to tweak the depth matte, and so I always pre-compose it, and put it inside its own composition. That gives me a lot of freedom and if I wanted to make changes to the depth pass later.
So let's go into the Video folder and into the Stadium Pass folder and inside the Special Passes folder in there is the Stadium Depth. And let's take that and drag it onto the New Comp button. And let's take this Stadium Depth and bring it down and put it into the Pre-COMP's folder. Inside the Stadium Depth, I want to scrub forward in time to the point where the camera settles, and I can see that I've got a pretty good looking image. The way the depth matte works is it's a grayscale image and CINEMA 4D when you render, projects a fog into the scene and the presence of the fog is based on a focal point for the camera.
And things that are sharpened and focus are not going to be enveloped in this fog and things that are out of focus will be enveloped by the fog. And that fog you never really see, but it's present here in the form of the depth matte. And so the way that depth matte works is that After Effects is going to be using the light and dark values in here, to determine what things are in focus. Now things that are perfectly black are going to be in sharp focus and things that are of grayscale values or white are going to be out of focus. And so you can see that our platform and the elements that project out from it are going to end up being in perfect focus and that's going to really have to draw our eye towards the type and blur out the background of the image.
So let's go into the MMM-001 composition now and I'm going to drag in the Stadium Depth composition and we're going to put that, it starts off at the top here, but we're going to drag it to the very bottom of the layers stack, so all the way down, and right below the Stadium Pass Pre. Now what we need to do is the Stadium Pass Pre, if I solo that layer and turn it off and on, that has holes in it. I want to make sure that these holes of ever become visible again and I don't to want to accidentally see the depth matte below that.
So I'm going to add a solid layer to my composition and put it right between those guys. That way it almost acts as a basic grounding for the whole image. So let's start off, I'll un-solo that and I'm going to make a new solid, Command+Y or Ctrl+Y, and let's make it black. We will just leave the name Black Solid and I'll hit OK and I'm going to drag that Black Solid layer all the way down to the very bottom of the layer stack and put it just above the Stadium_depth pass. And the Stadium_depth pass now is right underneath that black solid and there's no chance me ever seeing that Stadium_depth pass, because the Black Solid is covering it up.
What I need to do is to add the depth of field using an adjustment layer. An adjustment layer is a special layer in After Effects that affects all the layers below it. And it's really handy because you can add these adjustment layers and then it controls their intensity by just simply adjusting the opacity of the adjustment layer. So let see what that means. I'm going to make a new adjustment layer so I go Layer > New > Adjustment Layer, and that shows up at the very top of the layer stack, and I want to add the effect to that layer. The effect that we're going to use is the Lens Blur effect and so I'm going to go to the Effect menu and go to Blur & Sharpen, and go to Lens Blur, and when I add Lens Blur to the scene, the whole image blurs out.
But there's a really cool feature in the Lens Blur effect called Depth Map Channel and what I need to do is to tell it which layer to use to generate that depth map. So I go to the Depth Map Layer pulldown and this is a listing of all the layers that are in this composition. Well, way at the very bottom is the Stadium Depth and so when I select that it's now going to use the light and dark values to generate that Blur effect, and so let's see what happens. You can see that everything is blurred out. Now I have a problem though. The things that's the platform is blurred out, but also my phone, and so what I need to do is adjust the position of this adjustment layer and I need to put the phone and the type above that, so we're going to take the adjustment layer and drag it down in the layer order so that the type is above it.
So let's go down and raise that up. So there's my Flashbulbs. I'm going to put these right above the Flashbulbs and below the Phone Pass. And when I do that, you can see now the background is blurred out but the foreground is in nice sharp focus. Now I'm going to adjust the Iris effect. That controls the intensity of the blur and it's at 15 right now. That's the default value, and I'm bringing that down to about 10. So now it's a little bit blurry, but not completely blurred out. I don't want to have a total blur on the background. One of the things that depth of field tends to do is to make images look smaller, and so I want to be careful. The larger the depth of field, the smaller the foreground objects are going to look.
And so we are going to be very careful with that and apply very subtle effect. So now I'll turn the adjustment layer off and on so you can see what it look like before and after. And so if I just turn that off, you can see it's a very subtle effect but it does help to draw the eye towards the focal point of frame and that's really what this is all about. I don't want this Lens Blur to be visible all the way through the animation. I don't want it to come on really until the type hits while the flashbulbs are going off. That's going to help to draw our eye towards the center of the frame.
So let's go forward to the Moment Hit marker and I'm going to move my time slider to right there. And what I want to do is to set keyframes for the opacity of this adjustment layer. So I'm going to select the adjustment layer and hit T key on the keyboard to bring up the Opacity. And I'm going to turn on the stopwatch for Opacity, and that sets a keyframes for 100%, so that's where I want my blur to go to. I want to move this forward in time. I'm going to put it to about frame 106 or so, right above there.
And then the moment and the type hits, I want it to be zero and that's going to turn the Blur effect off. So if I go to the Opacity and change it to zero, that sets a keyframe for that. You can see the blur effect is off. Now what will happen is that the blur effect will come out slowly as we move through these keyframes and by the time we get to this keyframe it will be fully on at 100%. You can see now it's blurring out that stuff in the background but our type is nice and in focus. So once again let me turn off the adjustment layer, so you can see a before and after. When I turn off the adjustment layer, you can see that background is in very sharp focus. When I turn that on again it gets subtly out of focus and that really helps to drive the importance of the type in the phone.
This subtle Lens Blur using the depth pass adds a lot of realism to the scene. it also helps to draw attention to the type. But be careful with it. The more shallow your depth of field is, the smaller your entire image will feel, and so you really want to use it with caution.
Get unlimited access to all courses for just $25/month.Become a member
107 Video lessons · 32866 Viewers
94 Video lessons · 22772 Viewers
78 Video lessons · 9023 Viewers
83 Video lessons · 8315 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.
Your file was successfully uploaded.