One of the major tasks in some types of photo editing is to remove a background in Affinity Photo. You might need it to remove the background completely for a product photo or to add a different background for a composite, or do multiple-image composite in the form of matte painting. Magazine editors will also often need this technique in order to wrap text nicely around the cut-out image in an app like Affinity Publisher.
You might have already done background removal at some stage in life, or you are going to do it at some point. In this Affinity Photo tutorial on removing backgrounds, we look at tools one by one.
Our Tough Sample for Removing A Background in Affinity Photo
Yes, we chose a Scottish Highland bull, as our model. These long strands of fur/hair, and as we look closer at our sample image, we realize what a beautiful mess it is going to be trying to remove the background.
I have picked this image to demonstrate the background removal techniques in Affinity Photo because with a more complex case, I can show you multiple different techniques and show which are best for the task. If you can remove the background from this image, you can remove it from any image.
We are going to look at them further in detail, perhaps again and again. So the first lesson – background removal is about patience, and also about knowing the tools. One tool might not be enough to give you the result, so you may need more than one tool for the same purpose. This, at times, can be a time-saver.
AFFINITY PHOTO Workflow Video Course
Stop fumbling around in Affinity Photo Begin to use it like a PRO
The Pen Tool is Perfect for Removing the Background in Affinity Photo – for Some Images
There’s nothing better than the pen tool for point-perfect selections. It works wonders in many images with simple lines and edges. Though, as you will reach up to the hair of this furry model, you will realize the problem with the pen tool. The hairs are too thin, require too many curves, and it will be a constant mix of making a mask, and then removing parts of it, until you get the perfect mask.
Anyway, let us continue in our search for the perfect tool for using Affinity Photo to remove the background with the more difficult image of a furry animal.
Related articles: Check out our other Affinity Photo Tutorials
Specific Tone/Color Selection Tools
There are different selection tools based on tones and colors. The four of them are:
- Select by Color Range – where you can select reds, blues, and greens. Absolutely no control, but it is handy in some selections, especially while toning.
- Select by Tone – where you can select mid-tones, highlights, and shadows. Again, no control. But it has its uses too.
- Select by Alpha Range – when working with PNG and TIFF files, you may have transparent areas, opaque areas, and the ones between them. This selection caters to those.
- Select Sampled Color – where you get all the control. Let’s try clicking that.
There are four different modes and a tolerance slider. The RGB Mode lets you select colors based on sampling. The CIELAB Mode is about perceived colors and is a more natural and intuitive selection of colors.
Intensity Mode helps in selecting areas based on intensity. And the Alpha Mode is based on transparency.
As you may notice, the first two modes are basically the custom version of ‘Select by Color Range’, the third is a custom version of ‘Select by Tone’ (the pixel intensity in Affinity is measured by turning the image grey-scale), and the fourth is the custom version of ‘Select by Transparency’. Basically, it has all three modes, but with a custom sampling and tolerance tool.
Custom Sampling is when you click a random sample in an image. Like we have clicked the hair portion. When you click and drag, the selection gets expanded. And when you alt + click, it gets reduced.
The tolerance is to simply select how much or how less of the similar color/tone selection you require.
As you might notice, this isn’t the right way for selection in this image because of the different shades of hues in the hair. Furthermore, the background is merging with the subject in a few areas. However, if it was a simpler case, it would have worked like a charm.
Flood Select Tool (W) does a similar job to sampled color, albeit faster. Although it lacks the tolerance control, and in fact any control. It is simply click to select, ‘alt’ or ‘opt’ to remove from selection, and ‘ctrl’ or ‘cmd’ to add to selection.
Important Tip: Add to the selection step by step
You might have noticed by now that no selection works perfectly. It might appear, even after finishing everything, that no selection works on the whole.
Faster selections are often a result of knowledge of the best tool for the job. So if there’s a situation that can’t be dealt with using any other tool, an editor will move to the pen tool and finish it off rather than trying different easier solutions. And he will choose easier and quicker solutions for the selections that they work. In the end, it is about adding all the selections to make a whole, and it often makes the job easier.
The Magic Tool – Selection Brush Tool
I mentioned that there may not be any perfect tool for removing background in Affinity Photo, and yet I introduce you to the Selection Brush Tool (W) as the magic tool.
Firstly, it is a magic tool considering all it can do. Secondly, it has its drawbacks and shortcomings. More on that later. For now, time for some magic.
Selection by the Magic Tool is simply about clicking and dragging. So we will slowly click and drag from the edges towards the bottom right and then move upwards towards the face of the cow. Slowly, we will drag towards the hair.
The idea is to make a rough selection around the areas where we aren’t sure yet. It will not be a perfect selection, especially in areas like the hair.
Once we are okay with our selection, almost perfect at most places, while not being okay around the edges, we hit the magic button.
Refine, on top, is the magic button for selections. It gives us control that can help us achieve almost any selection. When we click Refine, the dialog box opens with an overlay mode, the selection being visible, while the non-selection being red.
The refine adjustment brush is currently in Matte mode, which gives control to Affinity Photo’s algorithm in selections. This is an ideal start for us.
Now we slowly start painting around the hair area, letting Affinity do its smart selections. As you might see, the selection is being re-recorded, and the edges being refined already. Let’s do this all over the edges of the beautiful hair.
The important tip is to try and start the brush from the areas you are sure to be selected, even if it gets repeated, and slowly hover around the edges. Also, take small selections. You may change brush size with [ and ] as the need arises. For delicate areas, small brush size is a great idea.
Now when you might think that this is so easy, and we are getting the result – we change the mode to something else. One between black and white matte will give you an idea about how sharp or accurate your selections seem to be, and also if there’s any mess around that needs cleaning up. It appears that the selection is accurate here, with a minor issue here and there. But let me go ahead and explain further points in this image anyway.
By choosing “Foreground” in the adjustment settings brush, we tell Affinity Photo that this is a part we want in our selection. The algorithm of Affinity will be at work, but it will take care to notice the larger portion.
So if your brush is not accurate most of the time, it might result in problems around the selections. Therefore, a smaller brush and smaller strokes work better. Next, we brush over some hair area which clearly seems lost, and red curves appear.
We try and paint over them with a very thin brush. It might be accurate, but it might also select extra portions. With the “Background” mode of the refine adjustment brush, we can remove the extra portions from across the image.
Now one final step towards better selection is to work zoomed in on the hair and check the missing link between hair. And just do a brush movement in Matte mode only. This step isn’t mostly needed, but in difficult selections, this can help. Very small strokes for areas where you see something missing.
Here, an important part worth discussing is that you can’t do a 100% perfect selection.
In such cases, choosing for complete selections and letting go of some selections that are frizzy is a good tip. Also, your selections need to appear complete. So if you don’t select a small strand of hair, don’t select it at all.
Don’t start the selection and then end it abruptly. The idea is to cheat smartly because we can’t be perfect.
When we finally hit apply and click on ‘mask’, we might still notice improper selections. We now have to paint over selections with a brush on the layer mask.
Select a white color, activate the layer mask, and begin to paint in the selection. It solidifies the selections, thus taking out those small unwanted parts by making them complete. The selection appears much fuller now after the brush. Now let’s try putting a background behind the selection.
Let’s see how to improve this selection further. Also, remember, you have to let go of certain areas in such selections that don’t look good, like on its right cheek (left in photo). You can get rid of this area by deleting it from the mask, and make sure the final selection looks natural.
However, if you are not satisfied with your result, there’s a way to improve the selection even further.
Let’s start from the start. Duplicate the image file in a new layer. And instead of using the Magic Tool directly, we would first work on the image to improve our chances of selection.
Here, I simply add a contrast adjustment layer and then use the same method as above. I’m working quickly over the hair area.
Now see only the hair area of the image, and how it compares with the previous version. Reason? It is because contrast somehow improves the image in focus, while the background, usually slightly blurred, gets further out of focus. This gives the software algorithm something more to work with.
After that, you can remove the contrast layers. The same method will work even in case of other adjustments like layers, curves, or saturation – anything that creates more separation and adds more contrast to the image, thereby making the selection for the software easier.
How? Simply change the mode to Selection Brush Tool after your selection is done. The ‘Refine’ button will appear. Now do all the adjustments you want to do, and it will work much like the same way. So you can do this image also by using the pen tool, roughly, and then hitting the refine tool.
The Pen tool is a great tool. The selection brush tool, however, is the ultimate tool. The ‘Refine’ tool in the Selection Brush Tool is how complex selections like hair are done in Affinity.
For most other selections, the pen tool is not up for the task. So, why not selection brush tool for everything?
As you can see with this example above, it can mess up big time, especially when similar hues and tones are there. For such images, the pen tool will give quick and accurate results, while adjusting the selection here may end up taking much more time without giving proper results.
What if the subject is mixed? As mentioned above, you can simply add up different selections, by selecting by parts, instead of full selection in one go. So easier areas with Selection Brush Tool, slightly difficult with Pen Tool, and the ones like we worked on with any selection followed by ‘Refine’ tool.
As I have demonstrated you can remove the background in Affinity Photo in even the most diffucult scenarios.
Not an Affinity Photo user yet? You can get Affinity Photo here.
Hey I’m Peter. I’m the owner and editor of Photography-RAW. I make sure that you get the best articles about photography. Personally, I prefer to shoot landscape, nature and macro photography.
I hope you enjoy the site 🙂