The importance of Photoshop's Layer Mask in image processing is undoubted. It is a magical "magic wand" in Photoshop. Let me teach you how to master this "magic wand".
What is layer mask
A layer mask is a grayscale image that is attached to a layer and can cover the upper area of the layer so that the layer image below it can be displayed.
The black part of the mask will make the image of this layer transparent, so that the underlying layer can be seen. So if we select "Hide All" when creating a new mask, we can get a completely black mask.
The white part of the mask represents the opaque part of the image on this layer, blocking the underlying layer. So if we select "Show All" when creating a new mask, we can get an all-white mask. The display and hiding here are all for this layer.
Gray means that the layer is semi-transparent, and some of the parts below it can be seen.
Add a layer mask to the layer
Each layer can be masked, whether it is a general image layer, text layer, template layer or various special effects layer.
To add a mask to a layer, first select the layer to be masked, and then click the Add a mask button on the layer panel, or click the Layer layer/Add a mask to add the layer mask/Reveal All command. , so you can add a full white mask, so the entire layer is opaque and will show everything. If you hold down the Alt key and click the Add a mask button, or click Layer/Add a mask to add layer mask/Hide All, a full black mask will be created to hide the entire layer. If you want to create a mask when there is already a selection range on the layer, you can execute the Layer layer/Add Layer Mask/Reveal Selection command to hide all unselected images. . If you execute Layer/Add Layer Mask/Hide Selection, you can partially hide all selected images.
Edit layer mask
The layer mask is an 8-bit grayscale image. Painting it black means that the layer is transparent and hollowed out, and you can see the layer below. Painting it white means the opaque part of the layer. If you want the layer image to be semi-transparent and blend perfectly with the underlying image, you can paint it gray. So if you want to edit the layer mask, you can choose any tool or command that can be used to paint instead of mask painting. Let’s take the masked part of the desert and the green grassland in the previous example as an example. We can clearly see the relationship between them.
Turn off layer mask
If you need to temporarily turn off the layer mask, hold down the Shift key and click the preview of the layer mask in the layer control panel or execute Layer/Disable Layer Mask to turn off the layer mask. A red × mark will appear on the layer mask preview in the control panel, indicating that the layer mask is temporarily turned off. At this point, the layer's image will be fully visible. To reopen the mask, click the layer mask preview in the layer control panel, or execute the Layer/Enable Layer Mask command to turn on the layer mask.
Links to layers and layer masks
By default, layers and layer masks are connected together, so they can be moved or transformed at the same time. In the layer control panel, a connection icon will appear between the layer and the layer mask thumbnail, indicating the connection between the two. Click the connection icon to unlink the layer from the layer mask so you can edit the layer mask individually. If you want to restore the connection relationship, click the position between the layer and the layer mask again, the connection icon will reappear, and the layer and layer mask are connected together again.