Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
There may be times when you want to replace part of the content in a photo with content from another photo. For example, here I have two photos on two layers in this file. On the top layer is this photo of the porch. I like it, but I think that the sky is rather bland. So, I'm going to turn the porch layer off temporarily by clicking its Eye icon in the Layers Panel, so you can see that on the layer below it's a photo of a more interesting sky. I'd like to use this sky to replace the sky in the porch image. I'll turn the porch image back on.
So how might you do that? Well, your first reaction might be to just select the sky in the porch photo and delete that area, so that we can see down through the transparent pixels that remain to the sky layer below. But I would urge you to do it another way. Instead of selecting and deleting, I suggest using a Layer Mask to hide the sky on the porch photo without actually deleting it permanently. That will give you a lot more editing flexibility to change your mind. Now, before I get started, you may be wondering how I got these two photos into one image.
I've already explained how to do that in the last chapter, in the movie on creating layers. So I refer you back to that movie for tutorial on how to combine two images in one file like this. Now that I have these two photos here, I'm going to add a Layer Mask to the porch photo. So with the porch layer selected in the Layers Panel, I'll go to the top of the Layers Panel and I'll click this Layer Mask icon. And that adds a new thumbnail to the porch layer that's filled with white. This thumbnail represents a Layer Mask. A Layer Mask is a grayscale item.
It can be only white, black, or shades of gray. Where a Layer Mask is white like this, it is revealing everything on the layer to which it's attached. So right now even though there is a Layer Mask here, it's really not doing anything. It's letting us see everything on the porch layer. But, where you add black paint to a Layer Mask, the corresponding area of the layer to which the mask is attached would be hidden from view. And if you add gray paint, that will partially hide that layer from view. So let's see how we can use those principles to hide the sky from view on the porch layer.
First, it's really important to make sure that you have the Layer Mask thumbnail selected, not the actual photo thumbnail. I know that the Layer Mask thumbnail is selected because it has a blue border around it. If yours isn't, then click on that Layer Mask thumbnail. Now I have to think about how I'm going to add black paint to this image. There are a number of ways; I could paint with Black using the Brush Tool; I could add a gradient from black to white, using the Gradient Tool; or I could make a selection and fill the selection with Black. In this case, because this sky is in relatively defined areas, I think making a selection and filling with Black is going to be my quickest option.
I'm going to get the Quick Selection tool; and then I'm going to go down for the options for the tool. And I'm going to switch to a Magic Wand tool, which I think will work well here because all these areas of the sky are approximately the same color and tone. Parts of the sky are separated from other parts by the columns. So I want to be sure to uncheck Contiguous in the options for the Magic Wand. And then I'll click with the Magic Wand on part of the sky, and that selects all the blue sky. It also selected a little bit of the sea down here. I want to remove those parts from the selection.
So I'm going to get the Selection Brush tool, down in the Options bar. I'll make sure it's set to Subtract from Selection here. And then I'll move into the image, and I'll just brush away those little selections that I don't want to be included in my selection of the sky. Now I'm ready to add some black to that Layer Mask to hide the selected areas. I'll go up to the Edit menu, and I'll choose Fill Selection. In the Fill Layer dialog box that opens, I'll go to the Use menu and I'll choose to fill with Black, and I'll click OK.
I'll deselect by pressing Ctrl+ D--that's Command +D on the Mac-- and there is the result. I've managed to hide the bland sky on the porch layer from view, so we can see down through to the more interesting sky in the same area of the sky layer below. Let's take a look at that Layer Mask, so you can better understand what's happened here. I'm going to hold the Alt key-- that's the Option key on the Mac-- as I click on the Layer Mask thumbnail; and that reveals the Layer Mask here in the Document Window. So now you can more clearly see where I filled this Layer Mask with black; where I left it white; and in between if I were to zoom in, you can see a thin border of gray pixels between the white and black pixels.
That border comes from an option for the Magic Wand tool called Anti-Aliasing, which adds a gradual bland at the edge of a selection made with that tool. I'll zoom back out to a 100% by double-clicking the Zoom tool. And then I'll go back to the regular view of the photo by once again holding the Alt key, or the Option key on the Mac, and clicking on the Layer Mask thumbnail. One of the beauties of working with a Layer Mask is that it remains editable. And that means that even if I save this image and close it, I'll be able to reopen it and refine the Layer Mask later.
That's too as long as I save in a format that retains layers. Like the PSD format, or the TIFF format-- but not the JPEG format, which as I explained earlier, flattens your layers all into one. So here I still have my Layer Mask, and let's say that I want to delete more of the porch photo. I'll just make sure that the Layer Mask thumbnail is still selected in the Layers panel. And then I'll go over to the toolbar. I'm going to get my Brush tool. I'm going to set my foreground color to black by clicking this double-pointed arrow, or clicking X on my keyboard.
And then I'll move into the image, and I can paint-away more of the porch layer. For example I'll paint away this little corner here. Now, if I paint too far into the photo, or if I change my mind about hiding that part of the porch layer altogether, I can always edit the Layer Mask by painting back with white. So if I go down to the bottom of the toolbar, and switch to white paint by clicking the double-pointed arrow, or pressing X on my keyboard, I can come back here and paint with white. And I don't have to bother undoing or remembering which history state I'm on.
I can just paint back with white on the Layer Mask to reveal the content of the attached layer. So the mantra that you might want to remember is that when you're dealing with a Layer Mask, black conceals, but white reveals. Now keep in mind that a Layer Mask can be used to hide anything on the layer to which it's attached. In this movie, I used the mask to hide actual content of a photo. In the next chapter, we'll see how to use a Layer Mask on an adjustment layer to hide part of a lighting or color adjustment from part of a photo, applying all the same layer masking principles that you learned here.
Get unlimited access to all courses for just $25/month.Become a member
164 Video lessons · 53466 Viewers
64 Video lessons · 86021 Viewers
86 Video lessons · 55508 Viewers
148 Video lessons · 92828 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.