Joint Shadow Generation and Relighting via Light-Geometry Interaction Maps

This paper introduces Light-Geometry Interaction (LGI) maps, a novel representation derived from monocular depth that encodes light-aware occlusion to enable a unified, physics-consistent pipeline for joint shadow generation and relighting, addressing common artifacts like floating shadows through a bridge-matching generative model trained on a newly curated large-scale benchmark.

Shan Wang, Peixia Li, Chenchen Xu, Ziang Cheng, Jiayu Yang, Hongdong Li, Pulak Purkait

Published 2026-03-03
📖 4 min read☕ Coffee break read

Imagine you are a digital artist trying to insert a new object—say, a shiny red apple—into an existing photo of a kitchen table.

If you just paste the apple in, it looks fake. It's floating in mid-air, it has no shadow, and the light hitting it doesn't match the light in the room. To make it look real, you need to solve two problems at once:

  1. Relighting: You need to paint the apple so it looks like it's actually sitting under the kitchen lamp (shiny on top, dark on the bottom).
  2. Shadow Casting: You need to draw a shadow on the table that matches the apple's shape and the lamp's angle.

The Problem with Old Methods
Previous AI tools tried to do this by guessing. They looked at the picture and said, "I think the light is coming from the left, so I'll draw a shadow there." But without understanding the physics of the scene, they often made mistakes. They would draw shadows that floated in the air, cast shadows in the wrong direction, or make the apple look like it was glowing from the inside. It was like trying to paint a realistic sunset without knowing where the sun actually is.

Other methods tried to build a full 3D model of the room first (like a video game engine), but that takes forever and is too heavy for everyday editing.

The New Solution: "Light-Geometry Interaction" (LGI)
This paper introduces a clever new trick called Light-Geometry Interaction (LGI) maps.

Think of the AI as a chef.

  • Old AI: Just looks at the ingredients (the photo) and guesses the recipe.
  • This New AI: Has a special "tasting spoon" (the LGI map) that tells it exactly how the light hits the ingredients based on their shape.

Here is how the "LGI Map" works, using a simple analogy:

Imagine you are in a dark room with a single flashlight. You hold up a ball.

  1. The Depth Map: The AI first uses a standard tool to guess how far away every part of the table and the ball is. It's like having a rough 3D sketch.
  2. The Ray Cast: Now, imagine the AI shoots invisible laser beams from every point on the ball toward the flashlight.
  3. The "Occlusion" Check: The AI asks, "Does this laser beam hit the table before it hits the light?"
    • If the beam hits the table first, that part of the ball is in shadow.
    • If the beam hits the light directly, that part is lit.

The LGI Map is a special blueprint that records the results of these laser checks. It doesn't just say "shadow here." It says, "The light is blocked by the table at this specific angle and this specific distance."

Why is this a big deal?
By feeding this blueprint into the AI, the system stops guessing. It's like giving the artist a ruler and a protractor instead of letting them draw freehand.

  • No more floating shadows: The shadow knows exactly where the table is because the LGI map calculated the distance.
  • Perfect lighting: The apple knows exactly how bright it should be because the map calculated the angle of the light hitting it.
  • Complex interactions: It even handles tricky stuff, like a glass vase casting a shadow through a table, or a shiny metal ball reflecting the shadow of a chair onto itself.

The "ShadRel" Dataset
To teach the AI this new skill, the authors built a massive training library called ShadRel. Imagine a giant virtual studio with 800,000 different objects (glass, metal, wood, leather) and millions of different lighting setups. They used this to train the AI to master the art of shadows and light.

The Result
The paper shows that this method creates images that are incredibly realistic. Whether you are adding a person to a beach scene or a product to a store shelf, the shadows and lighting look like they belong there naturally. It bridges the gap between "magic AI generation" and "physics-based reality," making digital editing feel as natural as placing a real object on a real table.

In a nutshell:
They gave the AI a "physics cheat sheet" (the LGI map) so it can finally understand how light and shadows actually work, resulting in digital edits that look indistinguishable from reality.