Shadows are a big part of the natural world. They’re everywhere! A shadow can be really dark, almost black with hard edges. Or it can be a diaphanous wisp of a darker tone that fades into light. However you cut it, in nature there’s no escaping the shadow you cast except by turning off the lights.
In order to mimic nature you must include shadows in your pictures. When you composite images from multiple sources, you must also create shadows in order to maintain credibility.
 |
|
Figure 1: Without a shadow and with an incorrect light source, the composited image looks separate from the background.
|
The best composites are seamless. That means it’s impossible to tell that they have been manipulated.
Figure 1 shows a picture of a guy without a shadow strolling through the sandy desert. Without a shadow, in that environment, he looks like he’s floating. The light illuminating the guy originates from a different direction than the light falling on the surrounding dunes. A shadowless guy standing in a differently lit world indicates the image is a fake and a bad one at that.
This article will show you how to create drop shadows and cast shadows that are so realistic that it will be impossible to tell that they were ever not a part of the original image. One key point: all shadows must start with layer content that is lit from the same direction as the background.
Drop Shadows
Everything that is opaque casts a shadow. An opaque object blocks light emitted from a light source. If the light source is really strong and there is an absence of ambient light on the opposite side, the shadow can appear very dark or even black with hard edges. Weaker light and more ambient light produce lighter shadows with softer edges.
A drop shadow is simply a replica of an element. Placed behind the layer content, it gives the appearance that the element is at a distance from the background. In Photoshop a drop shadow is created as a Layer Style. Layer Styles use the shape of the layer content to define the shape of the shadow. To create a drop shadow the layer content must be surrounded by transparency. In the Layer Styles dialog box, accessed by double clicking on the layer thumbnail in the Layers panel, click on the name Drop Shadow in the layer style list to display the controls that determine the drop shadow’s appearance.
 |
|
Figure 2: An image with composited content and type with drop shadows give the appearance of the content being forward in the picture plane.
|
The extensive controls include opacity, color, angle, distance, spread, size and contour. The distance can also be controlled manually by dragging the shadow while controls are displayed. The Use Global Light check box in the Structure field assures that all layer styles that have this box checked share a consistent light source (
Figure 2).
Cast Shadows
Drop shadows produce a cool effect. They are simple to create and they can be easily edited. They can really make layer content “pop”. However, drop shadows are limited to the layer’s shape and cannot be distorted independently to conform to a specific plane of contour in the image. The solution is to create a cast shadow, an effect that is more adaptable.
Creating cast shadows require a bit more elbow grease than drop shadows. A drop shadow is quite simply a gray, semi-transparent, soft-edged duplicate of the layer content. A cast shadow has similar qualities except that it is distorted by the direction of the light source and the terrain on which it rests.
Here is a simple technique to create a cast shadow:
1) Open an image that is composed a background on the bottommost layer and the content that is casting the shadow on a layer immediately above. I’ve flipped the guy horizontally to assure that the light source on both layers is consistent. The image of the guy should be surrounded by transparency.
 |
|
Figure 3: The Layers panel after the shadow layer was filled with black.
|
2) Drag the topmost layer to the New Layer icon to duplicate it. Double-click the new layer’s name and type the word Shadow. Drag the Shadow layer so that it is between the topmost layer and the background. In the Layers panel click on the Transparency lock.
3) Press the D key to make the foreground color black. Press Option-Delete/Alt-Backspace to fill the contents of the layer with black, as in Figure 3.
4) Click again on the Transparency lock to deselect it.
5) Choose Edit > Transform Distort. Drag the handles of the bounding box so that the contents of the shadow layer appear to lie on the ground. You may have to play with it a little to get it to look convincing. Sometimes you may even have to flip it vertically or horizontally. When you’re satisfied, commit your transformation by pressing Return/Enter (see Figure 4).
 |
|
Figure 4: The shadow is laid on the ground and distorted with Edit > Transform > Distort.
Figure 5: The shadow is warped (Edit > Transform > Warp) to conform to the ground’s surface.
|
6) If the shadow lies on uneven terrain, or you want to readjust it, choose Edit > Transform Warp. Drag the handles of the warp grid to conform with the topography of the background, as shown in
Figure 5. Commit your transformation by clicking on the check mark in the Options bar.
7) Observe the existing shadows on the image and globally adjust the opacity of the cast shadows to match. In this instance I added a layer mask to conceal the top of the shadow that overlaps the dark side of the dunes.
 |
|
Figure 6: The shadow is blurred and the opacity of the layer is adjusted.
|
8) Choose Filter > Blur > Gaussian Blur. Click and drag the slider to the right to soften the edges of the shadow. The amount will depend on the resolution of the image and how fuzzy you want the shadow to appear (
Figure 6). Click OK.
Fading the Shadow
The previous seven steps certainly produce an adequate cast shadow; however, for even more realism we’ll push the envelope a bit further and go for a shadow that fades. Consider two optical phenomena that are observable with different ambient lighting conditions. First, the shadow may gradually fade as it is cast further from the object. Second, the shadow’s edge closer to the content might be sharper and appear blurrier farther away. These are subtleties that help create the most realistic shadows.
Here’s how you can create a shadow that fades:
1) First, follow steps one through six to create a cast shadow (see above).
2) Select the shadow content on the Shadow layer by Cmnd/Cntrl clicking on the thumbnail.
3) Click on the Shadow layer to highlight it. Choose Layer > Layer Mask > Reveal All.
4) Press the D key to make the foreground color black and the background color white, then press the X key to reverse the colors.
5) Click on the layer mask. Choose the Gradient tool and drag a gradient. The white part of the gradient should be closest to the layer content, so drag away from the content. The far edge of the shadow fades. You may have to drag a few times until you get the perfect direction.
6) Observe the existing shadows on the image and adjust the opacity of the cast shadows to match.
Variable Edge Shadow
Here is a technique that uses a Smart Filter to modify the shadow’s blur.
1) Follow steps one through six to create a cast shadow (see above).
2) Highlight the shadow layer. In the Layers panel pull-down menu choose Make Smart Object. You’ll see a little icon on the Layer thumbnail that indicates the layer is a smart object.
3) Choose Filter > Blur > Gaussian Blur. Drag the slider until the shadow is blurry. Click OK.
4) The Shadow layer now has a Smart Filter mask below it in the stack. Click on the mask.
 |
|
Figure 7: The Shadow layer has a gradient layer mask that gradually fades the shadow as it gets further from the content. There is also a Smart Filter gradient mask applied to the Gaussian Blur filter that gradually blurs the edges of the shadow.
|
5) Press the D key to make the foreground color black and the background color white. Choose the Gradient tool and drag a gradient. The black part of the gradient should be closest to the layer content, so drag away from the content. The far edge of the shadow blurs more than the close edge. You may have to drag a few times until you get the shadow to fall in the right direction.
Figure 7 shows the completed faded shadow and gradual blur.
6) If you want to readjust the blur values click on the word Gaussian Blur under the mask to display the filter’s dialog box.
Cast shadows anchor the composited content to the overall picture and greatly enhance the believability of your images. Realistic shadows add nuance and subtle tonality that affects the atmosphere of the piece. With a little extra work, you’ll find that the effect can be astounding.