PDA

View Full Version : Tutorial: Layer Masks


Kevin
08-20-200620th August 2006, 07:09 PM
A discussion arose earlier (http://www.pixel-shooter.com/forum/showthread.php?t=75) concerning the desire to learn how to use layer masks in Photoshop to help enhance an image. This tutorial will help to demystify layer masks. They really aren't that difficult and once you understand the concept and get the hang of them I bet you'll be using them all the time. :)

The screenshots that accompany this tutorial are from Photoshop 7, though the steps are identical in CS2 (and CS, I assume). If any of this doesn't make sense, shoot me a PM and I'll be happy to clarify or answer any questions you might have.

I want to start with the concept of a layer mask. "Layer Mask" is really made up of 2 things: a layer and a mask. Let's assume you start off with an image in Photoshop. It shows up automatically as "Background". Whether you realize it or not, it's a layer. If you were to duplicate the background (Ctrl+J for a PC), it would create a copy of the background and add it as a layer.

A Mask is nothing more than what you think of a mask to be. It covers something. In the case of Photoshop, it covers a layer. It can either hide whatever is beneath it (a black mask) or it will reveal everthing beneath it (a white mask). The "black" and "white" refers to how the mask is "filled". You can fill it with white to reveal everything or fill it with black to hide everything. The beauty of a mask is you can make changes to the image as a whole (or just a part of it) and either paint the effect "in" or paint the effect "out".

Assume you have a mask filled with white. Any adjustment you make to the image is going to show through. But let's say there is some part of the image that you don't want to adjust. How do you do that? Since it's a white mask (which will reveal), we will paint with the paint brush tool, using the color black(which will hide). The opposite is also true. A black mask will hide so in order to reveal the effect, you paint on the black mask with a white paint brush. Simple, right?

This Layer Mask tutorial will deal with a specific type of mask, though the concept is the same for more complicated types of masks. Understand this process and you'll be well on your way to mastering layer masks and will discover many uses for this handy tool.

I'm using a very specific image (of a Snowy Egret) to demonstrate this concept. A snowy egret is entirely white. In this sample picture, it was intentionally underexposed to preserve the highlights. Without any adjustments, the picture looks kind of drab. So the first thing we're going to do is to create a "Levels Adjustment Layer". (Layer ->New Adjustment Layer -> Levels) You'll be prompted with a popup that will allow you to set certain things but for now, just click OK.

http://www.kevinpaavola.com/NikonCafe/Step1.jpg

After you click OK, you'll see a Levels Adjustment popup screen. What I did in this example was simply to slide the right-hand slider to the left to brighten the entire image. I typically do this on every image I work on. Normally, I'll simply scan the image for any bright white areas that might be negatively impacted by what we're about to do by creating this levels adjustment layer. I'll use my cursor and run over parts of the bird and watch in my Info dialog (upper right corner of screen shot) and watch the RGB values. I like to keep my brightest whites under 240-ish. You'll notice in this sample, after I applied my levels adjustment to brighten the entire image, the bird's head blew (as did a couple of other areas). No biggie...I'll fix it with the mask. Get the overall image to look the way you like it to the click ok.

http://www.kevinpaavola.com/NikonCafe/Step2.jpg

Now, in the Layers Palette (bottom right corner of screenshot) you'll see a new layer above the "Background" layer. Mine is called "Levels..". That's the newly added Adjustment Layer. You'll see two images there in that layer: the Levels Adjustment and a white box. The white box is the mask. It should already "be set" to work on but you can click on it with your mouse just to be sure.

So, now I have a bird with a blown out head that needs fixing. First thing to do is to make sure that your color swatches are set to black(foreground) and white(background). On your keyboard, hitting the "D" key will reset them to black and white. If white is on top, hit the "X" key on your keyboard to switch the foreground and background colors. Make sure Black is the foreground color (the one on top).

Select your Brush Tool from the Toolbox Palette and set the opacity to a very low number. I usually work at 5%. This can be set at the top of your screen, just under the main toolbar. So, now we have a white mask and a black paint brush. Now I'll paint with the brush on the bird's head where the white got blown out. Trying to stay within the white area, I just brush with small strokes all around. Since the opacity is so low, it'll take quite a few passes before you see anything happen. One trick you can do is to look at the Info palette in the top right. As you place your brush over an area of the head you'll be able to see the RGB values drop from 255. I went overboard just for illustration in my example and got them dropped all the way to 192. I also went way outside the lines (;) ) Don't do that on your image. If you make a mistake, you can always switch your brush color to white (hit the "X") and paint over the area with white to reveal. Hit "X" to switch back to black and pick up where you left off.

http://www.kevinpaavola.com/NikonCafe/Step3.jpg

Again this is a very simple example of layer masks. This one automatically created by adding an adjustment layer. You can also create a mask manually but we'll save that for another time. Give this a try and see how it works. Let me know if you have any questions.

Kevin
08-20-200620th August 2006, 07:19 PM
I'm very long winded and the software only allows so many characters so I'll have to add a comment here.

When you're painting with the black, in essence your putting those pixels back to how they were originally. Using a low opacity brush allows you to fine tune the process and hopefully allow you to blend it all together without it being obvious in the final image. The more you brush, the more drastic the change will be, so go slowly and gradually and watch the Info palette numbers to get the blown-out section back under control.

MGlennn
08-21-200621st August 2006, 05:44 AM
Very well done & very helpful :) :) :) Thanks !!!!

andreasb
08-21-200621st August 2006, 07:52 AM
Thanks Kevin for doing this I will sit down and study it carefully!!!

dmwphoto
08-21-200621st August 2006, 08:50 AM
excellent info! I have made this thread a "sticky" for now so it is kept available for referencing.

Pete
08-21-200621st August 2006, 10:41 AM
Excellent work Kevin I've learned a few new things and will give it go asap.Thanks for sharing!

Desert Rat
08-22-200622nd August 2006, 01:44 PM
Smoe day i will learn how do do these layer masks..

Kevin
08-22-200622nd August 2006, 02:23 PM
Smoe day i will learn how do do these layer masks..

Today is the day!! They're really not that hard. Especially in this incarnation. Wait till I do a more complicated one. ;)

hillrg
08-22-200622nd August 2006, 03:15 PM
Just to add some tips that I frequently use.

1. Create a new layer via Ctl J.
2. Do what you want to the new layer - maybe noise reduction or sharpening.
3. Create a mask from the menu: Layer > Layer mask > Reveal (or hide)
4. Paint in/out what you want.
5. Flatten layers.

With a little practise this is very fast, especially if you add custom keyboard shortcuts (CS2 feature).

cindyflood
08-22-200622nd August 2006, 06:38 PM
Kevin,
This was a nice presentation. I think that learning to use pp is as important as having good equipment. Thank you for sharing this with everyone.

Roger
11-30-200830th November 2008, 11:00 AM
Kevin, I linked this in my new blog

http://rogerlundphotoblog.blogspot.com/2008/11/photoshop-tutorial-layer-masks.html

Thanks!