One of the most popular posts on my blog is my Gimp Layer Mask tutorial. I feel like that post doesn’t fully explain everything you need to know about layer masks, so I’m going to try to break it down here, and hopefully by the end of this post, you will be a layer mask master.
What is a layer mask?
A layer mask is pretty much exactly what it sounds like. It puts a mask over a layer of your gimp image and you manipulate it to hide parts of the layer while showing other parts. When you apply a layer mask to an image, the mask itself deals with only black and white, and shades of gray in between. White areas of the mask make those corresponding areas of the layer opaque, and black areas of the mask make the corresponding areas of the layer transparent. Shades of gray make the layer partially transparent. The darker the shade of gray, the more transparent that part of the layer becomes, and the more of the layer below it shows through. Let’s look at an example:
In Gimp, open two photos by choosing “Open As Layers” from the File menu. As you can see on the right in the layers palette, each photo is on a separate layer.
Next, right-click on the top layer and Add Layer Mask. A window pops up that says “Initialize Layer Mask to.” Choose White (full opacity).
A white rectangle appears next to the thumbnail image in the layers palette:
It’s hard to tell, but this white rectangle also has a white border. The white border means that anything you do right now will be applied to the layer mask, and not to the layer itself. Try clicking on the thumbnail of the image on that layer and you’ll see the white border move over the thumbnail. Now any changes you make will be applied directly to that layer instead of the layer mask. Now there are lots of ways you can manipulate the layer mask. you can draw on it with the paintbrush, type over it with the text tool, make a gradient over it, etc. Any black that you add to the layer mask now will make that area of the layer transparent, and you’ll be able to see the layer below it in those areas. I guess I should make it clear that when you make changes here, you’ll be doing it in the main image area, not on the thumbnail of the layer mask. I think you already knew that, but I wanted to make sure. Let’s try drawing with a large, hard-edge brush and see what happens.
Where I drew on the image with black, it masked the area, allowing the layer below to show through. I might sound repetitive, but this is the main point of this post, and if you understand it, then you can do just about anything with a layer mask. In the layers palette, the thumbnail of the layer mask now has a black streak across it where I drew on the image. Now let’s look at how shades of gray affect the layer mask.
Here I made a gradient on the right side of the image, with white on the left end and black on the right end of the gradient. You can see this in the layers palette. In the image, the layer fades out from left to right, corresponding to the gradient from white to black. One more thing, I made a circle in the lower left part of the image with a soft-edge brush, so the mask fades at the edges of the circle.
That is really all you need to know to get started with layer masks. I hope this helps. If you have any questions, feel free to drop me a line on the contact page.