Compositing with Layers


Compositing with Layers



Why You Need Layers
If you plan to create complex designs in Photoshop, layers are a
must for a few reasons:





Easy modification: Layers make it easy to modify your de-
sign. Separate elements can be easily accessed and edited.
Easy manipulation: If you are using Photoshop to create
Web or video animation as well as multimedia elements like
slides or DVD menus, individual elements can be animated,
highlighted, or revealed.


TIP
Preserve Your Layers



Interface with other programs: Many other software
programs rely on Photoshop layers as a content creation tool
because these other programs lack Photoshop’s drawing and

You should always keep a layered

painting tools. By supporting the layered Photoshop format,

file because it will come in very
handy for future changes and
distribution.

these software programs cleanly interface with the best-selling
image-editing tool.


Dissecting a Composite Image
When designers need to create complex screen graphics, they
usually turn to Photoshop. Its combination of flexible compositing
tools, color correction and grading tools, and flexible type engine
make it an ideal choice.
Let’s create a composite image by building up its layers. To begin this
exercise, open Ch08_Composite.psd on the book’s CD. This compos-
ite image is a mock-up of a promotional graphic to be used in a slide
presentation. You’ll build up this graphic to examine its layers.
1. When you first open the document, all you’ll
see is a black screen because most of the
layers are not visible. You’ll need to activate
them in the Layers panel. Make sure you can
see the Layers panel (if you can’t, press F7
to toggle it on). Begin turning on the vis-
ibility icons (eye icon) from the bottom up
by clicking in the column next to the layer’s
thumbnail. The first layer of the composition
is called the Background, and it has a locked
icon. The Background is locked initially
because it is treated as the canvas or paper
that the rest of the image is built on.



Why You Need Layers  127



Technically, the Background is a layer but behaves in a unique

way. If you want to turn it into a layer (so you could use a

Layer Mask, for example), you need to double-click its name

and rename it.

2. Turn on the Painted texture layer by enabling

its visibility icon. This, as its name implies,

is a photo of real paint on a canvas, and it

serves as the starting point for your design. If

you look closely in the upper-right corner of

the Layers panel, you’ll see that this layer has

been set to 70% Opacity. This was to reduce

the intensity of the painted texture, which

is caused by it mixing with the black Back-

ground layer.

3. Turn on the Hue/Saturation 1 layer. This is

an adjustment layer, which is a special layer

type offered by Photoshop. Adjustment layers

can make image adjustment commands to all

layers below them but retain editability because they are non-

destructive. This layer changes the background color to gold.

To modify the adjustment layer properties, select the layer, and

then modify the sliders in the Adjustments panel.

4. Turn on the Show List layer to reveal another

feature of layers, blending modes. In the top-

left corner of the Layers panel, you’ll see that

this layer uses the Luminosity blending mode

as well as an Opacity setting of 60%. Blend-

ing modes are covered in depth in Chapter 9,

“Using Blending Modes,” but essentially they

cause layers to mix based on properties like

color and lightness. In this case a blending

mode is used to create a subtle but themed

background image.



128 Chapter 8 Compositing with Layers



5. Click the visibility icon for the next four layers: Shape 2, Por-
table Show, Shape 1, and Desktop Show. These layers use three
more features of the Layers panel:















Shape layers: The Shape layers were created using the
Rounded Rectangle tool (U) and were created as vector
shapes by choosing that style from the Options bar. The
benefit is that vectors can be resized indefinitely with no
quality loss.
Layer Styles: The Shape layers also have a stroke and
a bevel applied to them using Layer Styles. (For more on
Layer Styles, see Chapter 13, “Layer Styles”). You can ac-
cess Layer Styles by selecting a layer, and then clicking the
ƒ icon at the bottom of the Layers panel.
Clipping Mask: Photos were trapped inside the vector
shapes by using a Clipping Mask. A Clipping Mask acts
much like a cookie cutter by trimming the edges of a layer
based on what’s beneath it. Simply place one object above
another and choose Layer > Create Clipping Mask. Older
versions of Photoshop call this command Group with Previ-
ous. More on Clipping Masks later in this chapter.



Why You Need Layers  129



6. Click the visibility icon for the remaining three layers.



Text layer: The text layer was added with the Horizontal
Type tool (for more on type, see Chapter 12, “Using the

Type Tool”).



Smart Object: The logo was originally an Adobe Illustra-
tor file. You can choose File > Place to embed a vector file

inside your Photoshop document as a Smart Object. Using

Smart Objects preserves flexibility because you can scale

the vector object as many times as needed with no loss in

quality.



Vignette: The last layer, Vignette, provides a focal point
for the image. It was created by filling a layer with black,

and then making a selection with the Elliptical Marquee

tool (with a large feather) and pressing Delete. Vignettes

are often used in TV commercials and feature films, and

they draw the viewer’s eye toward the center of the image.



130 Chapter 8 Compositing with Layers



Creating Layers
You can create a new layer easily in several ways! You can click
the Create new layer icon (looks like a notepad) at the bottom of
the Layers panel. If menus are your thing, choose Layer > New >
Layer or press Shift+Command+N/Shift+Ctrl+N. Additionally,
you can drag layers up or down the layer stack or from one docu-
ment to another, if you are so inclined.
You can also move layers or reorder them to change your
image. Table 8.1 shows a few keyboard shortcuts for just
this purpose.

Table 8.1  Layer Mobility

Keyboard Shortcut              Layer Movement
Command+[ (Ctrl+[)             Move current layer down one position
Command+] (Ctrl+])              Move current layer up one position
Shift+Command+[ (Shift+Ctrl+[)  Move current layer to bottom of
Layers panel
Shift+Command+] (Shift+Ctrl+])  Move current layer to top of
Layers panel



Duplicating Layers
When you need to duplicate a layer, you have a few choices. You
can choose Layer > Duplicate Layer or right-click/Ctrl-click the
layer’s name in the Layers panel and choose Duplicate Layer. An-
other method is to drag one layer onto the Create new layer icon
at the bottom of the Layers panel. My favorite method is to press
Command/Ctrl+J—think jump —to create a copy of a layer immedi-
ately above itself.


Deleting Layers
If you decide you don’t need a layer, you can throw it away. This
will reduce the size of your file, which means it’ll take up less
disk space and require less memory to work with. To throw away
layers, drag them into the trash icon at the bottom of the Layers
panel. You can also right-click/Ctrl-click a layer’s name to throw
it away or choose Layer > Delete > Layer. If you are in a
hurry, you don’t have to throw away layers one at a time.



Why You Need Layers  131



Just Command/Ctrl-click on multiple layers, and



JUMP IT UP

then delete the layers using one of the previously

mentioned methods.

You can press Command/Ctrl+J to duplicate (or

“jump”) the current layer to a copy above. With a

Fill Layers

selection made, Command/Ctrl+J will jump only the
selection and create a copy above. Adding the Shift

Photoshop allows you to create specialty Fill

key to the Jump command will cut the selection and

Layers, which let you quickly create graphical

place it on its own layer above its previous position.

content for your designs. Choose Layer >

New Fill Layer, and then choose Solid Color,

Gradient, or Pattern (alternatively, click the

black and white circle icon on the bottom of the

Layers panel). Create a new document (sized

1024 × 768) and try out these new layers:



Solid Color: Choose Layer > New Fill
Layer > Solid Color. Pick from any color

using the Color Picker or Color Libraries.

To edit the color layer, just double-click its

thumbnail in the Layers panel.



Gradient: Choose Layer > New Fill Layer >
Gradient. A gradient is a gradual blend

between two or more colors. You can use

gradients as backgrounds or blend them over

an image to perform the same function as a

camera filter. Photoshop supports five types

of gradients: Linear, Radial, Angle, Re-

flected, and Diamond. You can double-click

the gradient in the Gradient Fill window to

launch the Gradient Editor. Within the editor

you can modify the gradient or click the sub-

menu to load addition gradient presets. For

more on gradients, be sure to read Chapter 6,

“Painting and Drawing Tools.”



Pattern: Choose Layer > New Fill Layer >
Pattern. Photoshop comes with a variety of

built-in seamless patterns, which you can ac-

cess from the Pattern Fill window. To choose

a different pattern, click the drop-down menu

to see the active patterns. To load even more

patterns, click the triangular submenu on the

right edge of the drop-down panel.



132 Chapter 8 Compositing with Layers



Adjustment Layers
While clicking through your Layers menu, you likely noticed Ad-
justment Layers (from Levels to Hue/Saturation). These important
layers are for image enhancement and color correction. They offer
a nondestructive way to fix image problems. These special layers
can contain one of 12 image manipulations. Unlike normal image
adjustments, these can be enabled or disabled as well as modified
with no loss in image quality. For now, be patient—you’ll tackle these
in depth in Chapter 10, “Color Correction and Enhancement.”


Working with Multiple Layers


26

VIDEO
TRAINING
Layer Organization

As Photoshop has continued to evolve, so has its ability to offer
powerful layer management. When creating complex designs,
such as Web site mock-ups or print advertisements, it is important
to maintain control over your design. This includes naming all
your layers, as well as creating relationships or linking between
them. Depending on which version of Photoshop you are using,
you may find slight differences in layer behavior.
To get some practice, open Ch08_Layer_Organization.psd from
the book’s CD. This file contains several color-coded layers that
you will manipulate (the color coding identifies layers that will
interact with each other). In the future, you might want to change
the color of layers in your own documents to better organize them.
To change the label color of a layer, just press Option/Alt while
simultaneously double-clicking on a layer (except for its name).
The Layer Properties dialog box opens, and you can choose from
a list of default colors to label the layer.


Selecting Multiple Layers
One of the first skills to learn is how to select
multiple layers. Select both the Right Foot and
Left Foot layers (which are color-coded red) in
the Ch08_Layer _Organization.psd. You can
click multiple layers to select them. Hold down
the Shift key and click to select multiple contigu-
ous layers or use the Command/Ctrl key to select
noncontiguous layers.



Working with Multiple Layers  133



Linking Layers

Linking layers creates a family relationship.

When one of the family members moves, the

others move along with it (same goes for scale

and rotation). You would choose to link two lay-

ers together to create a relationship of particular

elements that need to react to one another. For

example, if you had a logo and text that you

wanted to scale together (at the same time), you’d

link them together.

Go ahead and link the Right Foot to its compan-

ion Left Foot. You can click multiple layers to

select them using the techniques mentioned in

the preceding section. With both layers selected,

they are temporarily linked; simply use the Move

tool to reposition both layers. If you want to make the connection

persist when you leave the layers, click the link (chain) icon at the

bottom of the Layers panel.



Aligning Layers

A design can look sloppy if the designer relies solely on his or her

eyes for a precise layout. Alignment is the process of positioning

multiple objects on a straight line. This line is usually determined

by one of the edges of the selected objects. This is useful to create

a professional-looking design where the objects appear precise and

organized. Align the two layers you are working with.

1. Make sure the Right Foot and Left Foot layers are selected or

linked.

2. Make the layers visible.

3. Press V to activate the Move tool or click in the upper-right

corner of the Tools panel.

4. In the Options bar you will see the alignment

options. Hover your pointer over each to

become familiar with their names.

5. Select the object that you want to use as a

reference point for the alignment. In this case

let’s use Left Foot.



134 Chapter 8 Compositing with Layers



6. Click the Align bottom edges button. Notice
that the feet shapes are aligned along their
bottom edge.


Distributing Layers
Distribution places an identical amount of space
between multiple objects. This can be an im-
portant step in creating a professional-looking
design. Distribution is similar to alignment in
how it is accessed. However, the intent is slightly
different. You will need three or more objects to
distribute them. Let’s distribute a few layers:
1. Turn off the visibility icons for all layers except Background,
Spring, Summer, Fall, and Winter. Click the eye icon to make a
layer invisible.
2. Select the Spring, Summer, Fall, and Winter layers.
3. Choose the Move tool by pressing V or
clicking in the upper-right corner of the
Tools panel.
4. In the Options bar you will see distribution options (to the
right of the alignment options). Roll over each to become
familiar with their names.
5. Click the Distribute horizontal centers button to spread the im-
ages apart evenly.
6. Click the Align bottom edges button.
Your image will now be evenly aligned and
distributed.



Working with Multiple Layers  135



Grouping Layers

Sometimes you’ll want to take several layers and

treat them as if they were one layer. This is useful

for aligning a design composed of multiple images

or just general cleanup for organizational purpos-

es. The process of nondestructively joining layers

is called grouping. A permanent technique is called

merging (see “Merging Layers” later in this chap-

ter), but that is pretty decisive. Let’s group these

layers together so they still retain their individual

identity, yet behave as a group:

1. Select the Spring, Summer, Fall, and

Winter layers using the Command/Ctrl-click

technique.

2. Press Command/Ctrl+G or choose Layer >

Group to place these layers into a new group

(which looks like a folder). If you’d like to

name the group, double-click the folder’s

name in the Layers panel.

3. You can now move these elements together.

For example, select both the Background and

Group 1, and then use the horizontal center

and vertical center alignment commands to

center these images on the page.



Locking Layers

Sometimes you need to protect yourself from

your own worst enemy (you). Photoshop gives

you the option of locking properties of a layer

to prevent accidental modification. Just click the

icons next to the word Lock in the Layers panel.

You can lock three separate properties (or a com-

bination of the three):



Lock transparent pixels: The grid icon
locks all transparent areas of an image, but

you can still modify any data that was on the

layer prior to locking.



136 Chapter 8 Compositing with Layers











Lock image pixels: The paintbrush icon locks all image
pixels in the layer.
Lock position: The arrow icon prevents you from accidentally
moving a layer out of alignment or changing its position.
Lock all: The padlock icon locks all three properties in one click.

Let’s try locking a layer:
1. Turn off the visibility icons for all layers except Background
and Key.
2. Select the Key layer.
3. In the upper-left corner of the Layers panel, click the Lock
transparent pixels and Lock position icons.
4. Press B to select the Brush tool.
5. Click the foreground swatch and load a color of your choice.
6. Paint on the Key layer. Notice that the paint
stays “inside the lines.”
7. Choose the Move tool (V) and try to move
the layer. (A dialog box should pop up indi-
cating that Photoshop “Could not complete
your request because the layer is locked.”)









Clipping Mask
Sometimes you’ll want to place the contents of one layer inside
those of another. Designers often use this technique to fill text with
a pattern or to constrain a photo to fit inside a shape. The concept
is called a Clipping Mask (older versions called it Group with Pre-
vious), and it’s fairly easy and flexible. All you need to do is place
the content layer above the container layer (the one you want to
“fill”) and choose Layer > Create Clipping Mask.
1. Turn off the visibility icons for all layers except Background,
Ribbon, and Texture.



Working with Multiple Layers  137



2. Select the Texture layer.

3. Choose Layer > Create Clipping Mask or

press Command+Option+G/Ctrl+Alt+G.

In the Layers panel, you’ll see that the layer

indents and fills the opaque areas in the Rib-

bon layer below. Notice that the layer style

applied to the layer is still visible.

Choose Layer > Release Clipping Mask or

press Command+Option+G/Ctrl+Alt+G to

toggle the mask on and off.



Merging Layers

Sometimes you’ll want to permanently merge

layers together to commit a design. This can be

useful to reduce file size or to improve compati-

bility when importing a layered Photoshop docu-

ment (PSD) file into another application (such

as Apple Final Cut Pro or Adobe After Effects).

This process is destructive (in that it permanently

joins the layers, which limits future changes).

To merge layers:

1. Select two or more layers by Command/Ctrl-

clicking on their names in the Layers panel.

For practice, select the Texture and Ribbon

layers.

2. Choose Layer > Merge Layers or press Com-


In this document, the Texture and

mand/Ctrl+E.

Ribbon layers are joined into one new
layer. Photoshop kept the name of

the top layer. You can double-click the

Flattening an Image

name field and rename the layer.

If you want to merge all your visible layers and discard all the lay-

ers with visibility disabled, choose Layer > Flatten Image. How-

ever, flattening an image is a permanent change. You work hard

for those layers—keep them! Here are some alternatives to flattening

that will preserve future flexibility:



Save a copy of your image in a flattened format. By choosing
File > Save As (with the As a Copy check box selected) or File >

Save for Web, you can save another version of your image.



138 Chapter 8 Compositing with Layers



TIP
Flattening Images







If you need a flattened copy to paste into another document (or
within your current document), use the Copy Merged com-
mand. Select an active, visible layer, and then choose Select >

Remember, flattening is permanent.
Be 100 percent positive before you
discard your layers permanently.
Saving a flattened copy is usually

All. You can copy all visible items to your clipboard as a single
layer by then choosing Edit > Copy Merged or by pressing
Shift+Command/Ctrl+C.

a better idea. You can also group

multiple layers into a Smart Object
by selecting the layers, and then
choosing Layer > Smart Object >
Convert to Smart Object. You can

Creating a Panorama
By using layers, you can take several photos from one location and

always edit the Smart Object and

merge them together to create a large panoramic photo. Many

extract the layered file.

people take an assortment of photos of a subject while holding the

camera, but it’s best to use a tripod. It’s important to ensure that
you have some overlap between each frame; that is to say, the adja-
cent photos share some common subject matter—about 15 percent
overlap is usually enough.
















TIP
Professional Panoramic
















Let’s try piecing together some photos using the Automation com-
mand called Photomerge:

Photography

1. Choose File > Automate > Photomerge. Photomerge is a

Pros know that it’s best to use a

specialized “mini- application” within Photoshop that assists in

tripod and slightly move the camera

combining multiple images into a single photo.

to create overlap. There are even
specialized tripod heads that you
can purchase from companies like

2. Click the Browse button and navigate to the Chapter 8 folder
on the book’s CD.

Kaidan (www.kaidan.com) and

3. Select the folder Ch08_Pano, select all the files within the

Really Right Stuff (www.reallyright

folder, and then click Open.

stuff.com) that make leveling and

rotation much more precise.



Creating a Panorama  139



4. There are several Layout options avail-

able that attempt to fix problems caused by

panoramic photography (such as distortion).

A good place to start is Auto, which attempts

to align the images but will bend them as

needed.

5. Select the check boxes next to Blend Images

Together and Vignette Removal. These two

options will attempt to blend the edges of the

photos together and can hide subtle differ-

ences in exposure.

6. Click OK to build the panoramic image.

Photoshop attempts to assemble the panora-

ma based on your choices in the dialog box.

Since layers are preserved, however, you can still tweak the

position of individual layers.
















7. Nudge any layers with the Move tool if your

alignment is off.

8. The Layer Masks help to blend the photos

together. They can be modified as needed

using the techniques you learned in the

previous chapter.

9. Choose Layer > Flatten Image.

10. Crop the image to a clean rectangular shape

using the Crop tool (C).

Be sure to check out the file Ch08_Pano_

Complete.tif to see how the image was further

enhanced with adjustment layers.



140 Chapter 8 Compositing with Layers



Auto-Aligning Layers
The technology that powers the Photomerge
command can also be harnessed to stitch
together nonpanoramic shots. The Auto-Align
Layers command is a useful way to stitch to-
gether multiple shots or scans of a large object or
a group photo. The command is very easy to use
and produces impressive results.
1. Choose File > Scripts > Load Files into
Stack to combine two or more files into one
document.
2. In the Load Layers dialog box, click the
Browse button to navigate to the files
you need.
3. Open the folder Ch08_Cyborg, select both
images inside, and click Open.
4. In the Load Layers dialog box select the
check box next to Attempt to Automatically
Align Source Images.
5. Click OK. Photoshop opens both images and
aligns them, and does a good job (especially
since the top layer was taken at such an
angle). This alignment can be refined even
further.
6. Make sure both layers are selected in the
Layers panel.
7. Choose Edit > Auto Align Layers.



27



VIDEO
TRAINING
Creating Panoramas



Auto-Aligning Layers  141



8. Select the Auto option to enable both

Vignette Removal and Geometric Distortion

options for Lens Correction.

9. Click OK. Photoshop removes some of the

distortion in the glass case, giving it a more

rectangular shape.

The layers can be seamlessly blended togeth-

er using the Auto-Blend Layers command.

This applies Layer Masks as needed to each

layer to mask out exposure issues and create

a seamless composite.

10. Choose Edit > Auto-Blend Layers, specify

the Panorama method, and click OK (be sure

the Seamless Tones and Colors check box is

also selected).

11. Crop the image as needed, adjust Levels,

and Flatten.



142 Chapter 8 Compositing with Layers



LAYER COMPS

Photoshop CS introduced Layer Comps, which allows Photoshop to memo-
rize combinations of layer visibility, opacity, and position. This can be useful
for storing multiple designs inside one document. When experimenting
with layouts, you’ll often use several options in one document. You might
set the headline in three different typefaces and try the main photo in two
different positions. Using Layer Comps allows you to set up different options
within one document (instead of having to save and keep track of several).
1. Open the file Ch08_Layer_Comps.psd.

2. Make sure the Layer Comps window is visible. If not, choose
Windows > Layer Comps.
3. Click the forward triangle to Apply Next Selected Layer Comp.


28

VIDEO
TRAINING
Layer Comps

Click through and examine the different layer comps.
4. For Layer Comp 1, move the words around onscreen to a new position.
5. Click the Update layer comp icon at the bottom of the Layer Comps panel (it looks like two arrows in a circle),
6. Switch to Layer Comp 2. On the layer called This is, click the visibility icon next to the Layer Style Outer Glow.
A black glow should be added.
7. Click the Create new layer comp icon (it looks like a pad of paper) on the bottom edge of the Layer Comps
window. Name it Comp 2 Alternate.
8. Save a copy of each layer comp to send to a client. Choose File > Scripts > Layer Comps to PDF. Photoshop
creates a new PDF with all four layer comps in one document. This is a convenient way to email a project to a
client for review.
Layer Comps are a bit confusing at first, but as you master what layers can do, you’ll turn to Layer Comps for flex-
ibility. Be sure to check out the Adobe Help Center for more on Layer Comps.