What is a Mask?
A mask defines an area of an image which has been selected by using one or more masking tools.
In the image opposite, a square mask has been created around the poppy flower head. It appears as a flashing outline around the area selected. This flashing line is generally referred to as ‘marching ants’.
The area inside the square of marching ants is referred to as a selection.
What can we do with Masks?
The main purpose of masks is to isolate an area of an image so that it can be adjusted independently without changing other parts of the image.
A useful analogy is a window frame about to be painted. Masking tape is often applied to the glass around the frame. This allows the frame to be painted while protecting the glass from the paint.
In the poppy example, the square selection has been darkened by applying a Levels adjustment. Other areas of the image remain unchanged.
A more realistic example could be a landscape where the sky is too bright and parts of the land are too dark. By using masks, it’s possible to adjust bright and dark areas separately.
The business of creating masks is a two-step process:
- Creating Selections
- Saving Selections as Masks
Step 1: Creating Selections
This is always the first step in mask creation. It can be a simple or very complex operation depending on the nature of your subject and what you are setting out to do. Each of the masking tools offers a different way of making selections. The following possibilities are true for a wide variety of situations.
Use Masking Tools
Masking tools are often grouped according to the way in which they can be used to make selections. Some work with shape or subject, some are based on colour while others are based on brightness (luminosity). Different images will require different masking techniques. For example, a building with clear, straight edges will require the use of different tools from a portrait or a landscape.
In some cases, you may wish to create selections based on several different characteristics. This will require the use of multiple tools. For example you may wish to make a selection of bright areas which are red. In this case you would use a combination of luminosity and colour masking tools.
Many of the masking tools have several options which will appear in the Tool Options bar. These include:
- Feather: I usually leave this at 0 as a feather can be added after.
- Anti-Alias: This smooths and softens the edge of your selection. I leave this ticked at all times.
The masking tools and their uses are described in detail in the following pages of this module.
Build a selection
Many of the tools allow you to build the selection in multiple ‘moves’. Those masking tools which are selected from the Toolbar all have an associated Tool Options bar. The area to the left in the Tool Options (illustrated opposite) shows the 4 methods of operation:
- A: Start a New selection
- B: Add to selection
- C: Subtract from a selection
- D: Intersect with a selection
Refine a Selection
Once a mask has been created, it can be refined using ‘Select and Mask’. The main reasons you might wish to refine a selection are to create a more precise mask or to create a subtle blend with no obvious ‘joins’ between the masked area and the surrounding area.
If a masking tool is still selected, click the ‘Select and Mask’ button on the tool Options bar. Alternatively, use Select Menu >> ‘Select and Mask’ or press CTRL ALT R. In every case, the Select and Mask Properties dialogue will be opened.
Modify a Selection
Selections can also be modified. They can be feathered, smoothed, expanded, contracted or transformed. All of these options are available from the Select Menu.
Invert a Selection
It is often the case that you will make a selection by selecting the areas you DON’T want to include. For example, if you want to create a selection of everything except reddish colours, you may find it easier to select these reddish colours and then invert your selection.
This can be done by right-clicking anywhere on the image and choosing ‘Select Inverse’ from the dropdown, by clicking the Invert button in the Select and Mask dialogue or by pressing SHIFT CTRL I.
Clear a selection
The easiest way to deselect is to press CTRL D. You can probably guess the other ways to get the same result.
Step 2: Saving Selections as Masks
Once you are happy with your selection, it can be saved as mask. Although masked areas can be edited immediately, it nearly always makes more sense to save them so they can be edited further or re-used. There are two main methods for saving masks:
Go to Select Menu >> Save Selection. In the dialogue which opens, make sure ‘New’ is selected. Then give your mask a meaningful name and click OK.
This requires the use of the Channels panel. This is where any masks you have created are stored. Every image will have 4 visible channels when it is opened; the combined RGB channel and one for each of the 3 RGB colours. Channels which you save are referred to as alpha channels and will appear below the 4 visible channels.
In this example, 3 alpha channels or masks have been created; one for each of the 3 coloured circles in the image below. Alpha channels are always shown in black and white. The white area shows where your mask is and indicates the area which can be adjusted when the mask is applied. The black area will be protected from any adjustments.
Once you have created your selection , click the ‘Save Selection as Channel’ icon. It’s a good idea to rename your channel to something meaningful.
Masks can be created and saved at any point in the editing process.
A saved mask can be reloaded at any time by going to Select Menu >> Load Selection. Alternatively you can use the Channels panel. Either hold down CTRL and click on the mask you wish to load or select the alpha mask and click, ‘Load Channel as Selection’.
It’s also possible to combine several masks using the Channels panel:
- CTRL click on any alpha mask to create a new selection.
- SHIFT CTRL click on a second mask to add that to the selection.
- CTRL ALT click on a second mask to subtract the second mask from the selection .
- SHIFT CTRL ALT click on a second mask to intersect the two masks.
Once the mask is loaded as a selection, the relevant layer can be edited and only the masked areas will be adjusted.
Masks work best when they are combined with layers, often using Layer Masks. This is described in detail in Module 8: Using Layers and Masks.