Layer Masks

Tools: Layer Masks

by

Details

Difficulty: Beginner

Files

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

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.

layer masks explained01

Time for an example:

Blending Images

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:

layer masks example blend image01 layer masks example blend image02
Our two images

Step 1 - New Document

Create a new Pixelmator document. For the purpose of this tutorial I have chosen 698 x 500 pixels. (File > New…)

layer masks example blend01

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.

layer masks example blend02a

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.

layer masks example blend02b

Lets copy and paste the second image.

layer masks example blend02c

As we did with the previous image, resize it so that it fits within the current document. (Edit > Transform…)

layer masks example blend02d

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).

layer masks example blend03a

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).

layer masks example blend03b

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).

layer masks example blend03c

There we have it. The sky blends seamlessly into the other image. How easy was that!

layer masks example blend final

Copy and Paste into a Layer Mask

  1. Select the layer containing your greyscale image. (Image > Desaturate...)
  2. Goto (Filter > Color > Mask to Alpha).
  3. Goto (Edit > Load Selection).
  4. 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:

layer masks filter 01

Next we add a Layer Mask to our image layer with a simple gradient.

layer masks filter 02

With the Layer Mask selected, add the desired filter. In this case I have chosen (Filter > Halftone > CMYK Halftone...)

layer masks filter 03

Simple as that!

layer masks filter final

Comments

  • Connie says:

    Even though I haven’t tried this yet, this is the exact idea I’ve wanted to learn and try. A step by step instruction should be just the thing for a novice like me.

    Thank you so much for posting it!

  • tomgraphX says:

    Great job, continue so! I like it.

  • Ashley Rich says:

    Thank you for the comments!

  • Manticore says:

    Just did the tutorial. Great lesson!

    Merci!

  • Fhuy133 says:

    great tut!  I especially liked that you provided that images so that “we” beginners can follow along and see if what we are doing is right. This was my first one using this tool.  I really like it!  Suggestion: I especially liked your intro “Layer mask explained”.  PLEASE continue this on future tutorials.  There is so many features in this tools and I have no clue what many of them are.  A brief explanation like this at least gets me going in the right direction. thanks and keep up the great work here

  • Donal Leader says:

    Great explanation of layer masks in Pixelmator. For beginners this is a great introduction and motivates me to get started. Well done!

  • Mark says:

    Have you tried this on the new version of Pixelmator?
    Unfortunately, it doesn’t work this way anymore.
    The fade leaves a hard edge that can’t be blended.
    any thoughts?
    Thanks
    Mark

    • Ashley Rich says:

      Mark, sorry for the delayed response. I’ll take a look when I get home and get back to you on this. I can’t say I’ve notice it so far.

  • DM says:

    I find your beginner tuts very helpful and I have began a folder for them for future reference. Please, continue this series of beginner tuts. They are well done and the samples are helpful as a guide to see if you are understanding the tut as you follow along. Great job.