OK, so this isn’t exactly a how-to on blogging, computers, or anything else I would normally cover, but it does cover something that could be helpful in your blog.
After reading many examples and explanations of layers and masks, they all struck me as confusing. Now, if you have read my blog before, you’ll probably know I do a lot of things while tired. I was reading tired too. But even when I haven’t been tired, for some reason it always goes over my head.
I’ve been looking for a VERY basic explanation, in simple terms. Perhaps I haven’t looked hard enough, but I hadn’t really found one. That is, until I found an article on recreating depth of field via Photoshop.
Suddenly, layers and masks sounded SO SIMPLE and super easy. But, since it referred to Photoshop, I couldn’t do it. However, the idea is mostly the same so I’m going to give you a run down in GIMP instead (technically, the instructions are pretty much the same for either).
These instructions assume a very basic knowledge of GIMP (or Photoshop) functions.
1. Open a picture in GIMP or Photoshop. For this example, we’ll use an easy pumpkin patch photo. You can download and use the same photo by clicking here. (Right-click the link, choose “Save Link As…” in Firefox or “Save Target As…” in Internet Explorer and make sure you know which folder you save it to.)
2. Make sure that you have the Layers dialog open. If not, go to Windows > Dockable Dialogs > Layers.
3. Right-click your base image (titled “Background”) in the Layers dialog and click “Duplicate Layer”.
4. You should now have two layers, “Background Copy” and then “Background”.
5. Double-click the “Background Copy” text and rename it to “Black and White”. This isn’t necessary, but it’ll make it easier to distinguish between the two.
5. Click on the “Black and White” layer to select it.
6. Click on the “Color” menu at the top and choose “Desaturate”.
7. Click “OK”.
8. Right-click the “Black and White” layer and choose “Add Layer Mask…”
9. Choose “White (full opacity)” and click “Add”. Notice a little white box show up next to the “Black and White” layer. This is your mask.
10. Now we’re going to use the paintbrush tool on the “Black and White” layer. Make sure you’re painting in black. Paint over the foremost pumpkin. As you paint on it, you should see orange show through. In the Layers dialog, you should see black show up on the little white mask image.
11. Finish coloring in the pumpkin using whatever brush makes it easiest on you. You may want to increase the brush size for the main part of the pumpkin then use a smaller brush for the edges.
12. If you make a mistake and paint into the other pumpkins, change your brush color to white. It will act as an eraser for your mistakes.
13. If you want to see the mask at full size, right-click it and choose “Show Mask”. If you ever run into a problem with editing the mask, right-click it first and make sure “Edit Mask” is still checked. (It will un-check if you switch layers. These two options are only available in GIMP.)
14. When you are satisfied, right-click the mask and choose “Apply Layer Mask”. This will remove the mask image and you will see where you have created transparency in the “Black and White” layer.
15. Last but not least, right-click the “Black and White” layer and choose “Flatten Image”.
Notice before we flatten the image, we have 2 layers still. One is our black and white layer with transparency added. The next is our base image and colorful layer. After we flatten the image, we are left with only one image layer and it is a colorful pumpkin against a field of gray.
Had we done the same thing with a black mask, we would have painted over the pumpkin with white. The end result would have been one black and white pumpkin surrounded by lovely orange ones.
There are a variety of different mask types. White makes the masked layer fully opaque and black changes parts of the mask to transparent. Black does the exact opposite, making the masked layer fully transparent. Coloring white over it reveals that part of the white layer, making it fully opaque.
Likewise, you can use grayscale masks and paint over a mask in shades of gray for other effects. If I were to have colored over the white mask in gray, instead of black, the pumpkin would have been only orange-ish instead of bright orange.
Layers and masks are used for many things beyond color changes. You can recreate the depth of field photography effect with the same process. Instead of desaturating our “Black and White” layer, we would have blurred it instead (using Gaussian Blur, or Focus Blur to mimic Photoshop’s “Lens Blur”). Then we would have colored over the front pumpkin to reveal a sharp, clear pumpkin that would appear far away from the others.
Layers and masks can also be used to merge images together. If you had an image of a person bent over, you could arrange the two images to make it appear as though a person were bent down next to the pumpkin.
These are very basic uses, and there are many more fancy uses for these features. But hopefully this helps you gain a better understanding of how layers and masks work as well.
They aren’t, and don’t have to be, as complicated as I once thought.