How to create vector masks in Photoshop

04.07.2011
In graphic art and design, a mask is a tool that lets you isolate part of an image from the area surrounding it. Once isolated, you can apply adjustments (for example, special effects or color balance) to that area alone, or use the mask to eliminate the background completely. With Adobe Photoshop CS4 and CS5, you can create masks using both pixels and vector paths, but masks created with vector tools are almost always more accurate than those created using pixel-based tools. Moreover, vector masks are easier to edit later on. Here are some quick steps you can use to create a vector mask.

Use Photoshop to open an image you'd like to edit; for this example, I'll use the photo of a coffee mug. Once open, locate the Layers panel (Window -> Layers). You should see only one layer, called Background. Control-click (or right-click) this layer and, from the contextual menu, choose Layer from Background. You'll be asked to name the layer; to keep it simple, just call it Photo. From the main menu, choose Layer -> New Fill Layer -> Solid Color. Stick with the default name (Color Fill 1) and click OK. Choose a color you want to use as a background (this will help illustrate the mask later on), and once again, click OK. You'll notice that your picture disappears behind the solid color, but we'll fix that now. Return to the Layers panel and drag the Color Fill 1 layer below the Photo layer. This will keep the color fill layer hidden for the time being.

Click the Paths tab, which usually grouped with Layers and Channels. (If Paths is not visible, choose Window -> Paths.) Once you've located the Paths panel, click the menu icon in the top right and choose New Path. Give the path a name--Item Outline, perhaps--and click OK. Now choose the Pen Tool, which you'll use to create a vector shape that outlines the item (in this case, a coffee mug). Place your first anchor point in a concave corner of the item, and work from there, placing anchor points along the perimeter until you close the shape. Stay as close to the edge of the item as you can; or, if you're planning to knock out the background, try insetting the path just a touch.