Physics-Grounded Shadow Generation from Monocular 3D Geometry Priors and Approximate Light Direction

Shilin Hu, Jingyi Xu, Akshat Dave, Dimitris Samaras, Hieu LearXiv 2025 · DOI

Abstract

Generating realistic shadows for objects inserted into 2D images remains a significant challenge in computer vision. This paper introduces a physics-grounded framework that integrates the high-fidelity generation capabilities of diffusion models with the structural constraints of 3D geometry. By estimating dense 3D point maps and light directions from a single monocular image, the proposed model renders a coarse physical shadow that serves as an "anchor" for the final output. This approach significantly reduces common artifacts such as misaligned, floating, or physically impossible shadows.

Introduction

Realistic shadow generation is a fundamental task for image composition. Shadows are not merely dark regions; their shape, orientation, and intensity are strictly governed by the 3D geometry of the object, the receiving surface, and the light source's position. Traditional deep learning methods often operate entirely in 2D pixel space, attempting to learn these complex 3D relationships implicitly. Consequently, they frequently fail the "physics test," producing shadows that point in incorrect directions, lack proper contact with the object, or exhibit inconsistent lengths.

Methodology

The authors propose a three-stage pipeline that reintroduces explicit physical reasoning into the generative process:

  1. 3D Prior Estimation: Utilizing a single RGB image and a foreground object mask, the system employs a geometry estimator (MoGe-2) to generate a dense 3D point map. Simultaneously, a dedicated Light Predictor regresses a 3D vector representing the dominant light direction.
  2. Physics-Based Rendering: The model performs a "light-constrained candidate search" using the estimated 3D points and light vector. By identifying points on the ground plane occluded from the light source by the object, it produces a coarse but physically accurate shadow estimate.
  3. Diffusion-Based Refinement: This coarse estimate anchors a Mask Predictor and a Denoising U-Net (built on Stable Diffusion and ControlNet). An Intensity Encoder predicts the shadow's darkness scale and bias. The diffusion process then refines this estimate into a high-resolution, realistic shadow that maintains physical consistency.
Overview of the physics-grounded shadow generation pipeline, showing the transition from a composited image to a coarse shadow estimate using 3D priors.

Evaluation and Datasets

The framework was evaluated using the DESOBAV2 dataset, which contains over 28,000 image tuples. The evaluation focused on two primary scenarios:

  • BOS (Background-Object-Shadow): Scenes containing existing shadows that provide a reference for light direction.
  • BOS-free: Challenging scenes without reference shadows, requiring the model to rely solely on its geometric understanding.

Key Results

The proposed method achieves state-of-the-art (SOTA) performance on the DESOBAV2 benchmark, demonstrating significant improvements in both quantitative metrics and qualitative realism.

  • Quantitative Accuracy: In BOS-free scenarios, the model improved shadow mask accuracy, reducing the Balanced Error Rate (BER) by 25–30% compared to previous SOTA diffusion methods like GPSD.
  • Visual Fidelity: The model excels at preserving the silhouettes of complex objects, such as human limbs or intricate furniture, which often baffle 2D-only methods.
  • Physical Consistency: Shadows consistently align with ground planes and contact points, avoiding the "drifting" or hallucination of multiple shadows common in ambiguous lighting conditions.
Qualitative comparison between the proposed method and existing baselines (SGDiffusion, GPSD) across BOS-free and BOS scenarios.

Discussion and Future Work

While the framework represents a significant step forward, it has limitations. The model's performance is heavily dependent on the quality of the 3D geometry priors; failures in geometry estimation lead to incomplete shadow masks. Additionally, the current system assumes a single dominant light source, which may not generalize to complex indoor environments with multiple lamps. Future research will explore more expressive light representations, such as environment maps, to better handle multi-source illumination and soft shadows.

Summary updated

BibTeX
@misc{hu2025physics,
  author = {Shilin Hu and Jingyi Xu and Akshat Dave and Dimitris Samaras and Hieu Le},
  title = {{Physics-Grounded Shadow Generation from Monocular 3D Geometry Priors and Approximate Light Direction}},
  year = {2025},
  eprint = {2512.06174},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.06174},
}
Figure