Digital Graduated Neutral Density Filter in Photoshop

Article and Photography by Ron Bigelow

www.ronbigelow.com

Photoshop CS or Photoshop CS2 Used in this Tutorial

Background

One of the biggest problems with color films and DSLRs is the limited dynamic range. Print films tend to have around five stops of dynamic range. Slide films only have about three. DSLRs usually have about five stops, perhaps a bit more. Meanwhile, mother nature can produce ten or more stops of dynamic range in the real world. This produces a dilemma. Most sensors and film can not capture the entire dynamic range of many scenes. Consequently, images often lose detail in either the shadows (which block up to black) or the highlights (which blow out to white), or both. Long ago, film photographers developed a method of dealing with this problem that allowed photographers to capture a larger dynamic range. The solution is called a graduated neutral density filter. Part of the graduated neutral density filter is clear and part is a neutral gray. In use, the dividing line (edge) between the clear and gray portions of the filter is placed along the horizon (or any other dividing line between the brightest and less bright portions of the image). The gray part of the filter is placed over the sky (or other bright part of the scene). The clear part of the filter is placed over the rest of the scene. This allows photographers to reduce the intensity of the light from the brightest parts of the image while leaving the intensity of the light from the rest of the scene unaffected.

In many cases, this is a very good solution. However, it does have its drawbacks.

Digital photographers can use the same graduated neutral density filters that film photographers use. However, digital photographers also have an additional option. This option is often referred to as a digital graduated neutral density filter. In reality, it isn't a filter at all, but rather a technique that involves shooting the scene with two different exposures. One exposure is set to bring out the detail in the shadows and midtones (this image is given more exposure). The other exposure is set to protect the detail in the highlights (this image is given less exposure). Of course, the camera must be mounted on a tripod in order to ensure that the two images are identical except for the exposure. One of the best ways to get these shots is to place the camera on a tripod, set the camera to auto bracket, and use a shutter release. That way, the camera is not touched between shots.

The two shots are then combined in Photoshop (or another image editing program that supports layers) with the use of a mask that will blend the images. This allows for the highlight detail to be taken from the image that received less exposure and the rest of the detail to be taken from the image that received more exposure.

There are different ways of combining the images with a mask. This article will cover two: the Gradient tool method and the Lasso tool method.

Gradient Tool Method

Figures 1 and 2 show a scene that contained a dynamic range greater than the DSLR could handle. So, two images were taken. The exposure for the first image was set for the foreground, but this exposure blew out some of the detail in the clouds. The exposure for the second image was set for the sky. This exposure produced good sky detail, but it lost detail in the darkest parts of the image. Combining these two images in Photoshop will produce a final image with both foreground and sky detail (keep in mind that the rock in this image is supposed to be very dark since it is in silhouette; however, the water in the tidepools should have detail).

Figure 1: Image with Exposure Set for Foreground
Figure 2: Image with Exposure Set for Sky
The process is started by opening both images in Photoshop. There are now two images open (as shown in Figure 3).
Figure 3: Both Images Open in Photoshop
Figure 4: Tools Palette

Image 2 is now added to Image1 by the following steps:

  1. The Layers palette must be open in both images.
  2. The Move tool is chosen from the Tools Palette (see Figure 4).
  3. Image 2 is selected.
  4. The Background layer in the Layers Palette is selected.
  5. While holding down the Shift key, the Background layer for Image 2 is dragged over Image 1 and released.
  6. Image 2 will be labeled as Layer 1 in the file to which it has been transferred. Rename this layer as the Sky layer.
  7. Image 2 is closed.
Figure 5: Layers Palette with Both Images

Now, both images are in the same file, and the Layers palette looks like Figure 5

Figure 6: Image with Sky Layer on Top
The image now looks as shown in Figure 6. The foreground looks overly dark because the Sky layer is on top.
Figure 7: Layers Palette with a Layer Mask added to the Sky Layer

In order to produce and use the mask that will combine the two layers, a layer mask is added to the Sky layer. This is done by selecting the Sky layer and choosing Layer/Layer Mask/Reveal All. The Layers palette now looks as shown in Figure 7.

Figure 8: Tools Palette
In order to create the mask, the Gradient tool is chosen from the Tools palette (see Figure 8).

Once the Gradient tool is selected, the Gradient Tool options will appear in the Options bar (see Figure 9). In the options bar, the Linear Gradient is chosen, the Mode is set to Normal, the Opacity is set to 100%, the Reverse box is unchecked, the Dither box is checked, and the Transparency box is checked.

Figure 9: Gradient Tool Options in Options Bar
Figure 10: Gradient Editor
Clicking on the Gradient Sample brings up the Gradient Editor (see Figure 10). The Gradient Editor must now be configured to create a mask that will be suitable for combining the two images. For this, the Black, White Preset (top row; third from the left) is chosen, the Gradient Type is set to Solid, the Smoothness is set to 100%, the left Opacity Stop (the small rectangular object just above the Gradient Bar at the left end) is set all the way to the left, and the right Opacity Stop (the small rectangular object just above the Gradient Bar at the right end) is set all the way to the right. The Gradient Editor now looks as show in Figure 11.
Figure 11: Gradient Editor After Initial Settings

The last controls that need to be set are the left Color Stop (the small rectangular object just below the Gradient Bar at the left end) and the right Color Stop (the small rectangular object just below the Gradient Bar at the right end). These settings are critical. They determine how fast the mask will progress from black to white. The farther apart the two stops are, the more gradual the transition will be. Since the Gradient Tool will be used to create the mask, this will determine how fast the mask will progress from black to white. Subsequently, this will determine how the two images will blend.

To determine the proper Color Stop settings for an image, the image needs to be analyzed to determine how the mask (and thus the gradient) should appear. For the current image, the mask will start a little bit below the horizon. The mask will start off black. Since the mask will be applied to the layer mask of the Sky layer, this will ensure that the detail in the image, where the mask starts, will come from the Background layer. As the mask moves across the ocean and toward the sky, it will become lighter. Thus, the detail in the image will transition from being sourced from the Background layer to being sourced from the Sky layer. By the time the mask reaches the horizon, most of the transition from black to white should be complete (the transition will be less noticeable if it occurs over the dark ocean than if it occurs over the much lighter sky).

To achieve such a mask through the use of a gradient, the left Color Stop is moved all the way to the left (this guarantees that the gradient will start its transition to white right away; if the left Color Stop were moved to the right, the gradient would stay solid black for some distance). Since this image requires that the transition be relatively short (so that the transition is complete by the time the mask reaches the horizon) the right Color Stop must be moved quite a ways toward the left. Figure 12 shows the Gradient Editor after the Color Stops have been set.

Clicking OK closes the Gradient Editor.

Figure 12: Gradient Editor after the Color Stops Have Been Set
Figure 13: Gradient Tool Applied
The Gradient Tool is now active. Clicking the Sky Layer Mask thumbnail activates the mask and ensures that the gradient is added to the mask. The Gradient Tool is now clicked a little below the horizon and dragged to the top of the image (see Figure 13).
Figure 14: Layers Palette with Sky Layer Mask
The Layers Palette with the Sky layer mask is shown in Figure 14. The mask is shown in Figure 15. It can be seen that the mask is just what was desired. The lower portion is black so that the lower detail comes from the Background layer. Then, it transitions to white over a fairly short distance. This allows the upper detail to come from the Sky layer.
Figure 15: The Mask
Figures 16 -- 18 show the two original images and the final image.
Figure 16: Image with Exposure Set for Foreground
Figure 17: Image with Exposure Set for Sky
Figure 18: Final Image

Lasso Tool Method

The Gradient Tool method works great when there is a relatively straight division between the light and dark areas. When the division is more complicated, another approach is required. This is where the Lasso Tool method comes in.

Figures 19 and 20 show another scene that contained a dynamic range greater than the DSLR could handle. So, again, two images were taken. The exposure for the first image was set for the foreground. The exposure for the second image was set for the sky (which allowed the detail in the small moon to be captured). Combining these two exposures will allow for a final image that covers a larger dynamic range than either of the individual images could have handled.

Figure 19: Image with Exposure Set for Foreground
Figure 20: Image with Exposure Set for Sky
Figure 21: Layers Palette
The Lasso Tool method starts off the same as the Gradient Tool method: two shots of the scene are taken and the two images are combined in Photoshop (these steps will not be repeated as they were covered above). The Layers palette is shown at this point in Figure 21. The image now looks as shown in Figure 22. The foreground looks overly dark because the Sky layer is on top.
Figure 22: Image with Sky Layer on Top
Figure 23: Lasso Tool in Tools Palette
To create the mask, the Lasso Tool is chosen (see Figure 23). The Lasso Tool is used to draw a selection around that part of the image that will get its detail from the Sky layer (see Figure 24).
Figure 24: Image with Lasso Tool Selection
Figure 25: Edit in Quick Mask Mode on the Tools Palette
Before the selection can be used, it must be blurred to soften the edges so that the mask that will be created from the selection will blend the two layers smoothly. To do this, the image is moved into Quick Mask Mode by clicking on Edit in Quick Mask Mode on the Tools palette (see Figure 25). Figure 26 shows the image in Quick Mask Mode.
Figure 26: Image in Quick Mask Mode
Figure 27: Gaussian Blur Menu
The blurring is done by choosing Filter/Blur/Gaussian Blur. This brings up the Gaussian Blur menu as shown in Figure 27.
Figure 28: Selection in Quick Mask Mode after Blurring
The only setting on the Gaussian Blur menu is the radius (the larger the radius, the greater the blurring). To determine the proper radius setting for an image, the image needs to be analyzed to determine what the mask should look like. For the current image, the mask should blur to just about the edge where the rock meets the sky (as in the earlier image, the transition will be less noticeable if it occurs over the darker part of the image rather than over the much lighter sky). For this image, a radius setting of 150 was chosen. Clicking OK blurs the mask. Figure 28 shows the selection, still in Quick Mask mode, after the blurring.
Figure 29: Edit in Standard Mode on the Tools palette
Clicking on Edit in Standard Mode on the Tools palette (see Figure 29) moves the image out of the Quick Mask mode.
Figure 30: Layers Palette with Mask on Sky Layer

The selection is now ready to be used to create a mask. With the Sky layer selected, the mask is added by choosing Layer/Layer Mask/Reveal Selection.

The Layers Palette with the Sky layer mask is shown in Figure 30. The mask is shown in Figure 31.

Figure 31: The Mask
Figures 32 -- 34 show the two original images and the final image (which has been sharpened).
Figure 32: Image with Exposure Set for Foreground
Figure 33: Image with Exposure Set for Sky
Figure 34: Final Image

Summary

The digital graduated neutral density filter is a powerful tool that can substantially improve the highlight and/or shadow detail in images of wide dynamic range scenes. In addition, the ability to design masks to fit the particular requirements of individual images gives the technique a large amount of flexibility. Maybe best of all, this graduated neutral density filter costs nothing!

Articles