Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
The Camera Lens Blur effect can be used to do more than just blur an entire layer. With a blur maps that correspond to the depth of images in the frame, you can create depth of field and rack focus effects on a single 2D layer or on an entire 2D composition. So you might recollect this clip from an earlier movie. Now that the shot has been stabilized, I think a nice added extra addition to it would be to actually rack focus from the foreground rider to the background rider.
But how do we do it? Well, to begin, I will set the Camera Lens Blur effect. Now, of course that's going to blur the entire frame and leave these little black margins. So I'll click Repeat Edge Pixels to get rid of them. So this is my starting point. The way to create the rack focus effect is actually to create a grayscale map that describes where the start and end points of that rack focus are and I have one pre-made here. We could do it on the fly, but I think you'll see what it consists of and it will be pretty clear.
So, let's go to the Project panel and in my precomps, pull in my rack focus blur map. So this is just a gradient. If we look in there, it's just created with the ramp effect. Now, I have a couple of the layers that I have turned off because right now, we are just going to look at the effect of this one layer. So obviously, I don't want to be looking at this layer. I will just turn its volume and visibility off and back in the Effect Controls here I am going to choose that map to be my blur map and I'm free to actually move it behind as well.
And that doesn't mess up the Effect Controls. It's not confused by that. Luminance is the channel I want to use. I could also use any of the color channels or Alpha, but that was a grayscale map, so luminance map. It's centered because it's the correct size, and let's just crank up Blur Radius and see what's happening right away. So from that gradient-- let's just refresh ourselves. The white portion is what's now being blurred down here and the areas that were black are not getting any blur at all.
Well, that's the opposite of the direction I wanted to go. So, I am going to go ahead and invert it. Now, it's the background rider who's out of focus, and of course we're getting some other anomalies here right now. So this is going to need some cleanup. But just watch what happens if I move the value from 1 to the other. That is the basis of a rack focus effect and it's one that would have been very difficult to get if you could get it at all on the actual day because they're so far from camera beginning and there is a lot of light. But it's something that we can do in post.
Now, obviously, to improve on it, what we need to do is really get the foreground and background defined correctly. Lucky for you, I have already done that. So if I un-solo this layer, I have got a couple of others here. There's a matte that just holds out the ocean because that's all in the far background and then I went ahead and use Roto Brush to just create a really dirty roto of that cyclist. It doesn't have to be perfect. This is a great use of Roto Brush because it can be just good enough.
So, with all those layers on, let's go back and just preview again what we've got. Now, the blur effect is too heavy and you see an artifact happening here that I'm going to talk about in a moment. Let me cut this down in about half or a little bit less. So it's a little bit subtler. And I will animate it starting when it's just sort of starting to leave, but we want him to be in focus. I am going to set this back to 0. So now our guy in the background is not the object of focus. It's foreground guy. There is my first keyframe and then I will move ahead just as he exits. That's when will be focused on background guy.
And as I like to do, I think adding an Ease to these would be nice. We will just right-click on the keyframes. Under Keyframe Assistant, choose Easy Ease and that just recreates a kind of more organic and cameraman- like quality to how this happens. Let's preview and see what we have got. What succeeds about this rack focus effect is that there is a gradient traveling between the two points and that means that there are all those nice in-between values for the camera to focus on going from white to black.
So this is different from rotoscoping like you see over here where the transition from white to black is very sudden and it's those in between values that really give you the nice rack focus. One flaw that I pointed out earlier is that the edges around this foreground guy, when he's defocused, are actually looking a little too soft and what's happening is that hard edge is causing the blur to go right along it and it's blurring together the background and foreground.
So you are getting a little bit of haloing. It's not too bad, but I'd like to show a different scene in which I really did have to actually solve that problem. In this scene, my intention was to bring the foreground guy just in clear focus and have the background be out of focus. And as a reference I have this shot. So I was looking for an effect more like this. I will just go ahead and take a snapshot of that. So I have got a reference saved. Now you can use the same means as we did before. So I have a map.
So that's just again a use of Roto Brush to isolate them. Let's take a look at just the Alpha channel and there's the selection. Again, it's not a perfect matte, but it's certainly good enough to get started. And it just stays off when you put it to use. If I try to apply that to a single layer, as I have done here, you can see that it's a similar setup to what I had before. This time I am using the Alpha channel, but I have about the same amount of blur and the Focal Distance is set to 1 to have him be in focus and the background be out of focus, but the edges are really blowing the gag.
The only solution for this is actually to do them on separate passes to effectively create a clean plate for that background and to separate him out completely. Now we do already have him separated out. Let me show you what I mean by clean plate. I will just solo this layer. Now using that same Roto Brush effect, what I was able to do under Roto Brush is to actually use edge decontamination, just pull in those edges a little bit.
So what we have here is a clean plate, which just pulls more pixels in where there was the edge of guy before, so that there is nothing to blend against except background. Now you don't have to go so far as to knock him out completely. You just need enough to blur into and the Roto Brush with its decontamination options can do that. If I add the foreground, that one is in sharp focus and it helps to just have the plates behind them to cover that gap.
Now I explained it earlier that my Roto is not perfect here, but let's just take a look at the result and you can see that it's a lot closer than what we had. So what we have here is clearly a work in progress, but all the glitches that you see are just the result of the approximate Roto that's happening with just a quick Roto Brush. With proper Roto, you could certainly pull this one off and you'd even be free to create a rack focus so that as he gestures back toward the ocean, perhaps he would have him go out of focus and have the ocean come into focus.
At home, no one will know that lens effect such as shallow depth of field and rack focus weren't part of the original shot if you take the time to make full use of a blur map to control focal depth.
Get unlimited access to all courses for just $25/month.Become a member
93 Video lessons · 28330 Viewers
135 Video lessons · 62947 Viewers
79 Video lessons · 21275 Viewers
350 Video lessons · 106241 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.