Guides

    When shadows contradict the key light

    A shadow falling toward the light is one of the fastest tells in a generated frame. How to catch it in a review pass, and the two fixes that correct it.

    Versely Team9 min read

    There is a class of error in generated frames that nobody can name and everybody can see. The image is sharp, the anatomy is fine, the composition works, and something is wrong with it. Often the something is a shadow pointing the wrong way.

    It is a fast tell because shadow direction is one of the few things the human visual system checks automatically. You do not have to reason about it. A cast shadow falling toward the brightest source in the frame registers as wrong before you have consciously located either one, which is why this defect survives a casual look and then quietly makes the image feel synthetic.

    What the error actually looks like

    Four shapes, roughly in order of how obvious they are.

    Reversed cast shadow. The subject's shadow on the ground runs toward the light rather than away from it. Unmissable once seen, and the most common version in frames with a low, strong source.

    Contradicting objects. Two objects on the same surface throw shadows in different directions with no second source to explain it. Each shadow is individually plausible; together they describe two suns.

    Terminator mismatch. On a face or any rounded form, the line where lit turns to shadow faces a different way than the cast shadow on the ground does. The subject appears to be lit from the left and standing in light from the right.

    Missing contact shadow. Where an object meets a surface there should be a small, dark, tight shadow. Without it the object floats, and the frame reads as a composite even when nothing else is wrong. This is the subtlest of the four and the one that most often survives review.

    Why all four happen is worth stating plainly: shadow correctness is a global constraint. Every shadow in a frame has to agree with a single light position that exists nowhere in the pixels. Generation optimises for local plausibility, and a locally plausible shadow is one that looks like a shadow, not one consistent with a source three hundred pixels away. Nothing forces the whole frame to agree, so on complicated geometry it sometimes does not.

    The review pass

    Five checks, in this order, on any frame where light is doing real work. Two minutes for a batch.

    1. Find the key and name its direction. Look for the brightest continuous highlight — a specular on skin, a hotspot on a wall, a visible source. Say it out loud: "key is high and camera left." Everything after this is measured against that one statement.
    2. Trace one cast shadow. Pick the longest shadow in frame. It should run directly away from the source you just named. If the source is camera left, shadows run camera right.
    3. Check the shadows against each other. For a distant source such as the sun, cast shadows should be near-parallel. For a close source such as a lamp, they should splay outward from a point. Both are correct; mixing them in one frame is not.
    4. Check the terminator. On a face, sphere or cylinder, the lit-to-shadow boundary should be perpendicular to the light direction and on the far side from the source. This is where "the light seems to be in two places" usually originates.
    5. Check the contact points. Every object touching a surface owes a small dark shadow at the join. Absent contact shadows are why an otherwise good product shot looks pasted.

    Do this at whatever resolution you have. Shadow direction is a large-scale feature and survives heavy downscaling, which makes it one of the few things you can genuinely assess in a low-resolution preview. The editor's free 480p preview pass, which carries a short per-user cooldown, is fine for checks one through four. Contact shadows are small and soft enough that you want full resolution for check five.

    For a second opinion, the agent can give feedback on a generation; asking specifically about light direction rather than "is this good" gets a far more useful answer. Critiquing before rerolling is the general habit, covered in reviewing a generation before you reroll, and it applies here because a reroll on a shadow fault is a coin flip you pay for.

    Fix 1: re-specify positively

    The instinct is to add no wrong shadows or correct shadow direction to the prompt. Neither works, and on models trained with flow matching the negative field has essentially nothing to push against (the full argument). The replacement is positive re-specification: describe the shadow you want as a physical fact.

    Instead of Write
    "correct shadows" "long shadows stretching toward the bottom-right corner of frame"
    "no shadow errors" "a single hard source high at camera left; every shadow runs down and to the right"
    "consistent lighting" "one source, no fill; all cast shadows parallel"
    "shadow under the product" "a tight dark contact shadow where the bottle meets the marble"

    Two additional levers help more than most people expect:

    Name the source count. A single source, no fill removes the model's licence to invent a second light to justify a stray shadow. Contradicting shadows very often come from the model quietly assuming a fill it never rendered.

    Name the shadow's destination. Not "away from the light" — the model has to solve for that. Point at a corner of the frame: "toward the bottom-right corner". That converts a relational constraint into a direct one, and direct constraints land more reliably.

    Do this in the original prompt and the fault rate drops enough that most frames never reach the repair stage. A concrete lighting descriptor is worth more than several style adjectives, and "shadows run to bottom-right" is about as concrete as lighting language gets.

    Fix 2: masked repair

    When a frame is otherwise good, regenerating the whole thing to fix one shadow is the wrong trade. You will lose the composition, the face, and everything else you liked, and you will pay for a full generation to find out whether the new one has the same problem. Masked repair holds the frame and rewrites one region.

    The operation is inpainting: mask the offending area, describe what should be there, regenerate only inside the mask. For shadow work the mask should include the shadow and a margin of the surface around it, because a shadow with a hard mask boundary reads as a patch. Give the edit room to blend.

    Three practical notes:

    • Describe the corrected shadow, not the correction. The instruction is "a soft shadow falling from the chair toward the bottom-right of frame, on the same wooden floor", not "fix this shadow". Edit models respond to descriptions of end states.
    • Watch denoising strength. Too low and the wrong shadow persists under the new one; too high and the region stops matching the surrounding surface. Shadow repairs want more than a texture touch-up and less than a full regenerate.
    • Repair the cause when there is one. If a stray shadow exists because of an unexplained bright patch elsewhere in frame, removing the shadow leaves the frame lit by a source that produces no shadows at all. Sometimes the right repair is to darken the patch.

    The catalog carries several models built for instructed editing rather than fresh generation. Qwen Image Edit 2511 takes up to six reference images at three credits a call, and Flux Kontext handles single-reference instructed edits. Through the agent the same work is a conversation: edit a photo with AI routes the request without you picking a model up front, which is usually faster when you are iterating on a mask.

    For video the equivalent exists and is more expensive to get right. A shadow fault that persists through a clip is usually cheaper to fix by regenerating the shot with a better prompt than by masking and repairing every frame, and that calculation flips only when the rest of the shot is genuinely irreplaceable.

    FAQ

    Why do shadows go wrong more often in complex scenes?

    More objects means more shadows that all have to agree with one source, and the number of pairwise agreements grows much faster than the object count. A single subject on a plain floor has one shadow to get right; six objects on a table have six shadows plus their contact points. For a complex frame with credible light, build it in passes: get the light right on a simple version, then add elements through edits.

    Is this the same problem as reflections being wrong?

    Related, and it shows up in the same review pass. Reflections are the other global constraint the model has no explicit machinery for — a specular highlight should sit on the side facing the source. Check speculars at the same time as terminators; they fail for the same reason and often in the same frame. Reflected content in a mirror is harder still, and usually a compositing job rather than a prompt one.

    Does adding a reference image fix shadow direction?

    It helps a lot, because a reference has an unambiguous light direction baked into its pixels and the model is matching rather than inventing. It is the standard fix for lighting that drifts between shots. What a reference does not fix is contradictions within a single generated frame — the reference constrains the overall look, not the internal consistency of new geometry the model adds. Those still need the review pass.

    How much of this can I catch automatically?

    Less than you would like. Shadow direction is easy for a person and awkward to score mechanically, because the correct answer depends on a source position that is often outside the frame. The realistic setup is a human check on the two or three frames per batch where light is doing real work, plus a habit of writing the shadow destination into the prompt so the fault rate stays low. It sits alongside the other artefacts that still give generated footage away, several of which are catalogued in hands, teeth and signage.