|
|
Getting the Most Out Of Photo Object Masks
By Thomas Kryton
What's a "photo object," you ask? The easiest way to describe it is as a professionally-shot photo of one or more objects or
people. What makes it different is that its background has been carefully removed and the remaining objects or people have
been provided with clipping paths, to make them easy to manipulate with image editing programs, or use directly on Web sites,
in Flash creations or in presentations. This can save hours of painstaking work and open up entirely new creative possibilities.
In this tutorial, I'll show you how to create a variety of masks, using the supplied path to insert one image into another
target image. While I'm using Photoshop, any image editing application that supports masks can also get the job done.
To the right is an image that I'll insert into a new image, the target image. I'll begin by prepping the image prior to
moving it into the target image.
|
 |
First open a background image of your choice. Open the image and ensure that you are on the Layers palette and that
the background layer is active. Then type Cntl/Cmd J to copy the background to a new layer.
Then click on the Paths tab to bring up the Paths palette. When you click on the path it will become visible in your image
as a thin black outline around the construction worker.
Click on the "Path 1" layer to make the path active. Once "Path 1" is active click on the Load Path as Selection icon at
the bottom-center of the Paths palette. This will convert the supplied path to a selection that we will convert to a mask.
The black line should at this point change to the "marching ants" that indicate that you have an active selection.
Click on the Layers tab to return to the Layers palette and keep the selection active.
|
|
|
Click on the duplicated layer to make it active and at the bottom of the Layers palette click on the Mask icon.
This will convert the selection to a mask and automatically apply it to the layer.
What you should see is the copied layer with a black and white thumbnail to the right,
which is a representation of the applied mask, and there will be a link symbol in between them.
In my example I've thrown away the background layer by dragging it to the trash can in the bottom right.
|
|
What's next is to take our newly-masked layer containing the construction worker and insert it into our target image.
Ensure that the layer is active by clicking on the layer. Move the layer to your target image by typing V on the keyboard
to activate the Move tool and drag the layer with linked mask to your target image. What you should have is something similar
to the image on the left. The Layers panel shows our target image as the background layer with the construction worker on
layer 1 along with its accompanying mask. We could leave it at this stage and still have a pretty acceptable image,
especially at this reduced size, but there are a number of things I'd like to push in this image to enhance its meaning
and really push the concept of getting the most mileage out of the supplied path.
With Layer 1 still active type Cntl/Cmd T to activate the Transform tool. You may have to reposition the construction worker
in order to see the corner control points for this next operation. To move the construction worker, click anywhere inside
the transform bars in your image and drag the layer around until you find a control corner. Once you find a control corner,
hold down the Shift key and drag the corner point towards the center cross hairs of the layer.
By holding down the Shift key you are telling Photoshop to constrain the proportions of the layer so that you don't
inadvertently distort it. I've scaled my construction worker so that he looks like he could be placed just slightly
in front of the girl. You may have to also reposition the layer so that you can find the corner control points again.
I've also positioned the construction worker close enough to the girl so that when I zoom in for the next step it'll be
easier to compare the areas that I'm concerned with side by side.
|
|
| Here I've zoomed into the image to 400% to an area that includes both the child's pink pants on the left and the
construction worker's jeans on the right. On the left you'll see that the edge details of the child are noticeably softer
than the masked area of the construction worker's jeans. If you examine other areas of the construction worker where there
is a variation in the materials, such as his hat and headband, you'll see the same kind of transitions where the pixels
have been antialiased to trick the eye into seeing a smooth edge. There is a noticeable difference between the amount of
antialiasing occurring in the background image and the construction worker, so we'll try for a reasonably close fit.
|
|
|
Next we'll modify the mask on the construction worker so that he fits in better with our background image.
Click on the Channels tab and select the Layer 1 Mask and from the fly-out menu, the small arrow pointing to the right,
select Duplicate Channel and give it an appropriate name. The reason for duplicating this channel is that it will provide a
backup of our original mask in case we decide that we don't like the results of modifying our mask. Then at the bottom of the
Channels palette click on the Load Channel as Selection icon. This will turn the channel into a new selection that we'll
apply on top of our current mask. In my example I've turned off the RGB channel, which simultaneously turns off the individual
red, green and blue channels so I can see the mask by itself. If you've done this make sure you re-activate the RGB icon
before the next step. Click on the Layers tab at the top to return to the layers.
|
|
For this next step we are going to reduce the size of our mask provided by the original image.
If you look at the side by side figures in the above image you'll see a faint white halo surrounding the construction worker.
This halo is the leftover background from the original image, which would be fine if we were inserting our new image into a
white background. If you zoom in on the channel you'll see the same kind of antialiasing where Photoshop has smoothed the
mask that is similar to the zoomed-in view earlier.
With both the selection and the layer containing the construction worker active from the menu select Modify/Contract.
In the resulting dialog box I've selected a value of two pixels and clicked okay. The next thing is to apply our new selection
to the layer with the construction worker, which will replace the existing mask with our new selection.
The first thing to do is to remove the existing mask on the construction worker, click on the mask icon, the black and white
thumbnail, and drag it to the Trash Can. A dialog box will open asking you if you want to either Apply, Delete or Cancel the
operation. Select Delete. Then at the bottom, with your selection still active, click on the mask icon to re-apply the now
smaller selection as a mask to the construction worker layer. Why do it this way? I prefer to pull the object into my target
image, rather than the other way around—pulling my background image into the object I am going to mask. This way my mask
applied at the higher resolution and scaled down to fit my target image down-samples, preferable to up-sampling the
background image. And I just have to reposition my new object, rather than scale and fit the background.
|
|
| The next step is to blur the mask on the construction worker. Click on the mask icon of the construction worker,
the black and white thumbnail, to make it active. Then from the menu select Filter/Gaussisan Blur.
I usually find that zooming in a fair bit at this stage helps, usually at least 200% if not 400%.
If you haven't already zoomed in you can still do so using the keyboard short cuts; Cntl/Cmd + or - to control the
zoom amount and the Spacebar to reposition the image. I've repositioned the image so that I can see the child's pants
and the construction worker's jeans for comparison. What you are doing at this stage is blurring the mask around the
construction worker, effectively creating a series of grey steps between the black masked-out area and the white area
where the construction worker will be displayed. This grey area creates a transition from transparent to opaque,
thereby slightly softening the edges. The two pixels we cut out of the mask now allow us to reclaim some of the
construction worker that we cut out when we contracted the selection earlier. Select a gaussian blur that stops just
short of showing the existing white background behind the construction worker. If you start getting a halo around your
object you know you've gone too far, as in the example. Another handy short cut to use while using the blur filter is
the up/down arrows, which allow you to concentrate on the image rather than the filter dialog box.
|
|
|
Now that we've got our construction worker cut out and placed in the target image it's time to add some finishing touches.
Create a new layer with Shift Cmd/Cntrl N: I've named mine "shaded". Click on the mask thumbnail and holding down the
Alt key drag the mask to this new layer, to copy the mask to the layer. With a large, soft brush and a dark color,
I sampled some of the dark color in the distance and painted in some shadows on the construction worker. Use the girl on
the tricycle to help decide where to place the shadows on the man. Here I've painted in the shadow roughly and then applied
a bit of a gaussian blur to soften the edges. Now on the Layers palette adjust the opacity of the "shaded" layer so that it
fits the overall feeling of the image, in my case the child on the tricycle.
|
|
|
Create a new layer and label it "sunlight" for the next part of this exercise.
The light in the image is low and off to the right, which we've taken care of as far as applying shadows to the worker,
but the color of the light is also important. One of the nice aspects of the PhotoObjects.net photos is that they are
very evenly lit and have little color cast, which makes adding our own color cast even easier. Again, create a new layer
and copy the mask to the new layer. For a color I've sampled the sunlit area of the child's cheek, exposed just above the
right shoulder. I wasn't too happy with the color so I increased the brightness and saturation and shifted the color more
towards the yellow. If it doesn't work I can easily change the color on the separate layer. On the "sunlight" layer brush
in some areas of the bright yellow/orange where you think there will be hard hits of sunlight. I've left the mode of the
layer to normal for the time being just so that I can more readily see where I'm painting in the new color.
Again, I'll apply a bit of gaussian blur to soften the edges. Because I wasn't happy with the color of the light I
opened the hue/saturation adjustment and shifted the layer more towards the red and increased the saturation slightly.
I've set the opacity for this layer to 44% because I want just a hint of the color where I've painted it.
|
|
|
I'm not too happy with some of the highlights and shadows I've created so far, so rather than go back and edit the
existing masks I'll create a new one that encompasses all of the previous ones—besides, it makes for a more interesting tutorial.
The last step is to fine tune the masked layers that we've created, and the mask that we've originally created will again
prove useful. On the layers palette select Create New Group: I've labeled my group "masks." Next, drag the two layers,
the one with the hard sunlight and the shaded portion of the construction work, to the "masks" group and keep them stacked
in the same order. Select the masks group to make it active and then click on the mask icon at the bottom of the palette to
apply a new mask to the entire group. With a soft black brush, mask out the areas of light and shadow that you want to change.
For example, I'm not really happy with the bridge of the nose and the line of shadow that flows down the face,
so I've masked out areas of it to try and get the shadow to fit the contours of the face.
|
|
| You can push this notion of grouping and masking even further.
In this last shot I've created a new group and applied a new mask to it so that, for example,
if I wanted to I could position the construction worker behind the child just by masking out the appropriate parts.
To do this it's just a matter of creating a new group above the rest and dragging my "masks" group and the construction
worker all into the new group, maintaining the stacking order. The positioning of the construction worker probably isn't
the best but with the way the file is constructed it's merely a matter of selecting the entire group, resizing it and moving it,
then touching up the top-most mask. Remmeber, all this started out with the path supplied in the original PhotoObjects.net image.
About the only thing left to do is to give the construction worker a shadow, something covered in the next
tutorial by Barbara McGunigal.
Thomas Kryton owns and operates Digital Paint,
a company that provides graphic and Web design services to the small to medium business market.
|
|
Learn More About Photo Object Images With These Tutorials
Learn About Image Masking
Providing Photo Objects With Shadows
|