Manuscript Offprint

arXiv:2611.24565

Beyond Appearance: Evidence-Guided Programmatic 3D Scene Reconstruction with Agentic Lighting Reasoning

Zeting Luo, Yifan Li, Shuai Yang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Image-to-code methods for 3D scene reconstruction produce executable code that generates editable digital content and supports visual simulation. However, existing methods primarily rely on appearance similarity, which provides limited guidance for distinguishing errors in geometry, materials, and illumination. Light shapes scene appearance through its interactions with geometry and materials, influencing shading, cast shadows, and reflections. We therefore present LightHarness, a VLM-based agentic framework that incorporates explicit lighting reasoning into iterative scene reconstruction. To be specific, we leverage complementary geometric, intrinsic, and illumination cues to jointly refine scene structure and appearance, and propose Lighting Reasoning Memory to maintain light-source hypotheses, which supports evidence, and revision history throughout iterations. Together, they support reasoning about partially visible and unseen sources, with evidence-guided verification directing subsequent revisions. Our framework reconstructs explicit scenes through coherent reasoning about geometry, materials, and illumination without additional training or differentiable rendering. Extensive experiments demonstrate superior image-to-code reconstruction accuracy under challenging shadows and complex illumination, further supporting downstream scene editing, object insertion, and versatile relighting.

1 Introduction

Reconstructing an executable, editable 3D scene from a single image connects visual understanding with digital scene creation. Image-to-code reconstruction offers a promising direction: a scene program (e.g., Blender, Three.js) explicitly represents geometry, spatial layout, materials, cameras, and light sources, enabling novel-view rendering and subsequent scene editing [35, 10, 29]. Except for spatial grounding that concerns object poses or location, lighting is also central to this process. Shading, cast shadows, highlights and reflections arise from the complex interactions between illumination, geometry, and materials. Accurate image-to-code reconstruction requires recovering object structure and layout together with the illumination that explains their observed appearance.

Figure

Figure 2: Conceptual comparison of image-to-code paradigms. (a) Appearance feedback emphasizes rendered–reference similarity. (b) Tool-grounded refinement uses perception and spatial analysis to improve layout. (c) LightHarness combines enriched evidence and persistent memory for explicit lighting reasoning throughout reconstruction.

Recent advances in vision-language models (VLMs) [24, 9] have enabled scene construction through executable programs, connecting visual and semantic reasoning with explicit control over scene components. This capability supports a common iterative paradigm: an agent proposes or edits a scene program, inspects the rendered result, and revises its proposal based on visual feedback. SceneCraft [11] and BlenderAlchemy [12] demonstrate this paradigm to be effective in text-driven construction and appearance-guided editing, respectively. Extending it to reconstruction from visual input enjoys richer editing applications, and requires the VLMs to determine which scene configuration could explain the observed image. Recent systems formulate this problem through plan and observation management [35], staged refinement of scene attributes [10], or explicit geometric, material, and light modeling [26, 4] in synthetic game scenes.

Across these approaches, rendered-reference comparisons provide a central feedback signal for scene revision. However, such a discrepancy on appearance does not uniquely identify its underlying cause, because similar image differences can arise from geometry, reflectance, or illumination. For example, a dark region may arise from low surface reflectance, a surface facing away from light sources, or insufficient illumination from an unseen source. Simply brightening the material can reduce a local image discrepancy, but leave the underlying illumination error unresolved, leading to an incorrect material estimation. The challenge is therefore to connect observed lighting effects to their plausible geometric, material, and illumination explanations. This motivates our central question: How can we explicitly reason about scene geometry, materials, and light sources for more accurate image-to-code reconstruction beyond appearance?

To mitigate this, we propose LightHarness, a VLM-based agent framework that incorporates explicit lighting modeling into iterative scene generation and verification with complementary evidence and reasoning. We first associate light-source hypotheses with evidence of their interactions with scene geometry and materials. Specifically, we combine estimated HDR illumination [3], depth and surface orientation [27, 13], intrinsic albedo and shading [13]. These complementary sources of evidence relate appearance discrepancies to candidate revisions of the underlying scene factors, helping the generator agent determine which geometry, material, or light parameters to update during reconstruction, and finally output an executable Blender program. As for the verifier agent, we equip it with a rubric scorer and a VLM. The rubric scorer assesses rendered-reference agreement based on predefined criteria, while the VLM uses these assessments, reference-image history revisions, and decomposed rendering evidence to diagnose and propose refinement updates.

To preserve and refine illumination reasoning iteratively in the proposed agentic system, we design Lighting Reasoning Memory (LRM), shared by the generator and verifier agents. LRM associates each hypothesized light source with a group of stable parameters, including identity, visibility, location, color, etc., establishing a clear correspondence among observations, editable Blender elements and the revision history. Notably, we explicitly consider partially visible, occluded, and off-frame light sources as hypotheses, enabling a more complete model of scene illumination that accounts for both visible and inferred light sources. In each iteration, the generator uses this persistent lighting proxy to build scene programs and refine parameters, while the verifier examines it based on rendered evidence and recommends corrections. By incorporating source-specific observations, decisions, and their supporting evidence in a synergistic framework, LRM provides persistent illumination-centric context for LightHarness, enabling subsequent geometry, material, and lighting revisions to build coherently on historical judgments.

Extensive experiments demonstrate our competitive 3D image-to-code reconstruction accuracy. We further verify our effectiveness on hard cases under complex lights and shadows, and showcase that our method can generalize to rich downstream applications, including image relighting, material/texture editing, and harmonious object insertion. Our contributions can be summarized as follows:

  • We propose a VLM-based 3D image-to-code reconstruction framework that incorporates explicit lighting modeling to guide the recovery of geometry, materials, and light sources in an executable scene program.
  • We introduce Lighting Reasoning Memory to preserve source identities, supporting evidence, and revision history across generation and verification, combining geometric and intrinsic priors with light-transport evidence to guide iterative scene refinement.
  • We demonstrate competitive 3D image-to-code reconstruction accuracy and further illustrate the utility of the reconstructed scenes through downstream applications, including image relighting, enhancement and complex light understanding.

References (26)