Lewis Kemper's Photoshop Toolbox #1 Photo Course

If you do not see pictures in your email below, or do not receive the full lesson, visit the online version at: http://www.betterphoto.com/photocourses/13229/

All photos and text © Lewis Kemper, all rights reserved worldwide. No form of reproduction or usage - including copying, altering, or saving of digital image and text files - is permitted without the express written permission of Lewis Kemper and BetterPhoto.com.


Lesson #5: Creating Graduated Neutral Density Filters and Density Masks

Mt. Ansel Adams
Mt. Ansel Adams
© Lewis Kemper
All rights reserved
Overview -
In this lesson we are going to be making Graduated Neutral Density Filters and Masks using the gradient tool and a Composite Channel Mask

Digital Graduated Neutral Density Filters
Few photographic tools introduced in the last 10-12 years revolutionized outdoor photography like the graduated neutral density filter. It ranks right up there with autofocus and image stabilization in my mind. Of course not everyone owns, uses, or always remembers to carry their graduated neutral density filter. Fortunately with the digital darkroom you can achieve similar results!

In case you are not familiar with the filter I will quote from an article I wrote for Outdoor Photographer in April of 1991. "A graduated filter is a filter that has density on one edge and tapers to a clear filter at the other edge. Graduated filters come in two basic styles. One is the rectangular filter that secures to your lens by some type of filter holder system, and the other is the round screw-on filter that most people are familiar with. The variations from here are numerous. There are glass filters, plastic filters, colored filters, one stop, two stop, three stop and more."

The purpose of such a filter is to allow you to compress the tonal or contrast range of a scene into a range that will fit within the limitations of film. A typical example is shooting a sunset scene reflecting in a body of water. If you expose for the background the reflection will be 2 stops underexposed. If you expose for the foreground or reflection the background will be two stops overexposed.
Image exposed properly on bottom<br>Washed out on top
Image exposed properly on bottom
Washed out on top
© Lewis Kemper
All rights reserved
Graduated ND filter <br>applied to even out the exposure
Graduated ND filter
applied to even out the exposure
© Lewis Kemper
All rights reserved
If you place the filter over your lens with the density on the top portion and the clear portion on the bottom, then you are compressing the contrast range of the scene to one that "fits" neatly on the film.

Digital Graduated Neutral Density Filter
Step 1. Create an adjustment layer and as we have done before, keep it empty. Remember, you can create any type of adjustment layer, curves, levels, contrast and brightness, selective color, etc. The idea is just to create an empty adjustment layer.

Step 2. Then go to the blending mode and set the blending mode of the adjustment layer to either Multiply (darken) or Screen (Lighten) depending upon required fix.

If your image has an overexposed part as in the example shown above, you set the blending mode of the Adjustment Layer to Multiply.
Gradient Tool on Tool Palette
Gradient Tool on Tool Palette
© Lewis Kemper
All rights reserved

If your image is underexposed and you want to bring out details in the dark area, you again create an empty Adjustment Layer and this time set the blending mode of the layer to Screen.

Remember, if your overexposed area is still too light or your underexposed area is still too dark, make a copy of the adjustment layer and the effect will be doubled. If this is too much, lower the opacity of the second adjustment layer.

Step 3. Since an Adjustment Layer is a mask you can simply select the Gradient tool and draw the gradient.

Note: Make sure your Gradient Tool is set to the defaults of a linear gradient using the foreground to background colors.
To do this, check the Tool Option Bar and see if the first box on the left is highlighted.
Linear Gradient Highlighted
Linear Gradient Highlighted
© Lewis Kemper
All rights reserved

Next be sure you are using the Foreground to background option.

To do this select the fly away arrow next to the gradient to access the drop down menu.
Fly Away Menu Arrow
Fly Away Menu Arrow
© Lewis Kemper
All rights reserved

Now select the first option (upper left corner) to choose Foreground to Background.
Foreground to Background Option
Foreground to Background Option
© Lewis Kemper
All rights reserved

With the gradient tool draw a gradient from black to white on the active adjustment layer. The areas covered by black will hide the effect of the layer, while the white areas will show the effect. You can repeatedly draw the gradient until you get a smooth transition without needing to do an undo after each try. If black is your foreground color and white the background color you will want to draw from the bottom of the image towards the top. Black and white are the normal default colors, if yours are different select the D key to return to these default settings. If yours are reversed White and Black select the X key to toggle them.

Everything below the starting point will be black and everything above the ending point will be white. In the following example, I drew a short gradient leaving the whole bottom dark and most of the top white.


Gradient on Mask
Gradient on Mask
© Lewis Kemper
All rights reserved

Step 4. Optional - After drawing the initial gradient to get the best results, I then retouch the gradient with a brush, set to a low opacity, if I need to smooth out the transition or cover any areas that may be irregularly shaped. I prefer to use my tablet and stylus/pen for making these critical transitions.

So if you have an overexposed image then you set the blending mode to Multiply. You would place the black area of the gradient over the part of the image that was correctly exposed and the white part would be over the area that was overexposed in the original. This would then balance out the tonal range of your picture.

If you have an underexposed image, where the shadows are too dark but the highlights are correct, then you set the blend mode to Screen. You would place the white area of the gradient over the part of the image that was underexposed and the black part of the gradient over the area with the correct exposure. "White Shows, Black Hides"

When drawing with the Gradient Tool remember you can keep redrawing the gradient without having to undo. The gradient will redraw over the previous gradient. Experiment with the lines you draw. A long line will give a long smooth transition. A short line will give a more hard edge transition.
Short line (red) gives a harder edge
Short line (red) gives a harder edge
© Lewis Kemper
All rights reserved
Long line (red) gives a smooth edge
Long line (red) gives a smooth edge
© Lewis Kemper
All rights reserved


Gradient Masks
There are images where you will want to apply a Graduated ND filter but the image itself will make that more difficult.
Mt. Ansel Adams
Mt. Ansel Adams
© Lewis Kemper
All rights reserved

In this image, of Mt. Ansel Adams, the trees sticking up make the placement of a simple gradient a problem.

Just as using a filter in the field would present the telltale sign of trees that are dark at the top and light at the bottom the straight digital solution would do the same, but we will soon see a gradient mask will fix this problem.

Where Is My Fantasy Camera?
At most workshops I have ever taught there usually is a conversation that deals with creating the ideal fantasy camera or lens. In the past it may have been the 35mm camera that when you develop the film it grows to 4 x 5 proportions! Or the 20-300mm f 2.8 lens that is 6 inches long and weighs 2 pounds. My fantasy (I actually thought it may some day become a reality) is a camera with a pellicle mirror (a mirror that does not flip up but allows light to pass through) that has a coating that adapts to the light. It would be similar to the way photo-sensitive eyeglasses get darker when the light is brighter. The secret to this mirror would be that the mirror instantly would get darker only in the areas where the light is intense, creating a density mask that renders the image on film with a contrast range the film could hold!

Imagine never having over exposed images or blocked up shadows again! When Canon came out with their RT camera that used a conventional pellicle mirror in the late 1980's I thought it would only be a matter of time before my dream camera was built. Alas my dream has never come true. But with the digital darkroom you can achieve the same results using my theory of a density mask to even out the contrast ratio of your image.

Now when most people hear the word "mask" in conjunction with their digital imaging software it makes their head spin. By using Adobe Photoshop this is actually a really simple procedure to follow. I may not have created my fantasy camera, but when their head spins now, it's because they see the results using the digital darkroom. Here is how to do it.

Darken a Light Area
1. Open the image you want to adjust. In the first example we will pick and image with properly exposed shadows and overexposed highlights. I shot this image of Mt. Ansel Adams in the backcountry of Yosemite National Park on a 2 1/4 view camera. Unfortunately I forgot to use my Graduated ND filter. I did a good job exposing for the shadows, but in doing so, I totally blew out my highlights.

2. Next hold the CMD/CNTRL + OPT/ALT + the Tilde (left of number 1), or hold the CMD/CNTRL key and click the RGB channel (marked with a red X - click right on the word RGB). This will select the composite RGB channel in the Channels Palette. (marked with red X)
The RGB Composite Channel
The RGB Composite Channel
© Lewis Kemper
All rights reserved
This makes a selection based on the Grayscale values of the images. In plain terms, it selects the highlights of your image.

3. Create an empty adjustment layer, as shown in example below. Notice how the layer has a mask of the scene applied automatically based on our highlight selection.
Empty Adjustment Layer
Empty Adjustment Layer
© Lewis Kemper
All rights reserved

Creating an empty adjustment layer with selection made will automatically draw the mask.


Layer Mask Forms Based on Selection
Layer Mask Forms Based on Selection
© Lewis Kemper
All rights reserved
4. Set the Blend Mode of the adjustment layer to Multiply.


5. To make the image sharper run a 3 pixel Gaussian Blur on the mask.
Applying a Gaussian Blur
Applying a Gaussian Blur
© Lewis Kemper
All rights reserved

(Filter>Blur>Gaussian Blur)

This works in the same way Unsharp Mask, in the Sharpen Filters, actually sharpens an image. The science behind it does not matter, just accept that it works!

This gives me a one stop Graduated Neutral Density Filter. The mask is not pure black and white, so there will be some darkening taking effect on the gray areas of the mask. If parts of the image get too dark, select a soft brush with low opacity and paint with black on the mask. If you paint on the mask I would run the sharpening blur after the painting.

If I Want Two Stops I Would:

  1. Create an empty adjustment layer.

  2. Set the Blend Mode to Multiply.

  3. Copy this layer (by dragging the layer down to the New layer icon).

  4. Create a Group/Set. (Select the icon that looks like a folder or use the layers menu).

  5. Drag both adjustment layers into the group/set. (In CS2 you can Shift click on them to highlight both layers and drag them to the group/set together.

  6. Turn off the group/set by clicking on the eye to the left of group/set.

  7. Hold the CMD/CNTRL + OPT/ALT + the Tilde (left of number 1) or CMD/CNTRL + Click on the composite RGB channel in the Channels Palette.

  8. Turn on the group/set by clicking on the eye to the left of group/set.

  9. Create a Layer Mask on the group/set. Notice the Layer Mask is filled with the image made from the selection.

  10. Paint with black on areas that got too dark (in this case the foreground).

  11. To make the image sharper, run a 3 pixel Gaussian Blur on the mask (Filter> Blur> Gaussian Blur).


Completed Image
Completed Image
© Lewis Kemper
All rights reserved

Before and After
Before and After
© Lewis Kemper
All rights reserved


Lighten A Dark Area
In this second example I picked an image with properly exposed highlights but underexposed shadows. I shot this image in Tuolumne Meadows in Yosemite National Park with my 4 x 5 view camera. I used a two stop graduated neutral density filter on the image to hold the exposure on the sky area. But unfortunately there was such a big difference in the brightness range of the highlights and shadows the trees blocked up.


Dark Image
Dark Image
© Lewis Kemper
All rights reserved
1. Open the image you want to adjust.

2. Next hold the CMD/CNTRL + OPT/ALT + the Tilde (left of number 1).


Invert Selection
Invert Selection
© Lewis Kemper
All rights reserved
3. Invert the selection - we do this because we want to effect the dark areas not the light areas!

You can invert the selection through the menu as shown or the keyboard shortcut SHIFT + CMD/CNTRL + I.
4. Create an empty Adjustment Layer.


Blend Mode to Screen
Blend Mode to Screen
© Lewis Kemper
All rights reserved
5. Set the Blend Mode of the adjustment layer to Screen.

Notice the adjustment layer has a mask automatically loaded based on the selection. Since the mask is not pure black and white there will be changes to areas of gray.

6. Optional step - Since the negative will become our mask and with all masks the simple rule is "White Shows, Black Hides" we can make the sky of our mask a solid black to keep the sky of the original image unchanged.
Lightening Shadows By One Stop
Lightening Shadows By One Stop
© Lewis Kemper
All rights reserved

To do this go to Image>Adjustments>Levels and move the left (Black) triangle to the right while the adjustment layer is the active layer. Watch the image on the mask and stop when the sky is a solid black on the mask. This will lighten the shadows by one stop.

If you want to fine tune the image you can select a soft brush and paint with white on the adjustment layer to lighten any areas or paint with black to darken any areas (I find this image looks better if I paint with white on the area of the water that darkened on the mask when I ran levels).

You can just paint with Black and White on the mask instead of doing step 5 but you will get a better mask by doing that step.
Blur the Mask
Blur the Mask
© Lewis Kemper
All rights reserved

7. To make the image sharper run a 3 pixel Gaussian Blur on the mask.


Before and After 2
Before and After 2
© Lewis Kemper
All rights reserved
These techniques can help you get or salvage many photographs. So if you did not use your graduated neutral density in the field don't despair, you can still create or use those "almost" exposures and turn them into "keepers!"

While my fantasy camera may never get built I at least will be able to obtain comparable results after the fact in the digital darkroom. Ideally it would be best if the original image had the complete tonal range captured when the picture was made, but for now, an expanding knowledge of Photoshop and density masks will have to suffice. Who knows what the future will hold?


Assignment: Graduated Neutral Density Filters and Density Masks

  1. Using the images provided, create a Graduated Neutral Density Filter using the gradient tool for the Seastar image.

  2. Using the images provided, make the gradient masks for both the Mt. Ansel Adams and the Tuolumne Meadows images. Make a two-stop change on the Mt. Ansel Adams image.

  3. Using your own images, create Graduated Neutral Density Filters and Density Masks - Select at least one image where you darken washed out areas and one where you lighten dark areas.

Here are my images for you to work on:

Remember to email me your downsized Photoshop files (complete with layers) and then upload your corresponding flattened large versions to the Light Box.

Submit your four to five photos by Sunday, February 11, 2007.

As always, anytime you need an answer, don't hesitate to ask your question in our online Q&A forum or send me an email.

Have fun!
Lewis Kemper

All photos and text © Lewis Kemper, all rights reserved worldwide. No form of reproduction or usage - including copying, altering, or saving of digital image and text files - is permitted without the express written permission of Lewis Kemper and BetterPhoto.com.