From the course: After Effects Compositing: 2 Matching Foreground to Background

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Create depth of field with a depth map

Create depth of field with a depth map

Suppose you want to create shallow depth of field effects within a single layer, instead of between multiple layers. For this you need to assign a blur map. Blur maps, also known as depth maps, can be created by hand and in this lesson I'll show you how. The basic idea is to generate a grey scale gradient that corresponds the distance from camera of specific areas of the scene. So here we have a ground plane that extends from the camera to a wall in the background. Now let's suppose I want just one or the other of these skateboards to be in focus. That's going to be fairly simple because it's just a straight line back in space, along a flat plane with two objects very close to that plane. So I can achieve this with a simple gradient. As you know, I can create that just using a solid. I'll call it, grad. And it doesn't matter what color it is, because I'm immediately going to assign Effect > Generate > Gradient Ramp. So now I have a gradient that describes the foreground and background…

Contents