Sunday, January 27, 2013

How to Colour key or make a matte in Photoshop

Hello people with nothing better to do than read the nonsense i write. First let me say I'm sorry. it's bad enough being so bored as to write it, let alone be the reader so GO seize the day or something... well if you are still here then you might as well learn something. so here goes...

one of the mistakes most newbies to photoshop make is when separating objects from a background, they grab the eraser and start going to town or maybe the magic wand or quick mask. and the result is it takes waaayy too long and usually looks like garbage. No worries EVERYONE did the same thing. up to and including John Knoll the Genius who invented the program.

So here's how to do it quickly and efficiently, based on an age old vfx secret the Colour (I spell it that way cause i'm Canadian, stupid spell check...) key.

so to start I grabbed a random image off google of a tree against sky. these techniques apply to any FG BG separation but since a tree is the most complex and impossible to paint out by hand or magic wand, i will use it for my example.

here's my image.


First you want to go to the channels tab in your layers pallete. Then click on each and decide which has the best contrast between what you want separated and the BG.



obviously it's the blue one in this case cause we want to remove the sky. so right click on it and duplicate it.


next click on your copy and make sure it's the only one visible. this is where we are going to make a Black and white Matte\alpha channel to do the work for us. so use a Curves adjustment or levels (image-adjust-)
and bring the white and blacks in to up the contrast. REMEMBER all we are worried about is the edges against the sky, we can fix the rest later. so try and get the sky white and the leaves black. but dont go so far that you are losing detail. when you play with it you will know the line...


at this point I sometimes repeat the last step to get closer to black and white. Again pay close attention to those leaves and don't go too far, you will see the edges getting nasty if you push the Blacks too far. its okay to leave them a little gray if you have to.


now i go in with  the lasso tool and fill in Large areas and  grab the Burn tool set to shadows to darken down the edges and details in the trunk. when set to shadows the burn tool wont affect the white so its pretty easy to get all the little spots.


Now you can CTRL Click the channel you just made, that will select everything white. CTRL-SHIFT-I will invert your selection to the tree instead of the BG. Click the RGB channel again to return to normal and go back to your layers.


Now you can copy it, in this case I just copied to a new layer.


usually ill hit it with a Layer-Matting-Defringe to fix the edges a little more. Et Voila way easier than trying to erase between leaves. just make sure that whatever BG your putting it on  is similar in value to the object if its too dark your edges will be to bright and it will look terrible. at that point you colour correct both the BG and FG elements seperately to get them close too each other, and then Colour correct them together to get it where you want it.

Learn this trick and it will help immensely there is a million uses.

Good Luck, PhotoChoppers!

Nick

No comments: