So, why is the layer mask and it's thumbnail in the Layers palette filled with white? Why not red, or green, or yellow? It's because of how layer masks work in Photoshop. Layer masks use only white, black, and all the shades of gray in between , and they use these three colors white, black and gray to control the transparency of a layer. And gray in a layer mask means some level of transparency depending on how light or dark the shade of gray is. The lighter the shade of gray, the closer it is to white and the less transparent that area of the layer will be.
The darker the shade of gray, the closer it is to black and the more transparent that area will be. What if instead, you wanted to hide everything on the layer when you add the mask, so that as soon as the mask is added, everything on that layer disappears from view?
You'll most likely come across situations where it makes more sense to hide everything on the layer when you add the mask rather than leaving everything visible, and fortunately, Photoshop gives us a couple of easy ways to do that.
First of all, I'm going to delete my layer mask by simply clicking on its thumbnail and dragging it down onto the trash bin icon at the bottom of the Layers palette:.
Photoshop will pop up a message asking if you want to apply the mask to the layer before you delete it. This way, you can delete the mask without losing the work you've done with it, although you'll lose the ability to make any changes later. In my case, I haven't actually done anything with my mask so there's nothing to apply, so I'm simply going to press "Delete". Most times, if you find yourself deleting your mask, it will be because you're unhappy with it and want to start over, in which case you'll just want to click "Delete" as well:.
Now that I've deleted my mask, both the mask itself and its thumbnail in the Layers palette are gone:. This time, I want to add a mask to the top layer and have Photoshop hide everything on the layer as soon as the mask is added, which means the mask will need to be filled with black instead of white.
The "getting paid by the hour" way to accomplish this would be to go up to the Layer menu at the top of the screen, choose Layer Mask , and then choose Hide All remember last time, we chose "Reveal All".
Either way you choose to do it, Photoshop adds a new layer mask to the currently selected layer, just as it did before, but this time, it fills the mask with black instead of white. We can see this in the layer mask thumbnail which is filled with solid black:.
And, unlike the first time we added a layer mask where nothing seemed to have happened to our image, this time the top layer the photo of the couple facing the camera is completely hidden from view, leaving only the image below it visible:.
This time, the mask is filled with black:. This is where the important difference between the Eraser Tool and layer masks comes in. Remember when we used the Easer Tool to blend the images together by erasing away part of the left side of the top image? The Eraser Tool physically deleted that part of the image and it was forever gone at that point, and if we looked in the top layer's preview thumbnail, we could see that large chunk of the image missing on the left.
This time though, we've used a layer mask to hide not just part of the left side of the image but rather the entire image, yet if we look in the layer's preview thumbnail, the image is still there, completely intact:.
Where the Eraser Tool deleted the contents of the layer, the layer mask simply hides it from view! To prove that the photo on the top layer is still there, I'm going to fill the layer mask with white. To fill a layer mask with white, or do anything at all with a layer mask, you first need to select the mask so that you're working on the mask itself and not the actual layer, and to select it, all you need to do is click directly on the mask's thumbnail in the Layers palette:.
You can switch between selecting the layer itself and its layer mask by clicking on the corresponding thumbnail. You can tell which one is currently selected by which thumbnail has the white highlight border around it, as we can see around the layer mask thumbnail in the image above.
To fill the mask with white, I'll go up to the Edit menu at the top of the screen and choose Fill , which brings up Photoshop's Fill command dialog box. For Contents I'll choose white:. With white chosen as my fill contents, I'll click OK in the top right to exit out of the dialog box and have Photoshop fill my layer mask with white.
I can now see in the Layers palette that the mask thumbnail is filled with white:. And with the mask now filled with solid white, my photo on the top layer is completely visible in the document once again, proving that even though the image was hidden from view a moment ago when we filled the layer mask with black, it was always there, untouched and unharmed:.
And that's the basics of how Photoshop's layer masks work! Layer masks don't physically alter or affect the contents of the layer in any way. All they do is control which parts are visible and which are not. The contents of the layer are always there, even when we can't see them. And we know that whether the contents on the layer are visible or not, they're still always there.
The Eraser Tool deletes parts of the image but layer masks simply hide them. That's all great. But is this all we can do with a layer mask, either show the entire layer or hide it? How do we use a layer mask to blend these two images together like we did with the Eraser Tool? To blend the two images together using the layer mask, we don't use the Eraser Tool. In fact, while the Eraser Tool still has its place, you'll find yourself using it less and less as you become more comfortable with layer masks.
Instead, we use Photoshop's Brush Tool , and with our layer mask filled with white as it currently is, which is making the entire layer visible, all we need to do is paint with black on the layer mask over any areas we want to hide. It's that simple! I could also press B on my keyboard to quickly select it. Then, since we want to paint with black, we need to have black as our Foreground color, and by default, whenever you have a layer mask selected, Photoshop sets white as your Foreground color, with black as your Background color.
To swap them so black becomes your Foreground color, simply press X on your keyboard. If I look in the color swatches near the bottom of my Tools palette, I can see now that black is my Foreground color:.
I'm going to resize my brush to the same general size I used with the Eraser Tool by once again using the left and right bracket keys , and I want my brush to have nice, soft edges so I get smooth transitions between the areas of the layer that are visible and the areas that are hidden, and I can soften my brush edges by holding down Shift and pressing the left bracket key a few times.
Then, with my layer mask selected I know it's selected because the layer mask thumbnail has the white highlight border around it , I'm going to do basically the same thing I did with the Eraser Tool, except this time I'm painting with black on the layer mask over the areas I want to hide rather than erasing anything:.
After spending a few more seconds painting away the areas I want to hide, here's my result, which looks pretty much the same as it did after I used the Eraser Tool:. If we look at the layer mask thumbnail in the Layers palette, we can see where I've painted with black, which are now the areas of the top image that are hidden from view:. Let's say I'm happy with this, and I think my client will also be happy with it, so just as before, I email the image to the client for their approval, save my Photoshop document, close out of Photoshop and shut down my computer.
The client calls back a couple of hours later and says they like it but they want some of the bride's veil on the right brought back in. When I faced this situation after using the Eraser Tool, I was out of luck because I had deleted that part of the image and had no choice but to start all over again. This time though, I was smarter!
I used a layer mask, which means that the entire image on the top layer is still there and all I need to do is make more of it visible! 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. 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. Clipping masks fun, functional and underrated, but the truth is that layer masks are far more common in every day use. 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. The general idea here is to take some, not all, of the fire and apply it to the shack. This will make all of the black pixels transparent, which blends the two images together nicely.
With that one change, this is already a pretty decent image! Select the fire layer and click the mask icon shown in the image below. As we do this, the fire begins to disappear. To bring it back, we simply paint white.
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:. 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.
What do I mean by destructive? Think about what happens when you use the eraser tool: it erases pixels. This is simply a horrible way to work. For instance, Filters used to be a permanent and destructive change, if you blurred a layer, it was stuck that way!
Now, with Smart Filters, you can always go back and adjust or even delete the blur. This same concept gave birth to masks many years ago.
With a mask, you not only have the ability to make remarkably detailed decisions about the transparency of a layer or group of layers, even better, you have the freedom to go back and refine or scrap those changes at any time. If I had erased my fire in the example above, it would be gone forever and bringing it back would involve importing the layer all over again. However, because I used a mask, all I have to do is fill that mask with white and immediately all of my fire detail returns.
To use the metaphor of an actual mask, imagine that you want to change your appearance for Halloween. You have two options: the first is to undergo plastic surgery to permanently change your face to look like that of a scary creature and the second is to wear a mask. In this scenario, the eraser tool is plastic surgery. Go with the mask instead. In fact, you may be thinking that masks are so incredibly simple that they barely merit conversation.
If you can relate the word masking with the mask, it may make some sense. Why do we use a mask, to cover the face, right? So why would we use masking on a layer, to cover or uncover the content of any layer. With a mask you can control the transparency of a layer. But that is what opacity and fill is for, right? Yes, opacity and fill do control the transparency, but it works for whole layer. What if you would like to have only the right part to be transparent and the left part to be completely visible?
Masking works in two ways. First, you simply add a mask on any layer by clicking the third option on the bottom of layer palette. The other way is by using adjustment layers, which always comes with a mask. This image shows a layer with no mask applied.
I have highlighted the third option on the layer palette.
0コメント