Sub topic 7
Contact shadows: grounding the subject
This chapter assumes you can make a layer mask, load a selection from a layer, and switch blend modes. It also assumes you have a cut-out subject on its own layer above a background photo. The previous chapters covered reading the light and using Multiply. Here you apply both to the most important shadow in a composite.
What a contact shadow is
A contact shadow is the small, dark, tightly bounded area where an object meets the surface it rests on. It is the first thing the eye checks when deciding whether an object sits in a scene or hovers above it.
Two physical effects produce it:
- Occlusion. The object blocks light from the sky and nearby surfaces. The gap between the object and the ground is narrow, so very little light reaches it. This is called ambient occlusion. It happens even under flat, diffuse light that casts no clear directional shadow.
- Direct shadowing. If there is a dominant light source, the object also blocks it. That produces the cast shadow, which is the subject of the next chapter.
A contact shadow is darkest exactly where the object touches. It fades quickly as the gap between object and ground grows. A sharp, dark edge at the contact line with a short soft falloff is the signature of a believable one.
Why a cut-out looks like it floats
A pasted subject usually fails for three reasons:
- No darkening at the contact line, so the object appears to hover.
- A bright halo of the old background around the bottom edge.
- A shadow that is uniformly blurry, with no dark core.
Fix the halo first. Choose Layer > Matting > Defringe, or pull the mask edge in by one pixel. A dark shadow cannot hide a white fringe along the contact line.
Check the light first
Your analysis from the light chapter decides how the contact shadow behaves.
| Light in the scene | Contact shadow behavior |
|---|---|
| Overcast or open shade | Roughly symmetrical dark band all around the contact. Soft but still dark at the core. |
| Hard sun from one side | Darkest on the side away from the light. Almost no shadow on the lit side, with a thin dark line at the contact. |
| Overhead studio light | Tight dark patch under the object, mostly hidden by the object itself. |
| Colored or warm light | Shadow tinted toward the complementary tone, never neutral gray. |
Do not paint a contact shadow that contradicts the light. If the sun hits the left of the subject, the right side of the contact line gets the heavier shadow.
Building the shadow with a brush
This is the most controllable method for objects with a few clear contact points, such as shoes, table legs or a bottle.
- Create a new empty layer directly below the subject layer. Name it
Contact shadow. - Set its blend mode to Multiply.
- Pick a soft round brush with hardness between 0% and 30%.
- Sample a color from the ground near the contact point, then darken it and increase the saturation slightly. Avoid pure black. Pure black on Multiply gives a flat, dead area that ignores the ground's color.
- Size the brush to about the width of the contact area. Click or paint a short stroke along the line where the object touches.
- Lower the layer opacity until the shadow looks right. Most scenes land between 50% and 85%.
- Zoom to 100% or 200% and check the contact line itself. The shadow should reach right up under the subject's edge with no pale gap.
Because the shadow layer sits below the subject, any paint that crosses the subject's edge is hidden by the subject. You can paint slightly past the object without a visible mistake.
Building the shadow from a selection
Use this method when the contact area is long or irregular, such as a car, a sofa or a person's shoes.
- Ctrl/Cmd-click the subject layer's thumbnail to load its shape as a selection.
- Create a new layer below the subject and fill the selection with a dark color sampled from the ground.
- Press Ctrl/Cmd+D to deselect. Use Edit > Transform > Scale to squash the filled shape vertically. Move it so only the lowest strip of it peeks out below the subject's base, in perspective with the ground.
- Convert the layer to a Smart Object, so the next filter stays editable.
- Apply Filter > Blur > Gaussian Blur with a small radius.
- Set the layer to Multiply and adjust opacity.
- Add a layer mask and use a soft black brush to remove any shadow that appears where the object is clearly lifted off the ground, such as between a chair's legs.
Blur radius depends on image resolution. A radius that looks right in a 1200-pixel-wide image will look like a faint smudge in a 6000-pixel-wide one. As a starting point, use roughly 0.2% to 0.5% of the image width for the tight core.
Use two layers: a core and an ambient layer
A single blurred layer rarely looks right. Real contact shadows have two components, and separating them gives you control over each.
- Core layer. Very dark, with a small blur of about 2 to 5 pixels on a mid-size image, and high opacity. It sits right at the contact line and is only a few pixels thick.
- Ambient layer. Lighter, with a larger blur of about 15 to 40 pixels, and low opacity of about 25% to 45%. It spreads over a wider area and represents occlusion of ambient light.
Stack them with the core above the ambient layer. Both stay in Multiply mode. If you want to see the effect of each, toggle their visibility one at a time.
Color and texture of the shadow
A Multiply layer darkens the ground by multiplying its colors with the shadow color. That has two consequences.
- The ground texture stays visible through the shadow, as in real life. If your ground is gravel or grass, this is what keeps the shadow from looking painted on.
- The shadow color tints the result. A shadow painted in a warm dark brown on grey concrete adds a warm cast. Sample from the ground and shift toward blue in a daylight scene, because shadows are lit by the blue sky.
If the shadow still looks gray and flat, add a Hue/Saturation adjustment layer clipped to the shadow layer (Alt/Option-click between the layers). Raise saturation by a small amount so the shadow keeps the ground's color.
Perspective and the ground plane
The contact area is a shape lying on the ground, so it follows the ground's perspective. For a round object such as a ball, the contact is nearly a point and the shadow is a small ellipse. For a box, it is a parallelogram that matches the lines of the floor. If the ground recedes sharply, as with a wide-angle photo of a road, squash the shadow more vertically. When in doubt, look at lines already in the photo, such as paving joints or floorboards, and match their angle.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| Subject still floats | Shadow too light or not touching the base | Darken the core layer and extend it under the subject edge |
| Dirty gray smear | Pure black fill with Normal blend mode | Use Multiply and a color sampled from the ground |
| Pale line between shadow and object | Halo or gap in the mask | Defringe, or contract the mask slightly |
| Shadow visible through gaps | Shadow not masked under legs or handles | Paint black on the layer mask in those areas |
| Shadow looks tiny on a big image | Blur radius set for a small file | Scale the radius to the image width |
| Shadow on the wrong side | Light direction ignored | Re-check the light and shift the shadow weight |
Exercise
You have a cut-out bottle standing on a wooden table lit by a window on the left. The first attempt, a single layer filled with black, blurred by 30 pixels and set to Normal mode at 60% opacity, looks like a gray smudge and the bottle still floats. List four changes you would make, and say which blend mode and which layers you would use.
Show answer
Change the layer to Multiply so the wood grain shows through. Replace the black with a darker, slightly more saturated brown sampled from the table. Split the shadow into two layers: a core with a small blur (about 2 to 5 px) and high opacity right at the base, and an ambient layer with a larger blur (about 15 to 40 px) and low opacity. Weight the shadow toward the right side of the bottle, away from the window, and keep only a thin dark line on the left. Also defringe the bottle edge so no pale halo separates it from the shadow.