Depth of Field Blurs



  • How to get realistic looking shallow depth of field lens blurs with Adobe Photoshop, a step by step guide with image references. Please note that I use Sweetfx with my game. I do not use Reshade. I am offering this tutorial as an alternative to the use of Reshade and it's automatic blur, or for touching up old photos, doing collaborations with other members, or more!

    alt text


    :white_medium_small_square:

    Things you will need
    :gear: Adobe Photoshop
    :camera_with_flash: Image(s)
    :pray_tone3: Patience


    :white_medium_small_square:

    Step 1.a
    Start with an image that you wish to alter the depth of field on. I chose this photo that I used to show off a new horse in my blog.

    alt text

    Step 1.b
    To alter the depth of field we are going to be using alpha channels. The alpha channel becomes a depth map that gives us a greater ability to control what is and isn't going to be blured and how strong that blur is.

    :eight_spoked_asterisk: Key points to remember:
    Anything that is black is registered by Adobe as being in focus
    Anything that is white is understood to be out of focus, or blurred.



    Step 2
    Making the selection. There are a few ways you can do this, it's best to pick the method you are most comfortable with and I'v found it tends to end in a better result. The two easiest ways are to use the Quick selection tool and the lasso and a few layers. I am going to show you how to use the quick selection tool.

    Quick selection tool

    To access this tool, right click on the Magic Wand tool and select the quick selection magic wand. To use the tool, click on the image and drag your cursor around the area you want to select. To deselect an area that you do not want, press and hold Alt, then click and drag.


    :white_medium_small_square:

    Step 2.a
    I've selected most of the horse, and generally, the quick selection tool does an okay job of getting the majority of an area, but sometimes there will be pixels that the quick selection tool just can't quite make sense of, such as the horse's blaze, bit, and cheek strap. I
    alt text


    :white_medium_small_square:

    Step 2.b
    I zoomed in to give you a better view of some of the trouble areas. To remedy this and get those pixels selected we will use a Quick Mask and with a brush set to black, we will "paint" in the areas that the wand wasn't able to see.

    Black paint deselects
    White paint selects

    alt text


    :white_medium_small_square:

    Step 2.c
    Using the quick mask. Press Q to activate the quick mask. Your canvas will turn a lovely shade of eye-searing red. You do not have to be super meticulous with this step of select/deselect with the paintbrush because we will be refining the edge. Once you have made your adjustments as necessary and when you are done, press Q again to return to normal selection.

    alt text


    :white_medium_small_square:

    Step 2.d
    With the quick selection tool selected, right-click anywhere in your selection. A popup menu will appear, choose the Refine edge option. You can also reach the the options menu to refine edge by clicking in the options bar at the top of the screen.

    alt text


    :white_medium_small_square:

    Step 2.e
    When you get to the refine edge menu, if you deicde that your selection wasn't quite as nice as you would like that is OKAY. You can cancel the refinement, press Q again to bring up the quick mask made the necessary adjustments.

    To refine the edge, I put Smooth on a low setting of 4 because the stronger the effect the less detail your edges will have. As a matter of personal preference I set the Shift-Edge to -70. This is a setting I use more when making markings, and so I will go into it's uses in a later tutorial on that.

    alt text


    :white_medium_small_square:

    Step 3
    Building the depth maps.

    1. With your selection active, go to the bottom of your toolbar, click on the New Adjustment Layer Icon. It looks like a ying yang symbol, sort of. :yin_yang:

    2. Choose Solid Color option and choose BLACK as the fill color. :black_medium_square:. Press Okay.

    alt text


    :white_medium_small_square:

    Step 3.a
    Foreground Mask.
    This will keep the foreground in focus and the background out of focus. Click on the New Adjustment Layer Icon again and select Gradient. You want to use a Black to White gradient.
    By adjusting the ratio of black to white, which you can do by moving the arrows on the gradient slider bar, your depth of field will adjust. The more black you have, the more areas that will be seen as "in focus," where the more white you have, the less area that will be "in focus." You can and should make adjustments to this gradient based on a few different factors, which as what lense angle are your trying to mimic? Where does the natural horizon line fall? Are you trying to mimic a macro?

    For my image, I want more of the foreground to be in focus, so I adjusted the amount of black to be greater.

    alt text


    :white_medium_small_square:

    Step 3.b

    1. Once your gradient layer is set, click and drag it down below the Color Fill Layer.

    2. Select both layers using shift. Drag the layers down over the Group icon, which looks like a file folder :file_folder: , and release. This will put both layers into a group.

    3. Click on the Channels panel. Duplicate any layer in there, it won't matter which. For this tutorial, I choose the Blue channel.

    alt text

    1. Rename the layer whatever you want. For ease, I named my Depth Map Contessa.

    2. Go back to RGB mode. to do this, click on the RGB layer in the channels panel, click back on Layers and then click the eye icon to disable viewing of the group folder.


    :white_medium_small_square:

    Step 4
    Creating the Blur.

    1. Make a copy of your original layer. I always make a copy of the layer as creating the blur will permanently alter the layer.

    2. Go to Filter -> Blur -> Lens Blur.

    3. Make sure you have the Preview box checked so that you can see the changes as you adjust the blur.

    4. Under the Source option select the Depth Map that you made.

    alt text


    You're done!
    Once you hit okay, you are done. You can always go back and make adjustments as needed, the only step that you cannot undo at this point will be adding the blur to your duplicated original layer.

    (Posting my final result soon)




  • :white_medium_small_square:

    FAQ
    I will do my best to update this with any frequently asked questions, as well as make clarifying adjustments to the instructions in the tutorial <3


    :white_medium_square:


    Troubleshooting

    "The glow"
    The idea behind using this method is to first get a realistic sense of depth, and second to avoid the "glow," that can present around your subject sometimes when you use other methods of getting a background blur. When it comes to using this method, you can get a glow around your horse and or rider, if you do not make sure your margins (or edges) are clear and somewhat crisp. I showed you how to smooth the edges some, but depending on your image, that may be a step that you want to avoid. If you over smooth you will get a glow around your horse, and we don't want that!

    The following two images were both done using the same method.

    alt text

    VS.

    alt text


    :white_medium_square:




  • reserved



  • great tutorial!!!



  • Great tutorial! I actually get rid of the "glow" by copying the subject onto a new layer and then going back to the original layer I select the subject and apply content aware fill there. Works like a charm! :smile:



  • Thanks a lot for this tutorial! :heart:



  • Thank you!


Log in to reply

Looks like your connection to EQUUS | Forum was lost, please wait while we try to reconnect.