This tutorial is designed to be the definitive guide to one of the most essential features of Pixelmator - Layer Masks. We will explain exactly what a Layer Mask is, how to use them and uncover a few Layer Mask secrets. To conclude the tutorial we will show you step-by-step how to blend two images, so that they fade seamlessly into one another.
Here is how the tutorial is split up:
- Layer Mask Explained
- Copy and Paste into a Layer Mask
- Apply Filters to Layer Masks
Layer Mask Explained
A layer mask or masking as it is also known is a way to hide parts of a layer without modifying or deleting any part of it. The technique is known as nondestructive as it does not modify any of the layers pixels, allowing the mask to be completely removed at a later stage.
Layer Masks use black, white and any shade of grey between to determine which parts of a layer are visible. Black hides the corresponding pixels and white reveals them. The various shades of grey determine how transparent the pixel is, the darker the shade of the grey, the more transparent the pixel.
In the following example I have created a radial gradient from white to black, resulting in the layer fading to transparent.
Time for an example:
One of the most common uses for a Layer Mask is to blend two images so that they seamlessly fade into one another. Here’s how it’s done:
Step 1 - New Document
Create a new Pixelmator document. For the purpose of this tutorial I have chosen 698 x 500 pixels. (File > New…)
Step 2 - Import Images
Copy and paste the first image into the document. (Edit > Paste)
Remember, when importing images into a Pixelmator document they automatically get their own layer.
The image is too large for the current document. To resize it select (Edit > Transform…). Using the handles on either four corners, resize the image. Using the handles on the corners of the image will constrain the proportions.
Lets copy and paste the second image.
As we did with the previous image, resize it so that it fits within the current document. (Edit > Transform…)
Step 3 - Add our Layer Mask
It's time to add our mask. Goto (Layer > Add Layer Mask) or (Right click the layer and select Add Mask).
To fade the two image we need to create a linear gradient from white to black. Bring up the Gradients window (View > Show Gradients or CMD 4).
With the Gradient tool (G) and our new gradient selected; click and drag from the top of the image to roughly the same point that I have. Make sure that you add the gradient to the layer mask (In the Layers Window it should have a blue outline).
There we have it. The sky blends seamlessly into the other image. How easy was that!
Copy and Paste into a Layer Mask
- Select the layer containing your greyscale image. (Image > Desaturate...)
- Goto (Filter > Color > Mask to Alpha).
- Goto (Edit > Load Selection).
- Select the layer that you wish to have the layer mask applied to. Then goto (Layer > Add Layer Mask).
Apply Filters to Layer Masks
One often overlooked feature of the Layer Mask is the ability to apply filters to them. Let’s take a look at an example.
Let's start with a simple Pixelmator document consisting of two layers:
Next we add a Layer Mask to our image layer with a simple gradient.
With the Layer Mask selected, add the desired filter. In this case I have chosen (Filter > Halftone > CMYK Halftone...)
Simple as that!