Saturday, June 14, 2008

I used to have this up, but they decided it was gameplay footage and not a music video. Kinda sucks. I hope to find a place to post it again, but it is big and YouTube says it is a copyright violation. Funny...seems like I have seen maybe one or two other violations on YouTube...hmmmmm.

(See September 10th post...it is back!)

Monday, June 2, 2008

Good Masking Tutorial

Tutorial: Perfect masking using a highpass

Written by devvv (05 Sep 2007 08:00 AM)

There are several methods to extract/mask objects or persons from the background. But sometimes you need perfect masking that includes for example the hair of a woman. The method i use for this is called highpass. We need to simulate this filter because there is no filter in GIMP that does this for us. The point of the techqnique is that you'll save lots of time for the difficult hair part, because when you do everything right the hair is extracted automatically.

  1. Open any picture that contains a big shot of a person / celebrity / whatever. I use a picture of a well known celebrity.
    screenshot of step 1
    click to enlarge
  2. Duplicate the background layer 2 times, you should that layer 3 times then. On the top layer use Filter / Gaussian Blur: 18px. Set the layer to 50% transparency in the layers dialog.

    Then go to Colors / Invert. You should have something similar to my picture now.
    screenshot of step 2
    click to enlarge
  3. Click the right mousebutton on the layer in the layers dialog and choose "Merge down".

    Colors / Desaturate (average). The go to Colors / Curves and apply a soft S-curve as seen on the image below.
    screenshot of step 3
    click to enlarge
  4. Then choose Brightness & Contrast from the same menu. This step can vary when you use a diferent picture. We're aiming to get a good clearly vivisble contrast. Its important thyt you get nice contrast in the hairs area.

    We're now done with the highpass filtering.
    screenshot of step 4
    click to enlarge
  5. Go to Colors / Invert.
    screenshot of step 5
    click to enlarge
  6. Now you need to take a brush and paint the body of the person / object with white. To make it easier to correct mistakes you should create an empty layer above the highpass-layer and paint on this layer, when done merge the layer down. You can move the background-layer above all layers and set the transparency to 20% or so to see what parts you have to paint.

    IMPORTANT
    You don't have to paint the hair! Thats the point of this technique / tutorial. The hair should be already white, and everything behind the hair should be dark gray or black so you dont have to use time to get the hair extracted.
    screenshot of step 6
    click to enlarge
  7. When you have the person white you have to paint the background black. Start at the borders of the body. You can do this fast when you first use a smaller black brush to paint around the person (where the gradient from black to white is visible), and then using a very big brush to fill the rest of the background with black.

    If you use a sperate layer dont forget to merge it down at the end.
    screenshot of step 7
    click to enlarge
  8. At the end you should have an image containg almost only black an white. We use this as a layer mask now.

    Press CTRL+A (Selection / All), copy this using CTRL+C (Edit / Copy). Activate the background where the person is. Click right in the layers dialog, choose Add Alpha channel.

    Click right again and add a layer mask. Press CTRL+V (Edit / Paste) then and use the anchor-button in the layers dialog to get the copy onto the layer mask. You should the see the result immideatly. Make a white new layer behind all, then you can see the results even better!

    Good luck and have fun!
    screenshot of step 8
    click to enlarge
Creative Commons Attribution-NonCommercial 2.0 Austria
This work is licensed under the following license: Creative Commons Attribution-NonCommercial 2.0 Austria.