Mask from a Selection

Have you ever wanted to select a figure in one image and place it on a new background? Probably the best way to do so is to use a mask. A mask lets you selectively "erase" the old background, letting you slip a new one in underneath your figure.

In this tutorial, I'll use a mask created from a selection to isolate the iris and vase in this photo:

You can work along using this image or use one of your own.

  1. First, choose the Freehand Selection tool, and in the Tool Options palette set Selection type to Smart Edge. Now drag the selection tool around the edge of the figure you want to select, keeping the edge within the tool's bounding box and clicking at points along the edge wherever the angle of the edge changes.

    When you get to the end of what you want to select, double-click to close the selection, connecting from the last point at which you clicked to the start point of the selection. The result will look something like this:

  2. Smart Edge usually does a fairly good job, but there's no way that this tool can "see" the edges in just the same way that you do. So you'll almost certainly need to tidy up your selection a bit. With the Freehand Selection tool still active, go to the Tool Options palette and change the Selection type to either Point to Point or Freehand, whichever you feel more comfortable using.

    To add to your selection, hold down the Shift key and drag (if you're using Freehand) or repeatedly click (if you're using Point to Point), defining the area you want to add to the selection. To subtract from the selection, hold down the Ctrl key and drag or repeatedly click, as appropriate, defining the area you want to subtract from your selection. Keep adding to and/or subtracting from your selection until you're pretty much satisfied. The result will then look something like this:

  3. At this point you could simply copy the selected figure and paste it onto a new background. However, you can refine the selection even further by creating a mask from the selection.

    To create the mask, choose Masks > New > Show Selection, then turn the selection off with Selections > Select None. You'll then see something like this:

    What Paint Shop Pro has done is create a mask that hides everything outside the selection, leaving everything inside the selection showing. And if your image was originally on the Background layer, PSP promotes it to a "real" layer (a layer that supports transparency). The gray-and-white checked area is what PSP shows to indicate transparent areas on a layer.

  4. You can now refine the edges of your figure by editing the mask. Choose Masks > Edit, and if you want to see the red gel that indicates the mask choose Masks > View Mask. Here's what my example image looks like with the mask in View Mask mode:

    Notice that in the Color palette the rainbow palette you see with 24-bit color images has been replaced by a limited palette of black, white, and gray. Masks are made up of only these shades, with white mask areas leaving the layer areas opaque, black mask areas making the layer areas transparent (letting pixels from lower layers show through), and gray mask areas making the layer areas semi-transparent.

    When you're in Mask Edit mode, you can modify the mask by applying effects or brightness adjustments or by painting with the painting tools. Paint with black to make an area of the layer transparent; paint with white to make an area completely opaque. And if you want an area to be semi-transparent, paint with gray -- the darker the gray, the more transparent the painted area.

  5. Edit the mask as you wish. Maybe you'll want to zoom in and paint to refine your mask, hiding stray bits of the background or showing some of the figure that is currently hidden. Maybe you'll want to create a softer edge, in which case you can blur the mask, using one of the blur effects available under Effects > Blur.

    Continue your mask editing until you're satisfied, and then turn off Mask View with Masks > View Mask, and turn off Mask Edit with Masks > Edit.

    Warning: If you save your file while in Mask Edit mode, PSP will automatically take you out of Mask Edit mode. If you paint or apply an effect at that point, you'll modify the layer itself rather than the layer's mask. You'll need to get back into Mask Edit mode with Masks > Edit if you want to modify the mask instead.

  6. Now merge your mask into the layer with Masks > Delete, clicking Yes when asked whether you want to permanently merge the mask with the layer.

  7. And now you're ready for that new background. One option is to copy your figure and paste it onto its new background. Or you can create a new layer, move that layer below the layer containing your figure, and paint the new background on the new layer.

If you've merged your mask with its layer and if you've kept the figure and the new background on separate layers, you can enhance the figure in order to make it fit in better with its new background. For example, here's my figure on its new background, with a subtle drop shadow around the edges and a perspective shadow under the vase:


How To

Copyright 2002 Lori J. Davis
All rights reserved