[Tutorial] How to use layer masks and clipping masks

Discuss and share Pixelmator Pro resources such as templates, mockups, and tutorials.
User avatar

2019-01-23 13:27:35

In image editing, masks nondestructively hide parts of layers. There are lots of different uses for masks and they are an incredibly flexible and powerful image editing tool. For example, in photo editing, you might use masks to combine parts of different photos into one. In graphic design, you might use clipping masks to fit an image within a container. And, in illustrations, you might use masks to fill layers with textures. Let’s check out how masks work and how to use them.

Image

Read the full tutorial here.
User avatar

2019-02-14 06:42:52

Hello everyone! I have to say I’m a massive fan on Pixelmator Pro but I’m finding the lack of information about clipping masks to be infuriating. PS has a million different articles about the same process yet your lucky to find anything similar for Pixelmator? I would love to see more diagrams of how a mask effects objects Created in PP, since I create images for animations and not remotely interested in editing photo’s. I’ve been struggling to get the mask to work reliably, sometimes it seems to work other times it won’t? I have created a model made up of many layers and would like to paint it like I would a real model in the real world? If I apply paint to a model I don’t want paint anywhere else but on the model nor do I want the stroke used to be drowned out with paint? If anyone could help I’d really appreciate it since it would save going through every layer and painting them individually.

All the best,
Casey
User avatar

2019-02-14 14:41:03

Hey Casey, we're doing our best to create as much content about Pixelmator Pro as we can but we can do better and we've got some plans to ramp things up in this area in the coming weeks and months. In the meantime, could you share some examples of the file you're working on and what isn't working as expected? I'll do my absolute best to give you some pointers on how you should do things in Pixelmator Pro! :pray:
User avatar

2019-05-07 20:47:16

Is there a way to invert a clipping mask so it's possible to make "cut outs" to a shape (like windows in a house...)? I did not get it to work... cmd+I caused some strange color change on the shape with the clipping mask but did not create a "cut out"...
User avatar

2019-05-07 22:05:39

Hi Michael.
I think of clipping mask as a way to separate colour information on one layer from transparency information on another. So, a great way to paint your windows blue but not so good at cutting holes.
Holes are better cut by a mask rather than a clipping mask or, if you're dealing with shapes by using subtract. To subtract one shape from another, highlight both shapes in the layers pallette, right click on the top one and select Subtract. It will cut the top shape out of the bottom.
Hope this helps.
- Stef.
P.S. Have put quick sketch below. The windows are cut out of the house so a textured background (which in hindsight I should have added) would have shown through.
Image
User avatar

2019-05-08 22:52:58

Hey st3f
Very cool!
Thank you very much for pointing out what now seems so obvious. How come I didn't see this up to now...?

Now dear Wizards behind Pixelmator, since I'm here anyway: this would be perfect if it would work on Layer-Groups too. E.g. in the house of st3f up there: put all window-squares in one group, then mark the group and the path and cut all the squares out with one click on substract.

Or is there already a obvious way to do that I missed again?
User avatar

2019-05-09 06:33:00

Thank you for this tutorial. I appreciate it.

Is there a way to paste an image (any kind of image, pixels, shapes, text whatever) INTO a layer mask. I'd like the freedom to paste anything I want into a layer mask.

Is that possible?
User avatar

2019-05-09 12:18:03

by Michael Steiner 2019-05-08 22:52:58 Hey st3f
Very cool!
Thank you very much for pointing out what now seems so obvious. How come I didn't see this up to now...?

Now dear Wizards behind Pixelmator, since I'm here anyway: this would be perfect if it would work on Layer-Groups too. E.g. in the house of st3f up there: put all window-squares in one group, then mark the group and the path and cut all the squares out with one click on substract.

Or is there already a obvious way to do that I missed again?
There is a way to do this, yes. First, you'd need to create one window shape from the four window squares. To do that, select all four in the Layers sidebar, Control-click one, and choose Unite Shapes. You'd need to do this before combining the house and window shape, so it should not be inside any nested shape. Screenshot below:

Image

After doing this, select both the new window shape and the house shape in the Layers sidebar (make sure the window is above), Control-click either layer and choose Subtract Shapes. Screenshot below:

Image

If you then want to edit the windows separately, you can select the window shape in the Layers sidebar, Control-click it in the canvas and choose Make Editable (a quicker way to do this is to double-click the house, then double-click the window). Then, you can select multiple vector points and manipulate them as you wish. Here's another few screenshots:

Image

Image
by dan.dee.lyon 2019-05-09 06:33:00 Thank you for this tutorial. I appreciate it.

Is there a way to paste an image (any kind of image, pixels, shapes, text whatever) INTO a layer mask. I'd like the freedom to paste anything I want into a layer mask.

Is that possible?
Probably the simplest way to do this is to apply an Image fill effect to a layer mask. To do that, select the mask, choose Format > Effects > Fill > Image, then you can drop any kind of layer into the image well in the Tool Options pane. To edit the position of the object in the mask, click the Edit button next to the name of the effect.
User avatar

2019-05-10 11:55:08

Great! Thanks again! This will save me a lot of time and turnovers to other apps! Big fan of Pixelmator since it's early days. Keep up the good work!
User avatar

2019-05-10 12:00:41

Happy to help! :raised_hands:
User avatar

2019-10-06 01:07:19

Maybe I missed this. When you have created a clipping mask how do you add formatting to it like, strokes, shadows, etc. I have an eclipse shape with a photo and I want to add a border. I would appreciate your help.
User avatar

2019-10-06 01:57:48

Hi Marcia.
This is a little tricky. In a clipping mask, the bottom layer provides the opacity and the top layer the colour. The bottom layer has the shape you want but any style you put here has the colour information of the top layer applied to it afterward. I think that the logical place to style this would be to group the two layers and style the resulting group. Unfortunately, (at time of writing) Pixelmator Pro doesn't allow styles to be applied to groups.
My go-to would be to create a shape that holds just the border and place it above the clipping mask pair. If the lower layer is already a shape, just copy it, move the copy and style appropriately. If it's a bitmap:
1. Choose the lower layer in the layers panel.
2. Edit > Load Selection* to turn the layer into a selection.
3. Format > Convert into Shape to turn the selection into a shape.
4. Move the shape above the clipping mask pair and style appropriately.
I wonder if anyone else has a neater way of doing this. Hope this helps.
- Stef.
*or Cmd-click on the thumbnail in the layers palette.
User avatar

2019-10-09 09:26:31

I was looking for this. I so LOVE Pixelmator Pro. As happy as back in 2007, when I discovered Photoshop for the first time!
User avatar

2019-10-11 09:23:40

by ag123 2019-10-09 09:26:31 I was looking for this. I so LOVE Pixelmator Pro. As happy as back in 2007, when I discovered Photoshop for the first time!
Ahhh, that so great to hear! :blush:
User avatar

2019-11-21 22:01:28

Lovely easy to follow tutorial. Thank you!
User avatar

2020-03-12 15:54:14

I would like to put some rounded edges on a headshot. I presume I do that with clipping masks - but how do I get symmetrically round edges. And how do I change the "roundedness?" There was a great little app called Picturesque that did this but I think its no longer being developed. Thanks
User avatar

2020-03-12 16:36:32

Hey Philipnb,

If I understand what you're going for correctly, you could try clipping the headshot layer to a rounded rectangle shape. The rounded rectangle is a Smart Shape so you can easily control its corner radius using the green shape handle like so: http://upload-cdn.pixelmator.com/rounded-rect.mov
User avatar

2020-03-24 23:47:27

Hello,

How should I braid these Olympic rings together?
Each ring is in a separate layer!
See attached screenshots.

This is a Dutch to English translation with Google translate

Image
Image
User avatar

2020-03-25 06:56:00

I would duplicate layers and use masks. Here are the blue and yellow rings to show what I mean:
Image
The red arrow shows where I painted on the mask.

To do this:
1. Copy the blue ring and put the copy below the yellow one.
2. In the layers panel, right-click on the upper blue layer and select Add Mask.
3. Using a brush and black paint, paint on the mask where the blue ring should be open.

I hope this helps and that you understand. All the best.

- Stef.
User avatar

2020-03-25 11:48:07

Great advice from Stef, here's a quick tip to make this a little easier — you don't have to duplicate the layers, but using the Load Selection command, you can make sure everything lines up correctly. Basically you need to:

1. Add all your rings on their separate layers
2. Add layer masks to every layer
3. In the Layers sidebar, click one of the ring layers that should be above another ring layer (make sure to not click the mask) and choose Edit > Load Selection
4. Then, still in the Layers sidebar, click the layer mask of a layer that should be below the ring, but which is above it in the layer stack
5. Select a hard basic brush, with its color set to black
6. Roughly paint over the part of the ring that you need to hide — because a selection is active, you won't go outside the ring

This probably sounds quite confusing, so here's a quick video (note how in the video, for a moment, I get confused about what I'm doing...)



You can see the full resolution version here.
User avatar

2020-03-25 12:30:05

@Andrius. Nice. I didn't think of doing that.
(I mean I'll probably still duplicate because that works better for my brain, but still, nice :grin: )
User avatar

2020-03-25 14:28:32

@Stef and @Andrius,

Thanks for the quick responses.
Have applied the method of Jef, and it works!
Andrius' working method, on the other hand, looks very practical!
I was just figuring out how to select those rings myself, and with this video clip I learned something again! Thanks.
I will definitely try out this working method.
Thanks again and greetings from Belgium!
User avatar

2020-03-25 14:32:36

by st3f 2020-03-25 12:30:05 @Andrius. Nice. I didn't think of doing that.
(I mean I'll probably still duplicate because that works better for my brain, but still, nice :grin: )
To be honest, my method didn't work that well for my brain either, the video is evidence of that! :sweat_smile:
by Van Hauwe Gilbert 2020-03-24 21:00:00 @Stef and @Andrius,
Thanks for the quick responses.
Have applied the method of Jef, and it works!
Andrius' working method, on the other hand, looks very practical!
I was just figuring out how to select those rings myself, and with this video clip I learned something again! Thanks.
I will definitely try out this working method.
Thanks again and greetings from Belgium!
Glad to hear we were able to help!
User avatar

2020-09-10 21:54:04

When I follow the steps in this tutorial, I'm not seeing the same thing depicted by the screenshots and my clipping mask isn't working. What am I doing wrong?

I read this:
When you create a clipping mask, any transparent areas of the clipping mask layer will mask out those same areas of any layers ‘clipped’ to it. In simpler terms, if you create a clipping mask from a circle and clip a photo to it, any parts of the photo outside the circle will be hidden.
And that is exactly what I want! (I mean that literally — I want a circle as a clipping mask.)

I followed the steps:
1. Open a photo as the only layer.
2. Add a new ellipse (a circle, actually) and it appears above the photo in the Layer List.
3. Right-click / control-click the new layer and choose Create Clipping Mask.
4. The image in the tutorial now shows that the layers have swapped (mine did not) and the tutorial says, "Notice how the contents of the layer above are clipped to the shape of the layer below." That implies that I need to swap the layers.
5. However, whether I swap the layers or not, I do not get the result shown in the screenshots.

What's happening here? Why is this not working? (I'm using Pixelmator Pro v1.7.1 Sequoia.)

Thanks for any help you can provide!
User avatar

2020-09-11 15:19:55

Hi Frank, welcome to the Community! You definitely do not need to swap the layers around, the 'content' layer should be above the 'shape' layer. Just to triple-check, are you clicking the upper layer and using that as the clipping mask? Like in the following image from the tutorial:
Image
So, I'm not sure if this will help but, after making sure the shape layer is below the content layer, you actually create the clipping mask from the content layer. This bit can often be a little counterintuitive at first, because, of course, the 'shape' is really acting as the mask. if nothing at all is happening when you do that, I have a feeling you're Control-clicking the lower layer and creating the clipping mask from that.