Style Switcher

Predefined Colors

How To Blur Backgrounds In Photoshop – Shallow Depth of Field Effect Using Lens Blur

Welcome back to another very exciting tutorial, here at the My name is Jesus Ramirez and you can find me on Twitter @JRfromPTC. In this video, I’m going to show you how to create a blurry background in Photoshop. What we are trying to do here is fake the shallow depth of field focus that you typically see in portrait photography.

For this tutorial, we’re going to use a photo of my friend Cheryl. She runs a popular fashion blog. You can find her at As you can see, this photo was shot with a wide depth of field, so the background is not as blurry as we would want it to be. So, to create our blurred background effect, we’re going to use the Lens Blur Filter. But, first, we need to tell Photoshop what areas are going to be blurry, and what areas are going to be in focus. You can use a simple selection to determine that, but I recommend you using the alpha channel, instead.

It allows you to easily create more complex selection if your image requires it. This mask for alpha channel will be a Depth Map. It will allow us to blur the objects in the image exactly as we want to. Anything that is black will be treated as if they were in focus, and anything that is white will be treated as if they were out of focus. And, obviously, the grays will be different levels of focus. So, we’re going to use this photo of Cheryl and we first have to determine what’s going to be in focus, and what’s going to be out of focus. So, we’re going to use the alpha channel, which is pretty much the same thing as the mask.

Black hides, white reveals. In this case, black is going to keep things in focus, and white will make things out of focus. So, we first need to make a selection out of Cheryl, since she will be in focus. I’m going to use the Quick Selection Tool, and I just want to mention that I’m going to make a really, really quick selection here, but I want you to take your time on your image since selections are really important when using the Lens Blur Filter.

So, I’m just going to quickly make a selection around her, and, as you can see, I’m not taking too much time, but I’m not doing that bad of a job. Hold Alt, Option on the Mac, Click and Drag to Deselect the areas that you accidentally selected, like in-between her arms, here. And I’m going to Zoom in just to show you something. I couldn’t get the ring, here, and it might be a little hard using the Quick Selection Tool, so you can use the Q key on the keyboard for the Quick Mask Mode. With the Brush Tool, you can paint with black to deselect, and paint with white to select, so I’m using the bracket keys now to adjust the size of the brush, and, currently, my foreground color is black, so when I paint to deselect. But, if I want to switch that to black, I can just press X on the keyboard to swap foreground and background color, as you can see there.

So, with white, I’m going to select her finger there, and her ring. And I can just go around and hold X when I want to take something out, and press X, again, when I want to paint something back in. So, as I mentioned earlier, I’m not going to take too much time on the selection, just because I want to keep this tutorial short, and I want to show you what you came here to see. And I’m going to press Q, again, to bring the selection back. I’m going to click again on the Quick Selection Tool, and then, the Options Bar, with the selection still active, I’m going to click on Refine Edge.

That’s going to bring up the Refine Edge Window, and I just want to smooth out the edges, here, and that’s pretty good. I’m going to press OK. So we’re going to work with this selection. Now, remember what I said earlier, black is going to keep things in focus, and I’m going to build my depth map by using regular layers. In this case, I’m going to use a solid, so I’m going to go into the New Adjustment Layer icon, and select Solid Color, and I’m going to use black, and I’m going to press OK. Now, I’m going to create a mask that’s going to allow me to keep my foreground in focus, and my background, out of focus.

So I’m going to use a Gradient for that. I’m going to click on this icon, here, and make sure that I’m using my Default Gradients. I’m going to click on Reset Gradients, and press OK. So, I’m going to use black to white, and, remember, black is going to make things in focus, so Cheryl standing right about here. So I want to keep things in focus there, and I’m going to, gradually, blur the background, until we get to the background here, where everything should be blurry. So, I’m going to make one quick adjustment. I’m just going to drag this to the left a little bit, just to blur this area a little bit faster, right about there. Then, I’m going to press OK, and I’m going to press OK one more time. Then, I’m going to Click and Drag this down below the shape, there, that created her body, and I’m actually going to select both of these now by holding Shift and clicking them both, pressing Ctrl G, Command G on the Mac, put those into a group.

Now that we have that in a group, I want to click on the Channels Panel, and it doesn’t matter what channel we click on, they’re all the same. Duplicate any one of those, so click on it, drag it over into the New Channel icon here at the bottom, and you can rename it whatever you want. So, we’ll just call this one “Depth Map Cheryl” and go back into the RGB by clicking on the RGB, here, on top. Click on Layers, and disable the group. Now, we’re going to work on creating the actual blur. This filter is destructive, so you always want to work on a duplicate of the original layer. Press Ctrl J, Command J on the Mac. Then, go into Filter, Blur, Lens Blur, and we’re going to blur the image. First, make sure that you have Preview enabled, so that we can see the changes we’re making as we go along.

Then, under depth map, choose the alpha channel that we just created Depth Map Cheryl. Notice what happens. Immediately, Cheryl is in focus, and the background is out of focus. Notice that ground is in focus where she is standing, and it’s gradually getting out of focus the further back that we recede into the image, which creates a very realistic effect. Now, I do realize that this is not 100% accurate in terms of how our lens will represent depth of field, but for this tutorial, I wanted to maintain a simple mask, so that I can explain how the filter works. But, once you’ve mastered the filter, feel free to adjust the mask accordingly so that it matches a realistic lens more accurately. So, back on the Lens Blur Filter, you’ll notice that one thing has changed the cursor. Notice how it’s now a crosshair. So, if I click on the background, notice that the background is now in focus, and it gradually gets out of focus, and I can click on Cheryl, and, now, she’ll be in focus, and they will gradually be out of focus.

Now, we don’t really need to worry about that too much because we created the depth map knowing that she was going to be in focus. I’m just mentioning it just in case you accidentally clicked somewhere on the image, and you invert the focus, so, click on her so she stays in focus. But, you don’t need to worry about that as long as you create the accurate depth map. And I just want to point out that the controls under the iris label are all controls that try to mimic a real camera. For example, the Shape, which is sort of like the aperture opening for the lens, the lower the number, the less blur there is, and the higher the number, the more blur there will be. Then we have the Radius. This is the amount of blur that the filter is going to create. You can also think of it as the lens aperture. So, if I bring this down, you will see that there’s less blur in the background. If I bring this up, the background will be more blurry. So, adjust that accordingly, so, in my case, maybe, somewhere there.

Blade Curvature and Rotation don’t make that big of a difference, and you can slide those around. But, as I’ve mentioned, the change is not that dramatic. Then, we have the Specular Highlights, and this will help you create the bokeh effect. If I bring the Brightness up, and bring the Threshold down a little bit, you will see this area here get brighter. This is, probably, not the best image to show you the bokeh effect. But, in a different image, you would get that effect. Also, you have Noise. With the blurs, you remove any noise or film grain. This helps you add it back in. I’m going to just increase that all the way, just so you can see how that works. If you uncheck this, then you get noise with color. In this case, the original photo didn’t have any noise with colors, so I would leave that checked to Monochromatic. And, by the way, I’m going to hold Alt, Option on the Mac, turn the Cancel button into a Reset button, and reset the settings.

We’re all looking at the same thing. So, I’m going to go back into Source, select “Depth Map Cheryl” and I’m going to increase the Radius to blur the background even more, and I’m going to add just a little bit of noise. So, I’m going to click on here and just tap the Up key on the keyboard just once, just to add a tiny bit of noise, then, I’m going to press OK. So this is before, and this is after. Now, you might be thinking at this point, this is a lot of work. Why don’t you just duplicate the layer, go to Filter, Blur, Lens Blur? Don’t even worry about the depth map. Simply blur the whole thing, and make a selection around Cheryl, and mask that out. And, actually, let me invert the selection, so you can see why. Ctrl I, Command I on the Mac. Notice that ghosting effect that we get. That’s why that filter is so important. The filter doesn’t allow the things inside of that selection to become blurred, and you avoid getting this ghosting effect.

So, that’s the difference, with the filter, and the depth map, and without. So that’s one of the reasons why I went to the trouble of creating that depth map. And, again, as I mentioned earlier, you don’t necessarily need to create the depth map. You can start with just a selection and just use that. I’m just going to click on the original layer for now. Notice that the selection is at, then we go into Filter, Blur, Lens Blur, and we can invert the selection. And you can see, she’s in focus, but I don’t have that nice Gradient that I created earlier. So, the way that you create the selection is very important for this effect to work properly. So I would just learn how to use the alpha channels, not be intimidated by them, and if you’re already using them, great! Now, at this point, what I’m going to do is I’m just going to fit this to screen so we can see everything and I’m going to quickly show you how to create that Glow Effect.

It’s really popular in portrait photography, so I’m just going to click on the top layer, here, add a new layer. With the brush selected, I’m going to increase the size of the brush by tapping on the right bracket key on the keyboard, switching from black to white as my foreground, and just tapping in the middle once. So, I’m going to press Ctrl J, Command J on the Mac, to duplicate that layer. Press Ctrl T, Command T, to Transform. We scale that way up, and, actually, I’m going to Zoom Out since I’m going to scale it even further, maybe, something like that. Then, create a new Hue and Saturation Adjustment Layer, and click on Colorize.

But I only want this effect to affect the layer we just created there, at the bottom. So, I’m going to click on this icon, here, to create a Clipping Mask. Then, I’m going to choose a yellow color. I know you really can’t see it there, so I’m going to bring down the Lightness, and increase the Saturation, and this is not looking very good right now, and that’s because this layer here, and I’m going to call this “Outer Glow,” by the way outer glow. That’s because the outer glow and the center glow need to have a different Blend Mode. So I’m going to select both of them while holding Shift, and clicking, and switching it over to Linear Dodge Add. And, now, I can come in here, and adjust the Lightness and the Saturation, and the Color, maybe, something like that. You can hold Shift, click on the top layer, hold Shift, and click on the bottom; that’s Ctrl G, Command G on the Mac to put those into a group, and I can press V on the keyboard, Click and Drag to Move, and put that somewhere out here, maybe.

And I can adjust the Fill to control the brightness of that glow. One thing I may want to do is above the ìCheryl copy,î I think, you can create a new layer. Go to Gradient Map, click on this icon here, and go to Photographic Toning, and press OK, and you can select one of these gold ones here, maybe, this one here. And, change the Blend Mode to Soft Light, bring the Opacity down, and start dragging it up until you get one area that you’re happy with, so, maybe, something like that. At this point, I’m going to Zoom In just so we could see what’s going on. I’m going to put all these effects into one layer. So, we have the Glow, Gradient Overlay, and the Blur. So, select all of them. That’s Ctrl G, Command G on the Mac. Put those into a group. That’s before, and that’s after. And, one quick last thing that I want to mention before we finish, that I just remembered, on the “Cheryl copy” here, I want to Zoom In, and if there’s jagged edges there, that’s because your mask is not as good as it could have been.

So you can go back and make adjustments to your mask, or you can use something like the Blur Tool, here, to create the blur on the edges. But, to be frank with you, you probably want to create a better selection to start with. And that’s it for this tutorial.

As found on Youtube

Posted in PhotoshopTagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,