Chapter 10
IN THIS CHAPTER
Putting pieces together with layers
Integrating with blending modes and opacity
Masking for complex selection problems
Keeping it in perspective with Vanishing Point
Creating panoramas with Photomerge
A pharaoh’s head on a lion’s body. A lion with the head, talons, and wings of an eagle. As evidenced by the sphinx and the mythological griffin, compositing elements has been around a lot longer than Photoshop, but Photoshop certainly makes it easier! Take part of one image, drop it onto another image, and sell the composite to the tabloids for thousands of dollars. (One of the most infamous misuses of image compositing occurred during the 2004 U.S. presidential campaign, with the publication of a fake photo of candidate John Kerry with actress and antiwar activist Jane Fonda. That incident pretty much shut the door on this sort of Photoshop hijinks in major media.) Photoshop offers you incredible power — use it wisely!
In this chapter, I show you some basic techniques for compositing (combining two or more images into a single picture), how to use channels to select part of an image for compositing, the Vanishing Point feature, and then wrap up the chapter with a look at combining images automatically to create panoramas.
You make a selection in one image, copy, switch to another image, and paste. There you have it — the basic composite! Pretty simple, isn’t it? Whether you’re putting together two images or creating complex artwork involving dozens of elements, the trick is making the composited image look natural. The key techniques are blending the edges of your selections and matching color among the elements.
When you put together images, you work with layers. Think of layers in Photoshop as stackable elements, each of which holds part of your image. Where an upper layer is transparent, the lower layer or layers show through. Where the upper layer has pixels that aren’t transparent, those pixels either block or interact with pixels on the lower layer. (You control that interaction with blending modes and opacity, explained later in this chapter.)
Take a look at Figure 10-1 (which reveals how Figure 13-3 is created). The Layers panel shows the individual layers and their content. The individual elements come together to create a single image.
You can manipulate the content of each layer independently — moving, resizing, erasing, painting, or adjusting color and tonality — to suit your needs and artistic vision. Remember to click a layer in the Layers panel to make that layer active for editing. The Move tool’s Options bar offers the option Auto-Select: Layer (and Auto-Select: Group), which enables you to make a layer (or group) active by clicking any visible pixels on that layer (or in that group).
You can link two or more layers so that they maintain their positions relative to each other as you move them. (⌘ /Ctrl+click to select the layers in the Layers panel; then click the Link button at the bottom of the Layers panel — a Link symbol appears to the right of linked layers when active in the Layers panel.) Linked layers can be moved together without knocking them out of alignment.
When working with complex images containing many layers, you can use the filtering buttons and the menu at the top of the Layers panel (which shows Kind by default) to show only certain layers — perhaps only the type or adjustment layers in the image. You can also isolate layers by selecting one or more layers in the Layers panel and selecting from the filtering menu at the top-right of the Layers panel or by choosing Select ⇒ Isolate Layers. Only the isolated layer(s) are visible in the Layers panel and can be edited. To restore all the layers, deselect Isolate Layers in the Select menu, switch the filtering menu back to Kind, or right-clicking the isolated layers and select Remove from Isolation. You can also choose Select ⇒ All Layers to show the entire content of the Layers panel.
One key concept about layers is well illustrated in Figure 10-1. The higher a layer is in the stacking order (the order of layers in the panel from the top down), the more “in front” it will be. The layers Clouds-Dark and Clouds-Light are on top of everything in the image. The layer Man is in front of everything except the clouds. Because of the stacking order, the man appears to be standing on top of the musical notes, and the notes appear to be on top of the DVD.
You can also create groups, which are two or more layers packaged together in the Layers panel so that you can show or hide them together. As you can see in the Layers panel in Figure 10-1, you can have nested groups: a group within a group. The group named Background Items includes another group, named Sun, as well as several layers that aren’t part of the Sun subgroup.
Smart Objects provide you with additional flexibility in Photoshop. When working with Smart Objects, you preserve your editing options without risk to the image quality. For example, you can transform a Smart Object as often as you like because each time you rotate or scale or otherwise manipulate a Smart Object, Photoshop goes back to the original pixels and resamples again. This prevents the sort of image degradation — especially loss of fine detail — in the image you would see if you were to shrink, enlarge, or rotate a regular layer’s content numerous times.
When working with Smart Objects, you can apply a filter to a selection in Photoshop and then later go back and change the filter settings or even remove the filter entirely. But this feature is available only when you’re working with Smart Objects. Again, it goes back to Photoshop’s ability to return to the original source pixels when working with Smart Objects. (Filters are discussed in Chapter 15.) In the Layers panel, Smart Filters very much resemble layer styles: You can click an eyeball icon to temporarily hide a filter’s effect, and you can double-click the filter name to reopen the dialog box so that you can make changes. (See Figure 10-2.)
If you want to apply a Smart Filter to only a section of a Smart Object, make a selection before selecting the filter. In keeping with the whole concept of “smart,” the filter is applied to the entire Smart Object but the filter’s visibility is controlled with a mask. (An empty filter mask is visible to the left of the words Smart Filter in the Layers panel in Figure 10-2.) And, of course, you can — at any time — paint in the mask with black, white, and shades of gray to alter where the filter is visible. (Painting in masks is discussed later in this chapter.) Note, too, that a Smart Object can have both Smart Filters and a layer style.
When you choose File ⇒ Place Embedded or Place Linked, a Smart Object is automatically created. To create a Smart Object from an existing layer (even a Background layer), choose Layer ⇒ Smart Objects ⇒ Convert to Smart Object. When you choose Place Embedded, a copy of the placed image is added to your working document. When you choose Place Linked, the file itself is not added to your document; only a line of info in the document’s metadata noting the location of the placed image.
When working with Raw images, hold down the Shift key and Camera Raw’s Open Image button changes to Open Object. If you want Open Object to be the default, click the line of image info below the preview (between the Save Image and Open Image buttons) to open Workflow Options. That’s also where you specify the default color profile and bit depth of images opened through Camera Raw.
The pop-up menu near the upper-left corner of the Layers panel offers more than two dozen different blending modes. A layer’s blending mode determines how the pixels on that layer interact with the visible pixels on the layers below.
In Figure 10-3, the black-white and rainbow strips of gradients overlaid on the garden photo below each use the blending mode shown by the text outline. (You can see the original gradients in the Normal stripe.) Normal, Multiply, Screen, Overlay, and Luminosity are the blending modes you’re most likely to use regularly.
The Layers panel blending mode pop-up menu is divided into six sections, based loosely on how the pixels on the upper layer affect the pixels on the lower layer. Here’s a quick look at how you use the key layer-blending modes:
Photoshop also offers two pairs of blending modes that you might find useful, but confusing. Lighten and Lighter Color compare a pixel on the upper layer to the pixel immediately below to determine the resulting color. Lighten chooses the higher (brighter) value in each of the RGB color channels and produces a new color based on those three independent lightness values. Lighter Color, on the other hand, looks at the color on the upper layer created by all three channels, compares it to the color on the lower layer, and makes visible whichever of those two colors is lighter overall. The Darken and Darker Color blending modes work similarly, but choose the darker values.
Blending modes help determine how pixels on an upper layer interact with pixels on a lower layer, but those upper pixels have to be visible before they can do any interacting at all. When looking at any pixel on a layer, you have to consider four factors about transparency:
When you add a layer and paint on it, for example, you color some of the pixels yet leave other pixels transparent. (Every layer in every image is completely filled with pixels, whether visible or not.) If nothing is done to color some pixels, they remain transparent, and the lower layers can be seen through that part of your upper layer. In Figure 10-5, the words upper layer are on a separate layer above the layer containing the words LOWER LAYER. Where the upper layer has transparent pixels, the lower layer shows through.
Lowering the Opacity or the Fill slider in the Layers panel (or the Layer Style dialog box) makes all visible pixels on the layer partially transparent: The pixels on layers below can be seen through the upper layer’s pixels. (The Opacity slider controls the pixels on the layer and any layer style; the Fill slider works only on the pixels, not the layer style.)
Chapter 8 discusses layer masks and vector masks. Remember that any pixel inside the mask is at least partially visible, and any pixel outside the mask is transparent, regardless of whether it has color. But, as you can guess, any completely transparent pixels inside the mask remain completely transparent.
This being Photoshop, here is yet another way to restrict the visibility of pixels on an upper layer: clipping groups. Clipping an upper layer to the layer below, in effect, creates a mask for the upper layer. The opacity of the pixels on the lower layer is applied to the pixels on your upper layer. Where the lower layer is transparent, the upper layer (regardless of original content) becomes transparent. In the Layers panel, Option+click (Mac)/Alt+click (Windows) the line between two layers to clip the upper layer to the lower. When you hold down the Option/Alt key, the cursor turns into the icon shown between the two layers in Figure 10-6.
After you Option+click/Alt+click the line between Layer 1 and the type layer, the upper layer is visible only within the text on the lower layer. The upper layer is indented to the right in the Layers panel, with a downward-pointing arrow to let you know that it’s clipped to the layer below. Note that the upper layer’s thumbnail in the Layers panel shows the entire layer, not just the visible area. To unclip a layer, Option+click/Alt+click again on the line between the two layers in the Layers panel. Also note in Figure 10-6 that the layer style is applied to the lower layer rather than the upper layer.
Photoshop lets you show the layer thumbnails in two ways. Normally, the entire layer, including all areas of transparency, shows in the thumbnail. Although that gives you a good indication of how large or small the particular layer’s content is in the image, layers with little content have little to show in the thumbnail. By using the Panel Options (from the Layers panel menu) or Control+clicking/right-clicking the empty area below the layers in the panel, you can elect to show a thumbnail that includes only nontransparent areas of the layer. Little things fill the thumbnail, but they also appear out of proportion to the other thumbnails. Your choice.
One of the keys to compositing two images is a slight fade to the edges of the element you’re adding to the original image. That fade, called feathering, makes the edges of the image appear to fall off into the distance very slightly rather than having a sharply defined edge that sticks out like a sore thumb. (See Chapter 8 for full information on feathering.) You have a number of ways to feather a selection, including the following:
Matching color between two layers is also critical for a natural appearance. Take a look at Chapter 6 for full information on Match Color and Photoshop’s other color adjustment capabilities.
You also need to be aware of perspective and scale. When an element in your composited image seems to be too large or too small or when it seems to be facing the wrong way or standing on air, rely on the Edit ⇒ Transform commands. Although the Scale and Rotate commands are self-explanatory, Figure 10-7 shows visually how you can use the other Transform commands, such as Skew, Perspective, and Warp. Drag the bounding box anchor points to transform the selected pixels.
The Edit ⇒ Transform ⇒ Warp command adds a simple mesh over the content of the layer or selection. You click and drag the direction lines for the corners of the mesh and at the intersection of mesh lines to distort your artwork. As you see in Figure 10-8, the Warp distortion gives you a level of control second only to Photoshop’s Liquify feature (discussed in Chapter 15). You can also use Warp with paths and vector shapes.
In order to combine elements from separate images into a single piece of artwork, you sometimes need to make very complex selections. That’s often best done with an alpha channel, which can then be made into an active selection with the aptly named Select ⇒ Load Selection command. Among the alpha channel creation techniques available to you are
Duplicating a color channel is often the most effective way to extract a complex subject from a complex background. Here’s one way to approach the task:
Examine each channel individually to see which offers the most contrast between subject and background.
Open the Channels panel and click each color channel, one at a time, to see which presents the best contrast between the edges of the subject and the surrounding background.
Don’t forget that you have 10 color channels — that’s right, 10 channels — from which to choose! In addition to the Red, Green, and Blue channels in your image, you can choose Image ⇒ Duplicate and then convert the copy to CMYK or Lab mode. One of the CMYK channels often offers much better contrast between subject and background than do the RGB channels. In Lab mode, the a and b channels are also worth a try. And after creating your alpha channel, you don’t even need to switch back to RGB mode.
Duplicate the selected channel.
Drag the color channel of your choice to the New Channel button at the bottom of the Channels panel to create an alpha channel from it.
Maximize the contrast between subject and background.
Ideally, you’ll end up with a subject that’s completely white and a background that’s completely black. (If your alpha channel shows a dark subject and a light background, simply press ⌘ +I/Ctrl+I or choose Image ⇒ Adjustments ⇒ Invert.) Generally speaking, the first place to start maximizing the contrast is Levels. Drag the end sliders way in under the middle of the histogram, and then adjust the middle slider. After clicking OK, you may want to use Levels again. After Levels has done most of the work, grab the Brush tool and clean up any additional areas, painting directly in the channel with black and white.
Load the channel as a selection.
If you duplicated the image and used one of the CMYK or Lab channels to create the mask, click the original RGB image to make it the active window. (If you used one of the RGB channels, you only have the one version open.) Choose Select ⇒ Load Selection. You can load an alpha channel from any open document of exactly the same pixel dimensions.
Figure 10-9 illustrates the steps. To the left, the Red channel shows decent contrast between the subject and background, the Green less so, and the Blue channel is useless for this particular image (too much yellow in the background). After you create a duplicate and convert to CMYK mode, it’s apparent that both the Cyan and Black channels are even better starting points than the Red channel. After duplicating the Black channel and using Levels twice, the alpha channel is in pretty good shape (top center). After a few swipes with the Brush using black and then again using white, the alpha channel is ready (top right). Switch back to the original RGB image, choose Select ⇒ Load Selection and load the Black copy channel, and there’s a perfect selection of the flower!
When combining images to create a scene, you might find a need to add texture or a pattern along what is supposed to be a three-dimensional object. You might, for example, add a product box to a photo of a kitchen and need to add a logo to the front of the box. Or maybe you will create a room, perhaps in a house high on a hill, and you’ll need to add a realistic brick texture to the walls. Use the Vanishing Point feature to “map” a pattern to angled surfaces, such as walls, floors, buildings, and boxes. Vanishing Point, using information that you provide, automatically determines the correct angle, scale, and perspective. You can also use the Brush tool to paint in perspective in Vanishing Point. (Vanishing Point is rather complex, so for simple jobs, you might want to stick with the Paste and Edit ⇒ Transform commands.)
To use Vanishing Point, you follow a specific sequence of steps:
Copy your pattern.
Open whatever pattern file (or texture or logo or whatever) you’re going to add to the walls or sides in your image, make a selection, and then choose Edit ⇒ Copy. You can now close the pattern file.
Make a selection in your working image.
Identify where you want the pattern to be applied. If you’re working with walls, for example, make a selection that includes the walls but doesn’t include windows and doors.
Open Vanishing Point (choose Filter ⇒ Vanishing Point).
The Vanishing Point window opens, displaying your image.
Click in your image where you want to place the three corners of your plane and then move the cursor to the fourth corner.
You see the plane extending along the last two sides.
Click the fourth corner to create the plane.
If the plane is yellow or red rather than blue, it’s not aligned properly. Drag the corners of the plane to realign them, using the Edit Plane tool (the top tool on the left). Drag the side anchor points outward to expand the plane’s mesh to cover the whole wall or side.
Create perpendicular planes by holding down the ⌘ /Ctrl key and dragging the side anchor point at the point where the two planes should meet. If the second plane should be at an angle other than 90 degrees to the first plane, Option+drag/Alt+drag one of the anchor points to rotate the grid.
If the second plane’s angle is off a little, drag one of the corner anchor points to adjust it. In Figure 10-10, you see two perpendicular planes.
Press ⌘ +V/Ctrl+V to paste your pattern into Vanishing Point.
Your pattern is pasted into the upper-left corner of the Vanishing Point window.
Select the Marquee tool (third from the top) and drag the pattern into your plane.
The pattern automatically adopts the orientation of the plane. If necessary, click the Transform tool (or press T on your keyboard) and then rotate and scale the pattern.
Replicate the pattern.
Unless your pattern is an exact fit, you need to replicate it to fill the plane. With the Marquee tool selected, hold down the Option/Alt key. Then click and drag in your pattern to replicate it. Repeat as necessary to fill the plane. As you see in Figure 10-11, you can replicate a relatively small pattern to fill a large area.
If the lighting in your original image varies, set the Healing pop-up menu (at the top of the window, only with the Marquee tool active) to Luminance. That helps maintain the original lighting on the new pattern or texture.
Click OK to exit Vanishing Point and apply the pattern or texture to your image.
After exiting Vanishing Point, you might need to do some touch-up work on your image with the Clone Stamp tool (depending on how precise you were when dragging). You might also, depending on the original image, need to add a layer and paint some shadows or highlights to reproduce the original lighting in the scene.
Here are some tips for working with Vanishing Point:
Sometimes a snapshot doesn’t adequately portray a scene. (It’s hard to capture the majesty of the Grand Canyon in a single frame.) For those situations, take a series of images and combine them into one large panorama with Photomerge (found on the File ⇒ Automate menu).
The first step in using Photomerge successfully is taking appropriate photos. Here are some tips:
When working with images that are properly exposed and have suitable overlap, Photomerge is fully automated. Open Photomerge, select the images you want to use, select how you want the component images to interact, click OK, sit back, and watch the magic as the elements are put into order, aligned, and blended.
After Photomerge completes its mission, you’re left with a layered image that uses layer masks to combine individual photos (one per layer) into a unified whole. Each layer is named for the file from which it was created. Typically, you’ll need to crop the image a bit to neaten up the edges and remove any areas of transparency.
At the bottom of the Photomerge dialog box you’ll find an option named Content-Aware Fill Transparent Images. If your panorama ends up with some empty areas (perhaps due to camera angle), Phomerge can use Content-Aware Fill to add content to those areas, using the surrounding pixels.
3.138.67.27