Gimp Tutorial – advanced photo separation
Category: Tutorials
One of the most common tasks I do with Gimp is to seperate a part of the photograph, so I can use it in my Flash projects later. At first I had problems when it came to a objects with hairs – fortunately I’ve learnt quite easy way how to do it. So – here it is.
We’ll use this nice photo to demostrate it.

The whole object (I mean the girl and the horse) is pretty easy to cut out with pen or similar tool – but the horses’ tail might be a little tricky.
Let’s start from duplicating the first layer.

Then we choose Desaturate option from menu Color, so duplicated layer becomes black&white.

Than we change Brightness and Contrast levels.

We go back to the orginal layer and choose Add Layer Mask option from right-click menu. We copy the black&white layer to the layer mask.


Effect is totally opposite to what we really wanted to do;)

So we choose Invert option from menu Color.

We make another copy of the orginal layer.
Now we can cut out most of the object “the normal way”, and in problematic places (like the tail) – we can simply delete it with eraser. Those places are already seperated by the mask – and we see it from the layer beneath.

There’s some grass visible on the bottom – we change this part of mask layer to solid black.
Final effect:
(I had to add some dust to the legs – there was grass still visible. Of course we would be able to do it more nicely, but I’ll leave it for the next tutorial)


If you would like to examine how it’s made a little closer – you can download the .xcf file here.
Update
Many people have a little problem with this tutorial – and I think I need to clarify it a little.
After copying and pasting the black and white layer, when you have:

You need to anchor the pasted layer in the mask – by clicking small anchor icon in the bottom of the layer dialog box.
And when I said “Effect is totally opposite to what we really wanted to do;)” – I ment that we should invert the colors (it’s written under the picture, but again I think that this was not so obvious).
Thank you for the comments – I’ll try to be more specific next time:)
Nice technique! Very professional..
What about the new background? Did you design it? If yes, by which program and if you can make a tutorial. If no, where did you get it from?
But there some steps which are missing.. like when you said “We copy the black&white layer to the layer mask” how?
and then you said “Effect is totally opposite to what we really wanted to do;)” how can we achive the effect you talked about and which appears in the picture after that sentence?
Please calrify more.. thank you!
@RedBirdiii – thanks for the comments. I’ll try to answer some of your questions.
a) How to copy&paste a layer to mask
– you select black&white layer
– ctrl+a (select all), ctrl+c (copy)
– than you select mask layer and press ctrl+v (paste)
You paste selected layer to Floating Selection (check screenshot in this tutorial). You just need to link it to current layer by pressing the anchor icon.
b) About the background – it’s made from elements bought at shutterstock.com
c) How do we achive the effect I’m talking about – it’s actually described in the next step – “So we choose Invert option from menu Color.” (look at the screens).
If you’ll have any more questions – you’re most welcome.
Cheers
Thanks. This is exactly the technique that I need. I was using Paint tool with the Fuzzy brush before.
But now, I can cut out sharp hairs from my photos
Thanks again. Good job.
looks amazing and im doing it step by step on my ubuntu, thx so much for it, been seeking it for a long time
i appreciate this tutorial! thanks. but thing is i can’t seem to do one of the steps quite right. After we copy the black and white layer to the layer mask and we get the Floating Selection, what do we do after that? I dont get the same results as shown in the screenshot.
Thank you for your post. I’m getting stuck at the same spot. Once i’ve pasted the black and white layer to the layer mask, it still just looks the same. I then tried anchoring the layer and inverting the colors but it looks different to your pictures. Please please help me as this is the most practical way i’ve found to do this.
Thank you so much
I didn’t get the rest after you said “now we can cut the rest, etc…” I tried erasing from the tail but I didn’t know what layer to select. I tried all combinations and didn’t get what you did… I also didn’t get the grass part. Help…?
The hair in my picture is light, so when I erase it, it disappears.
http://i71.photobucket.com/albums/i137/mayjan239/0bellaandedward.png
@nhu – I updated the post – it should be a bit more clear now
@mara – could you send me your picture (the best would be as xcf file). I’ll try to help
@Victor – I think it’s a little more clear now – let me know if you’ll still have problems
@May – Well, it’s not working (well) for light hair. As soon as I’ll figure out a way to seperate blonde hair easily – I’ll put that on the blog in no time
still stuck where RedBirdiii is.
[QUOTE] But there some steps which are missing.
“Effect is totally opposite to what we really wanted to do;)” how can we achive the effect you talked about and which appears in the picture after that sentence?[/QUOTE]
When did you lock alpha channel?
Visibility was disabled somewhere.
Neat effect if I could figure it out.
@toad – I’ve made a videotutorial for this method – I guess it’ll be easier for you to understand the whole process. You can check it at http://blackmoondev.com/gimp-videotutorial/
I can get to the part were you paste on the black and white picture and anchor it but I don’t get grids on my picture..
What did I do wrong? or is it right and I just need to continue?
Please Post back ASAP =)
@Spagett – please check the video in the link above – it shows the whole process quite nicely. Cheers.
I’m so confused! Even with the video tutorial TT^TT i still dont understand what to do after you adjust the brightness contrast. And i dont get how to get the checkerboard background on. help??
Hi.Thanks for great tutorial but I have 2 problems…
1-I done invert things..(the body was gone and hairs there)But I can’t made “Now we can cut out most of the object “the normal way”, and in problematic places (like the tail) – we can simply delete it with eraser. Those places are already seperated by the mask – and we see it from the layer beneath.” part… is “the normal way” paths tool way ? if its..do I select hair or tail..or I just erase those ?
2- “There’s some grass visible on the bottom – we change this part of mask layer to solid black.” I can’t get it…
Thanks for your help.Realy nice works
Hi TEZ. So – here we go:
1. “Normal way” is the way you like the most. That would be paths made with pen by me – but anything (eraser, lasso tool) will do.
2. You can simply change this part of mask to black – and cut-out the legs with “normal way” since there’s nothing complex (no hair).
The general idea is to have the image made with two layers – one masked (that will seperate hair) and second one cut-out in other way – where you can have smooth lines (I preffer paths, but as I said – anything will do here).
Thank you.I will try again as soon as possible.
Good Tutorial, but a bit difficult to understand. could have been more clear in explaining
when i try to anchor the pasted layer into the layer mask, it doesn’t anchor there, it always anchors into my desaturated layer
This is really good work but I can`t seem to get the same results. I`ve wached the video and I have read the written explanation of the photo (girl on the horse) but I can`t seem to follow your directions. Maybe it would have been better if you had used the same example on both video and written explanation. I am having problems almost from the very beginning as I find the explanation of what to do in what layer a little ambiguous. Wish you can help me as this is exactly what I need. Thanks.
You have to paste the copied b/w layer on top of the layer with the mask. So, reverse the layer order as depicted in the update section before pasting.
Hi! Nice tutorial, the problem is that it doesnt always work :/. I didn’t use the same picture as you, but my character got half of his body in transparency >.<. May be it was because of some glow effect?
this is probably an old tutorial and no one will respond to this… but im having trouble following the directions, as they were much different that that of the video… Such as in the beginning of the video there was something major going on with the lighting, as reverse… that was nowhere in the tutorial that stated that… Just saying this… thank you
Hi machatesgimp – actually, I would love to help you – the problem is I don’t know what’s causing the difficulty for you. Could you tell me which point is unclear? Cheers
Sorry about that….
1) May I asked how you had kept the brush still while cloning? It was a problem when I was painting black because there was so much to have to paint over.
2) Near the end: somehow the background layer (which had changed color and I do not know how) had lined up with the other layer and that confused me.
3) When I cut near the end, instead of the background layer coming up, it was all white.
Others have come up, but I am assuming that I will answer them myself.
Thank you
I’m having a bit of a problem, starting about when you say ‘effect is totally opposite to what we really wanted to do’. The picture shown beneath that is different from what mine looks like at the time. I think I have followed every step careful until then. Is there any steps that I might be missing?
Thank you for making this tutorial!
@machatesgimp
Actually – I’m working on the new version for this tutorial. I hope it’ll be easier to understand and anwser your questions.
Great tutorial, makes me wonder why I didn`t think about it myself
I have only small suggestion which can in some cases save a bit of work. When converting to BW I prefer to use Channel Mixer (Colors->Components->Channel Mixer) instead of Desaturation. By choosing Monochrome option and fooling around with the sliders it is quite easy to get good contrast at the places where u need it. But as I said at the beginning, great tutorial.
Wonderful solution and I really like this, because it doesnt need so much steps. But please forgive me, even with the additional info I can’t work it out, Perhaps because Ive not enough experience with Gimp. I tried the video, but its blurry and different from what is written here.
If you have time pls make a real step by step instruction that would be very nice, showing all the steps and choosen options. For example “add a layer mask”, what kind of mask when there are 7 options to choose from; and how to select the layer mask, when you want to copy the black and white to it? How to get the new background in and how to save?
Go on with the good work!
I have been trying to work this out for several hours, determined. But no luck. I’ve been working with the video – the one with the woman. I don’t see how you get the black and white on the first layer. I don’t know what to do with the cloned layer. I wasn’t getting a floating layer. etc. I can usually chew my way through other tutorials, but this one has me all choked up. I’ll be looking forward to your revised tut, because the process is intriguing.
Thanks for all your effort.
Pingback: Best 35+ GIMP Tutorials | X Design Blog
I am lost too…..I even get the half transparent image. I have watched the video over and over….
OK I am starting to get it….I guess it doesn’t work to well for skin…..How would i do this and just get the hair part…..say i wanted to mask the hair and then colorize it? as you explain in http://blackmoondev.com/fantasy-illustration-in-gimp-tutorial/
Pingback: links for 2009-09-27 » 4exp.net
Pingback: Best 35+ GIMP Tutorials | Qbrushes Blog
Pingback: 30 tutoriales para diseñadores usando GIMP - Tecnologia.in
Alright, so I guess you could say I’m getting the hang of this, but here’s my issue. The part where your sky completely disappears, the background of my photo is still noticeable! I mean, it’s basically transparent now. How do i fix this?
This tutorial is featured on 70 creative Gimp tutorials
I still don’t understand what you mean when you are erasing the tail.. When you duplicate the layer//
It’s confusing me.
muitooo bom!!!
eu precisava muito disso
e não encontrava.
tanks
bye,
gpr.
The download link doesn’t work
Very usefull, but what to do when you dont have a nice single colour behind the hair but a busy background??
@Marloes – it won’t work then:) I’m planning to do some tutorial with a method for that.
I agree with Marloes… It’s easy enough when the background is a blue sky. The real challenge is to extract a busy background from hair. I have the perfect example. Just email me, and I’ll send it to you…
Pingback: Gimp tutorials « Emmanuel Lusenji's Blog
This looks like what I need, but I just can’t follow your instructions. You lost me when you began adding a layer mask. I tried the link with detailed instructions, but it doesn’t work.
Nice. Thanks for enabling the download of the .xcf as well!
The reason this is so hard to follow for just about everyone is that most advanced Gimp users assume everyone is able to follow their instructions, so they feel it is OK to omit important steps with screenshots and clear menu selections for those of us that DON’T have an advanced level of knowledge. The principle for this tutorial is fine, but as usual it caters to people who already know a great del about the software, and not to average users who are looking to you for advice and wanting to learn.
http://i56.tinypic.com/rk96kp.jpg added a transparent layer on the bottom to make it possible to combine the mask on a transparent layer.
I figured that after the closure of the visibility of that layer of black and white.
Supporting the white layer must be removed after erasing a rubber band between the background with the rest of the hair.
http://i52.tinypic.com/5pep1k.jpg Select the layer with a horse and it erases eraser.
Here, there is little to erase, because before pasting into the mask, black and white film I corrected the Colors -> Brightness and Contrast, shifted slightly to the right the two sliders.
Such a deepening of color can also be obtained from the Colors -> Levels, moving the slider to the right a bit to the left.
http://i55.tinypic.com/nda2b7.jpg On a white background looks all right, but when the bottom layer is filled with a different background, the background will also be on the saddle and face. So you need to shut the horse layer to fill in areas such as dorysować thin brush.
Face the best domalować cloning tool, or a mask.
I would add, after that when combined with the background mask layer and the transparent layer, the layer black – white should be removed.