[Tutorial] How to use layer masks and clipping masks

Discuss Pixelmator Pro tutorials and share useful resources.
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!
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!
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!
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 )
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 )
To be honest, my method didn't work that well for my brain either, the video is evidence of that!
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!