T o n y   K u y p e r   P h o t o g r a p h y

magic mid-tones tutorial



Masking-the-Mask

Reprocessing several images gave me a chance to explore another masking method that resulted from a discussion with a friend. It's called "masking-the-mask" and has turned out to be one of my favorites. It's based on the following principle:

In order to increase contrast during an adjustment, the direction of the adjustment (lighter or darker) needs to follow the direction of the mask. In other words, darkening an image through a mask in the Darks-series will increase contrast. So will lightening an image through a mask in the Lights-series.

Doing the opposite—darkening through one of the Lights-series masks or lightening through one of the Darks-series masks—has the opposite effect, namely decreasing contrast. These two different effects can be seen by looking what happens to the tonal spectrum when lightening and darkening curves are applied through the Light Lights mask. Figure 17 shows the two adjustment curves.

Figure 17
Figure 17

Figure 18 shows the results. The top section is a selection of the Light Lights filled with yellow. The intense yellow color on the left side indicates this selection favors the lighter tones, which is exactly as expected since this is one of the Lights-series masks. Just below it is how the gradient image looks after the lightening curve is applied through the Light Lights mask. Compared to the normal tone spectrum just below it, the adjustment with the lightening curve created more white and less gray at the left end of the spectrum indicating an increase in tonal contrast. The bottom section is the tonal gradient after the darkening curve is applied through the Light Lights mask. In this case, the mid-tone grays shift significantly to the left and there is more gray on the left and less white. More gray and less white is a working definition of decreased contrast. So the principle holds: lightening through a Lights-series mask increased contrast and darkening through a Lights-series mask decreased contrast. This same effect could be demonstrated with the dark tones using one of the Darks-series masks.

Figure 18
Figure 18

This example points to a problem that sometimes occurs when using luminosity masks: significant adjustments to darken an image through a Lights-series mask or to lighten an image through a Dark-series mask has the potential to decrease image contrast and make the image look dull. Sometimes this may be exactly what is needed and sometimes the loss of contrast is barely noticeable, but other times, the loss of contrast is visible and undesirable.

So, back to the principle. If you want to maintain or increase contrast in an image, you have to darken the image through a Darks-series mask or lighten it through a Lights-series mask. But this presents as serious complication: it doesn't make sense! For example, using any of the Darks-series masks instead of a Light-series mask to decrease the brightness of the highlights is completely impractical. Not only is a Darks-series mask deficient in light tones that need adjustment, but actually executing a darkening Curves adjustment through a Dark-series mask would seriously darken the mid-tones before any effect on the light tones would be noticeable. The image would become hopelessly dark before the light tones were properly adjusted. So the question becomes: Is it possible to actually apply the principle?

The answer is yes, and the masking-the-mask technique is one way to do it. The technique uses two masks and a layer group to facilitate the process. The first mask, called a "controlling mask," sits atop the layer group. A second mask, called the "adjustment mask," sits on a Curves adjustment layer within the group. The controlling mask controls which pixels get adjusted while the adjustment mask controls how the adjustment occurs. With this arrangement, the controlling mask of the layer group masks the adjustment mask on the adjustment layer, hence the term "masking-the-mask." With the proper choice of an adjustment mask, the principle is followed and a contrast-preserving adjustment is possible. This is best illustrated with an example.

In Figure 19 below, I felt the sky was too light. I wanted to bring down it's brightness but at the same time preserve its contrast. This is an ideal situation for masking-the-mask. In order preserve contrast, darkening needs to occur through a Darks-series mask, so the adjustment mask would need to be from the Darks-series. The sky and clouds, however, are some of the lighter parts of the image, so the controlling mask would need to come from the Lights-series. The rollover shows the results after the appropriate adjustment.

Figure 19
Figure 19

The first step in making the adjustment is to create a layer group and put the appropriate mask in place. Here's the process for creating the layer group:

  1. Create a luminosity mask that best defines the pixels to be adjusted and place it on the Channels palette. Instead of trying to guess the right mask, it's usually easiest to create all the masks in the series, in this case the Lights-series, and choose the one that has good brightness in the pixels to be adjusted and is reasonably dark in the pixels that are to remain the same. Light Lights turned out to be the correct one to use as the controlling mask for this image.
  2. Create a new layer group at the top of the Layers palette. Layer > New > Group is the menu command. In the dialog box that pops up, give the group a name and choose a color for the group if you'd like. Leave the mode as "Pass Through" and the opacity at "100%" (Figure 20).

    Figure 20
    Figure 20

    Alternatively, a new group can also be created using the New Group button at the bottom of the Layer palette (Figure 21).

    Figure 21
    Figure 21

    Figure 22 shows the new layer group at the top of the layer stack.

    Figure 22
    Figure 22

  3. Load the chosen controlling mask as a selection. Ctrl+click on the mask on the Channels palette (Mac: Command+click) that was created in Step 1.
  4. Create a group mask on the new group layer. With the group layer as the active layer and the chosen mask loaded as a selection, use the menu command Layer > Layer Mask > Reveal All to create a mask on the group layer. The group mask can also be created by clicking the Add layer mask button at the bottom of the Layers palette (Figure 23).

    Figure 23
    Figure 23

    When finished, the newly created group and its controlling mask should be at the top of the Layers palette like Figure 24.

    Figure 24
    Figure 24

    The controlling mask on the group layer filters whatever is happening on the layers contained in the group. With this mask in place, no matter what the other layers in the group are doing, only adjustments to pixels revealed by the controlling mask will pass to the image.

Once the controlling mask is in place, the adjustment mask can be chosen. Since retaining contrast is desired, the principle dictates that the darkening adjustment needs to occur through a Darks-series mask. A little caution is necessary, however. The controlling Light Lights mask progressively blocks out the adjustment as pixels darken, so choosing a Darks-series mask that only reveals the darkest tones would mean that the controlling mask wouldn't allow any of the adjustment to pass to the image. So the Shadow Darks and Super Darks are definitely out as possible adjustment masks in this case. Also, don't forget that the goal here is to darken the light tones in the image. It therefore makes sense to choose a Darks-series mask that still reveals some light tones, even if only faintly. The Expanded Darks and the Darks masks meet this criterion. While these masks are still quite dark in the lighter tones, they aren't completely black in them. A vigorous enough adjustment through even their weakly selected light pixels will still have an impact on the image. The Darks mask turned out to be the right choice for this image.

The adjustment mask is placed on a Curves adjustment layer within the group. The process for adjusting an image with a Curves adjustment layer and a luminosity mask was explained in the first tutorial:

  1. Create and/or load the selection of the chosen adjustment mask, Darks in this case.
  2. Create a Curves adjustment layer with the adjustment mask in place as the layer mask.
  3. Make the necessary adjustment.

The two green-coded layers in Figure 25 shows what the final masking-the-mask group looks like. Although it usually happens automatically, it's important that the Curves adjustment layer with the adjustment mask be part of the layer group with the controlling mask. It should be under the group layer and slightly offset to the right as in Figure 25. If this isn't the case, the adjustment layer can be dragged to the group layer which adds it to the group.

Figure 25
Figure 25

Figure 26 shows the curves adjustment that was used for this image. It's quite severe and would normally cause significant darkening of the image, but that's not a problem in this case. The strong adjustment was needed to insure that the weakly selected light pixels in the Darks mask on the adjustment layer were properly affected (darkened). The controlling Light Lights mask on the group layer makes sure that only the adjustment of the lighter pixels is passed to the image. The Light Lights mask also blocks from appearing in the image the major over-darkening that would be expected to happen to the mid-tone pixels as a result of this adjustment.

Figure 26
Figure 26

The masking-the-mask technique makes it possible to darken light values through a Darks-series mask or to lighten dark values through Lights-series mask. In doing so, it adheres to the principle outlined above and insures that image contrast is maintained or increased by the adjustment. The histogram for the image demonstrates this visually. The BEFORE and AFTER histograms are shown in Figure 27. Compared to the BEFORE histogram, the AFTER histogram (rollover) shows that the light values have been shifted slightly to the left, indicating darkening. There is also more "combing" of the light values in the AFTER histogram, and this indicates increased contrast. So while it took a bit to explain, masking-the-mask worked exactly as intended to both darken the light tones and increase their contrast.

Figure 27
Figure 27

Looking at the two histograms it could be argued that the lower standard deviation number in the AFTER histogram indicates decreased overall contrast in the image. However, the change in standard deviation is actually quite small and visually imperceptible compared to the increased contrast in the tones targeted for adjustment. Also, watching the histogram shift with the rollover shows that the brightest and darkest values in the image are unchanged; they are actually locked in place on the histogram. So overall dynamic range of the image is constant. The bottom line is that increased contrast in the lighter tones is apparent in both the histogram and the actual image.

Interestingly, the results from the masking-the-mask technique could also be obtained with the same Curves adjustment applied through a single mask that was created by intersecting the controlling mask (Light Lights) and the adjustment mask (Darks). Intersection was mentioned in the first tutorial and is when Photoshop finds the pixels that two selections have in common, and then makes these pixels (or the appropriate percentages of these pixels) the active selection. With luminosity masks, it is accomplished by first selecting the pixels of one mask—Ctr+click (Mac: Command+click) on the mask itself—and then Shift+Alt+Ctrl+click (Mac: Shift+Command+Option+click) on the second mask. In fact, the Basic Mid-tones mask could be created by intersecting the Expanded Lights with the Expanded Darks. So it turns out that masking-the-mask is really just another way to create a special mid-tones mask and garner the benefits of adjusting through it. The histogram roll-over above, with its ends locked in place, confirms that just mid-tone values are being affected by the adjustment. Figure 28 shows what the intersected mask would look like in this case. Since the Light Lights mask and the Darks mask have very few tones in common, intersecting them leads to a very dark mask, though it's still feathered with the appropriate amount pixel selection to allow the adjustment to be effective. (It may be helpful to view Figure 28 in a darkened room in order to be able to see the features of the mask.) It should be pointed out that while mask intersection can effectively create mid-tone selections, masking-the-mask is the preferred method as it allows more flexibility to experiment. This is explained in the next section.

Figure 28
Figure 28

Summary: Luminosity masks work extremely well to adjust specific tones in an image. Sometimes, however, an adjustment through a luminosity mask causes an image to look dull or to lose contrast. In these cases, masking-the-mask is a very useful technique that allows the user to take advantage of the tone-selecting capabilities of luminosity masks while at the same time increasing contrast in the adjusted tones. It's a good technique for lowering the brightness of the sky while maintaining or improving its contrast and should also be helpful in opening up dark shadows.