Sub topic 8
Building a cast shadow that follows the ground plane
A cast shadow is the dark shape a subject throws onto the ground, away from the light. This chapter shows how to build one from a copy of the cut-out subject, so its direction and length match the scene and it lies flat on the floor instead of standing up like a sticker.
This chapter assumes you can already do the following:
- Work with layers, layer masks and layer opacity.
- Use Free Transform and its context menu.
- Have a cut-out subject on its own layer (see the earlier chapter on isolating the subject).
- Have read the light in your scene: you know which way the light points and how hard it is.
Why the Drop Shadow style is not enough
The Drop Shadow layer style offsets a copy of the layer's alpha in one direction. It cannot bend the shadow along the ground, and it cannot lengthen the shadow without moving it away from the subject's feet. It works for objects that float or sit against a wall. For a standing subject on a floor, the shadow must be a separate layer that you transform to match the ground.
The idea: project the silhouette onto the ground
Imagine the light as a lamp. Every point of the subject has a shadow point on the ground, found by following a straight line from the light through that point. The feet touch the ground, so their shadow points stay at the feet. The head is farthest from the ground, so its shadow point lands farthest away.
You imitate this with a flipped, skewed copy of the subject, anchored at the feet.
| Light situation | Shadow direction | Shadow length |
|---|---|---|
| Light high overhead | Short, nearly under the subject | Short |
| Light low, such as sunrise or sunset | Long, stretched far across the ground | Long |
| Light from the left | Falls to the right | Depends on height |
| Light behind the subject | Comes toward the camera | Foreshortened |
| Light in front of the subject | Falls behind the subject | Hidden or short |
Step 1: Make a shadow layer
- Select the subject layer and press Ctrl+J (Cmd+J on Mac) to duplicate it.
- Rename the copy "Cast shadow" and drag it below the subject.
- Turn on Lock transparent pixels (the checkerboard icon in the Layers panel).
- Fill the layer with black. Set the foreground color to black and press Alt+Backspace (Option+Delete on Mac).
Lock transparency keeps the fill inside the silhouette. If the subject is a Smart Object, convert the copy with Layer > Rasterize > Smart Object first. A rasterized copy is fine here because you can always make a new one from the original.
You can use a very dark color instead of pure black. Pure black is a good start. You will tint it later, in the color-matching chapter.
Step 2: Flip the copy
Choose Edit > Transform > Flip Vertical. The shadow now hangs below the subject like a mirror image.
The flipped copy is positioned wrongly. Its feet are at the top, and they must touch the subject's feet. Use the Move tool to slide the copy up until the two sets of feet meet at the same spot on the ground.
Check this carefully. If the shadow's feet do not meet the real feet, the viewer reads the subject as floating.
Step 3: Transform along the ground plane
Press Ctrl+T (Cmd+T) for Free Transform. Right-click inside the box and choose Skew, Distort or Perspective, depending on the scene.
- Use Skew for a simple directional shadow. Drag the top-middle handle sideways. The feet stay put and the head end slides across the ground.
- Use Distort when the ground has a strong perspective and the shadow must converge toward a vanishing point. Drag the corner handles individually.
- Use Perspective when two sides must stay parallel to the camera but the shadow narrows with distance.
To make the shadow shorter or longer, scale the layer vertically while the pivot sits at the feet. Click the pivot point in the options bar and set it to the bottom center, or drag the pivot dot to the base of the subject.
Use the scene itself as a guide. Look for existing shadows from other objects, and match their angle. If there are floor lines, tiles or a table edge, make the shadow's base follow them. A shadow that ignores the lines of the floor looks pasted on.
Step 4: Blend the shadow into the ground
A black shape at 100% opacity looks like a cut-out. Fix it with the blend mode and opacity.
- Set the blend mode of the shadow layer to Multiply. Multiply keeps the texture and color of the floor underneath, so grain and tile joints show through.
- Lower the opacity to about 40–60%. Hard sunlight allows a darker shadow. Overcast light needs a fainter one.
// Assumes a pixel layer named "Cast shadow" already exists in the document
var doc = app.activeDocument;
var shadow = doc.artLayers.getByName("Cast shadow");
shadow.blendMode = BlendMode.MULTIPLY;
shadow.opacity = 50;Step 5: Soften and fade
Real shadows are sharp near the contact point and blurrier far from it, because the light source has some width. A uniform blur cannot do this. Use two steps.
- Apply Filter > Blur > Gaussian Blur. Use a small radius first, perhaps 3 to 8 pixels, and increase it for a softer light. For an overcast scene, 15 or more can be right.
- Add a layer mask and drag a black-to-white linear gradient across it, so the shadow is solid at the feet and fades toward the far end.
The mask works because it is non-destructive. You can repaint the gradient any time to change how quickly the shadow fades.
For better results, convert the shadow layer to a Smart Object before blurring. The Gaussian Blur then becomes a Smart Filter with its own mask. Paint black on the filter mask near the feet to keep that part sharp, and leave the far end blurred.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| Subject looks like it floats | Shadow feet do not touch the real feet | Move the shadow so its base meets the base of the subject |
| Shadow looks like a standing silhouette | Only flipped, not skewed to the ground | Use Skew or Distort so it lies flat |
| Shadow points the wrong way | Light direction not checked | Compare it with other shadows in the photo |
| Shadow is gray and flat | Normal blend mode | Use Multiply and check the color of the floor |
| Shadow is too uniform | One blur value for the whole shape | Add a gradient mask or Smart Filter mask |
| Shadow passes through a wall or object | Shadow is not clipped by the scene geometry | Mask it, or split it so it bends up the wall |
| Fill spills outside the silhouette | Transparency was not locked | Undo, lock transparent pixels, fill again |
Edge cases
- Uneven ground. If the shadow crosses a step, curb or rock, cut the layer into pieces and transform each piece to its surface. A shadow bends where the ground bends.
- Multiple lights. Each light makes its own shadow. Make one layer per light, with different opacity values. The strongest light gets the darkest shadow.
- Shadow on a wall. Treat the wall as a second ground plane. Use Distort so the shadow follows the wall's perspective.
- Soft shapes. Hair or fur may need a mask edge refined with Select and Mask before the copy is filled. Otherwise the shadow edge looks hard and jagged.
- Subjects with gaps. A subject with a gap between the legs lets light through. Your flipped copy already keeps that gap, so leave it.
Check your work
Zoom out to a normal viewing size and ask these questions.
- Do the shadow's feet meet the subject's feet?
- Does the direction agree with the light and with other shadows?
- Is the shadow darkest and sharpest at the base?
- Does the floor texture still show through the shadow?
- Does the shadow follow the floor lines?
If all five answers are yes, the shadow is ready. The next chapter softens it further and refines the fade.
Exercise
You flipped a duplicate of a standing person vertically, set it to Multiply, and the shadow looks like an upside-down person lying under the feet at an odd angle. What two transform steps should you check, and what should the pivot be for the transform?
Show answer
First check that the feet of the flipped copy meet the feet of the real subject, by moving the copy until they touch. Then apply Skew (or Distort/Perspective) so the copy lies along the ground in the direction away from the light. Set the transform pivot to the base of the subject (bottom center, at the feet), so the contact point stays fixed while the head end moves.
Exercise
Why does a shadow built with a uniform Gaussian Blur look less realistic than one with a blur plus a gradient mask, and how would you keep the blur editable?
Show answer
A real shadow is sharper close to the object and softer and fainter farther away. A uniform blur softens every part equally, so the contact area is too fuzzy or the far end too sharp. A gradient mask fades the shadow with distance. To keep the blur editable, convert the shadow layer to a Smart Object so the Gaussian Blur becomes a Smart Filter, and use the filter mask to reduce the blur near the feet.