Embedding Physical Reasoning into Diffusion-Based Shadow Generation Under the Sun and Sky
summary
The gist
Generating realistic shadows for inserted objects requires reasoning about scene geometry and illumination, which existing methods often fail to do purely in image space.
In short
This work introduces a framework to generate realistic shadows by grounding them in physics rather than just image space. It estimates scene geometry and light direction to create a physical shadow prior, which is then refined into a high-resolution mask. This physically-grounded estimate guides a frozen Stable Diffusion model through spatial and global conditioning, ensuring the generated shadows are geometrically consistent.
Key concepts
- Physics-based Prior
- This step estimates the shadow by checking if any object pixel lies between a receiver pixel and the estimated light source. It uses geometric reasoning to create an initial, physically determined shadow shape before any learning occurs.
- Quality Estimator
- This network predicts confidence scores (qlight and qmask) for the predicted light direction and shadow mask. These scores are vital because they allow the system to automatically down-weight unreliable predictions during image generation.
- Spatial Control Branch
- This pathway conditions the diffusion model on local, dense guidance derived from the refined shadow mask. The mask is scaled by its confidence score (qmask), meaning low-confidence masks have minimal influence on the final shadow detail.
- Cross-Attention Tokens
- This pathway uses estimated global lighting information to condition the diffusion model. The light direction estimate is modulated by its confidence score (qlight) using FiLM, providing scene-level orientation cues.
Terminology used across episodes
This episode discusses
- Embedding Physical Reasoning into Diffusion-Based Shadow Generation Under the Sun and Sky · Paper Radio
- Decoupled Weight Decay Regularization
- Denoising Diffusion Implicit Models
- MoGe-2: Accurate Monocular Geometry with Metric Scale and Sharp Details
- IP-Adapter: Text Compatible Image Prompt Adapter for Text-to-Image Diffusion Models
The paper
Embedding Physical Reasoning into Diffusion-Based Shadow Generation Under the Sun and Sky · Read on arXiv
Shilin Hu, Jingyi Xu, Akshat Dave, Dimitris Samaras, Hieu Le
Stony Brook University
Generating realistic cast shadows for inserted foreground objects requires reasoning about scene geometry and illumination. However, most learning-based approaches treat shadow generation as an image translation problem and capture these physical relationships only implicitly. This often results in misaligned or implausible shadows. Motivated by the physics of shadow formation, we introduce explicit geometric guidance for outdoor shadow generation. Given a composite image and a foreground object mask, we recover approximate scene geometry and estimate a dominant light direction to derive a coarse shadow estimate via geometric reasoning. While coarse, this estimate provides a spatial anchor for shadow placement. Because illumination cannot always be uniquely inferred from a single image, we predict confidence scores for both lighting and shadow cues and use them to regulate their influence during generation. These cues (shadow mask, light direction, and their confidence scores) condition a diffusion-based generator that refines the estimate into a realistic shadow. Experiments on DESOBAV2 show substantially improved shadow-region fidelity and localization, with an overall 23% lower shadow-region RMSE and 30% lower shadow-mask BER than the prior state-of-the-art method.
Transcript
Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.
Tom: I'm Tom, and with me are Jane, Lu, senior AI researcher at Tsinghua, Meng, lead engineer at a mysterious AI startup and Lalam, the in-house Large Language Model.
Jane: Today's paper: "Embedding Physical Reasoning into Diffusion-Based Shadow Generation Under the Sun and Sky".
Tom: Generating realistic shadows for inserted objects requires reasoning about scene geometry and illumination, which existing methods often fail to do purely in image space.
Jane: First, who's behind it and why it matters.
Title and authors: Tom: So, we're talking about "Embedding Physical Reasoning into Diffusion-Based Shadow Generation Under the Sun and Sky" by Hu, Xu, Dave, Samaras, and Le from Stony Brook University. It’s a title that tells you right away they are integrating physical understanding directly into their diffusion shadow generation process.
Jane: That title really captures the essence of what they're doing—taking something that is usually learned implicitly and explicitly embedding reasoning about the physics of shadow formation into it, which is quite a detailed approach for an image generation task.
Lu: The authors are tackling the core difficulty: generating realistic shadows in scenes where you don't have perfect reference information, moving away from just looking at pixels to understanding the three dee scene structure. This moves the problem from pure pattern matching to geometric estimation.
Meng: I'm curious about their approach regarding how they manage that physics reasoning part; it sounds like a complex step before the actual diffusion happens. Does this rely heavily on prior knowledge or is it something they are trying to recover from scratch?
Lalam: The fact that they are recovering approximate scene geometry and estimating a dominant light direction using tools like MoGe-two forty-two suggests they are building an explicit spatial anchor, which could be a really important cultural asset for how we train future multimodal models.
The paper's summary: Tom: Looking at the summary of "Embedding Physical Reasoning into Diffusion-Based Shadow Generation Under the Sun and Sky," they outline a three-stage process. First, they use MoGe-two to get an approximate three dee point map and estimate a light direction, then they use those to compute a physics-based shadow estimate via geometric ray reasoning twenty-seven thirty-four.
Jane: That initial step sounds like it’s establishing the physical relationship between the object's shape and the incoming light source before anything else is generated, which makes sense for getting things right.
Lu: The summary highlights that this coarse shadow estimate acts as a spatial anchor for generation, encoding the object-receiver–illumination relationship before any learning takes place. This pre-computation step is key because it gives the generator something concrete to work with geometrically.
Meng: But then they move to refining this coarse estimate using a "mask corrector" to get a full-resolution auxiliary shadow mask, denoted as M˜f s, which is an interesting way to bridge that gap between rough estimation and fine detail.
Lalam: That refinement process sounds like it's where the heavy lifting of making the final shadow look sharp happens, and if they can handle that well, it could make our generated scenes look incredibly professional.
The paper's improvements: Tom: The authors highlight a significant improvement by showing their physics-grounded approach produces shadows that align more faithfully with the occluder geometry and scene lighting compared to methods like SGDiffusion twenty-two and GPSD fifty-one.
Jane: That comparison is telling; they claim better alignment even in scenes without reference background-object-shadow pairs, which tackles a major weakness in previous state-of-the-art techniques.
Lu: Their main contribution is explicitly introducing the framework that derives an initial shadow estimate from recovered monocular scene geometry and predicted illumination, providing that physically grounded spatial anchor for shadow placement. They also mention improving fidelity in top-down views under complex object geometry.
Meng: So, beyond just better alignment, does this mean a tangible reduction in the boundary errors when we look at the generated shadows? I'm interested in practical metrics for how much better it is than what we're currently seeing.
Lalam: Yes, because they specifically focus on producing more realistic and physically consistent shadows that respect the occluder’s shape, which should lead to a lower boundary error rate overall.
Conclusion: Tom: So, to wrap up the "Embedding Physical Reasoning into Diffusion-Based Shadow Generation Under the Sun and Sky" paper, they've shown how combining geometric recovery with confidence scores allows them to condition a frozen Stable Diffusion generator effectively through spatial and lighting guidance pathways.
Jane: It really boils down to using learned quality scores for both the lighting direction and the shadow mask so that uncertain cues get down-weighted during synthesis, which makes the whole generation process more reliable.
Lu: This ability to predict confidence scores for both light and mask cues, qlight and qmask, is what lets them use two complementary conditioning pathways in the diffusion model. It’s a sophisticated way to guide the AI synthesis based on its own uncertainty.
Meng: From my side, seeing that they can handle ambiguous scenes without reference pairs is very encouraging; it means we could deploy this framework in scenarios where we don't have perfect ground truth data for scene geometry or lighting, which is a big deal for real-world applications.
Lalam: I think the implication here is that AI can start reasoning about the physical world with much higher fidelity, and this work lays a foundation for more reliable creative content generation across the board.
More episodes
- 2610.10857-Self-Supervised Keyframe Discovery for Horizon-Invariant Behavior Cloning
- 2610.10768-Strategic Investment Decision Making for Value Creation in Energy Transition: A Reinforcement Learning Approach
- 2610.10858-RFChipAgent: Multi-Agentic AI Flow for Analog/RF Chip Design
- 2610.10613-Temporal transformer CAN encoder with federated lightweight heads for anomaly detection
- 2610.10616-When Routing Reveals Membership: Privacy Leakage from MoE Router Telemetry
- 2610.10655-Nullify: Null-Space Activation Steering for Training-Free LLM Unlearning
- 2610.11031-Language Modeling is Monotone Compression
- 2610.01253-Context-Aware Error Mitigation Orchestration for Hybrid Quantum Reinforcement Learning on NISQ Systems
- 2604.24201-CMGL: Confidence-guided Multi-omics Graph Learning for Cancer Subtype Classification
- 2609.34069-Towards Certificate-Driven Software Porting: A Self-Improving Agentic Harness for Scientific Program Optimization