Masks+in+photoshop

Masking in Photoshop
@http://designshack.net/articles/graphics/a-complete-beginners-guide-to-masking-in-photoshop/

Clipping Masks
Clipping masks are very similar to layer masks only they use one layer to determine the transparency of another. In this scenario, you stack two layers on top of each other with the bottom being the determining factor of the transparency of the top. Instead of using black and white values though, clipping masks simply borrow transparency from the layers used to make them, namely the bottom layer. If the bottom layer has some areas that are opaque and some areas that are transparent, a clipping mask will apply these values to the top layer. This one is hard to explain without an example, but becomes crystal clear when you see it in action. Let’s use the two layers shown below and say that our goal here is to cut or “clip” the wood layer to be in the shape of the letters. Notice that, at this point, the wood is the bottom layer and the text is the top layer.  To achieve the effect that we want, simply swap the position of the layers so that the wood is on the top, then go to the Layers menu at the top of your screen and select “Create Clipping Mask” (Command-Option-G). Voila, we now have the effect we were going for. Where the text layer was opaque, the wood layer is now opaque and where the text layer was transparent, the wood layer is now transparent.  There’s some really interesting functionality here. You can still position and make changes to each of the two layers independently. By dragging around the wood layer, you move the position of the texture inside the bounds of the letters while the letters themselves stay stationary. Also, you can apply layer effects to the compilation via the bottom layer. For instance, here’s what happens if we select the text layer and add an Inner Shadow.  Clipping masks fun, functional and underrated, but the truth is that layer masks are far more common in every day use. The information above should be enough to get you off and running with clipping masks so from here on out we’ll focus purely on layer mask functionality.

How Do I Make a Layer Mask?
Now that we have a strong grasp of exactly what masks are and how the two different types of masks differ, let’s see how to create and work with a layer mask. The first thing we need is two layers. I grabbed the two images below from photographers [|Adrian Durlea] and [|Erik Soderstrom]. The shack image is on the bottom and the fire is on the top.  <span style="background-color: #ffffff; color: #333333; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 1.2em;">The general idea here is to take some, not all, of the fire and apply it to the shack. The first step is to stack the two images as we see above and set the fire layer’s blending mode to Screen. This will make all of the black pixels transparent, which blends the two images together nicely. <span style="background-color: #ffffff; color: #333333; display: block; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 12px;"> <span style="background-color: #ffffff; color: #333333; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 1.2em;">With that one change, this is already a pretty decent image! Let’s say though that we want to only have fire near the door of the shack. To accomplish this, we’ll need to add a mask to the fire layer. Select the fire layer and click the mask icon shown in the image below. <span style="background-color: #ffffff; color: #333333; display: block; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 12px;"> <span style="background-color: #ffffff; color: #333333; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 1.2em;">Now, with the mask selected in the layers palette, we grab a soft, black brush and paint out the portions of the fire that we don’t want to see. As we do this, the fire begins to disappear. To bring it back, we simply paint white. <span style="background-color: #ffffff; color: #333333; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 1.2em;">As you can see in the image below, with just a little painting, our fire is now much more centralized to the portion of the image that’s already lit up and therefore looks decently natural. <span style="background-color: #ffffff; color: #333333; display: block; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 12px;"> <span style="background-color: #ffffff; color: #333333; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 1.2em;">To see the actual mask, Option-Click (Alt-Click on a PC) on the little mask preview in the layers palette (Shift-click to hide the mask completely). After painting out some of our fire, this brings up the following: <span style="background-color: #ffffff; color: #333333; display: block; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 12px;"> <span style="background-color: #ffffff; color: #333333; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 1.2em;">Notice that we’re not just constrained to hard edges. The beauty of masks is that you can do anything you want with them as long as you can pull it off in values of gray. This means you can paint, clone, create and fill selections, copy and paste, and all kinds of other actions you perform on the main canvas.