{"course":{"slug":"image-editing","title":"Editing an Image","url":"https://addaly.com/learn/image-editing","level":"beginner","track":"create"},"lesson":{"slug":"matching-light-and-shadow","title":"Relighting a cut-out so it belongs","url":"https://addaly.com/learn/image-editing/matching-light-and-shadow","position":52,"of":78,"minutes":9,"answer":"Read direction, elevation, quality and the key-to-fill colour difference from the plate first, build the tight dark contact shadow before the directional cast shadow.","keyIdea":"Read direction, elevation, quality and the key-to-fill colour difference from the plate first, build the tight dark contact shadow before the directional cast shadow, and accept that shadows already baked into a hard-lit element cannot be relit from the opposite side."},"body":{"format":"markdown","text":"## Read the plate before you touch the element\n\nFour readings, in two minutes, from the background photograph alone.\n\n**Direction.** Find any object with a shadow and note which way it points. Find anything round or cylindrical (a pole, a head, a bottle) and note which side is lit. Two independent readings agreeing tells you where the key light is.\n\n**Elevation.** A short shadow means a high light. A long shadow means a low one. Overhead noon sun gives a shadow roughly a third the object's height; late afternoon gives one two or three times it.\n\n**Quality.** Look at the edge of a shadow. Sharp edge with a clear boundary: a small or distant hard source, usually direct sun or a bare flash. Soft edge that fades over centimetres: a large source, an overcast sky, a window, a bounce. Somewhere between: partial cloud or a moderately sized source.\n\n**Colour.** Sample the lit side of something neutral and the shadow side of the same thing. Compare. Under sunlight the lit side is warm and the shadow is blue, because the shadow is lit by sky. Under an overcast sky the difference is small. Under artificial light it can be anything. That difference between key and fill is one of the strongest realism cues there is, and almost nobody matches it.\n\n## Relighting the element\n\nAssume the element's light is close enough in direction to be salvageable. Three layers, clipped to the element:\n\n**1. A gradient for the key.** A Curves layer pulled up, with a gradient on its mask running from the key's direction. This lifts the side facing the light. Keep it subtle; you are adjusting rather than relighting from scratch.\n\n**2. A gradient for the shade.** A Curves layer pulled down with the opposite gradient, and (this is the part that sells it) the curve's blue channel lifted slightly so the shaded side goes cooler as well as darker. Under daylight that is physically what happens.\n\n**3. Dodge and burn**, on a grey Soft Light layer clipped to the element, to shape the form: deepen the shadow side of a face or a bag, lift the top surfaces facing the sky.\n\nWhere a light source in the scene should be spilling onto the element (a neon sign, a window, a fire) add a colour layer clipped to the element, set to Soft Light or Colour, masked to the side facing the source. A subject standing beside a red wall has red light on that side, and its absence is one of those things nobody notices but everybody feels.\n\n## Rim light: the cheapest realism there is\n\nWhen the key light is behind or to the side, the edge of the subject catches it, giving a bright rim along the outline. Adding one to a composited element does more for integration than almost anything else, because it visually ties the element's edge to the scene's light rather than to the mask.\n\nHow: duplicate the element's mask into a selection, contract it by two or three pixels, invert within the original selection to leave a thin band along the edge, then use that as a mask on a Curves layer pulled up. Mask off the band on the side away from the light. Two minutes.\n\nThe caution: a rim light on the wrong side is worse than none, and a rim light all the way round reads as a cheap cut-out glow.\n\n## Contact shadow versus cast shadow\n\nThese are different phenomena, and treating them as one is why so many composites float.\n\n> Figure: Two shadows that are different phenomena. A two by two grid, rows Contact shadow and Cast shadow, columns What makes it and What is missing without it: Contact shadow and What makes it: The object blocks ambient light from every direction; Contact shadow and What is missing without it: The object floats; Cast shadow and What makes it: The key light is blocked by the object; Cast shadow and What is missing without it: It reads as an overcast day. Treating them as one is why so many composites float. Build the contact shadow first: it exists regardless of any key light, it is there on an overcast day when nothing casts a shadow at all, and it is the one that grounds the object.\n\n**The contact shadow** (sometimes called occlusion) is the dark area immediately where the object meets the surface, caused by the object blocking ambient light from every direction. It is **dark, tight and relatively sharp**, it exists regardless of any key light, and it exists even on an overcast day when there is no cast shadow at all.\n\n**The cast shadow** is the shape thrown by the key light. It is directional, it can be long, and its edge softens with distance from the object.\n\nAn object with a cast shadow and no contact shadow still floats. An object with a contact shadow and no cast shadow looks like an overcast day. Build the contact shadow first; it is the one that grounds the object.\n\n## The rules a shadow obeys\n\n- **Darkest and sharpest where the object touches**, lighter and softer as it recedes. This is the single most-broken rule in amateur compositing, where a uniformly blurred grey shape is pasted underneath.\n- **It takes the shape of the surface it falls on.** A shadow crossing a kerb bends at the kerb. A shadow on grass is broken up by the blades.\n- **It is not black.** A shadow is lit by ambient light and by bounce from nearby surfaces. In daylight it is blue; beside a red wall it is reddish. Use a Multiply layer with a colour rather than a black one.\n- **It is not uniformly opaque.** 20 to 40 per cent on a Multiply layer is usually right; 80 per cent reads as a hole.\n- **Multiple lights make multiple shadows**, each fainter than a single light's would be.\n\n## When the directions cannot be reconciled\n\nIf the element is lit from the left and the plate from the right:\n\n- **Flip the element horizontally**, if nothing on it is asymmetric or has text. Instant fix.\n- **Change the plate** to one whose light agrees.\n- **Convert the scene to soft light** by choosing an overcast plate, where direction barely matters.\n- **Reshoot.**\n\nWhat does not work is relighting a hard-lit element to look hard-lit from the other side. The shadows *within* the element (under a nose, inside a fold, beneath a brim) are baked into the pixels, and painting the opposite side bright while those remain gives an object lit from both sides with shadows in the wrong places. Every viewer sees it and none of them can say why.\n\nThis is the case where recognising the limit early saves the afternoon, and it is the reason experienced compositors spend so long choosing which two photographs to combine."},"check":{"question":"A composited handbag has a long, evenly blurred grey shadow stretching away from it, but it still looks as though it is hovering above the table. What is missing?","options":[{"text":"The shadow's opacity is too low, and raising it towards 80 per cent would anchor the object.","correct":false,"tempting":"Treats density as the grounding cue: a uniformly darker shadow still lacks the tight occlusion at the contact point and reads as a hole rather than a join."},{"text":"The shadow should be black rather than grey, since a cast shadow on a lit surface receives no direct light.","correct":false,"tempting":"Applies a physical half-truth: shadows receive ambient and bounced light, so a black shadow looks more artificial rather than better grounded."},{"text":"The contact shadow (the dark, tight occlusion exactly where the bag meets the table) has not been built, and it is that rather than the cast shadow which grounds an object.","correct":true},{"text":"The cast shadow's direction does not match the plate's key light, and correcting the angle would resolve the floating.","correct":false,"tempting":"Names a real mismatch that would make the shadow look wrong in a different way, while an object with a correctly angled cast shadow and no contact shadow still floats."}]},"prev":{"slug":"perspective-scale-and-horizon","title":"The horizon tells you where the camera stood","url":"https://addaly.com/learn/image-editing/perspective-scale-and-horizon"},"next":{"slug":"building-shadows-and-reflections","title":"Constructing what the light would have done","url":"https://addaly.com/learn/image-editing/building-shadows-and-reflections"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Exam keys checked blind by a second model: 3,665 of 3,666 agreed. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'Relighting a cut-out so it belongs', in Editing an Image. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/image-editing/matching-light-and-shadow (Accessed: 13 October 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"Relighting a cut-out so it belongs","courseTitle":"Editing an Image","module":{"index":6,"slug":"compositing","title":"Compositing: making two pictures one"},"answer":null,"keyIdea":"Read direction, elevation, quality and the key-to-fill colour difference from the plate first, build the tight dark contact shadow before the directional cast shadow, and accept that shadows already baked into a hard-lit element cannot be relit from the opposite side.","hero":{"kind":"figure","figure":{"t":"figure","label":"Figure","figure":{"cols":["What makes it","What is missing without it"],"rows":["Contact shadow","Cast shadow"],"type":"matrix","cells":[["The object blocks ambient light from every direction","The object floats"],["The key light is blocked by the object","It reads as an overcast day"]],"title":"Two shadows that are different phenomena","caption":"Treating them as one is why so many composites float. Build the contact shadow first: it exists regardless of any key light, it is there on an overcast day when nothing casts a shadow at all, and it is the one that grounds the object.","cellLabels":[["dark, tight and fairly sharp, and present on a grey day","build this one first, before anything directional"],["directional, softening and lightening with distance","coloured by the sky and the bounce, never black"]]},"alt":"Figure: Two shadows that are different phenomena. A two by two grid, rows Contact shadow and Cast shadow, columns What makes it and What is missing without it: Contact shadow and What makes it: The object blocks ambient light from every direction; Contact shadow and What is missing without it: The object floats; Cast shadow and What makes it: The key light is blocked by the object; Cast shadow and What is missing without it: It reads as an overcast day. Treating them as one is why so many composites float. Build the contact shadow first: it exists regardless of any key light, it is there on an overcast day when nothing casts a shadow at all, and it is the one that grounds the object."}},"blocks":[{"t":"h2","id":"read-the-plate-before-you-touch-the-element","runs":[{"text":"Read the plate before you touch the element"}]},{"t":"p","runs":[{"text":"Four readings, in two minutes, from the background photograph alone."}]},{"t":"p","runs":[{"text":"Direction.","b":true},{"text":" Find any object with a shadow and note which way it points. Find anything round or cylindrical (a pole, a head, a bottle) and note which side is lit. Two independent readings agreeing tells you where the key light is."}]},{"t":"p","runs":[{"text":"Elevation.","b":true},{"text":" A short shadow means a high light. A long shadow means a low one. Overhead noon sun gives a shadow roughly a third the object’s height; late afternoon gives one two or three times it."}]},{"t":"p","runs":[{"text":"Quality.","b":true},{"text":" Look at the edge of a shadow. Sharp edge with a clear boundary: a small or distant hard source, usually direct sun or a bare flash. Soft edge that fades over centimetres: a large source, an overcast sky, a window, a bounce. Somewhere between: partial cloud or a moderately sized source."}]},{"t":"p","runs":[{"text":"Colour.","b":true},{"text":" Sample the lit side of something neutral and the shadow side of the same thing. Compare. Under sunlight the lit side is warm and the shadow is blue, because the shadow is lit by sky. Under an overcast sky the difference is small. Under artificial light it can be anything. That difference between key and fill is one of the strongest realism cues there is, and almost nobody matches it."}]},{"t":"h2","id":"relighting-the-element","runs":[{"text":"Relighting the element"}]},{"t":"p","runs":[{"text":"Assume the element’s light is close enough in direction to be salvageable. Three layers, clipped to the element:"}]},{"t":"p","runs":[{"text":"1. A gradient for the key.","b":true},{"text":" A Curves layer pulled up, with a gradient on its mask running from the key’s direction. This lifts the side facing the light. Keep it subtle; you are adjusting rather than relighting from scratch."}]},{"t":"p","runs":[{"text":"2. A gradient for the shade.","b":true},{"text":" A Curves layer pulled down with the opposite gradient, and (this is the part that sells it) the curve’s blue channel lifted slightly so the shaded side goes cooler as well as darker. Under daylight that is physically what happens."}]},{"t":"p","runs":[{"text":"3. Dodge and burn","b":true},{"text":", on a grey Soft Light layer clipped to the element, to shape the form: deepen the shadow side of a face or a bag, lift the top surfaces facing the sky."}]},{"t":"p","runs":[{"text":"Where a light source in the scene should be spilling onto the element (a neon sign, a window, a fire) add a colour layer clipped to the element, set to Soft Light or Colour, masked to the side facing the source. A subject standing beside a red wall has red light on that side, and its absence is one of those things nobody notices but everybody feels."}]},{"t":"h2","id":"rim-light-the-cheapest-realism-there-is","runs":[{"text":"Rim light: the cheapest realism there is"}]},{"t":"p","runs":[{"text":"When the key light is behind or to the side, the edge of the subject catches it, giving a bright rim along the outline. Adding one to a composited element does more for integration than almost anything else, because it visually ties the element’s edge to the scene’s light rather than to the mask."}]},{"t":"p","runs":[{"text":"How: duplicate the element’s mask into a selection, contract it by two or three pixels, invert within the original selection to leave a thin band along the edge, then use that as a mask on a Curves layer pulled up. Mask off the band on the side away from the light. Two minutes."}]},{"t":"p","runs":[{"text":"The caution: a rim light on the wrong side is worse than none, and a rim light all the way round reads as a cheap cut-out glow."}]},{"t":"h2","id":"contact-shadow-versus-cast-shadow","runs":[{"text":"Contact shadow versus cast shadow"}]},{"t":"p","runs":[{"text":"These are different phenomena, and treating them as one is why so many composites float."}]},{"t":"p","runs":[{"text":"The contact shadow","b":true},{"text":" (sometimes called occlusion) is the dark area immediately where the object meets the surface, caused by the object blocking ambient light from every direction. It is "},{"text":"dark, tight and relatively sharp","b":true},{"text":", it exists regardless of any key light, and it exists even on an overcast day when there is no cast shadow at all."}]},{"t":"p","runs":[{"text":"The cast shadow","b":true},{"text":" is the shape thrown by the key light. It is directional, it can be long, and its edge softens with distance from the object."}]},{"t":"p","runs":[{"text":"An object with a cast shadow and no contact shadow still floats. An object with a contact shadow and no cast shadow looks like an overcast day. Build the contact shadow first; it is the one that grounds the object."}]},{"t":"h2","id":"the-rules-a-shadow-obeys","runs":[{"text":"The rules a shadow obeys"}]},{"t":"ul","items":[[{"text":"Darkest and sharpest where the object touches","b":true},{"text":", lighter and softer as it recedes. This is the single most-broken rule in amateur compositing, where a uniformly blurred grey shape is pasted underneath."}],[{"text":"It takes the shape of the surface it falls on.","b":true},{"text":" A shadow crossing a kerb bends at the kerb. A shadow on grass is broken up by the blades."}],[{"text":"It is not black.","b":true},{"text":" A shadow is lit by ambient light and by bounce from nearby surfaces. In daylight it is blue; beside a red wall it is reddish. Use a Multiply layer with a colour rather than a black one."}],[{"text":"It is not uniformly opaque.","b":true},{"text":" 20 to 40 per cent on a Multiply layer is usually right; 80 per cent reads as a hole."}],[{"text":"Multiple lights make multiple shadows","b":true},{"text":", each fainter than a single light’s would be."}]]},{"t":"h2","id":"when-the-directions-cannot-be-reconciled","runs":[{"text":"When the directions cannot be reconciled"}]},{"t":"p","runs":[{"text":"If the element is lit from the left and the plate from the right:"}]},{"t":"ul","items":[[{"text":"Flip the element horizontally","b":true},{"text":", if nothing on it is asymmetric or has text. Instant fix."}],[{"text":"Change the plate","b":true},{"text":" to one whose light agrees."}],[{"text":"Convert the scene to soft light","b":true},{"text":" by choosing an overcast plate, where direction barely matters."}],[{"text":"Reshoot.","b":true}]]},{"t":"p","runs":[{"text":"What does not work is relighting a hard-lit element to look hard-lit from the other side. The shadows "},{"text":"within","i":true},{"text":" the element (under a nose, inside a fold, beneath a brim) are baked into the pixels, and painting the opposite side bright while those remain gives an object lit from both sides with shadows in the wrong places. Every viewer sees it and none of them can say why."}]},{"t":"p","runs":[{"text":"This is the case where recognising the limit early saves the afternoon, and it is the reason experienced compositors spend so long choosing which two photographs to combine."}]}],"check":{"question":[{"text":"A composited handbag has a long, evenly blurred grey shadow stretching away from it, but it still looks as though it is hovering above the table. What is missing?"}],"options":[{"text":[{"text":"The shadow’s opacity is too low, and raising it towards 80 per cent would anchor the object."}],"correct":false,"tempting":[{"text":"Treats density as the grounding cue: a uniformly darker shadow still lacks the tight occlusion at the contact point and reads as a hole rather than a join."}]},{"text":[{"text":"The shadow should be black rather than grey, since a cast shadow on a lit surface receives no direct light."}],"correct":false,"tempting":[{"text":"Applies a physical half-truth: shadows receive ambient and bounced light, so a black shadow looks more artificial rather than better grounded."}]},{"text":[{"text":"The contact shadow (the dark, tight occlusion exactly where the bag meets the table) has not been built, and it is that rather than the cast shadow which grounds an object."}],"correct":true,"tempting":null},{"text":[{"text":"The cast shadow’s direction does not match the plate’s key light, and correcting the angle would resolve the floating."}],"correct":false,"tempting":[{"text":"Names a real mismatch that would make the shadow look wrong in a different way, while an object with a correctly angled cast shadow and no contact shadow still floats."}]}],"order":[1,3,0,2],"why":null},"prev":{"slug":"perspective-scale-and-horizon","title":"The horizon tells you where the camera stood","minutes":9},"next":{"slug":"building-shadows-and-reflections","title":"Constructing what the light would have done","minutes":9}}}