When Photoshop 2.5 first introduced layers, the concept was revolutionary. Layers made it possible for artists to make changes while preserving the underlying image by isolating different elements on their own layers. For example, suppose you place a butterfly image on a transparent layer, with a flower garden image on the Background layer. You can use all the Transform commands you learned about in the last hour on the butterfly without messing up the flowers behind it. Or you can change its colors to suit your lightest whim—again, without affecting anything else in the picture. You can hide and show the butterfly layer to help you decide whether the picture looks better with or without it. You can run filters on the Background layer without affecting the butterfly. The list of possibilities is endless.
In the years since layers were introduced, Adobe has thought of lots more ways that Photoshop can make use of them, to help you create more complex images in less time with less effort. Now there are several special kinds of layers, including the following:
Fill layers contain a single color, gradient, or pattern. You could always create a layer and fill it with a particular color, or a gradient or a pattern, but fill layers are a bit easier to change. You just click a fill layer’s color swatch in the Layers panel to open the Color Picker. Choose a new color, click OK, and you’re all set; there’s no need to fill the layer with the new color. We looked at creating fill layers in Hour 7, “Drawing and Combining Shapes.”
Shape layers are simply fill layers with an editable vector mask in the form of the chosen shape. You can modify the mask using the Path tools, and you can transform the shape in any way you like without blurring its details because it’s defined by paths instead of pixels. Hour 7 also covered creating shape layers.
Type layers contain editable type that you can search and even spell-check. Of course, you can also go back and change the font, size, and other attributes at any time. Hour 18, “Adding Type,” shows you everything you need to know about using type and type layers in Photoshop.
Adjustment layers are just about as cool as it gets. You can create an adjustment layer for any of kind of image modification in the Image, Adjust submenu (Levels, Curves, Vibrance) so that the adjustment is not only easily removable (just delete the layer), but also editable (you can go back and change the settings at any time). We used adjustment layers back in Hour 5, “Adjusting Brightness and Color,” to make this kind of nondestructive change.
3D layers are a new feature that you’ll find only in Photoshop CS4 Extended. If you’re into 3D modeling, you’ll love the capability to create and animate 3D scenes right in Photoshop. Skip ahead to Appendix B, “A Quick Walk on the Extended Side,” for a few more details about 3D and 3D layers in Photoshop CS4.
Video layers, like 3D layers, are only available in Photoshop CS4 Extended. As the name implies, they can hold video footage that’s integrated into your projects.
Despite all these special types of layers, the plain old transparent layer remains one of Photoshop’s most powerful features. In this hour, we look at how to create and edit layers, how to keep them organized, and what kinds of projects you might want to use them for.
Sometimes the best way to learn something is to jump right in, so let’s spend some time experimenting with layers. The first step is to create a new image file (the default size is fine) and then open the Layers panel, if it’s not already visible. Just choose Window, Layers, or, if you see the Layers panel icon docked on the edge of your screen, click the button at the top of the dock to switch it out of icon mode. The Layers panel (see Figure 11.1) is where you control your layers’ behavior—you can create, add, delete, hide, or show them. The small versions of your images on the left of the panel are layer thumbnails. Each of these small rectangles displays a tiny version of the contents on that layer. For the moment, because you haven’t added any new layers to the image, you should see only one blank thumbnail in the Layers panel. That’s the Background layer; if you stuck with the default white background fill when you created this image, the Background layer’s thumbnail is white.
The biggest difference between the Background layer and a regular layer is this: When you erase pixels on a regular layer, the erased area is transparent; when you erase on the Background layer, the erased area is filled with the background color shown in the toolbox.
If the thumbnails are too small for you to be able to tell what’s on each layer, choose the Panel Options command from the panel’s menu (click the arrow in the upper-right corner to pop it out) and change the size to suit your needs (see Figure 11.2).
You can choose from three sizes or choose no thumbnail image at all; it’s up to you. Of course, the smaller the thumbnail, the less space the panel takes up on your screen. This won’t matter much at the moment, but if you end up working with more than a few layers at a time, you’ll find that being able to see more layers in the Layers panel at one time is worth reducing the thumbnail size.
You can add new layers to an image in more than one way. The most obvious of these, of course, is to click the New Layer button at the bottom of the Layers panel. This gives you a new, empty layer positioned just above the layer that was active when you clicked the button. You can also duplicate an existing layer by clicking its thumbnail and dragging it to the New Layer button. Again, the copy is placed just above the original in the list of layers.
Let’s pause and take a look at the new layer’s thumbnail. Its double frame and the highlight color indicate that this is the active layer. When you paint, only the layer or layer mask with the double frame receives the paint. Similarly, when you make edits or adjustments—colorizing or blurring, for example—they’ll be applied only to this layer. Of course, the active layer’s entry in the Layers panel is also highlighted.
It’s happened to most every Photoshop jockey over the last few years—you’re humming right along, painting and adjusting and filtering, and all of a sudden nothing’s happening, no matter what you do. What’s going on? The answer just might lie in the Layers panel; check it to see if there’s an active layer. If not, click the layer you want to work on, to get moving again. Originally, it wasn’t possible to have no layers selected, but Adobe changed that a few versions ago and it has been tripping up users ever since.
To change the active layer, click the name of the layer you want to work on. Figure 11.5 shows what the panel looks like after the active layer change has been made.
You can move, add to, or erase anything on the active layer, but those actions won’t affect layers above or below the one you’re working on. For instance, if you make Layer 1 the active layer, you can use the Move tool to reposition the candle, but you can’t move the jam until you make its layer active.
As you saw in step 6, you can also change the order of the layers. Because new layers are always created above the current active layer, you’ll sometimes need to move them to a more appropriate position in the layer stack. Let’s review the steps to do that:
In the Layers panel, click and hold the thumbnail of the active layer.
Hold down the mouse button and drag the layer up or down to a different position in the stack. (Note that you can’t move the Background layer—by definition, it has to stay at the bottom of the stack unless you convert it to a regular layer by double-clicking it.)
If you want to move a layer up or down one level, you can select it in the Layers panel and press Command-] (Mac) or Ctrl+] (Windows) to move it up, or press Command-[ (Mac) or Ctrl+[ (Windows) to move it down.
As you’ve seen, using layers enables you to avoid painting where you don’t want to paint. You can also hide layers so that you can concentrate on one part of your image. To the left of each layer thumbnail, there’s a small icon in the shape of an eye. This indicates that a layer is visible. If you see the eye, you can see the layer—logical enough. If you click the eye, the eye disappears and the layer becomes hidden. In Figure 11.11, you can see that I’ve turned off the frosting, but the plate, cake, jam, and candle are still visible.
Why don’t you try it? Click the eye icon next to your own frosting layer. The icon disappears, as does the corresponding layer in your image. Click again and the icon reappears—with the layer. While the layer is hidden, you can’t paint on it or do anything with it except drag it up or down (or use the commands detailed previously) to change its order.
The easiest way to remove a layer is to click to make it active and then click the Delete Layer button at the bottom of the Layers panel—it looks like a trash can. Or you can choose Layer, Delete, Layer or the Delete Layer command in the Layers panel pop-up menu. If you use any of these three methods, you’ll see a warning dialog asking whether it’s really okay for Photoshop to delete the layer, and you’ll need to click OK. To skip the warning, Option-click (Mac) or Alt-click (Windows) the Delete Layer button or drag the layer to the panel’s button instead of clicking the button. To bring back the layer, choose Edit, Undo, assuming you’ve done nothing else in the meantime. If you have made other changes to the image, you’ll need to use the History panel to return to a previous state.
You have seen how to create, move, and remove layers, but we still haven’t really addressed the question of what they’re good for. Layers are useful in many situations, especially whenever you are combining two or more images (in Photoshop terms, compositing). Each of the elements you paste or drag into the background image from another document is added on a separate layer. You can use the Layers panel to control exactly how these elements combine to form the whole image. Although a layer itself always remains transparent, you can control the opacity of objects that you paste onto the layer or paint that you apply to it. You can also control the blending modes that affect how the colors on one layer combine with the colors of the layers beneath it, just as you can when painting over an image or background.
As you saw in our cake-making session earlier in the hour, the Layers panel’s Opacity slider controls the opacity—the opposite of transparency— of the active layer. You used it briefly to change the opacity of the jam. You can make the slider appear by clicking the triangle to the right of the percentage entry field. You can adjust the value adjusted from 0% to 100% by dragging the slider. If you’d rather not mess with the slider, enter a value without even clicking in the entry field by just typing 0
for 100%, 1
for 10%, 2
for 20%, and so on. For more precise control, simply type the digits of the measurement you desire (57
, for instance) in quick succession. This trick works with any active tool that doesn’t have its own Opacity setting—if you’re currently using a tool that does have an Opacity setting, using the keyboard adjusts the setting for the tool instead of for the layer.
Time for some more practice with the Opacity slider. You should still have the layer cake image open. Hide the candle, frosting, and top “cake layer” layers, and then make the jam layer active and drag the Opacity slider (by clicking and holding the arrow to make it appear) to about 25%. Can you still see the jam? Yes, but it’s spread very thin—not the kind of cake we like to eat in my house. Drag the slider down to 10% and then to 0%. Then move it back to 100% again. You can change opacity as often as you like, with no permanent effect on the layer’s contents.
You can’t use the Opacity slider to change the opacity of the Background layer. By definition, the Background layer always remains 100% opaque. To get around this, you have to convert the Background layer into a regular layer; that’s accomplished by double-clicking its thumbnail and then clicking OK in the resulting dialog. If you look at the Layers panel, you’ll notice that the former Background layer is now called Layer 0, indicating that you can change its opacity.
You can create a document with a transparent background by choosing File, New. From the Background Contents pop-up menu, choose Transparent, as shown in Figure 11.12. When the image window opens, you’ll see a checkerboard pattern, indicating that the layer is transparent. And if you look at the Layers panel, you’ll see that the image’s only layer is called Layer 1 instead of Background. Anything you paint on that layer will have a transparent background. Anything you copy from another source and paste in will go on a new layer that’s also transparent wherever it doesn’t contain image data.
If you have trouble distinguishing the transparency checkerboard from the rest of your image, you can change its color and size in Photoshop’s preferences. Press Command-K/Ctrl+K and click Transparency & Gamut in the left column. You can choose None, Small, Medium, or Large for the size of the checkerboard’s squares, and you can pick from the color choices in the Grid Colors pop-up menu or click the color swatches below it to choose your own colors using the Color Picker.
In Hour 6, “Choosing and Blending Colors,” you learned about blending modes and how they affect the way paint is applied. Almost the same set of modes can be applied to layers to control how their colors combine, and they produce the same general effects, but only on the layers beneath the one to which you have applied the blending mode. (If you’re not clear on what the effects are, refer back to Hour 7.) The color of the layer to which you’re applying the blending mode is called the blend color, and the color of the image below is called the base color. You’ll find all the layer blending modes on a pop-up menu at the top of the Layers panel.
Just as a reminder, the blending modes for layers are the following:
Normal
Dissolve
Darken
Multiply
Color Burn
Linear Burn
Darker Color
Lighten
Screen
Color Dodge
Linear Dodge (Add)
Lighter Color
Overlay
Soft Light
Hard Light
Vivid Light
Linear Light
Pin Light
Hard Mix
Difference
Exclusion
Hue
Saturation
Color
Luminosity
You can apply blending modes directly from the Layers panel or by using Layer, Layer Style, Blending Options. This opens a dialog that gives you a great deal of control over the way blending happens. Along with the usual opacity and blending mode controls, the Blending Options dialog contains the Advanced Blending controls, which enable you to determine which color channels are affected and whether a layer’s special effects contribute to its blending attributes (see Figure 11.13).
If you select more than one layer in the Layers panel (Command-click or Ctrl+click), you can click the Link Layers button at the bottom of the panel to tie the layers together. Each linked layer has a piece of linked chain next to its name. This indicates that the layers are linked together, meaning that if you move the contents of the active layer, all the layers that are linked to it move with it. Figure 11.14 shows the Layers panel with the jam and frosting layers linked to the cake.
When you start working with a lot of layers, you’ll need some help keeping them organized. That’s what layer groups are for: managing collections of layers. After you create a group to contain related layers, you can collapse the entire group or reveal its contents as necessary, without actually flattening the image, and you can hide and show the entire group as one. With the cake example, you could have designated all the edible components as a group. If you needed to move the individual layers or change the size of the objects they contained, you could do so to the whole group instead of having to work with one layer at a time. Layers in a group have to be contiguous; you can’t group layers 1, 3, and 5 together unless you move layers 2 and 4 to above or below the layer group. To create a layer group, Command-click or Ctrl+click to select the layers you want to group, and then choose Layer, Group Layers. To make the group easier to locate, you can double-click its entry in the Layers panel and assign it a color in the Group Properties dialog. The assigned color surrounds the group’s folder icon and the visibility icons of each layer in the group.
Merging layers combines them into a single layer so that you can apply layer effects, mask, and edit them as a unit. The Layer menu contains different Merge commands depending on which layers are active: Merge Layers, Merge Down, Merge Group, and Merge Visible (see Figure 11.15). The latter is always available and applies to all layers that aren’t hidden; Merge Layers appears when more than one layer is selected, and Merge Down is available only when a single layer is selected. Merge Group, as you might guess, appears in the menu when you’ve selected a layer group in the Layers panel.
Flattening an image combines all its layers with the Background layer. You can make this happen at any time by choosing Layer, Flatten Image; if you save in a format that doesn’t support layers, the image is automatically flattened. Formats that do support layers include the two native Photoshop formats as well as TIFF, PDF, and Dicom (which you’ll almost certainly never see or use). However, if you’re saving in TIFF or PDF, you’re most likely sending the file somewhere else to be printed or otherwise output, which means you’re probably done editing it. In this case, you can make the file smaller by flattening the layers before you save it in TIFF or PDF format. Both merging and flattening reduce file size, but beware: After you merge or flatten and close the file, you can’t go back. Those layers are gone.
A comp is a mock-up made so that a client can see how a design for an ad, a web page, or product packaging will look. It includes rough illustrations, sample type, the company’s logo, and so on. Often several comps are made of the same design, with elements in different colors or different positions, to see which version looks best.
Photoshop’s Layer Comps panel gives you the capability to create and save layer comps, each of which records the visibility, layer style, and positions of selected layers. So when you’re working up a design in Photoshop, whether it’s for a big business client or for your holiday newsletter, instead of needing to create a half-dozen examples as six separate documents, you can create just one image file and then add as many comps as you need. To save a layer comp, first open the Layer Comps panel by choosing Window, Layer Comps. When the image is set up the way you want it, with the right layers showing and the others hidden, click the New Layer Comp button at the bottom of the panel. (It looks just like the New Layer button on the Layers panel.) You can name the layer comp and choose which attributes it should preserve in the resulting dialog, shown in Figure 11.16. You can also add notes about this version of the image in the Comment field.
In Figure 11.17, I’ve created a bunch of different versions of my cake. They are all listed on the Layer Comps panel. If you look at the Layers panel as well, you can see that they are simply different combinations of visible layers.
Photoshop also includes customizable layer styles, a number of automated effects that you can apply to layers, including drop shadows, glows, bevels, embossing, and a color fill effect. You’ve already tried the Emboss style on the jam in our cake. Figure 11.18 shows Photoshop’s Layer Style submenu.
You’ll apply these effects to type and to composited images in Hours 17, 19, and 20.
In this hour, you learned how Photoshop handles layers and what you can do with them. You used the Layers panel to create, delete, and move layers. You also learned about layer comps. Layers are an important part of the Photoshop interface, and knowing how to apply them will get you a great deal closer to being a master user, especially when you work with type and composite images later.
Let’s do some more experimenting with layers. First, click the Background color swatch in the toolbox and choose a medium-light color for a background. Then create a new image. Be sure to choose Background Color from the Background Contents pop-up menu so that the image is filled with the color you picked out. Choose a contrasting Foreground color, create a new layer, switch to the Brush tool, and use a medium-sized brush tip to write the number 1. Add layers, with a number on each, until you have about 10. Then, starting with the first one, apply different blending modes. Try changing the transparency of a layer. Move the number 5 to the upper-left corner of the screen. Merge Layers 2 and 3. Play around until you feel that you really understand how the layers are working.