Skip to main content
We no longer support Internet Explorer. Please upgrade your browser to improve your experience. Find out more.

How to use Compound Masks in Affinity Photo 2

Open up new ways to control and edit adjustments using Compound Masks.

Compound Masks in Affinity are unique to Photo 2. They offer the ability to determine precisely where the adjustments we choose should fall within the composition. In this article, Affinity Technical Author Mike walks you through an example workflow for utilising Compound Masks while outlining their benefits over more typical and well-known layer-based edits.


I’ll start with the raw image below, shot with a model on location in Barcelona, Spain. I love how this beautiful Catalan city bursts with wall art full of rich colours, often present on its numerous sun-washed and run-down old buildings. While en route to the main location for a morning photo shoot, this was one of those unexpected stops near Park Güell, and we decided to capture frames spontaneously here. Although these were still early hours, the area on the right was already busy with tourists. Initially, I liked the idea of including people in the scene, however on later inspection, I decided I would only leave the character at the far right of the frame, so I used a combination of the Inpainting and Clone tools to repair the image.

Starting image opened in Affinity Photo 2

The main goal I envisaged for this image was to manipulate the colours in the scene so that the viewer is drawn to looking at the wall art initially, and then led to the model’s position–the geometry of the image facilitates this. Before moving on, I straightened the image slightly using the Straighten tool so that the vertical lines of the building were undeviating.

Implementing a Compound Mask

Accentuating the colours in the scene could be performed in a number of ways: I could simply use either the HSL adjustment and work on individual tones, or I could use the global Vibrance and Saturation alteration and combine the two with Levels or Curves to dial in and add contrast. This, however, would be a tedious and lengthy process in which I’d find the aforementioned modifications (for colour) often overlap, so I wouldn’t be able to regulate the tones to the level of precision I’d like. Enter Compound Masks, which I will use within a group and precisely direct to target colours based on the channels’ information for Red, Green and Blue–exactly what I need for this photo. Let’s have a look at how this is done.

First, as a rule of thumb for all of my edits, I duplicate the Background layer, as this provides me with a safety net to land on should any errors occur. I need to make sure I’m working on the new duplicate layer, so from the Layers panel, I select it. Then, on the Channels panel, I right-click each colour channel in turn (Background Red, Background Green, Background Blue) and create a spare channel for each. It’s important to stay organised, so I rename the spare channels accordingly.

Creating spare channels for targeted adjustments

In the next step, I create a group with a Compound Mask layer inside it–this is where my adjustments as well as compound masks will reside. Creating a group with its child compound will keep things organised as well. To create a group, use the keyboard shortcut cmd+G on Mac or ctrl+G on Windows. Next, to create a Compound Mask layer, select Layer>New Compound Mask Layer from the top menu. You can also find the same option when clicking on the Mask icon in the Layers panel whilst holding the key (Mac)/alt (Win). Before we target individual colour tones with an adjustment, we need to load the previously created tonal areas and mask them. To do so, I follow these steps:

  1. In the Layers panel, I ensure I’ve got the duplicated Background layer selected.
  2. I then switch to the Channels panel and click on Spare Red (previously created channel), then right-click and select Load to Pixel Selection.
  3. Back on the Layers panel, I create a mask and drag its layer onto the text of the Compound Mask layer in the group to child-layer it. At this stage, I rename the new mask to Reds.
  4. Next, I clear the selection by navigating to the top menu and choosing Select>Deselect.
  5. I then select the Background duplicate layer in the panel and repeat the above for the Green and Blue spare channels.

As you create masks within the Compound Mask, you will notice they come with icons directly to their left. These are the masks Operators–I’ll come back to them in a moment as I need to apply the first adjustment. To give the image the pop of colours on the wall, I’ll add the Vibrance adjustment and drag its layer to offer it to the Group’s text. I will also re-arrange the mask layers in the stack to go in the following order: Red, Blue, Green. This is because I wish to target the red tones first, exclude blues and affect greens. I’m not shy with the vibrance and saturation settings here, so I boost both to a generous 80%.

Next, I set the Compound Masks operators, which I use to control how the adjustment targets colours. I set the reds layer to have the Add operator as I definitely want to bring in vibrance and saturate these tones. I set the Subtract operator on the blue tones layer because I do not want these tones to be affected, and finally leave the base greens layer as it is–the base layer for the adjustment (which by default is affected by it).

The scene is starting to look the way I envisaged, but I feel that at this stage (although the colours do pop more) the photo needs more contrast. I will control this by adding the Curves adjustment layer and then shape it with a typical S-curve pattern.

Curves adjustment for adding contrast

I do like the overall effect, however, I notice that adding contrast also has affected the model’s skin, and it now appears too orange. Not a problem! Because in Affinity Photo 2, adjustments inherently come with their masks, so I can simply remove this unwanted effect from the areas affecting it by gently painting over the model’s face (on the Vibrance adjustment layer) with a brush set to black colour and at a low flow setting.

Other fixes

Before moving on with the final steps of the edit, I notice that the effect of inpainting (to remove the black roadblock in the foreground) isn’t perfect. This is due to the fact that the adjustments sitting above the Curves layer are blending through. I will fix this easily by making sure that the Curves adjustment layer sits on top of the group layer–I simply drag it there and note the effect.

There’s more to correct here, though. I can also see that the yellow pavement in the foreground has a repeating pattern that doesn’t look natural. To fix that, I create another layer on top of everything I’ve done so far by merging all the adjustments together. To do so, from the Layer menu, I select Merge Visible and rename this layer to Sharpening&Cloning. Next, I zoom into the area of the pavement and spend some time fixing the repeated pattern with the combination of the Clone Brush and the Inpainting Brush tools.

Left to right: before and after cloning and inpainting.

Sharpening and cropping

There are several ways an image can be sharpened in Affinity Photo 2, either with the use of a dedicated tool or a live filter. I choose the latter and, from the top menu, select Layer>New Live Filter Layer>Sharpen>Unsharp Mask. I settle on 7px for the Radius, a Factor of 0.5 and 1% Threshold. This makes the pixel edges sharper and results in a further colour-pop effect, which is something I wanted to achieve here.

Sharpening using a Live Unsharp Mask.

Finally, I decide on the crop for the scene and add a touch of grain. I feel that the top and left parts of the image, although providing some environmental context, are a bit too distracting, so I remove those.

Before (left) and after (right) applying edits

Not just on desktop

When on the go, I always pick up my project files on Affinity Photo 2 for iPad, where all my layers and adjustments (including Compound Masks) are present and ready to be processed further if needed.

Project file opened in Affinity Photo 2 for iPad (left) and the Layer options showing the Add operator (right).

With seamless integration of cloud storage, I’m not restricted to one platform, which is great because I often move from place to place and can still share my images with others.

Final edit cropped