Using Select And Mask and Select Subject
Photoshop provides a set of tools focused on creating and refining masks, collected in a task space called Select And Mask. Inside Select And Mask, you’ll use the Select Subject tool to get a fast head start on the mask that will separate the model from the background. Then you’ll refine the mask using other Select And Mask tools, such as the Quick Selection tool.
In the Layers panel, make sure both layers are visible and the Model layer is selected.
Choose Select > Select And Mask.
Select And Mask opens with the image. A semitransparent “onion skin” overlay indicates masked areas. For now, the checkerboard pattern covers the entire image, because you haven’t yet identified the areas to unmask.
Click the View menu in the View Mode section of the Properties panel, and choose Overlay. The masked area is now shown as a semitransparent red color instead of the onion skin checkerboard. It’s solid because nothing is masked yet.
The different View Modes are provided so that you can see the mask more easily over various backgrounds. In this case, the red overlay will make it easier to see missed areas and edges where loose hair isn’t properly masked.
In the Options bar, click the Select Subject button.
Using advanced machine learning technology, the Select Subject feature is trained to identify typical subjects of a photo, including people, animals, and objects, and then create a selection for them. The selection may not be perfect, but it’s often close enough for you to refine easily and rapidly with other selection tools.
Click the View menu in the View Mode section of the Properties panel, and choose Black & White. This View Mode helps make the mask edge easier to see.
In the Properties panel, expand the Refine Mode if needed, and click Color Aware. If a message appears, click OK. The mask edge changes.
The two Refine Modes interpret potential subject edges differently. Color Aware can work well on simple backgrounds like the one in this lesson. Object Aware may work better on more complex backgrounds. If you want to compare the two results, choose Edit > Toggle Last State to switch between them.
Click the View menu in the View Mode section of the Properties panel, and choose Overlay to better compare the edge to the actual image.
Notice that there are a few areas over the chest that were missed by Select Subject. You can easily add them to the selection using the Quick Selection tool.
Make sure the Quick Selection tool () is selected. In the options bar, set up a brush with a size of 15 px.
Drag the Quick Selection tool over the missed areas (without extending into the background) to add the missed areas to the selection. Notice that the Quick Selection tool fills in the selection as it detects content edges, so you don’t have to be exact. It’s OK if you release the mouse button and drag more than once.
Where you drag teaches the Quick Selection tool which areas should be revealed and are not part of the mask. Do not drag the Quick Selection tool over or past the model’s edge to the background, because this teaches the Quick Selection tool to include part of the background in the mask, and you don’t want that. If you accidentally add unwanted areas to the mask, either choose Edit > Undo or reverse the edit by painting over it with the Quick Selection tool in Subtract mode. To enable Subtract Mode for the Quick Selection tool, click the Subtract From Selection icon () in the options bar.
As you drag the Quick Selection tool over the model, the overlay disappears from the areas that you are marking to be revealed. Don’t worry about total perfection at this stage.
Click the View menu in the View Mode section again, and choose On Layers. This shows you how the current Select And Mask settings look over any layers that are behind this layer. In this case, you’re previewing how the current settings will mask the Model layer over the Episode Background layer.
Inspect the edges around the model at a high magnification, such as 400%. Some of the original light background may still show between the model’s edge and the podcast background, but overall the Select Subject and Quick Selection tools should have created clean edges for the shirt and face. Don’t be concerned about edge gaps or imperfect hair edges, because you’ll take care of those next.
Refining a mask
The mask is pretty good so far, but Select Subject didn’t quite capture all of the model’s hair. For example, some of the strands coming off of the bun on the back of the model’s head are discontinuous. In Select And Mask, the Refine Edge Brush tool is designed to mask edges with challenging details.
At a magnification of 300% or higher, inspect the hair edges at the back of the model’s head.
Select the Refine Edge Brush tool (). In the options bar, set up a brush with a size of 20 px and Hardness of 100%.
Drag the Refine Edge Brush tool between the hair bun and the ends of the hair, where the selection needs to be improved. As you drag the Refine Edge Brush tool over the hair edge, you should see that the missing hair strands falling from the bun are now included in the visible areas.
Scroll down to the loop of hair that falls over the back of the shirt.
Select Subject correctly masked the background inside the hair loop. However, a more subtle hole above still needs to reveal the podcast background, so you’ll use the Refine Edge Brush to add that hole to the mask.
In the options bar, set up a Refine Edge brush with a size of 15 px, with a Hardness of 100%.
Drag the Refine Edge Brush tool over the enclosed area that should be transparent. Gaps in the hair should become masked as transparent, and fine hairs are added to the visible edge.
Click the View option, and choose Black & White. This is another good way to check your mask. Inspect the mask at different magnifications, and when you’re done, choose View > Fit On Screen. Black areas indicate transparency.
If you see hairs or other details that are masked but should be visible, drag the Refine Edge brush over them. The finer the details you want to mask, the smaller you should set the Refine Edge brush size. It’s OK if the brush size is slightly larger than the details you want to mask, and you don’t have to drag the Refine Edge Brush tool precisely.
If you see Refine Edge Brush tool mistakes that need to be erased, such as inner areas incorrectly added to the mask, drag the Refine Edge Brush tool over the mistakes while holding down the Alt (Windows) or Option (macOS) key.
”If you see individual spots or discrete areas that need to be fully visible or fully transparent, you can paint them out using the Brush tool, the third one down in the toolbox. To make areas visible, paint them with white; to make areas hidden, paint them with black.
Adjusting Global Refinements
At this point the mask is in good shape, but needs to be tightened up a little. You can tune the overall appearance of the mask edge by adjusting the Global Refinements settings.
Click the View menu in the View Mode section of the Properties panel, and choose On Layers. This lets you preview adjustments over the Episode Background layer, which is behind the Model layer.
In the Global Refinements section, move the sliders to create a smooth, unfeathered edge along the face. The optimal settings depend on the selection you created, but they’ll probably be similar to ours. We moved the Smooth slider to 1 to reduce the roughness of the outline, Contrast to 20% to sharpen the transitions along the selection border, and Shift Edge to -15% to move the selection border inward and help remove unwanted background colors from selection edges. (Adjusting Shift Edge to a positive number would move the border outward.)
Take one more look at this preview of the current mask over the background layer, and make any remaining corrections as needed.
Completing the mask
When you’re satisfied with the mask preview, you can create its final output as a selection, a layer with transparency, a layer mask, or a new document. For this project, we want to use this as a layer mask on the Model layer, which was selected when you entered Select And Mask.
If the Output Settings are hidden, click the disclosure icon () to reveal them.
Zoom in to 200% or more so that you can more easily see the light fringing around the face edge that’s due to the Model layer’s original background color seeping in behind the mask.
Select Decontaminate Colors to suppress those color fringes. If Decontaminate Colors creates unwanted artifacts, reduce the Amount until the effect looks the way you want. We set Amount to 25%.
Choose New Layer With Layer Mask from the Output To menu. Then click OK.
Clicking OK exits Select And Mask. In the Layers panel, the Model Copy layer now has a layer mask (pixel mask) that was generated by Select And Mask.
The layer was copied because using the Decontaminate Colors option requires generating new pixels. The original Model layer is preserved and automatically hidden. If you wanted to start over, you could delete the Model Copy layer, make the original Model layer visible again and selected, and open Select And Mask again.
If the mask isn’t perfect, you can continue to edit it at any time. When a layer mask thumbnail is selected in the Layers panel, you can click the Select And Mask button in the Properties panel, click it in the options bar (if a selection tool is active), or choose Select > Select And Mask.
Save your work.