in this video we're looking at masks in affinity photo and how to use them it expands on the layers
video from the previous lesson in this course if you didn't see that i've included links to it and
earlier lessons in the youtube video information now to understand what masks are let's look at
a simple example by adding a black and white adjustment layer to this image to do that i'll
use the icon at the bottom of the layers window then in the list select the black and white option
i'll just close the dialog because i don't need that to explain how masks work if we look at the
layer studio panel we can see the adjustment layer which has a white thumbnail the white thumbnail
represents a mask that's attached to the black and white adjustment layer and which controls
where the layer's effect is seen this mask has the same size and dimensions as the image document is
covering when the mask is white as this thumbnail shows the mask has no effect on the adjustment
layer you can also switch to viewing the mask rather than the image you can do this by holding
down the option key on your keyboard and then clicking the mask thumbnail if you're using a
windows pc that's the alt key now you can see the mask is completely white let's use the rectangular
marquee tool now to select a square in the center when i then press command and i on my keyboard it
inverts the selected area of the mask so that it's black if you're using a windows pc you can
press ctrl and i to return to viewing the image rather than the mask click the image layer once
now you can see that the image is still black and white apart from the center where i inverted
the mask to black what's happening is that a white mask allows you to see the effect of the
adjustment layer whilst black hides it where the adjustment layer is hidden or masked out you just
see the layer below which is in color in this case if i select the adjustment layer again and then
invert the selected area of the mask it changes that area back to being white and the color is
gone from the image let's clear the rectangular selection so that i can show you something else
this time i'll invert the full mask so that the entire image is in color now because the
mask is black and hiding the effect of the layer remember press option and click to view the mask
let's select half of the mask using the rectangular marquee tool again this time i'll
use the flood fill tool to fill the selection with a light gray notice how the colour of the image in
that area has returned but it isn't so strong what's happening is that once the black part of
the mask hides the layer gray allows some of the effect of the layer to be seen it's a little light
changing the opacity setting for that part of the layer if i fill the area of the mask with a darker
gray we see more colour the darker the gray the more it blocks the layer from being visible whilst
black blocks it completely whenever we add an adjustment layer in affinity photo the mask that's
attached to it is always completely white that's why you see its effect across the entire image
now that you understand some of the mass basics let's look at how we can use this
imagine that we want to increase the saturation in the sky in this image where we can see the
glow from the sun on the right i can do this by adding a vibrance adjustment layer and increasing
the saturation slider because the layer mask is white the adjustment affects the entire image but
we don't want that let's invert the mask now to turn it black so that it hides the effect remember
i just select the mask and press command and i on my keyboard or control an eye on a windows pc
by hiding the effect it allows me to paint it into selected areas by painting on the mask using white
let's select the paint brush and set the color to white i'll then be sure to select the adjustment
layers so that i paint on the mask and not the image as i paint you can see the adjustment appear
if i display the mouse by holding down option and clicking you can see the white area that
i've now painted the problem with this though is that it doesn't look very natural that's because
i didn't configure the brush correctly before i started painting let's undo the brush strokes and
i'll start again this time i'm going to change the brush from having a hard edge which is easy to see
to being very soft with a hardness setting of zero percent i'm also going to reduce the flow to 10
rather than 100 percent this means the white eye paint onto the mask is going to build up
more slowly and because of this i'll need to use multiple brush strokes which helps to blend the
effect if we view the mask again you can see the difference this makes also the effect the layer
is having on the image is now much more realistic but there is another technique you can use which
may produce even better results let's start again with a new vibrance layer and a black mask
this time i'll start by selecting the yellow part of the image using the select sample color option
in the select menu now i can click on the color in the image that i want to use i'll pick the area of
the cloud on the right near to where the sun is i can then change the tolerance slider to control
what's selected in the image the higher the value the wider the range of pixels that are selected
you can see the selection indicated by these matching ends but that's going to get in the way
for the next step i'll therefore hide the issues in the view menu and the show pixel selection
option although i've hidden the marching ants the selection is still in place now i can start
to paint on the mask but i'll be painting through the selection first though i'll click the layer
to be sure that i'm painting onto the mask then i'll paint over the area where i want to boost the
saturation if we look at the mask now you can see that it's picking out the sampled areas in white
the adjustment layer is no creating a strong but natural adjustment that only targets the colours
we want now the problem with selections like the one i've been using is that they're only
temporary when we select something else or we close the image the selection we used vanishes
you could try to recreate it but you might not sample the same point in the image or use the
same settings because of this it's a good idea to save your selections in case you want to use them
again in the future the way you can do this is by adding them as a spare channel in the image
this stores them inside the image so that they're saved as part of it let's turn the pixel view back
on so you can now see the selection again i'm then going to select the channel studio panel which is
where we can save the selection if you can't see the channel studio panel you can make it visible
in the view studio menu the channel studio panel shows the channels that make up the entire image
these are the composite red green blue and alpha channels because this is an rgb image
if it was a cmyk image you'd see those channels instead now as well as the composite channel
we can also view the individual channels of any layer we have selected in the layers studio panel
then further down we have the pixel selection this shows the currently selected pixels in the image
to save this selection all we need to do is right click on the pixel selection and choose create
spare channel this adds a new spare channel at the bottom of the studio panel which i can then click
to view i can also right click on this and select to rename the channel to something more meaningful
this new channel is then saved as part of the image file in case we want to use it in
the future let's clear the current selection and i'll show you how to use the new channel
all i need to do is right click on it and choose low to pixel selection in the menu
i want you to remember this point because we're going to be coming back to use it later now i have
the exact same selection active as i did before i could then paint through it again or i can use it
to create a new mask watch what happens when i add a new curves adjustment layer to the image
it uses the current selection to create a mask on that layer any adjustment i apply then
only affects the area allowed by the mask this also produces a much more realistic adjustment
remember selections are temperate but you can convert them into masks or channels to store
them in the image it's a good idea though to get into the habit of saving your selections as a
spare channel the spare channels are like master templates that you never adjust some people use
masks for this but you do sometimes end up editing masks so it's better to use a spare channel to
save your selection now earlier i showed you how to load a selection from the spare channel
in the channel studio panel although we use the spare channel we don't need to limit ourselves
like this we can use any of the channels in the channels window let's right click on the
composite red channel and load that instead then we'll add another vibrance layer and use that to
boost the vibrance of the image the new layer then has a mask created from the composite red channel
now our adjustments are affecting areas based on the level of red in the image if there's a lot of
red in that area the effect is stronger i'll clear this selection now so that we can edit
the mask by painting on it by painting with black on the mask around the ground i can restrict the
adjustments so that they only affect the sky masks are an extremely powerful tool for working with
layers but to get the most out of masks you need to understand how to create and work with
selections that's the subject of the next lesson if i've already published that you'll see it here
now and you should watch that next if not watch this video where i explain the quick mask mode in
affinity photo and if you haven't already done so don't forget to subscribe and please share
this video with other affinity photo users thanks for watching and i'll see you in the next video