Selections & Masks in Photoshop-- Part IV

Article and Photography by Ron Bigelow

www.ronbigelow.com

Photoshop CS or Photoshop CS2 Used in this Tutorial

Selection: Calculations

Another very good method of making selections that are based on tone is the Calculations tool. This tool works on the channels instead of the layers. Calculations works by blending two channels into a new channel (or the same channel blended into itself).

Figure 1: Image Ready for a Selection

Figure 1 shows an image that is dominated by two colors. However, it is the difference in tonality of these two colors that is important and that will allow the selection to be made.

In this image, it is desired to select the yellow leaves for editing. As in the case of the Channel Mixer, the channels must first be studied in order to understand the contrast in each of the channels. For this, the Channels palette is selected. Figures 2 -- 4 show the three channels.

An examination of the channels quickly shows that the Blue channel has little contrast between the yellow leaves and the pine forest background. The green channel has some contrast. However, it is the Red channel that has the most contrast. Therefore, the red channel will be used with Calculations.

Figure 2: Red Channel
Figure 3: Green Channel
Figure 4: Blue Channel
Figure 5: Channels Palette Before the Selection Process Begins.
Figure 5 shows the Channels palette before the selection process begins. To proceed with the selection, Calculations is launched (choose Image/Calculations).
Figure 6: Calculations Dialogue Box
Figure 6 shows the Calculations Dialogue Box. As mentioned above, Calculations allows two channels to be blended into one, or one channel can be blended into itself (as was the case for this image). In this case, the red channel is blended into itself. Source 1 is the source for the first channel, which is simply the name of the file that is being worked. The Layer is the layer that is being used to produce the channel. For instance, the channel could represent the data in the Background layer only, or it could represent the data in all of the layers (the merged option), or it could represent any of the other layers. For this image, the merged option is selected. The Channel is the channel that is selected for the merging (red in this case). The invert option allows the tonality of the mask to be inverted before the channels are merged (i.e., black becomes white). The invert box is left unchecked for this image. The settings for Source 2 are the same as in Source 1 for this image. The Opacity setting determines the strength of the blending. The Blending option is the final setting on the dialogue box. This options sets the Blend Mode that is used to blend the channels (for more information on Blend Modes, see Blend Modes). This is the key to the use of Calculations for creating selections. The trick is to find the Blend Mode that maximizes the contrast between the area to be selected and the rest of the areas. Some experimentation showed that Multiply was the best choice for this image.
Figure 7: Channels Palette after Calculations

Calculations creates a new channel named Alpha 1 and places it in the Channels palette (see Figure 7). The new Alpha 1 channel is shown in Figure 8. While this image shows a better separation of the areas to be selected from the rest of the image, the contrast needs to be increased further. This is very easy to do. The Calculations procedure is simply repeated. The only difference this time around is that the Alpha 1 channel is used in Calculations, and the Vivid Light Mode is used since it creates the best contrast enhancement. Figure 9 shows the Alpha 2 channel that is created from the second iteration of Calculations.

Figure 8: Alpha 1 Channel

 

Figure 9: Alpha 2 Channel

The Alpha 2 channel has increased contrast, but even more contrast is needed. One more pass with Calculations is performed for this image (see Figures 10). This pass uses the Alpha 2 channel from the prior pass. Figure 11 shows the Channels palette after the Calculations procedure is complete.

Figure 10: Alpha 3 Channel

 

Figure 11: Channels Palette after Calculations

To turn the channel into a selection, the Alpha 3 channel is selected, and the Load Channel as Selection icon at the bottom of the palette is clicked.

Figure 12: Selection

Back in the Layers palette, the selection can be seen (see Figure 12). After some clean-up work, the selection is slightly blurred and turned into a mask.

Figure 13 shows the final mask, and Figure 14 shows the final Layers Pallet after the mask was applied to a Curves layer.

Figure 13: Final Mask

 

Figure 14: Final Layers Palette

 

Selection: Gradient Tool

The Gradient Tool is a bit different than any of the other tools that have been presented thus far. All of the other tools create a selection. The selection is then turned into a mask. Used in the manner shown in this article, the gradient tool does not create a selection. Rather, it used to directly create a mask.

Figures 15 and 16 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 15: Image with Exposure Set for Foreground
Figure 16: Image with Exposure Set for Sky
Figure 17: Layers Palette with Both Images
The procedure starts by placing both images into the same Layers palette as shown in Figure 17.
Figure 18: Image with Sky Layer on Top
The image now looks as shown in Figure 18. The foreground looks overly dark because the Sky layer is on top.
Figure 19: 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 19.

Figure 20: Tools Palette

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

Once the Gradient tool is selected, the Gradient Tool options will appear in the Options bar (see Figure 21). 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 21: Gradient Tool Options in Options Bar
Figure 22: Gradient Editor
Clicking on the Gradient Sample brings up the Gradient Editor (see Figure 22). 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 23.
Figure 23: 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 24 shows the Gradient Editor after the Color Stops have been set.

Figure 24: Gradient Editor After the Color Stops Have Been Set
Figure 25: 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 25).
Figure 26: 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 27: The Mask

Articles

Selections -- Part III     Selections -- Part V