Imagine you’re trying to teach an apprentice to build a cathedral. You wouldn't just show them a finished photo and say, "Go." You’d show them the blueprints, explain how the flying buttresses support the weight, and—most importantly—you’d let them make mistakes, watch them fix those mistakes, and guide them through the iterative process of construction.
In the world of AI, we’ve been doing the opposite. Most 3D "code agents"—AI models that write scripts to generate 3D objects—have been trained on "single-turn" data: a simple prompt like "make a chair" paired with a single block of code. This works for chairs, but it fails miserably when you ask for a functional, interactive Baroque Hall of Mirrors.
The researchers behind 3DCodeFactory realized that to build complex worlds, agents don't just need more data; they need better trajectories. They need to learn the art of the "multi-turn" rollout—the back-and-forth process of writing code, rendering a view, spotting an error, and fixing it.
TL;DR
3DCodeFactory is an automated pipeline that turns raw web text into high-quality, multi-turn training data for 3D code agents. By using AI-generated images as "visual anchors" and rigorous automated rubrics to filter the results, the authors created a dataset that allows a 27B-parameter model to outperform a massive 2.4T-parameter flagship model in 3D scene construction.
What Problem Does This Paper Address?
Existing 3D datasets are "data-starved" for complexity. They mostly consist of static, single objects (like a 3D model of a teapot) converted from existing assets. This leaves a massive gap:
- Lack of Interactivity: Most data doesn't teach an agent how to make a door that actually opens or a light that switches on.
- Single-Turn Limitations: Real-world coding is iterative. Current datasets don't capture the "self-correction" loop.
- Evaluation Void: How do you automatically grade a 3D scene if you don't already have a "perfect" version to compare it to?
Methods
The authors built a "factory" that synthesizes training data from scratch using a four-step process:
- Taxonomy Alignment: They started with raw web text (like product descriptions) and mapped them to a balanced "3D Taxonomy" to ensure the data covered everything from "Celestial Bodies" to "Kitchenware" (see Figure 2).
- Visual Anchors: Since text can be vague, they used an image generator to create a 3D reference image. This image serves as the "ground truth" anchor, guiding the agent on layout and style (see Figure 3).
- Requirement Synthesis: An LLM then "looks" at the image and generates a formal specification (dimensions, materials) and functional requirements (e.g., "the cabinet doors should swing open").
- The Agentic Loop & Rubrics: A "teacher" agent (like Claude) attempts the task in a sandbox. Crucially, the system generates automated rubrics to score the agent on visual fidelity, geometric accuracy, and whether the interactive parts actually work. Only the best "trajectories"—the ones where the agent successfully builds and refines the scene—are kept for the final dataset.
Datasets
- 3DCodeFactory-Data: The star of the show. It contains 5,045 high-quality trajectories (2,920 for Blender and 2,125 for Three.js), totaling 5.52 billion tokens.
- Evaluation Benchmarks: The models were tested on BlenderWorld (complex scenes), P3D-Bench (Three.js modeling), 3DCodeBench (procedural objects), and BlenderGym (scene editing).
Key Insights and Ideas
- Images as Anchors: One of the biggest "aha" moments is using 2D image generation as a bridge. It’s much easier for an AI to generate a consistent target image than to jump straight from "luxury kitchen" to 1,000 lines of perfect Python code.
- The Power of the Rubric: By generating task-specific rubrics before the agent starts coding, the system can act as its own "judge," filtering out the "hallucinated" or broken code that plagues other automated datasets.
- Efficiency over Scale: The results suggest that high-quality, multi-turn data is a massive force multiplier. A 27B model trained on this data didn't just improve; it leapfrogged models nearly 100 times its size.
Key Results
The impact of this data is staggering:
- Beating the Giants: A Qwen 27B model fine-tuned on 3DCodeFactory-Data outperformed the 2.4T flagship Qwen3.8-Max on overall 3D coding performance.
- Massive Gains: On the BlenderWorld benchmark, the Qwen 9B model’s score jumped from a measly 7.16 to 57.91 after training.
- Cross-Modal Generalization: Even though the training didn't include video, the fine-tuned model got significantly better at following video-based instructions, proving it had developed a deeper "spatial intuition."
Limitations and Future Work
While the factory is automated, it currently relies on a powerful "teacher" model (like Claude) to generate the initial successful trajectories. The authors also note that the filtering is currently "offline."
Future directions include self-distillation (where the model improves itself without a teacher) and reinforcement learning, where the agent could learn from the rubrics in real-time during training, much like a human apprentice learning from a master's critique.
Summary updated