princatko Posted September 4, 2019 Share Posted September 4, 2019 Hi, I am little bit frustrated with masking the white background in affinity photo, so I came to ask for help here. I have an image(s) 18mpx with model (hips and above) and I am trying removing the white background (I have pure white background). I found the best way for the body shape to use the pen tool but it is way too slow (ok I have about 40 images I need to remove the background from). So I tried thinks like background removal, color range selection, flood tool with lots of settings... and everything resulted in lost of background bud the shape was saw like (not smooth at all). When I smoothed and shrinked the selection it helped a little but nothing close to the pen cut. And then - the Refine selection for head and hair. I do not mind that at the end it has some whitish semitransparent rims/area around hair ends, but fighting the semitransparent areas with foreground and background is nightmare - you edit one place with background and it add automatically something new to it behind the edge etc. (sure i can do some of it later with editing mask, but the edges with hair and hairs I do not want to do pixel by pixel). I can fix the hair itself by darkening it, using Clone ets. but the areas of the glow will be there and also look unnatural (I can cut some of it with masking for sure). I am adding several image to see what I mean - 100% crops: 1 - original, 2 - saw like cut, 3 and 4 - background taken, smooth, shrinked, 5 - semitransparent within refine selection, 6 - results of refine selection. Probably I do everything wrong, but I have not found any tutorial that works this way (or better say - showing, how to fix it). So please, do you have any help to poor myself? Currenty I have some reasonable result within 40-60 minutes per image, so if there could be something that speeds the process Any helpful help is payed saves me to get old too soon. Regards Jiri Quote Link to comment Share on other sites More sharing options...
Chul Posted September 4, 2019 Share Posted September 4, 2019 You're not alone! I've tried & tried to get good sharp & yet smooth cut edges with the other selection tools to no avail. I don't know how many times I watched the selection tutorials. I finally decided the pen tool is the way to go in order to achieve the edges I want. That being said though, I do use the selection brush tool some and then finish it up with the pen tool. I was just really pleased to discover how well the pen tool worked, saves me hours of work! Hopefully someone can help you out! Quote Link to comment Share on other sites More sharing options...
Wosven Posted September 4, 2019 Share Posted September 4, 2019 Without the image, it's difficult to find a solution. If you need to do this with 40 images, perhaps an easy solution would be to use 1 layer with the image with "erase white paper" at the bottom, and another of this image with enough feather in the selection that those white borders disappear. Quote Link to comment Share on other sites More sharing options...
princatko Posted September 5, 2019 Author Share Posted September 5, 2019 Hi, 2 start point images are here: https://www.icloud.com/iclouddrive/0tazN43yzoWUc1g5GTU8ly5rQ#_PP_1233 https://www.icloud.com/iclouddrive/0dg_Zqal5dSmoOHXKTziEH85A#_PP_1254 Go from this to white background, I do quick selection and then enhance whites on the background (little loss of hair but thats fine). Jiri Quote Link to comment Share on other sites More sharing options...
Wosven Posted September 5, 2019 Share Posted September 5, 2019 4 and 6 minutes. I'll post later the AP files, not time for upload huge files, I need to go to work photos.zip Details : Most of the time is spend using the selection brush in a smaller size than needed, perhaps, and processing the reffine selection on my not too performant PC. 1. Dupplicate layer. 2. Apply erase white paper on the bottom layer. 3. Selection brush on the top layer, reffine selection to selection. Shrink selection -1. Add a mask. Quote Link to comment Share on other sites More sharing options...
HVDB Photography Posted September 5, 2019 Share Posted September 5, 2019 Using channels could be an option ... using Channels.mp4 Alfred 1 Quote Affinity Photo 2.3.1 Laptop MSI Prestige PS42 Windows 11 Home 23H2 (Build 22631.3007) - Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz 2.00 GHz - RAM 16,0 GB Link to comment Share on other sites More sharing options...
princatko Posted September 5, 2019 Author Share Posted September 5, 2019 Hi HVDB Photography! Thanks! For this type images (dark dress) its very nice, smooth and quick. I would add to your process (for case someone is reading it): This process leaves a white rim around the body so it can be easily fixed: separate the head, and shrink the selection/mask of rest with -1% (if you apply it to whole, you will loose some hair). For the second image it cannot be applied (white jersey). However much lifetime saved with this on similar images. Big Thanks! Jiri Quote Link to comment Share on other sites More sharing options...
princatko Posted September 5, 2019 Author Share Posted September 5, 2019 Hi Wosven! I tried your steps. However once I open the Refine selection dialog (and after its first analyses) the "glow" around lots of area on the body appears - did you remove them in the mask manually? Without Refine the edge wont be smooth (tried that). So looking forward to your files/words... the result look promising and time as well Jiri Quote Link to comment Share on other sites More sharing options...
Wosven Posted September 5, 2019 Share Posted September 5, 2019 (edited) Here the file: (second upload) _PP_1254.afphoto Edited September 7, 2019 by Wosven Upload anew Quote Link to comment Share on other sites More sharing options...
Wosven Posted September 5, 2019 Share Posted September 5, 2019 And the parameters for hairs that need more precision on the second one: _PP_1233v2.afphoto Quote Link to comment Share on other sites More sharing options...
Wosven Posted September 5, 2019 Share Posted September 5, 2019 @princatko Hi, Here the files, I mainly adjusted the one on white background for the hairs, and completely forget to check the masks —as can be seen with rhis screenshot! — but the selections weren't bleeding like yours. Try to modify some parameters in the reffine panel. We don't need a perfect selection, the outside is covered with the layer without "white paper", this one is only to have the inside on white background easily. If there's a little bit transparency on some hairs, it should feel more natural on another colour, since usually this colour appears in the hairs. Speed = errors The channels can be effective, especially when working in CMYK, when needing to select the sky: using the yellow channel help a lot. It's not helpfull with hairs or faces that contains a lot of subtle colours, unless you need to correct a bad picture with red faces! I use less this technique in AP since I don't find it as easy than with another app.a Quote Link to comment Share on other sites More sharing options...
princatko Posted September 5, 2019 Author Share Posted September 5, 2019 Hi Wosven! The files cannot be opened - they both ends with an error: " The file appears to be truncated (shorter than expected)." But as you wrote, the messing with Ramp parameter helped with the "glow". But I have quite a lot semitransparent spots around the inner edge, so I would love to see the files and what you have done (and I missed) - and I still do not have similar or same questions. Do you think that this could work also on some long and messy hair (same picture set I mean)? (not everyone has such clean one) Jiri Quote Link to comment Share on other sites More sharing options...
princatko Posted September 5, 2019 Author Share Posted September 5, 2019 And this is what I mean by inner semitransparent areas. Jiri Quote Link to comment Share on other sites More sharing options...
firstdefence Posted September 6, 2019 Share Posted September 6, 2019 Unchecking "Matte edges" gives a cleaner edge on the body section. Quote iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9 (Please refrain from licking the screen while using this forum) Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions Link to comment Share on other sites More sharing options...
princatko Posted September 6, 2019 Author Share Posted September 6, 2019 Hi firstdefence! Turning off Matte edges makes the edge "saw like" and thats a thing I would like to solve here (or one of things). I give it a several try - add new layer, shrink it, smooth it. Everything resulted in a need to go around whole body and still fix the semi transparent area (now is smaller) + fix some white area after smoothing (if applied). It is quick way to remove some of the semitransparent areas but it is not quick(er) solution. But worth to mention it, it can save some time for sure. Jiri Quote Link to comment Share on other sites More sharing options...
carl123 Posted September 6, 2019 Share Posted September 6, 2019 On 9/4/2019 at 6:06 PM, princatko said: Currenty I have some reasonable result within 40-60 minutes per image, so if there could be something that speeds the process Have you tried running one of your images through the paid version of https://www.remove.bg It will cost you £1.79 to find out how well it works (for a one-off image) but if it does as good as a job as Affinity it may be worth signing up for one of their much cheaper subscription plans. Quote To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time. Link to comment Share on other sites More sharing options...
princatko Posted September 6, 2019 Author Share Posted September 6, 2019 Hi! And sure, probably some will expect this question - once I have the body part done, then comes the hair. The simple one as in previous examples are simple (to fix if necessary). But what about more complex hair? Messing with Refine tool (Border 0 - 10%, Ramp 0 to -30%) I got this as a best result. It really works on light backgrounds but more darker more disgusting it get (and sure it looks nice on transparent background as in any tutorial). If you would like to play with it, the original file is here - https://www.icloud.com/iclouddrive/0JxVwmzKOeCP1pKu7pcaCg0nA#_PP_1476 Please, any ideas in this final step? Jiri Quote Link to comment Share on other sites More sharing options...
princatko Posted September 6, 2019 Author Share Posted September 6, 2019 Hi carl123! Thanks to pointing this out. I tried it with this last image. The result is quick but worthless - there are even same issues I/we are trying to solve here (look at edge all over the body). The result is much worst but much faster. It would be super if it works perfectly I would immediately sign in. Jiri Quote Link to comment Share on other sites More sharing options...
Wosven Posted September 7, 2019 Share Posted September 7, 2019 @princatko I was able to re-upload _PP_1254 but not the other one, each time it show the real size of the file after upload, but if I try to edit the post, the size is wrong Quote Link to comment Share on other sites More sharing options...
RNKLN Posted September 7, 2019 Share Posted September 7, 2019 On 9/6/2019 at 12:57 AM, princatko said: And this is what I mean by inner semitransparent areas. Jiri You can paint these semitransparent inner areas away when you use the paint brush on the mask itself. You can 'paint in' with white and 'paint out' with black. It may be a little bit of work but my experience is that you'll get nice, sharp if necessary, results. Quote Affinity Photo - Affinity Designer - Affinity Publisher | macOS Sonoma (14.2) on 16GB MBP14 2021 with 2.4 versions Link to comment Share on other sites More sharing options...
HVDB Photography Posted September 7, 2019 Share Posted September 7, 2019 Here"s an almost perfect cut out ... Wosven 1 Quote Affinity Photo 2.3.1 Laptop MSI Prestige PS42 Windows 11 Home 23H2 (Build 22631.3007) - Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz 2.00 GHz - RAM 16,0 GB Link to comment Share on other sites More sharing options...
princatko Posted September 8, 2019 Author Share Posted September 8, 2019 Hi! @HVDB Photography Does it work on a black color? Mine hair cut :) works great on light colors too, but not so nice on dark ones. @RNKLN Thanks for your input. Sure hand masking is an option for that (but in this case it would be almost same time as masking it with paint brush on the beginning ;) Quote Link to comment Share on other sites More sharing options...
princatko Posted September 8, 2019 Author Share Posted September 8, 2019 Hi @Wosven! I check the file, and I have a question - have you touch the mask after the Refine edge? Because I was not able to get similar result like yours. But I found one way how to get better than good result with your idea: I just take head and body separately. So then when refining the body edge, I can be quite aggressive with smoothing - I went up to 10px, and then I fixed just few curved areas - fixing itself is like 3-4minutes, and the result is I would say almost perfect. The Erase white paper give the space for quick solving (does not need to be super precise). Also if this is kept for head then with some few edits it help to remove the semitransparent ears (etc.) and so the focus can be just on hair. So after all this image is then really like 8-10 minutes, and that's gigasuper Thank you a lot! And if I may, do you have any thought about that more complex hair? Jiri Wosven 1 Quote Link to comment Share on other sites More sharing options...
Wosven Posted September 9, 2019 Share Posted September 9, 2019 8 hours ago, princatko said: have you touch the mask after the Refine edge? No, I didn't, that's why there some errors, like the "Y" and the ">", and some part on the arms. This isn't enough for complexe hair… that's always a pain to do. With those, perhaps doing a selection from the channel, and using this selection and a black brush on the mask can help. But if the hair and the background a in similar tones, it's nearly impossible to do. At least for me Quote Link to comment Share on other sites More sharing options...
princatko Posted September 9, 2019 Author Share Posted September 9, 2019 @Wosven Ok, thanks! Yeah, I am compering several methods to have some not so bad results. How nice is to have bold men :), right? Now, I have suitable and I would say quick enough result of cutting out the body from white background. Hair is another issue but that was not my original request, and we can leave it for long winter nights (or someone else to go through). Now, I am not so disappointed anymore, so for that ... Thanks you all for helping me getting better! SOLUTION For someone who just read the title and skipped here for solution. It goes like this: 1. base layer - applied Erase white paper filter 2. second layer (the body selection) quick selection with Refine edge - play with the Border, Smooth and Ramp settings (e.g. in this case Border 2%, Smooth 10px, Ramp -22%), touch hair with the Refine brush. After applying Refine edge, clear the background pieces brought back by smoothing. 3. next layers are for hair (you want find the solution for complex hair here) This should take you about 10 minutes to have nice cut of body (and in some cases of head too) on this I would say middle size images with these simple portraits. Jiri Wosven 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.