Today is the first day of Week Two. You've already learned a great deal about Photoshop, but there is, as always, more to learn. This week's material, however, is the fun stuff. Today we are going to discuss one of the most important aspects of Photoshop--Layers.
At first, layers might seem confusing, even daunting, but don't worry--they're not as bad as they sound. In fact, they are exactly what their name implies--layers within one image--and each layer can be adjusted and edited separately from the others. That's what makes this feature so cool.
If it helps, think of it this way. Remember Bugs Bunny and how he is always walking in the woods, or the city, or maybe even on a boat. Well, the geniuses at the Warner Bros. studios created these backdrops and then made the animated Bugs move through them. Hence, two layers--Bugs Bunny and the background.
Photoshop has a capability similar to this animation technique, but you can create a great many more layers than just two. It enables you to create up to 100. You can hide layers, while you work on others. You can link layers together and you can employ adjustment layers that enable you to make color and tonal corrections in your images. You can also use layers to create interesting collages, which we will examine at the end of today.
The best method for getting started is to open a couple of images and go from there. Please open files 08file01 and 08file02 from the CD-ROM, and select Window+Show Layers. This brings up the Layers palette (see Figure 8.1), where you will control your layers' behavior--creating, adding, deleting, hiding, and showing.
Figure 8.1
The Layers palette with two layers: Layer 1 and a Background. Most of the time when
you open an image, it will only have one layer (this image has two for illustration
purposes).
The Layers palette is command central for working with layers. The small versions of your images on the left of the palette are called thumbnails. Each of these small rectangles displays a separate layer. When you first open an image, you will probably have only one thumbnail in the Layers palette (that is, unless it was saved with layers, which we will get into later in this chapter). If the thumbnails are too small for your liking, select the Palette Options command from the palette's menu, (the arrow in the upper-right corner) and check out Figure 8.2.
Figure 8.2
Optional thumbnail sizes.
You can choose from three different sizes and also no thumbnail image at all. Remember that every image on your screen consumes a certain amount of the RAM available to run Photoshop. So if you can get by with the smallest thumbnail, try to. The smaller the thumbnail the less space the palette will take up on your desktop. This is an advantage as you begin to work with 3, 4, 5, and more images at a time.
Now that you have opened a couple images, have the Layers palette up, and have decided on a thumbnail size you are comfortable with, let's paste one image into another, thus creating two layers:
Figure 8.3
The combined images.
The figure that you selected and pasted should appear in the image. Now, turn your attention to the Layers palette. There should be two layers there--a background layer and layer 1.
In Photoshop 4, every time you paste or drag an image into another, a new layer is automatically created to accommodate that image. You can also create layers as you go. We'll look into this in a moment.
Another great feature of layers is that when you want to concentrate on one part of your image, you can hide all the other layers. To the left of the thumbnails, you will notice small icons that resemble eyes (refer to Figure 8.1). If you see the eye, you can see the layer. If you click the eye, however, the eye disappears and the layer becomes hidden.
Let's try it. Click the eye icon next to your background layer. It will disappear, as will the corresponding layer. Click it again and it will reappear--with the layer.
Next to the eye icons, to the right, you will notice a box that contains a paintbrush (see Figure 8.4). This indicates the active layer--or the layer on which you can work. Paint all you want, but only the layer with the paintbrush receives the paint.
To change the active layer, click in the white space to the right of the icon (see Figure 8.5). If you try to click in the empty box where the paintbrush icon should appear, you will end up with a chain icon, which indicates that the layers are linked. We'll look at this option in just a few pages, but for now it is not what we want.
Figure 8.4
The active layer.
Figure 8.5
Changing the active layer.
Try changing the active layer by clicking in the space to the right of the thumbnail. Notice that the active layer will turn black.
You also can change the order of the layers. To do so:
Notice the slider at the top of the Layers palette (see Figure 8.6). This controls the opacity of the active layer. It can be adjusted from 0 to 100% by dragging the slider or by entering a value by typing "0" for 100%, "1" for 10%, "2" for 20%, and so on. Zero makes the layer totally invisible, whereas 100% makes the layer fully visible.
Figure 8.6
The Opacity slider.
Let's give the opacity slider a try. It is one of the most fantastic features that layers offers--one fantastic feature among many.
The background cannot be affected by the opacity slider. It always remains at 100% opacity. There is, however, a way around this. There is a difference between the background of your image and what Photoshop sees as the background to your layers.
To create an image with a semi-transparent background:
NOTE: When a layer is labeled as the Background layer, you are not permitted to change the opacity or employ blending modes. To change the background layer in an image so that you may manipulate it, simply double-click the background layer in the Layers palette and rename the layer.
Figure 8.7
The new file settings.
Figure 8.8
Note the absence of a background layer in the Layers palette.
I used the Elliptical marquee to select the man's face with a feather of 2 pixels--in case you were wondering (see Figure 8.9).
Figure 8.9
The resulting image.
You see, in this exercise, we have sort of fooled Photoshop into thinking that there is a background layer, which there is, only it is transparent. The background of your image then becomes Layer 1.
NOTE: You also can add a background layer to a file that lacks one by selecting Background from the blending modes drop-down menu.
If you want to create a new layer before you paste an image into another, open the Layers palette menu (arrow in the upper-right corner) and choose New Layer. The following dialog box will appear.
Figure 8.10
The New Layer dialog box.
In the New Layer dialog box, you can name your layer, select an opacity, which you can always change after working with it, and select a blending mode. The Group With Previous Layer checkbox welds your new layer to the one beneath it.
All these features are useful, but they are all available in the Layers palette. Therefore, I strongly recommend that you, 99 out of 100 times, allow Photoshop to create the new layer automatically for you. This way you don't waste time on creating settings whose effects you can't immediately see. Make the changes to opacity, blending modes, and link options after you get the image onto its own layer.
If, however, you have created a new layer or pasted in something that looks terrible, it is easy to delete a layer. This removes only the layer in question and all other layers (or parts of the image) are left untouched. This is even better than Undo. With this feature, da Vinci could have painted 10 different smiles for his famous lady and tried them all without affecting the face beneath.
To delete a layer, click it to make it the active layer. Now, click and drag (the cursor will become a fist) the layer onto the garbage can icon at the bottom of the window (see Figure 8.11). You can also just select the layer and click the trash can, without dragging it, and a confirmation dialog box will appear.
Figure 8.11
The Trash Can icon.
The blending modes are available in a drop-down menu at the top left corner of the Layers palette (see Figure 8.12). These options control how the "paint" in the background combines with the "paint" of the foreground. These are in quotation marks because, of course, Photoshop doesn't really deal with paint. It deals with pixels, which are colored light values, and that is why we can so easily combine and blend them. See Day 5, "Adjusting Color," for a full explanation of the blending modes.
Figure 8.12
The blending modes.
As you work with layers you will find a useful tool under the Layer menu in the Layer Options feature (see Figure 8.13).
Figure 8.13
The Layer Options dialog box.
Three of the commands, preserve transparency, mode, and opacity, are available on the Layers palette and we have already discussed them. Let's instead focus on the lower half of this dialog box--the blending options. Figure 8.14 shows the image we'll be working with in this section.
Figure 8.14
Original image.
The layer slider (the top slider) enables you to specify how the pixels in the layers will blend (see Figure 8.15). The range is defined from 0 (black) to 255 (white). Thus, for example, if you set the values for the top slider to 50 and 255, respectively, only those pixels with those midtone range colors will appear in the final image (make sure to click the Preview check box!).
Figure 8.15
This Layer slider set to 55 and 255.
The really dark tones, those that would fall in the 0 to 49 range, are excluded from our preview. Now, let's try reversing our process somewhat. If I change the settings to 0 and 200, we get the result as depicted in Figure 8.16.
Figure 8.16
This Layer slider set to 0 and 200.
Now let's investigate how the underlying layer affects the image. Because most of the background layer is comprised of light colors, let's remove the light colors from the color range by setting the underlying slider to 90 and 135 (see Figure 8.17).
Figure 8.17
The underlying layer set to 90 and 135.
You see, with the full color range (0 to 255) allowed in the top layer, and 90 to 135 in the bottom layer, only the pixels 0 to 89 and 136 to 255 are blended. Those parts of the overlying image that fall directly above the blended pixels (0 to 89 and 136 to 255) are not blended.
The point is this: in the upper layer, any values between the points are retained and blended in the final image. In the underlying layer, color values that fall outside of the defined points of the color range are included in the final image. Thus, if you set 100 and 200 in the upper layer, those are the values that will appear in the final image. If, on the other hand, you set 100 and 200 in the underlying slider, the values 0-99 and 201-255 will appear in the final image.
In the Layer Options dialog box, you can also specify RGB values separately and the application remembers your settings for each.
Layer options is another feature in the Layer Options dialog box. It enables you to control the blending of layered images. However, as you can see in Figure 8.17, too much blending can really obscure the upper layer. Use this feature sparingly--unless, of course, what you see in Figure 8.17 is the effect you desire.
The term clipping group refers to a technique using layers that enables you to define, in a multi-layered image, some of the upper layers as masks for the lower layers or background. This is a great technique when you want, for example, to fill text with a background image. It might sound a little confusing at first, but there's nothing to it.
To create a clipping group:
Figure 8.18
The Layers palette.
Figure 8.19
The New Layer dialog box.
Figure 8.20
The Text Mask tool.
Figure 8.21
The Type Tool dialog box.
Figure 8.22
The Fill dialog box.
Figure 8.23
Our image so far.
Figure 8.24
The Elliptical Marquee tool.
Figure 8.25
The Elliptical Marquee Options palette.
Figure 8.26
The flowers pasted into the image.
Figure 8.27
The newest layer.
Figure 8.28
Linking layers.
Sometimes you might want to add another layer to the clipping group, but beware, after you have one clipping group, the next must occupy a different space or it will be invisible unless you have the layers arranged in the proper order. To add a layer:
Figure 8.29
The final effect.
When you add an image (and subsequently, a layer), just click the link icon in the Layers palette and select Layers+Group with Previous.
See Figure 8.30 for the order in which the layers fall. You might, to get the desired effect, have to drag one layer on top of another. Experiment and play around until you get things right.
Figure 8.30
The Layers palette with the a image added.
Not unlike the clipping group technique described in the preceding section, layer masks enable you to hide and reveal parts of layers, as well as apply special effects, such as filters, in a controlled and precise manner.
Let's work with the image you created in the last section, or if you already discarded it, open the file skyblend.psd from the CD.
Figure 8.31
The Layers palette.
Figure 8.32
The marquee in the flowers layer.
This, however, is only one of the commands available in the Layer+Add Layer Mask menu option. Let's try the others and see what happens. First, let's try Layer+Add Layer Mask+Reveal Selection:
Figure 8.33
A layer mask that hides a portion of the flower image.
Figure 8.34
The revealed selection.
This does just the opposite of the first command, Hide Selection. This command removes everything from a layer except that area within the marquee selection.
NOTE: You don't have to go through the menu commands to create a mask. Simply click the Add layer mask button at the bottom of the Layers palette (refer to Figure 8.1).
The other commands, Hide All and Reveal All, work a little differently. These are based on the entire layer.
Let's see what we can do with these commands.
Figure 8.35
The Layers palette with the Text layer on top.
Figure 8.36
Hiding the topmost layer by painting the mask with black.
Finally, let's take a look at the Hide All command available under the Layer menu.
Figure 8.37
Revealing the topmost layer by painting the mask with white.
This produces an excellent effect. Remember, paint the mask with black to hide the mask again. Try painting with different brushes at different opacities and using different blending modes to achieve a variety of effects.
Here is a cool (and easy) way to create some great effects. Combine the use of layer masks with the power of the Photoshop filter collection. In the following image, I applied the Filter+Distort+Twirl (see Figure 8.38). It came out with a rather cool effect.
Figure 8.38
Twirl filter applied to layer mask.
As a general rule of thumb, (and we all know that rules, especially those set down by computer book authors, are made to be broken), use the Filter+Distort filters when you work with layer masks. You might also get some really interesting effects by using the Lighting Effects filters.
For more information on filters, turn to Day 12, "Photoshop Filters." For now, I just didn't want to overlook reminding you of this neat, easy feature that can really enhance an image. Try a few and see what you think.
The mask that you add to an image creates a new channel in your image. For more information on channels, see Day 5. Add a mask and select Window+Show Channels.
Click the eye icon to the left of the mask in the Channels palette and the mask appears as red, representing rubylith, a carry over from the old days when this stuff was done in the real and not the cyber world (see Figure 8.39).
Figure 8.39
The image with the red mask displayed.
Double-click the mask section of the Channels palette. This invokes a dialog box where you can edit the opacity of your mask and, if you don't like red, choose another color (see Figure 8.40). You may also access this dialog box by double-clicking the layer thumbnail in the Layers palette.
Figure 8.40
The Layer Mask Display Options dialog box.
There are two ways for you to get rid of the layer mask when you are done with it or you want to start over.
The first way, possibly the easiest, is simply to drag the layer mask icon found in the Layers palette onto the small trash can icon at the bottom of the window (see Figure 8.41).
Figure 8.41
Trashing a Layer.
You also can get rid of a layer by selecting Layer+Remove Layer Mask. Whichever way you prefer, you will be presented with the following box in which you are prompted to Apply the effects of the mask or Discard the mask without applying it (see Figure 8.42).
Figure 8.42
Apply, Discard, or Cancel.
NOTE: Using the Layer+Disable Layer Mask you can get rid of the effects of the layer mask temporarily. When you want it back, just hit Layers+Enable Layer Mask and you are back in business.
Now you have worked with layers and layer masks, you've created a layered image, you've applied a cool lighting effect filter to a mask, but somehow something still just isn't quite right. It's the color.
You don't want to have to go back and do all the color adjustment on all those images that went into that wonderful work of art hanging on your monitor, so what do you do?
Adjustment layers. These guys enable you to make changes to the color and tone of your image without having to take your image apart. Make a correction--if you like it--and keep it. If you don't like it, trash it.
To explore the world of adjustment layers:
Figure 8.43
What you should have so far.
Figure 8.44
The New Adjustment Layer dialog box.
Figure 8.45
The Levels dialog box.
Figure 8.46
preview of the image.
Now that you know how to apply an adjustment layer, let's figure out what you can do with them, adding to their usefulness and functionality.
Figure 8.47
The Hue and Saturation dialog box.
NOTE: Most of the adjustment layer options come with a Preview check box in their respective dialog boxes. Make sure to check it so that you can see your changes immediately.
Figure 8.48
The Fisherman surrounded.
In the preceding image, you see the fisherman with an aura of lighter color about him, but you will also notice that although you clicked OK in the Hue and Saturation dialog box (or whatever dialog box, if you used another adjustment option), this did not remove the adjustment layer. It is still there for you to use. In the following exercise, we will, as we did in the previous section on layer masks, paint to add or make transparent portions of the adjustment layer.
Figure 8.49
The Layers palette.
Figure 8.50
The Paintbrush tool and the default color button.
Figure 8.51
Painting with white.
Figure 8.52
Painting with black.
As you learned while working with layer masks, painting with white adds the color, while painting with black hides the color. Paint with gray if you want to hit somewhere in between the true color and removing it altogether.
NOTE: If you didn't like the way that your adjustment turned out, don't despair. Simply select it in the Layers palette and choose Layer+Adjustment Options. This enables you to make all the changes you want, as many times as you want.
The more layers you add to an image, and the more effects that you add to those layers, the larger your image file will become. If you have a large capacity hard drive and can back up to removable media, size isn't a problem.
It does, however, make a big difference if you want to use your files for anything else, such as publishing in print or on the web. The only format in which you can save a multi-layered image is the Photoshop native format, which is great for Photoshop, but bad for other uses. For the web, you need to save as GIF or JPEG. For print, you probably will need to save as TIFF.
Therefore, when you have completed an image to your satisfaction, and you want to reduce its file size and/or make it available to be viewed by software other than just Photoshop, you need to flatten the image or merge the layers.
As a final note to this chapter, I would like to take you on a brief excursion through the creation of collages, a task at which Photoshop excels, as a result of layers. Collages are combinations of images, juxtaposed and dissonant or in harmony, that represent a whole that exceeds the mere sum of its parts. If you learn how to create effective collages, there is no telling the market for your valuable skills.
Images can be combined effortlessly. They can be manipulated easily, as well as removed when things aren't turning out exactly as you had imagined. Of course, the real trick is finding the inspiration.
NOTE: If you want to know more about the art of creating collages with Photoshop, I suggest that you find a copy of Photoshop Collage Techniques by Greg Haun, also published by Hayden Books.
In the following exercise, we will walk through the creation of a simple collage. Feel free to choose other images than I have chosen, or to add images. You have up to 99 layers to accomplish your purpose with, so don't be shy. Stretch out and engage yourself in some pure play--this should be fun.
Figure 8.53
Water selection pasted into wall image.
Figure 8.54
Glass filter.
Figure 8.55
Water with layer mask added.
There is nearly an infinite number of things you can accomplish with Photoshop and collage. Explore the real, the abstract, create everything from the common to the uncommon. Just don't ever let Photoshop stand in your way. If you can think of it, Photoshop can probably do it. And always keep looking for a better, faster way.
Figure 8.56
Final image.
I was told by a colleague before I began writing this book that what he needed was a good tutorial on layers. I hope that this chapter solves his and your confusion. Layers can be a little perplexing, but I believe that is because there is no analog to it in the real world. In reality, if you drop a picture on top of another, that's that. The one on top shows up, and there is no way to push it through to the back or bring the one in back to the front. Photoshop creates this capability. Each layer is infinitely manipulatable. Add and delete layers to your heart's content. Make some opaque, make others transparent, add filters, and use adjustment layers until you are satisfied with your work.
© Copyright, Macmillan Computer Publishing. All rights reserved.