[Tutorial] How to use layer masks and clipping masks

Discuss Pixelmator Pro tutorials and share useful resources.
User avatar

2020-09-11 23:31:33

Okay, I see what happened. The first screen shot under "Create a Clipping Mask" shows the Circle layer above the photo image.

Then the paragraph directly below that says to "right-click the upper layer" and choose Create Clipping Mask.

But the next screen shot has to the two layers swapped — the Circle is now on the bottom and the image is on top!

Somehow those two layers were swapped/moved. The tutorial didn't have instructions for doing that, and when I right-clicked on the "upper layer" it was still the Circle layer. I do see that the second screen shot does have the image as the top layer.

I think the tutorial is just missing the step of moving the Circle layer under the image layer...

Yep, I just tried it that way and it works great.

(And yes, it is confusing, not least because most of the other tools I've used put the clipping area on top, such as Inkscape and Gimp.)

I actually ended up using Inkscape because my image wasn't really an image, it was a drawn graphic, and saving it as SVG meant being able to resize it infinitely without pixellation. However, now that I know to add that extra step, I'll try to use PMPro in the future.

Thanks for the quick reply! 👍
User avatar

2020-09-14 09:19:34

by Frank Edwards 2020-09-11 23:31:33 I think the tutorial is just missing the step of moving the Circle layer under the image layer...
You're 100% correct, I should've totally made that clearer! I've updated the tutorial to include this info.
by Frank Edwards 2020-09-11 23:31:33 (And yes, it is confusing, not least because most of the other tools I've used put the clipping area on top, such as Inkscape and Gimp.)
Does GIMP have clipping masks? I'm not sure about Inkscape, but clipping masks are a relatively rare feature in image editors and I'm not sure I've seen it in GIMP.
by Frank Edwards 2020-09-11 23:31:33 Thanks for the quick reply! 👍
Happy to help!
User avatar

2020-11-22 06:44:11

I'm trying to figure out how to use an existing layer as a layer mask on another layer. It's very easy to use an arbitrary image as a layer mask; how can I do the same with an existing layer? Is the only way to export the layer as an image and then import it again as a layer mask?
User avatar

2020-11-26 14:05:18

You can apply the Image fill effect to the layer mask, then drag and drop the layer you'd like to use as the mask into the image well for that effect. But it's true that we could make this easier some way – possibly using drag & drop to drop layers directly into masks...
User avatar

2020-11-30 22:07:52

Thanks! That works nicely, wouldn't have figured it out on my own though.
User avatar

2020-12-16 10:18:26

st3f wrote: “In a clipping mask, the bottom layer provides the opacity and the top layer the colour... Unfortunately, (at time of writing) Pixelmator Pro doesn't allow styles to be applied to groups.”

In addition to Group styling (which works for things like opacity) further Pixelmator development focus is required for Shape management.

Say you use a Mask to cut the visible unfilled Ellipse Stroke shape in half. Add a Mask to the stroke-only visible Ellipse and use the rectangular selection tool to select (mask) half of the Ellipse. Then press delete. Now, the half circle Ellipse Stroke still rotates around the axis of the whole Ellipse-and-Stroke unit, which is mission critical goodness for some projects.

However, say you want to save that Ellipse construction as a shape, so you drag and drop it into your Shapes box. What appears in the Shapes box is a filled (stroke-less?) Ellipse!

Convert a Shape to pixels and you save the original Shape's Stroke outline. But that kind of Shape grows and shrinks the original Shape's Stroke thickness as saved Shapes inserted in constructions change dimension. Stroking a 'shaped(?)' Stroke is also not proportional (sic) to what we have discussed masking our Stroke for.
User avatar

2020-12-16 10:34:55

by MarkCate 2020-12-16 07:00:00 However, say you want to save that semi-Ellipse mask construction as a shape, so you drag and drop it into your Shapes box. What appears in the Shapes box is a full Ellipse!
Shape, Opacity, Stroke, Mask and Color are each interdependent, and define the development of the Pixelmator family.

Now, it is easy to select that Ellipse Stroke Semi-Circle, convert that selection to Shape, then drag-and-drop to save your fresh new Shape as a custom shape in the Shapes box. But every existing Shapes box shape lacks saved Shape Stroke information - most importantly, the Stroke loses its original editable thickness, becoming another static object, as the vector Shape that it skinned changes dimensions, in its new shape-object role. Along with any opacity which is also ignored, in that Shapes box. Also, the essential Masking is lost.

We might have to wait on Shapes saving variable opacity. Masks may never be saved in Shapes data. Sure wish Pixelmator Pro would allow us to save both Shape and/or editable Shape Stroke as Shapes that we construct using Masks. But for that to work, Shapes must also save Opacity and Stroke. Perhaps one day observing shape masking.

Imagine some nice Elk antlers, Human joggers and other adaptable Stroke Shape outlines saved as editable-width STROKE Shape, preserving editable Stroke widths (in a third generation Pixelmator Pro Shapes box-of-goodies). Imagine also, saving Masks into Shapes, so any construction can be saved and shared with a click, in portable export-import Shape Packages. Note that Shapes do not have to save Color to manage Shape, Stroke, Opacity and perhaps Masks. At this time, Pixelmator Pro cannot preserve existing Layer opacity while adding hue and/or colored shade to that existing transparency. In every situation, Layers are independant... and can be Masked.

Is SHAPE the modality that can be adapted to store, apply and generally improve other Pixelmator modalities: namely, Opacity, Stroke, Mask and Color?
User avatar

2020-12-21 02:35:02

First, let me say I'm a complete newbie, so I'm sure that the answer to my question is extremely basic, and I apologize in advance.
I have used the quick selection tool to isolate my Christmas tree on an image. What I want to do, is fill in the background with my full image, at a lesser opacity, add text around the tree so that the text can be read over the background, and have just my tree be full color and opacity. To be honest, I'm having trouble figuring out how to add text around the tree, never mind a third layer with a lesser opacity image. I thought I could use the inverse selection to create a mask, and add text to that, but that isn't working either.
Please help! and again, I'm sure this is extremely basic, I'm sorry.
User avatar

2020-12-29 22:52:21

Hello everyone! I have one question, how I can create mask for next working from this layers (r,g,b). Originally, I had an RGB "mask" with red green and blue channel, next I create three separate masks but how do I apply each mask to a layer cam1 ?
Image
User avatar

2020-12-31 10:28:54

by Andrius 2020-11-26 22:05:18 But it's true that we could make this easier some way – possibly using drag & drop to drop layers directly into masks...
The ability to command-C from anywhere and command-V into the mask. No need to reinvent the wheel here.
User avatar

2021-01-05 10:18:27

by Nicole Schuster 2020-12-21 00:35:02 First, let me say I'm a complete newbie, so I'm sure that the answer to my question is extremely basic, and I apologize in advance.
I have used the quick selection tool to isolate my Christmas tree on an image. What I want to do, is fill in the background with my full image, at a lesser opacity, add text around the tree so that the text can be read over the background, and have just my tree be full color and opacity. To be honest, I'm having trouble figuring out how to add text around the tree, never mind a third layer with a lesser opacity image. I thought I could use the inverse selection to create a mask, and add text to that, but that isn't working either.
Please help! and again, I'm sure this is extremely basic, I'm sorry.
This is a rather late reply if you needed this done in time for Christmas, and you, hopefully, worked this out in the end, however – the gist of what you'd need to do is:

1. Duplicate the original layer
2. Make your selection
3. Add the mask to the upper layer
4. Add a white rectangle shape between those two layers and adjust its opacity

As for adding the text around the tree, are we talking curved text here or a paragraph wrapped around the tree?
by Ilya72 2020-12-29 20:52:21 Hello everyone! I have one question, how I can create mask for next working from this layers (r,g,b). Originally, I had an RGB "mask" with red green and blue channel, next I create three separate masks but how do I apply each mask to a layer cam1 ?
If I've correctly understood what you'd like to do, then I'd say you'd probably need to duplicate the cam1 layer twice (so you have three cam1 layers in total) and apply each mask to each layer. But I guess I could be wrong if you only want to apply the masks to a particular channel, in which case you'd probably need to isolate each channel using the Channel Mixer adjustment (again, in each duplicated layer) and then mask those layers, blending them using the required blending modes (which I can't recall off the top of my head). Though I can't guarantee it will work without having tried it.
by Teelar 2020-12-31 08:28:54 The ability to command-C from anywhere and command-V into the mask. No need to reinvent the wheel here.
True, true. But we also don't want to break any existing wheels (i.e. confuse people who might have a mask selected without noticing and then paste into it accidentally). Maybe that's an edge case, though.
User avatar

2021-01-10 01:27:26

Hi! Is there a way to make clipping masks behave just like common masks? So that black color would hide original, and white did not affect it? Image
User avatar

2021-01-10 05:44:17

Looks like, I've found a solution. I should first transform the mask:
Format -> Effects -> Other -> Mask to Alpha
And then add it as a clipping mask.

With “Mask to Alpha” сlipping masks behave just like a layer mask, aren't they? Is there any difference?
Image
User avatar

2021-01-15 15:25:10

Hi,
not sure what I am doing wrong here (sounds like it should be rather hard to do it wrong ), but my mask shape is still visible after applying it. I have a simple Ellipse shape (white) below the layer I create the clipping mask on, and the ellipse does correctly clip that layer. However the white ellipse shape itself also does stay in the image, which of course I don't want.
Thanks, habitoti
User avatar

2021-01-15 15:52:24

Hey Habitoti! What you're describing sounds right. Could you take a screenshot of the issue? A bit more context might help here.
User avatar

2021-01-15 16:19:11

Sure. To make it more obvious, I changed the mask to red in the below screenshot. The blue shape in the top layer should be masked by the red ellipse to exactly fit into the inner (light blue) part of the button shape of the lowest layer.

Image

I use the latest PM Pro from AppStore. Here is the setup w/o the mask to show more clearly what I am finally up to:

Image

So I'd like the correct masking of the first picture, but not the red mask, to come up with the lower picture correctly cut out.
User avatar

2021-01-16 14:38:22

Hi Habitoti!
I'm far from pro, but I think this is just how clipping mask works. A layer mask can help here. Just create a layer mask from your red shape.
Image
Here is video tutorial

1. Choose shape and load selection (option + command + l)
2. Create a new layer and make the selection white (command + shift + n, then option + backspace)
3. Invert selection and make it black (command + shift + i, then command + backspace)
4. Choose the shape and add a layer mask
5. With the “Format” menu fill the mask with image
6. Drag created layer to the image of the mask
7. Hide or remove layers with the red ellipse and another one, we used to create a mask.
User avatar

2021-01-16 14:57:28

Thanks for the tip. Phew...that sounds really complicated for something that should be simple and is really often used. Should be as simple as in Photoshop, IMHO. When dedicating a shape as mask, only opacity should count for the masking/clipping shape. TBH, the tutorial for clipping referenced in the beginning of this thread also shows it like this. The white circle shape just serves as a cutout stencil and is itself no longer visible in the resulting image — which is how it should be and would be intuitive. I still think this is rather a bug.
User avatar

2021-01-16 15:27:41

I think the white circle from the tutorial is not visible cause there is no transparent pixels on the image with balloon.

In your case, the clipping mask is visible only where the target shape has no visible pixels.

Also hope someone will show a simpler solution.
User avatar

2021-01-16 16:40:23

At least you gave me a good hint with the "Load Selection". So right now I just create the selection shape on the clipping layer (ellipse), then switch to the image layer and just cut it out with the same selection, then paste that cut out portion back as a new layer. Then I hide the uncut image and ellipse (for later reference if needed) and have a similar result. Not so nice, as I can't simply move the shape while at the same time applying the mask in real time, but it does the job for now.

But would have hoped for a better support from PM Pro here...
User avatar

2021-01-16 17:15:31

If you want to move the shape:
1. Choose the red shape, load selection.
2. Choose the button layer, invert selection.
3. Copy and paste layer.
4. Move it on top.
5. Hide the layer with red ellipse.
6. Make the button layer a clipping mask for the shape.

I've uploaded new video on same page.

Image
User avatar

2021-01-16 17:23:00

Very helpful, thanks!
User avatar

2021-01-18 08:53:17

Thanks for the screenshot, Habitoti. I've posted the response Friday evening and didn't really expect you'd come back to me so quickly! But I can only second Hermansorgel's suggested workflow. It looks like using layer masks is the best way to achieve the look you're going for. You can, however, cut down on the steps needed to mask the clipped layer.

To load a selection, Command-click the top layer thumbnail, add a mask, then drag the mask down to the Ellipse layer directly. You can find a quick video illustrating this here: http://upload-cdn.pixelmator.com/clipping-11118.mov.
User avatar

2021-05-18 11:37:43

Sorry, I don't understand what "load selection" does. Can you please explain?
User avatar

2021-05-19 13:01:23

by Francisco Sorry, I don't understand what "load selection" does. Can you please explain?
Sure! Load Selection lets you automatically select all opaque areas of an image, so you can quickly make selections of layers without having to select them by hand.