Hi this is Gary with MacMost Now.
On today's episode let's look at using layers and masks in Pixelmator.
So let's open up a nice little picture of a beach here in Pixelmator and then in addition
let's open up another image that is kind of a star field with a comet in it.
Let's use these two very contrasting images to demonstrate layers and masks.
So I'm going to go into this one and I'm going to select the entire thing and then I'm going
to go into here and paste it.
Then I'm going to close this original one.
So I've got the two images in one now and the way I know that is if I go to View and
Show Layers, I'll get this list of layers and I can see that I've got two different
layers here.
One is the beach and the other is the star field.
So I've named the layers here.
I just double click on the Name in the Layers panel here and I can name it Stars and Beach.
Now we know what we are dealing with.
Only stars is visible.
It has this check mark.
Now I'm going to use a clipping mask here as my first example.
It is a very simple type of masking.
I'm going to use the shape tool here.
I'm going to create a rounded rectangle shape.
I'm going to just put that here underneath the stars layer.
So now it is hidden by stars.
I'm going to select the stars layer and I'm going to say I want there to be a clipping
mask for this layer.
Sure enough when I do that, you can see this little arrow there that points down to the
next layer, and you can see that the stars layer is masked using the shape layer.
So I only see what is visible by where there is some sort of color in the shape layer.
So I can move this layer around and it will reveal a different part of the image.
That is a really simple form of masking.
The clipping mask.
Now I could select this layer and delete it and instead create another layer and let's
use a brush tool here.
I'm going to use a pretty big brush there.
I'm going to create a new layer and in this layer I'm going to draw.
It doesn't matter the color.
It is the intensity.
So white versus yellow here or white versus black.
I'm going to move this layer below just like I did the shape layer, select stars, and then
say create clipping mask.
You can see what is only visible where there is some sort of color as opposed to white
in this layer here.
I can draw more and you can see I can reveal even more of this so you can do all sorts
of different things to reveal this layer using this layer below it with the clipping mask.
Now what is not revealed is in fact just transparent.
So if I turn the beach layer back on you can see it appears there and I'm kind of punching
holes through the beach layers.
So I can actually select in here and delete and instead draw in part of the sky back there.
Let me actually I'll use a selection tool.
I'll use this blind selection tool here and I will create an area in this layer that kind
of follows where the sky would be.
So let me start here, draw to here.
I'm not going to get it just perfect right now but you get the general idea.
Now to here and finish it.
Then I'm going to use Option Command F which is for Fill right there.
So I'm going to fill it with a color.
So I'll fill that a with yellow.
So after I'm done with the Fill there you can see that I've got the sky now replacing
the original blue sky that was there in the background.
That's using a clipping mask.
Now let's undo a bunch here and get back to before we applied the clipping mask.
There we go.
Now we just got back to the two layers just by using Command Z a bunch of times.
I'm going to create another type of mask.
I'm going to Control click on this layer here and I've got the contextual menu.
I can also use the little menu there.
I'm going to add a layer mask.
So a layer mask actually splits the little image up here into two parts.
You've got the image itself and you've got the mask area for that particular layer.
It's all white meaning the entire thing is filled with color so it is going to show everything
that is here.
So if I want actually remove part of this I would simply paint it but using a color
say like black would be the easiest to visualize.
So I'm going to go and paint there and as I paint black look in there you can see the
little black squiggle there I'm actually revealing part of the beach here.
So I could say you know create a little beach like space here that is shown.
So I'm basically removing this part of the star field so that it reveals what is underneath.
I can turn off the beach there and it is just a hole that I have created in the star field.
Now what is really cool about this is it doesn't have to be black and white literally.
You don't have to have areas that are hole through the image and and area that is opaque.
You can actually blend things like this.
So for instance if I were to use the tool here for creating a blend and I'm going to
bring up the gradient here and use something normal, white to black there, I can actually
draw in here.
Notice I still have the mask selected.
Not the regular image, not this layer, but the mask.
I can actually draw something like that and you can see how the gradient which you can
see here, the white part is showing the star field and the black part is basically a hole
through it that you can see the beach.
So I can do something really cool like for instance put a hole that goes from the top
here and gradually fades in to the beach there.
Now you kind of get you look like you've got a beach that is looking to a star field or
may actually be better to go right here to the edge of the beach like that or even just
right to the edge of the horizon there and now you kind of look like you've got the star
field here mixed in with that blue sky.
Notice that there is that little link-thing between these two here.
That means that the image and the mask are linked together.
So if I switch to the Move tool here and try to move them you can see both move at the
same time.
Which may be what you want a lot of time.
But you can click here on the link to Unlink them so now I can only move one independent
of the other.
So now with the actual star field image selected I can move the star field and the mask will
remain the same.
Since I am not using the bottom part here I can bring this up and actually bring the
comet part that was in the bottom of it into view and now you can see the comet here in
that creating a more surreal type of image with this comet here in the background.
Kind of a combination day night sky.
So using the layer mask and clipping mask, it's really tricky I find.
I have a lot of trouble remembering which one goes on top of the other one and which
color is the one that is opaque and which one creates transparency.
So I encourage you to play around with this.
Grab some sample images, just grab some images off of different websites, just to play around
and get good at using it before you need to use it on one of your projects or just for
fun.
Hope you found this useful.
This is Gary at MacMost now.