Sub topic 11
Painting contact and cast shadows
This chapter assumes you can make selections and layer masks, use adjustment layers, and know the basic blend modes. It builds on the earlier chapters on reading light and blending cut-out edges. You will paint the two kinds of shadow that anchor an element to a surface, using only non-destructive layers.
Why shadows decide the result
A cut-out can match the background in tone and colour and still look pasted on. The usual cause is a missing or wrong shadow. Shadows tell the viewer where the object touches the ground, where the light comes from, and how hard that light is.
Two shadows do different jobs:
- A contact shadow (also called an occlusion shadow) is the dark, tight area where an object meets a surface. It exists even under soft, flat light, because the surface there is blocked from the sky.
- A cast shadow is the shape the object throws across the surface. Its direction, length, and edge softness come from the light source you identified earlier.
Most beginners paint only a cast shadow, and often as a uniform soft blob. Real shadows vary in darkness and sharpness along their length, and they follow the surface they land on.
Set up the shadow layers
Keep each shadow on its own layer so you can adjust it later. Place the layers between the element and the background, in this order from top to bottom:
- The element (ideally a Smart Object with a layer mask).
- Contact shadow layer, blend mode Multiply.
- Cast shadow layer, blend mode Multiply.
- The background plate.
Multiply darkens the layers below and keeps the surface texture visible through the shadow. A shadow painted in normal mode with black covers texture and looks like a stain.
Create each layer as an empty pixel layer. Do not paint on the background.
Choose the shadow colour
Pure black is almost never right. Shadows pick up the colour of the light that still reaches them, usually the sky. For an outdoor scene under a blue sky, shadows lean cool. Use the Eyedropper to sample the darkest area of an existing shadow in the plate, then paint with that colour, or a slightly more saturated version of it. Because the layer uses Multiply, a mid-dark saturated colour gives a more natural result than black at low opacity.
Paint the contact shadow
- Select the contact shadow layer and choose the Brush tool.
- Pick a round soft brush at 0% to 20% hardness, depending on how sharp the plate's shadows are.
- Set the brush size to roughly the thickness of the gap you are filling. For a shoe on pavement, that is a few pixels to a few dozen pixels.
- Set Opacity to about 30% to 50% and build up in several strokes.
- Paint along the exact line where the object meets the surface, not under the whole object.
The contact shadow should be darkest right at the touching edge and fade quickly. If it extends far, it is becoming a cast shadow.
Check where the object really touches
Only the parts that touch the surface get a contact shadow. A person walking has one foot planted and one in the air. The planted foot gets a dark contact shadow. The raised foot gets a lighter, offset one, or only the cast shadow.
Paint the cast shadow
Find the shadow direction
Use the plate to find the light direction. Look for an object in the background with a clear shadow, such as a post or a tree trunk. Imagine a line from the tip of the object through the tip of its shadow. In a scene lit by the sun, every shadow's base-to-tip line points away from the sun in the same direction on the ground, though perspective makes parallel lines appear to converge.
For a precise placement, draw a line from the base of a background object to the end of its shadow. Then draw a line from the top of the object to the end of its shadow. Repeat for your element: its shadow ends where the lines from the top of your element, parallel to the first line, meet the ground line.
Build the shape
The fastest reliable method is to duplicate the element and distort it:
- Duplicate the element layer, then Ctrl/Cmd-click its thumbnail to load its selection (or use the duplicate directly).
- Fill the selection with your shadow colour on a new layer, or convert the duplicate to a black silhouette with a Brightness/Contrast or Levels clipped adjustment.
- Press Ctrl/Cmd+T, then right-click and choose Flip Vertical.
- Anchor the base of the silhouette at the base of the element, so the feet or bottom edge stay touching.
- Use Distort or Skew to lay the shadow along the ground in the light direction. Stretch it for a low sun and shorten it for a high one.
- Set the layer to Multiply and lower Opacity until the shadow matches the plate's darkness.
If the ground is not flat, such as grass, steps, or a curb, use Edit > Transform > Warp so the shadow bends over the surface. Where a shadow crosses a step, it breaks at the edge of the step.
Soften with distance
In real light, a shadow is sharp near the object and gets softer farther away. A single Gaussian Blur applied to the whole shadow cannot do this. Use one of these approaches:
- Two-layer method. Keep a sharper copy near the base and a more blurred copy for the far end. Mask each so the sharp one fades out as the blurred one fades in, using a gradient on the layer mask.
- Variable blur. Convert the shadow to a Smart Object and apply Filter > Blur Gallery > Tilt-Shift or Path Blur. Place the sharp zone at the base.
Convert the shadow layer to a Smart Object before blurring, so the blur stays editable as a Smart Filter.
Shadows that follow the surface
A shadow takes the shape and texture of what it lands on. Check these cases:
| Surface | What to do |
|---|---|
| Flat ground | Skew the shadow to match perspective. |
| Grass or gravel | Lower the shadow opacity, add a mask with noise, or use Blend If to let bright blades show through. |
| Steps or curbs | Split the shadow into pieces and shift each at the edge. |
| Wall behind the subject | Warp the shadow onto the wall and make it larger and softer. |
| Water | Use a reflection instead, offset and slightly blurred, rather than a solid shadow. |
For textured ground, double-click the shadow layer to open Layer Style and use the Blend If sliders for "Underlying Layer". Hold Alt/Option and drag a slider to split it. This lets the lightest points of the ground texture break through the shadow.
Make the shadow density consistent
Shadow darkness should agree with the plate. Compare your shadow with a real one on a similar surface. If they differ, adjust opacity first, then change the shadow colour. Light bouncing around the scene makes shadows lighter, so a shadow in a bright, open scene is rarely near black. The next chapter covers bounce light and colour spill in more detail.
The diagram below summarises how the shadow layers sit in the stack and what each controls.
Common errors
- Shadow in the wrong direction. Re-check against two background objects, not one.
- Shadow separated from the object. The base of the shadow must start exactly at the contact point. Zoom to 200% and check.
- Uniform blur. The shadow looks like a drop shadow from a layer style. Use graduated softness.
- Black shadow at 100%. It looks like a hole. Use a sampled colour and lower the opacity.
- Shadow ignores surface. Flat shadow on rough ground. Warp it and use Blend If.
Exercise
A person is composited onto a road in a photo where a lamp post's shadow stretches to the lower left and gets blurrier toward its tip. List the layers you would create for the person's shadows, their blend modes, and how you would make the shadow soften with distance.
Show answer
Create two pixel layers below the person, both in Multiply mode: a contact shadow layer with a small soft brush painted only where the shoes touch the road, and a cast shadow layer made from a flipped, skewed silhouette of the person that points to the lower left, matching the lamp post's direction. Sample the lamp post's shadow colour for the fill. To soften with distance, convert the cast shadow to a Smart Object and apply Tilt-Shift or Path Blur with the sharp area at the feet, or use a sharp copy and a blurred copy joined by a gradient mask. Lower the opacity until its darkness matches the lamp post shadow.
Exercise
Why is Multiply a better blend mode for shadows than Normal mode with black paint?
Show answer
Multiply darkens the layers below while keeping their texture and colour, so ground detail still shows through the shadow. Normal mode with black paint covers the texture and produces a flat, stain-like patch.