How To Easily Create Luminosity Masks

by | 3 years ago

Luminosity masking is a technique used both in still photography and motion pictures for creating masks for different luminosity ranges. These resulting masks can help us manipulate parts of an image based on their brightness values. It’s especially useful for landscapes but can help us achieve amazing results in portraits, as well.

Unfortunately, most techniques in Photoshop use steps that are cumbersome and make it difficult to predict their results precisely. Hence, many of us resort to using plug-ins and actions. There’s an easier, visual, and plug-in-free way, however, that we’re going to explore in this article using the powerful Gradient Map adjustment layer.

In this step-by-step tutorial, we’re using a landscape image, but you can follow along using any other kind of image. Also, we’re going to create three different luminosity masks, but you can create any number of them using the same technique. Let’s get started. (If you’d like to follow along using this image, you can find it by clicking here .)

Step One: Once you have your image opened, you need to create a Gradient Map adjustment layer above the Background layer. Before doing that, set the Foreground and Background colors to their defaults (black and white, respectively) by using the keyboard shortcut D. To create the adjustment layer, go to Layer>New Adjustment Layer>Gradient Map, and click OK. In the Properties panel (Window>Properties), click on the gradient strip to open the Gradient Editor. This is the dialog in which we’ll spend most of our time. In here, we can set what colors we want the adjustment layer to apply to our image. Remember, we’re creating masks, which are black and white, so our gradient will need to be black and white too.

Step Two: The Gradient Editor is a dialog with Presets and various other options. We’ll be concentrating mostly on the gradient strip and its color stops. The color stops are those small house-shaped indicators below the strip (the ones above the strip are for transparency, which we don’t need for this technique). Our gradient should be going from black to white because we created the adjustment layer after we set our colors to their defaults. If your gradient strip isn’t black-to-white, then carefully double-click on the left color stop without moving it, select black in the resulting Color Picker, and click OK. Do the same for the stop on the right, but set that one to white. Now, we can set our first luminosity range using these two sliders.

Step Three: The first luminosity mask is going to be for the brightest areas (or highlights) in our image. Think of the black-and-white image you have in front of you as a mask: black hides, white reveals. Therefore, if we want to create a mask for the highlight range (where everything is hidden except the highlights), we’d need to turn everything below that range to black. To achieve this, move the black color stop to about the 75% position. You can track your color stop’s position by looking at its Location setting below the gradient strip. As you can see in this image, this turns everything black, except for our highlights.

Unfortunately, our whites aren’t clean enough for a mask yet. We can easily solve that, however, by moving the white color stop closer to the black one. Move it until the Location displays 85%. Obviously, if we used a different image, we’d pick different locations for our color stops. The amazing thing about this technique is that you can visually see what the resulting mask will be as you move the stops around.

Step Four: We’re done with our first range, but that doesn’t mean we have a mask yet. To turn the result of our Gradient Map into a mask, we need an adjustment layer to which we can apply it. For our purposes, we’re going to use a Curves adjustment layer, but feel free to use any other adjustment layer you want. Click OK in the Gradient Editor, and then create a new Curves adjustment layer by going to Layer>New Adjustment Layer>Curves. Name this new layer “Highlights,” and click OK. Make sure its layer mask is active by simply clicking on its thumbnail in the Layers panel. You know it’s selected if it has four white brackets around the thumbnail.

Now, go up to Image>Apply Image, leave the default values, and click OK. Click on the Eye icon next to the Gradient Map adjustment layer in the Layers panel to hide it (you should now see the original image). If we’ve done everything correctly, then the Curves adjustment layer should have a layer mask that’s the same as what we set with our Gradient Map adjustment layer earlier. You can check it by clicking on the layer mask thumbnail while holding down the Option (PC: Alt) key on your keyboard. Do the same to exit the mask view.

Step Five: Now that we have a luminosity mask for our highlights on a Curves adjustment layer, we can darken them a bit. Usually, this brings out amazing depth and detail in landscape images. (Note: You don’t need the Gradient Map adjustment layer anymore, so you can go ahead and delete it or just leave it hidden.) Click on the layer thumbnail for the Curves adjustment layer so its active instead of its mask. Go into the Properties panel, and pull down on the midtones a bit in the curve. If we have a good image, this usually brings out the sky.

Step Six: Our next luminosity range will be for our dark and shadow values. We’ll use the same steps we used for the highlights. First, make sure that the Foreground and Background colors are black and white, respectively (if not, press D on your keyboard). Then, go to Layer>New Adjustment Layer>Gradient Map to create a new Gradient Map adjustment layer. Click on the gradient strip in the Properties panel to open the Gradient Editor. Our aim is to create a layer mask that hides the highlights and midtones but reveals the blacks and shadows. This means that we need to turn our highlights and midtones to black and everything else to white.

To achieve that, we need to swap our color stops. We can do that by either double-clicking on each of them and setting the colors to their opposite (left stop to white, right stop to black), or we can just drag them past each other. After changing their colors, move the black stop closer to the white, just as before, say, to a Location of 27%. This cuts out everything that’s not a shadow value. Again, we still need to clean up the white portion, so move the white stop closer to the black one a bit, until you achieve the desired result (around 9–10% for this example). Click OK.

Step Seven: Create a new Curves adjustment layer by going to Layer>New Adjustment Layer>Curves, and name it “Shadows.” Then, select its layer mask, and go to Image>Apply Image to apply the current view as a layer mask. Once again, you can delete this new Gradient Map adjustment layer or just hide it. Now, using the Shadows curves layer, brighten those darker values a bit by pulling up on the middle of the curve. This opens up the shadows and makes darker details more visible without sacrificing too much of the contrast.

Step Eight: We’ve created luminosity masks for our highlights and shadows, so now we need the final one for our midtones. We could subtract the two ranges that we’ve already created from each other to create our midtones, but it’s important to learn how to create it using the Gradient Map method. Even though this will use the same steps as before, there’s a catch. First, create the Gradient Map adjustment layer on top of all of our other layers by going to Layer>New Adjustment Layer>Gradient Map. In the Gradient Editor, we need to create a gradient that will show up as black, both where we have highlights and shadows. We only want white in our midtones. Here’s the catch: When we try to achieve the aforementioned result, it just simply isn’t possible. Why? Because we only have two color stops, and we need three.

To create another color stop, click anywhere below the gradient strip where there isn’t already a color stop. Next, we need to have one white stop sandwiched between two black stops. This order is really important, but you can achieve it any way you want. Feel free to use the double-click method mentioned earlier in Step Six, or you can move the stops around. Just make sure that it’s black, white, black.

Now, you can watch the results on your image as you move these stops to their desired locations. For this example, use Locations of 23% for the left stop, 48% for the middle stop, and 70% for the right stop. This creates exactly what we need: white midtones and black everywhere else.

Step Nine: After clicking OK in the Gradient Editor, create a new Curves adjustment layer. Then, select its mask and go to Image>Apply Image to apply the current view as a layer mask. Discard or hide the latest Gradient Map adjustment layer, and then manipulate the midtones with the Curves adjustment layer. Usually, it’s a good idea to slightly darken the midtones, as that gives an image more depth and richness. With this, we’ve arrived at the end of our tutorial.

In this small exercise, we’ve created three luminosity masks for highlights, midtones, and shadows, using a technique that helps you visually see what your mask will be—no more plug-ins or guessing from marching ants! Before you turn the page, here are a few notes that are worth mentioning:

  • Don’t forget that the Gradient Maps will only turn into masks once you’ve applied them to another adjustment layer using Apply Image.
  • For extra finesse, you can slightly blur the created masks.
  • You can use this technique on any layer type that has a mask.
  • If using a Curves adjustment layer, you can also manipulate its individual color channels (red, green, and blue), not just the RGB.
  • You can generate as many luminosity masks as you’d like. It can be one, two, or even a hundred.
  • And finally, you can save all of your gradients as presets in the Gradient Editor if you want to use them later.