Create a Grayscale Image Mask


How To:

Create a Grayscale Mask Based on Grayscale Image Values.

Commonly misnamed as a Luminosity Mask*, a grayscale layer mask based on a selection of the ~composite channel hides the shadow tones and reveals the highlight tones, while the other image tones are mapped to transparency at their relative grayscale tonal level value. 

Generating the Grayscale Selection:

1. The ~composite or ~master channel can be loaded as a selection, just like the separate image channels or alpha channels with the following PC/Mac keycut combination: ctrl/cmd+alt/opt+` (indicated in the channels palette via the ~ tilde key symbol).

This selection can also be loaded via a ctrl/cmd mouse click on the composite channel palette icon, animated below: 

Load Composite Channel As Selection

 

Creating the Layer Mask:

2. The grayscale selection can be applied in the default form as a layer mask to an existing non background image or it can be inversed to reverse the desired masking effect. Simply use the Add Layer Mask icon in the layers palette to create a layer mask from the current selection. Alternatively, one may choose to save the selection as an alpha channel, for backup and or further editing, before it is applied to a layer as a mask.

Extracting the Photoshop Lab Mode L Channel:

Another common alternate approach is to make a temporary merged duplicate of the current document and to convert this dupe to Lab mode (History snapshots could alternatively be used instead). 

1. Target the Lightness channel in the channels palette.

2. Select all and then copy the L channel data to the clipboard.

3. Close the temporary duped Lab mode image without saving and paste the L channel data into a layer mask or alpha channel in the original image.

Tip:

Layer Style Blending Options Blend If sliders are a useful addition, or sometimes a viable alternative to layer masks. Alt/opt click on the blend if slider triangle to split the tonal range to provide a smooth blending transition.

*Further Information:

The term "Luminosity Selection" or "Luminosity Mask" is inaccurate when applied to this technique, as the Colour Settings Gray Working Space values do not represent Photoshop Luminosity values. I would like to thank Dan Margulis for pointing out the fact that the Colour Settings, Gray Working Space governs the density of the grayscale tones when using the ~composite channel technique. One may prefer to use the Lightness channel from Lab instead of the ~composite channel selection. Although a viable technique, Lab's L channel also does not represent Photoshop Luminosity values. I would like to thank Ian Lobb, the developer of Lobster software for Photoshop, for publishing many thought provoking issues on luminosity and chromaticity, as found in the material at his website. Despite this footnote for the sake of technical accuracy, creating a "Luminosity Mask" has generally become accepted as the term for this technique, despite the factual inaccuracy of term when applied to the previously listed methods.  

 


Binary FX: Photoshop Tech Vault ©1997-2008 Stephen Marsh, All rights reserved.