Photoshop Tutorial: Realistic Shallow Depth of Field Effect Using Depth Maps

Hello everyone this is Chris from Spoon Graphics back with another video tutorial for Adobe Photoshop Today I'm going to show you a useful technique for adding a realistic shallow depth of field effect to your photos

We'll use a Depth Map to indicate which areas need to be blurred and by how much This method gives you complete control over the effect, which makes it ideal for all kinds of photographs, no matter the perspective, or complexity of the background In a previous tutorial I showed a technique to create a shallow depth of field effect that involved cutting out the subject, then applying a blur filter to the background That process is perfect for images with a background that cleanly recedes into the distance, but sometimes the scene is littered with other objects that may need to be blurred by different amounts to represent their distance from the camera This is where a Depth Map comes in handy

By defining the sections of the image in grayscale tones, you can blur some areas more than others I'll be using this free photo by Cameron Stewart as an example You can see the natural focus depth of the image which keeps the subject in focus, then gradually blurs into the background We'll create a depth map to exaggerate this Choose the Quick Selection tool and draw a mask around the areas of the photo that are the closest to the camera that are in clear focus, this includes the main subject and the rocks she's standing on

Make sure you capture every detail around the outline If you go too far, hold the ALT key while painting to remove the area from the selection Add a new layer, then fill this selection with white using the CMD (or CTRL key on Windows) and Backspace shortcut Go to Select > Deselect to clear this selection The landscape beyond the subject gradually recedes into the distance

Add a new layer and drag it below the selection of the main subject Select the Gradient tool, then make sure the gradient settings flow from black to white Drag a gradient from the horizon down to the subject, ensuring that the area the farthest away is black and the area closest is white The grayscale gradient inbetween will result in this area being blurred more and more as the tone gets darker Add a new layer, then swap the foreground and background colours around

Change the gradient preset to white that fades to transparency Drag a shorter gradient that lightens top of the image so the depth map is darkest at the horizon In this particular photograph the tree branches towards the top of the image are close to the camera, so they shouldn't be blurred as part of the grayscale gradient Since they're pretty clearly defined against the background, the Channels selection method is the easiest way to select them Turn off the visibility of the gradient layers so the tree branches are visible

Toggle through the Red, Green and Blue channels within the Channel panel to find the one with the highest control Drag this layer onto the New icon to make a copy Use the CMD+L shortcut to open the Levels, then adjust the sliders to make the leaves black and sky background pure white Draw around the rest of the image with the Polygonal Lasso tool and fill the area with white Hold the CMD key and click on the thumbnail of this new channel to load a selection of the branches

Click the RGB Channel again to activate it, then head back to the Layers panel Bring back to the visibility of the hidden layers, then add a new layer above them, Go to Select > Inverse to flip the selection, then fill this area with white, which will prevent any blur effect being added, since these branches area in the foreground so they will still be in focus Shift and click all the grayscale layers to select them all, then press CMD+G to create a Group Give it a quick name to keep things tidy We need to create a snapshot of this grayscale image, so head over to the Channel panel, then duplicate any channel by dragging it over the 'New' icon

Give it a recognisable name, such as Depth Map Activate the main RGB channel again, then head back to the Layers panel and hide the Group of grayscale layers, leaving the original photograph Make a duplicate of the background photo layer to save a copy of the original, then to go Filter > Blur > Lens Blur Change the Depth Map Source setting to the channel we created and named Depth Map, then max out the radius to completely blur the out of focus areas The depth map is currently applying maximum blurring to the white areas, so check the Invert button so the blurring is applied to the darker tones

You can see the background is completely out of focus, but the areas closer to the camera are blurred less, leaving the subject crisp and clear Whilst keeping the background in focus might be better suited to a photograph with such beautiful scenery as this, the shallow depth of field effect can really enhance images where you want to draw attention to the main subject The use of a Depth Map gives you complete control over which areas should be in focus, for those complex images that might have items are different depths within the scene So if you enjoyed this tutorial or learnt any new tricks, a thumbs up to help spread the word would be really appreciated Subscribe to the channel to stick around for more of my content, and be sure to join my mailing list at Spoon Graphics to get your hands on my free bundle of design resources

Thank you very much for watching, and I'll see you in the next one

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.