SceneCode: Executable World Programs for Editable Indoor Scenes with Articulated Objects

Puyi Wang, Yuhao Wang, Linjie Li, Zhengyuan Yang, Kevin Qinghong Lin, Yangguang Li, Yu ChengarXiv 2026

TL;DR

SceneCode is a novel framework that compiles natural language prompts into executable, code-driven 3D indoor scenes rather than static, opaque meshes. By generating part-decomposed Blender Python programs on demand, it synthesizes highly customizable, simulation-ready environments complete with functional, articulated objects (like wardrobes with working hinges and desks with sliding drawers).

What Problem Does This Paper Address?

Generating 3D indoor scenes from text prompts is crucial for embodied AI, robotics, and virtual simulations. However, existing pipelines typically represent scenes as collections of static meshes or rely heavily on retrieving pre-made assets from fixed, curated libraries.

This approach introduces a major bottleneck: if a specific articulated object (e.g., a cabinet with a precise number of drawers or unique dimensions) doesn't exist in the library, the system cannot create it. Furthermore, standard image-to-3D generation methods produce "watertight blobs"—single-piece meshes that lack internal structure, semantic part decomposition, or functional joints, making them useless for physical interaction or robotic manipulation.

Methods

SceneCode shifts the paradigm from asset selection or shaping to asset programming. The framework operates via a two-level coupled pipeline:

  1. Room-Level Agentic Scene Backbone: A planner-designer-critic loop converts the natural language prompt into a structured house layout and emits per-object AssetRequests containing semantic descriptions, target dimensions, and spatial constraints.
  2. Code-Driven Object Generation: Instead of using a single universal prompt, an asset router dispatches each request to one of five specialized Vision-Language Model (VLM) code-generation strategies (WALLART, STATICFURN, SIMPLEMANIP, STRUCTMANIP, ARTIC). The system lifts the request into a structured ObjectPlan, verifies it, and synthesizes part-wise Blender Python programs.
Figure 2: Overview of SCENECODE. From room-level planning to code-driven object generation, simulation-ready compilation, and scene-state registration.

To ensure robustness, SceneCode implements an Execution-Guided Program Validation loop. The generated code is executed in headless Blender; if it fails, the traceback error is fed back to the synthesizer for up to three repair attempts. A critic agent then inspects the rendered image to refine the asset's visual and structural quality.

Finally, the framework compiles these visual geometries into simulator-compatible formats (single-body SDFs for rigid objects and link-joint structures for articulated ones) and logs them into a persistent house_state registry for local editing and traceability.

Datasets

The authors evaluated SceneCode using 30 room-level prompts selected from the SceneEval-100 benchmark. These prompts span six indoor categories: bedroom, living room, dining room, kitchen, basement, and bathroom, ranging from simple object lists to highly detailed, atmospheric descriptions.

Key Insights and Ideas

  • Code as a Unified Representation: Representing 3D objects as executable programs naturally unifies geometry, part decomposition, material assignment, and physical motion mechanisms into a single editable format.
  • The Power of Strategy Routing: A single universal prompt often causes VLMs to generate fragile code with broken symmetries or unstable topologies. Routing requests to specialized prompt profiles (e.g., enforcing canvas constraints for wall art or independent link structures for articulated objects) drastically improves generation reliability.
  • On-Demand Articulation: Because objects are built part-by-part from geometric primitives, the system can generate completely novel articulated structures on the fly, breaking free from the limitations of fixed asset datasets.
Ablation study showing how route-specific construction prompts preserve semantic parts and internal structures compared to generic prompting.

Key Results

SceneCode was compared against scene-level baselines (SceneSmith, HSM, LayoutVLM) and the asset-level baseline (SAM 3D Objects).

Scene-Level Performance

SceneCode achieved the highest semantic fidelity scores, leading in object count (CNT: 79.4%) and attribute satisfaction (ATR: 74.0%). It also dominated in physical usability metrics, showing a 100% navigability score (NAV) and cutting collision rates (COL: 11.3%) roughly in half compared to baselines. In a user study, human raters consistently judged SceneCode as the most prompt-faithful framework.

Qualitative comparison showing SceneCode's superior prompt fidelity and spatial layout coherence over HSM and SceneSmith.

Object-Level Quality

Compared to SAM 3D Objects, SceneCode produced significantly cleaner, more usable meshes:

  • UV Organization: Produced ~22 UV islands per asset on average—roughly 4.4× fewer than SAM 3D's 96 islands, allowing for coherent texturing.
  • Geometry Efficiency: Halved storage and rendering costs by reducing face and vertex counts by approximately 50% while maintaining high structural accuracy.
  • Topology: Achieved 0 non-manifold edges on average, eliminating the artifacts that typically break downstream physics simulators.
Object-level comparison demonstrating clean UV layouts, parametric editability, and on-demand articulated generation.

The generated articulated assets were successfully loaded into the MuJoCo physics engine, demonstrating independent movable links and executable joints ready for contact-based robotic interaction.

Robot interaction with SceneCode-generated articulated assets inside the MuJoCo simulator.

Limitations and Future Work

While SceneCode excels at structured indoor environments, the authors note several limitations:

  • Domain Constraints: The framework relies heavily on strong architectural and functional priors (floors, walls, furniture layouts). Extending this code-driven paradigm to outdoor or large-scale mixed environments with organic geometry (like vegetation or irregular terrain) remains an open challenge.
  • Visual Richness: Purely primitive-based programmatic generation can sometimes lack the fine-grained, photorealistic texture variations provided by retrieval or image-to-3D pipelines. Combining executable code with neural texture synthesis is a promising future direction.
  • Computational Cost: The multi-stage planner-designer-critic loop and execution-guided repair cycles introduce nontrivial runtime overhead, highlighting a need for parallel generation and specialized 3D code-distilled models.

Summary updated

BibTeX
@misc{wang2026scenecode,
  author = {Puyi Wang and Yuhao Wang and Linjie Li and Zhengyuan Yang and Kevin Qinghong Lin and Yangguang Li and Yu Cheng},
  title = {{SceneCode: Executable World Programs for Editable Indoor Scenes with Articulated Objects}},
  year = {2026},
  eprint = {2605.19587},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.19587},
}
Figure