Working with selections and masks
Video: Working with selections and masksI have shown how you can bring entire layers from one document into another when you're making a composite. Alternatively, you can bring just part of a layer or layers by making a selection, and bringing that into another document. Here, for example, I have this image of a rose. I like the rose, but I am not thrilled with the background. I would like to bring that yellow rose into this document, where I have a more interesting background of purple rose petals. So, I will go back to the tab for the rose document, and I am going to use the Selection tool to select the background around the rose.
Viewers: in countries Watching now:
In Photoshop CS4: Image Compositing for Photographers, Jan Kabili demonstrates how to take photographs to the next creative level using image compositing techniques in Photoshop. Jan starts with a basic compositing workflow: how to choose images, move layers from one file to another, use Smart Objects to transform photos, blend photos with layer masks, and resize and sharpen the results. She then reveals her methods for blending images into a composite for a seamless look. Photoshop's powerful blending features, including Auto-Blend, the Advanced Blending sliders, and layer knockout, are explored. Jan also shows how to handle common multiple-image situations, such as panoramas, bracketed exposures, and HDR photos. Exercise files are included with this course.
- Preparing photos in Adobe Camera Raw
- Customizing color settings for compositing
- Compositing with selections and masks
- Extending depth of field with compositing
- Creating panoramas and photo montages
- Incorporating text in photo composites
Working with selections and masks
I have shown how you can bring entire layers from one document into another when you're making a composite. Alternatively, you can bring just part of a layer or layers by making a selection, and bringing that into another document. Here, for example, I have this image of a rose. I like the rose, but I am not thrilled with the background. I would like to bring that yellow rose into this document, where I have a more interesting background of purple rose petals. So, I will go back to the tab for the rose document, and I am going to use the Selection tool to select the background around the rose.
I am going to select the background rather than rose itself, because the background has a relatively uniform tone and color that's going to be easier to select using one of the Selection tools that does select based on tone and color, and that tone is this one, the Quick Selection tool, which I am selecting in the toolbar. I will move into the image, and I am going to make my brush smaller by pressing the Left Bracket key, because the Quick Selection tool works best with a small brush. I have all the options in the Options bar set to their defaults. Now, I am going to come and drag over the background and this tool quickly goes ahead and selects based on the color and tone of the background.
And it's also sensitive to edges, in other words, places where the contrast changes from a dark area to a light area, and that's why it's able to do such a quick job of selecting. Now, when I click again in this area, the tool tries to add to the selection, but it goes too far and adds the stem of the flower and I don't want to include that in the selection of the background. So I am going to undo my last pass with the Quick Selection Brush by pressing Command+Z on the Mac or Ctrl+Z on the PC, and I am going to take a minute to train the brush, telling it what I don't want it to include in the selection.
To do that I will go to the Options bar for the Quick Selection tool and I will click on this minus icon and then I will come back into the image and with my small brush tip, I am going to click- and-drag over the stem of the rose. What I am doing is telling the Quick Selection tool that when I use it next, I don't want to include those areas in the selection I am making. Then I will go back up to the Options bar and I will click on the icon with the plus symbol on it, because I want to add to the selection I had started of the background around the rose.
And now, I will click and drag in this area and it quickly selects the rest of the image without including the stem that I trained it not to select. Pretty amazing! So now I have the background selected, what I really want to select is the rose. To do that, I am just going to invert this selection by going up to the Select menu and choosing Inverse or I could use the keyboard shortcut, Shift+Command+I on a Mac or Shift+Ctrl+I on a PC. And now I have the rose selected. It's not a bad idea to save this selection, so I don't have to make it again if I ever need to come back into this image.
So I am going to go to the Select menu and choose Save Selection and I will name this selection 'rose', and I will click OK. Now that I have this selection made, I am going to get my Move tool and I am going to click in the selection, notice that the icon changes to scissors, and I am going to drag from there up to the tab for the petals image. I will hover over the petals tab, I haven't yet released my mouse, and with the mouse still held down, I am going to move over the petals image until I see the gray bounding box inside the image.
I still haven't released my mouse. At this point, I am going to hold down the Shift key in order to align the selection of the rose with the petals image. And then I'll release my mouse and that drops the rose in exactly the same place that it was in, in the rose image. Because the petals and the rose images are exactly the same size, this fits very nicely right there. So, that's fine. That's one way to work. But the problem with making a selection and dragging the selection into another image is that now I don't have a lot of choice about refining the edge of the selected rose, which looks kind of rough to me over here and is carrying a bit of a halo from the dark green that was around the rose in the other image.
So let me show you what I think is a better way to do something like this. Rather than selecting the rose and dragging it in, I am going to bring in the entire rose image and then use a Layer Mask, which I can control better here in the petals image to isolate this yellow rose. So, I will undo by pressing Command+Z on the Mac or Ctrl+Z on the PC and I will go back to the rose image. I am going to delete my selection by pressing Command+D on my Mac or Ctrl+D on the PC, and this time, with the Move tool selected in the toolbar, I am going to click anywhere in the rose image and drag up to the tab for the petals document, hover over it until the Document Window switches to the petals image and then I will go down into the image until I see the gray bounding box in the image.
I will hold the Shift key to align the two layers and then I will release my mouse. So now, I have got the entire rose image on its own layer here on top of the petals image. My next step is going to be to make a selection of the rose again, before I create a Layer Mask. Unfortunately, the saved selection didn't come with the image. So again, I use the Quick Selection tool, I will click and drag with a small brush tip over the background, then I will click on the minus icon in the Options bar and I will train the tool not to select the stem right here by moving over it.
And then I will go up to the Options bar again and I will click the plus symbol and I will click-and-drag over the rest of the background to add it to the selection. Then I will invert the selection by going up to the Select menu and choosing Inverse. So now, I have the rose selected. At this point, I am going to add a Layer Mask. Making a selection before adding a Layer Mask is yet another way to add black and gray pixels to a Layer Mask. So, with this selection active, I am going to go to the Masks panel and if the Masks panel isn't open, I will go up to the Window menu and choose Masks.
Here in the Masks panel, I am going to click the Add a pixel mask icon and that adds this Layer Mask. The Layer Mask comes in with only the area that was selected, the rose, white, and the rest of the Layer Mask is black with some gray pixels in between. I will Option+Click on the Layer Mask thumbnail, that's Alt+Click on a PC, in the Layers panel, so that you can see what that mask looks like. And then I will Option+Click or Alt+Click again on the mask to go back to the regular view.
The advantage of working this way, as opposed to bringing in just the selected rose is that, now I can refine the mask making the edge between the yellow rose and the purple petals, a little smoother and softer. To do that, with the Layer Mask selected on the rose layer, I will go up to the Masks panel and there are few things that I could do here. I could try feathering the edge, by moving the Feather slider to the right, but that's just kind of blurs the edge. I don't think it's sophisticated enough for this image. So, I will drag the Feather slider back to zero pixels.
I could try reducing the Density of the Layer Mask, allowing part of the green image on the rose layer to show through. So, if I drag the Density slider over to the left, I can see that kind of an effect. I kind of like that, but I am actually going to take the Density slider back to 100% to show you what else I can do from the Masks panel to refine the edge of this mask. I will go to do the Mask Edge button, and I will click there to open the Refine Mask dialog box. The first thing I will do here is click the default button, to set all the settings back to their defaults.
Then I will go down to the icons down here that allow me to preview the mask against different backgrounds. I am going to choose this first preview, the standard preview, which allows me to see the purple petals on the layer below. And I am going to hide the marching ants of the selection, so I can get a better view of the edge of the rose by pressing Command+H on the Mac. That's Ctrl+H on the PC. The selection is still there. It's just hidden from view. Now that I can see the edge of the yellow rose, I see that there is a little bit of a green halo there.
And I am going to try to get rid of that by going to the Contract/Expand slider in the Refine Mask dialog box, and dragging to the left to contract the mask, and that does a pretty good job of getting rid of that halo. I can also try to smooth out the edge of the mask by moving the Smooth slider slightly to the right, and I can play with the Radius and Contrast sliders trying to soften the edge there, and then make that soft edge a little bit crisper, removing any artifacts along that edge.
Now, normally I would spend a little more time refining this mask, but I just want to give you an idea of the kinds of things that you can do, if you use a selection to create a mask, rather than using a selection to cut out an object and drag it into another image to make a composite. So, I am going to click OK here, and I am done using a selection with a Layer Mask to make this composite image.
There are currently no FAQs about Photoshop CS4: Image Compositing for Photographers.