1 The idea
A shadow is the plate with the sun blocked: what’s left is the light from the sky, so a real shadow has a colour (bluish here), never black. The shadow on this plate’s sand is 0.39 / 0.44 / 0.52 (R / G / B) of the lit sand. Its density and colour can be measured from the shadows already in the plate.
Click inside a rock’s shadow, then on the lit sand beside it, and read the plate “shadow ÷ lit” per channel. Set the “level in the shadow” and the “shadow colour” until your shadow matches the plate, then add contact AO. Watch the feet zoom and the “umbra vs Blender” and “at the feet (contact)” readouts.
plate × (1 − m · (1 − shadow colour)) × AO2 Hands-on
Task: make the robot’s shadow match the plate: the umbra within 6% of Blender’s in every channel, and contact AO that brings the feet closer to Blender’s render.
The shadow starts black (level 0) with no AO. Sample a shadow on the same sand that lies under the robot; a shadow hugging a rock sees less sky and is darker than open sand in shadow. Compare channel by channel, not just overall brightness, and keep the AO near the feet.
3 Deep dive
A shadow is the plate without the sun
On open sand there are two lights: the sun from one direction and the sky from all around. When the robot blocks the sun, that sand still gets the sky, so the shadow turns darker and bluer.
So a shadow can’t be darker than the local black, and it always carries the sky fill’s colour. A black or neutral grey shadow looks wrong the moment it sits next to the plate’s real shadows.
Always compare the CG shadow with the nearest rock shadow in the plate.
Measure it from the plate, per channel
Pick a real shadow on the same kind of sand, sample the lit sand right beside it and divide one by the other per channel. That ratio holds both the shadow’s density and its colour. In our plate it is about 0.39 / 0.44 / 0.52 (R / G / B): the channels differ, and the shadow is bluer than the lit sand.
Multiply the plate by that ratio inside the shadow matte and the sand under the robot becomes shadowed sand, just like the rock shadows. Use a multiply only, never an offset or a negative lift, which crushes the darks instead of scaling them.
- 1Click a rock shadow
- 2Click the lit sand beside it
- 3Divide per channel
- 4Multiply inside the shadow matte
Two layers: broad shadow and contact AO
Shadow softness depends on the size of the light and the distance from the object to the ground: the closer to the contact, the sharper and denser.
So you layer two: a broad, soft sun shadow, and a darker contact AO only under the feet, where the robot blocks the sky as well. Without that dark contact under the feet, the robot reads as hovering above the sand.
| Layer | Where | What it blocks |
|---|---|---|
| Sun shadow | Wherever the robot blocks the sun | The sun; the sky remains, so use the plate’s ratio |
| Contact AO | Only near the feet | The sky as well, so darker and tighter |
When the CG shadow crosses a plate shadow
If you multiply the CG shadow over an area that is already in shadow in the plate, it darkens twice and you get a double shadow. In reality, ground already out of the sun doesn’t get darker when something else blocks the sun too.
The fix is a shadow clean plate, with the sunlit parts pulled down to shadow level, then a Keymix through the CG shadow alpha. Sunlit sand ends up at shadow level, while sand that was already in shadow stays close to where it was.
Push the viewer gamma up and look at the seam where the CG shadow meets a rock shadow.
4 In real work
In Nuke
- Shuffle2 the shadow matte and the AO pass out of the CG EXR.
- If the shadow catcher pass arrives as 1 = lit, Invert it so 1 = full shadow.
- Blur the matte for a soft edge: sharp near the feet, softer further away.
- Sample a rock shadow and the lit sand beside it with the viewer’s colour picker, and divide per channel.
- Multiply on the plate with the ratio per channel and the matte in the mask input (Copy the matte into alpha first if you need it there).
- Merge (multiply) the AO pass onto the plate, limited to the area near the feet.
Common mistakes → the fix
- ✗ A black or grey shadow with no sky colour in it✓ Use the per-channel ratio from a real shadow so it takes the sky fill’s colour.
- ✗ Leaving the density at 100% as the pass arrives✓ Sample a real plate shadow and set the density from it.
- ✗ Multiplying the AO over the whole image✓ Limit the AO to the contact area near the feet.
- ✗ Darkening with an offset or a negative lift, which crushes the darks (and goes below 0 once Grade’s black clamp is off)✓ Darken only by multiplying with values between 0 and 1.
- ✗ Measuring density on a darker rock instead of the same sand✓ Sample both shadow and lit on the same surface the CG shadow falls on.
Before you send the shot
- The CG shadow’s shadow/lit ratio matches a real shadow on the same sand in every channel.
- The shadow carries the sky colour and is no darker than the local black.
- No negative values inside the shadow.
- The AO sits only near the feet; the rest of the plate is untouched.
- The shadow is sharp at the contact and softer further away.
- No double darkening where it crosses a plate shadow.
5 Check yourself
What is a real sun shadow on the sand?
🔒 Answer the question above and this card opens
1. To measure shadow density and colour, where do you sample the plate?
2. How should the contact AO go in?
Where the numbers come from: Every picture is a Blender 5.2 Cycles render of our own desert and robot (tools/assets/passes_cg.py), computed in your browser. The shadow passes are Blender shadow-catcher renders: sun only (the shadow matte), and the ground’s AO pass with and without the robot (contact AO). The reference is the shadow catcher with both the plate’s sun and sky. The goal is the umbra ratio against Blender plus AO that helps the feet; the whole-shadow error is shown but is not the goal, because render noise dominates it. The shadow formula here is a teaching version of the usual Grade/Multiply setup.