← Latest papers
💻 computer science

Code-as-Room: Generating 3D Rooms from Top-Down View Images via Agentic Code Synthesis

The paper proposes Code-as-Room, an MLLM-based agentic framework that generates realistic 3D indoor rooms from top-down images by synthesizing executable Blender code through a structured, multi-stage pipeline with cross-stage memory to overcome the spatial precision and stability limitations of existing methods.

Original authors: Yixuan Yang, Zhen Luo, Wanshui Gan, Jinkun Hao, Junru Lu, Jinghao Yan, Zhaoyang Lyu, Xudong Xu

Published 2026-05-19
📖 4 min read☕ Coffee break read

Original authors: Yixuan Yang, Zhen Luo, Wanshui Gan, Jinkun Hao, Junru Lu, Jinghao Yan, Zhaoyang Lyu, Xudong Xu

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a flat, 2D drawing of a room's floor plan—like a blueprint you might see in a real estate listing. Now, imagine you want to instantly turn that flat drawing into a fully furnished, 3D room that you can walk through in a video game or a virtual reality headset.

That is exactly what the paper "Code-as-Room" does. It's a new system that takes a single top-down image of a room and builds a complete, interactive 3D version of it inside a popular 3D software called Blender.

Here is how it works, explained through simple analogies:

The Problem: The "Magic Wand" That Keeps Failing

Previously, researchers tried to use AI (specifically large language models) to do this. They would show the AI the picture and ask, "Build this room."

  • The Issue: It was like asking a chaotic intern to build a house. Sometimes the AI would forget where the walls went, put the bed in the middle of the ceiling, or get stuck in an endless loop of trying to fix its own mistakes. It was unstable and often produced rooms that didn't make sense.

The Solution: The "Master Architect" with a Strict Blueprint

The authors created a new system called Code-as-Room. Instead of asking the AI to just "make it," they gave it a strict, step-by-step job description. Think of the AI not as a magic wand, but as a Master Architect who must write a set of instructions (code) to build the room.

The system breaks the huge, scary job of "building a room" into smaller, manageable shifts, like a construction crew working in stages:

  1. The Surveyor (Image Analysis): First, the AI looks at the flat picture and identifies the big things: "That's a wall, that's a door, and that's a big sofa." It creates a mental map of the room.
  2. The Framing Crew (Layout): Next, it places "ghost boxes" where the furniture should go. It doesn't worry about the color or texture yet; it just makes sure the sofa is on the floor and not floating in the air.
  3. The Inspector (Visual Feedback Loop): This is the secret sauce. After placing the furniture, the system actually renders a quick picture of what it built and shows it back to the AI. The AI acts as its own critic: "Wait, the table is overlapping the chair. Let me fix that." It repeats this check-and-fix cycle a few times until the layout is perfect.
  4. The Interior Designer (Detailing): Once the layout is solid, the AI goes back and adds the details. It decides the sofa is "velvet," the floor is "wood," and the lamp is "brass." It writes code to generate these specific shapes and materials.
  5. The Lighting Tech (Final Polish): Finally, it sets up the lights and cameras to make the room look realistic and ready to be viewed.

The "Notepad" (Cross-Stage Memory)

One of the biggest problems with previous AI attempts was forgetting. The AI would do a great job on the walls, but by the time it got to the furniture, it would have forgotten where the walls were.

To fix this, the researchers gave the AI a shared notepad (called a "Cross-Stage Memory"). Every time the AI finishes a step, it writes the results on this notepad. When the next step begins, it reads the notepad to remember exactly what happened before. This ensures the whole team stays on the same page, preventing the AI from losing its place or contradicting itself.

The Result

The paper shows that this method works much better than previous attempts.

  • Stability: The AI doesn't get stuck in loops; it follows the structured steps.
  • Accuracy: The furniture stays in the right places, and the room looks like the original drawing.
  • Usability: The final output is actual code that can be run in Blender. This means the room isn't just a static picture; it's a real, editable 3D scene that designers can tweak later.

In short, Code-as-Room turns a flat floor plan into a 3D world by acting like a disciplined construction crew that checks its work at every step and keeps a shared log of progress, ensuring the final building is solid, accurate, and ready for use.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →