Back to Model List

3DCodeFactory – Xiaohongshu's Open-Source Fully Automated 3D Data Synthesis Framework

Rice
RSS Feed
3DCodeFactory – Xiaohongshu's Open-Source Fully Automated 3D Data Synthesis Framework official screenshot
(Image source: official screenshot)

Executive Summary:

3DCodeFactory is a large-scale fully automated 3D data synthesis framework open-sourced by Xiaohongshu. Its core design philosophy lies in eliminating reliance on existing 3D assets, directly generati...

1. What is 3DCodeFactory

3DCodeFactory is a large-scale fully automated 3D data synthesis framework open-sourced by Xiaohongshu. Its core design philosophy lies in eliminating reliance on existing 3D assets, directly generating complex 3D modeling tasks and high-quality interaction trajectories from pure text on the internet. This is achieved through stages such as 3D classification alignment, task synthesis guided by reference images, and multi-dimensional scoring criteria, as well as multi-round real-machine validation in a sandbox environment. The framework simultaneously open-sources a companion training dataset containing 5,045 trajectories and a total of 5.52B tokens, which is used to train code agents in building complex 3D scenes and dynamic interaction capabilities. In terms of data scale and task complexity, it significantly surpasses existing open-source 3D datasets.

3dcodefactory-3d official website screenshot
(Image source: official screenshot)

Technical positioning and domain: 3DCodeFactory belongs to the intersection of 3D artificial intelligence and procedural content generation (PCG), focusing on training code agents' capabilities in 3D scene construction and interaction development through synthesized data. Its technology stack spans natural language processing, computer vision, 3D graphics, and agent systems, falling within the scope of multi-modal agent training infrastructure.

Development background: This framework was developed and open-sourced by Xiaohongshu's technical team, reflecting the technological accumulation of community-based tech companies in the areas of 3D content generation and AI training data infrastructure. The development motivation stems from the threefold limitations of existing open-source 3D datasets in terms of scale, complexity, and quality validation—datasets derived from reverse conversion of existing assets have ceilings in task scale and scene complexity, and lack a systematic quality acceptance mechanism.

Core value: 3DCodeFactory addresses three long-standing issues in the 3D data synthesis domain: first, it breaks the dependency on existing 3D assets, achieving forward synthesis from text to 3D task data; second, it elevates task complexity from single objects and dozens of lines of code to multi-object cross-domain scenarios and thousands of lines of code; third, it establishes a multi-dimensional real-machine validation mechanism, ensuring that the synthesized data has genuine executable quality assurance, rather than merely existing at the static code level.

Technical features: The framework's core technical advantages are embodied in two major mechanisms: "task synthesis guided by reference images" and "sandbox multi-round interaction sampling." The former uses synthesized images as visual anchors, compensating for the lack of spatial details in pure text. The latter simulates the real workflow of human developers—"write code—render—view image—revise"—ensuring that the generated data inherently possesses long-range, multi-round, and executable characteristics, with an average of over 1 million tokens per trajectory.

2. Key Features

  • Three-Dimensional Classification System Construction: The framework first merges the directory structures of multiple mainstream 3D asset platforms, establishing a hierarchical classification tree that spans 10 primary domains and 56 subcategories. The core value of this feature lies in structuring and mapping the vast, heterogeneous general plain-text data available on the internet. Through high-frequency category downsampling and targeted retrieval for long-tail categories, it ultimately forms a balanced 3D seed corpus, providing a high-quality input foundation for subsequent task synthesis.

  • Reference Image-Guided Task Synthesis: To address the inherent limitation of plain text in lacking spatial detail descriptions, the framework converts seed text into candidate 3D reference images. After filtering out low-quality samples, these images serve as clear visual anchors. Based on this, the framework automatically generates complex modeling task requirements that include elements such as application context, 3D scale proportions, and spatial arrangements, providing the code agent with task descriptions that are both visually referenced and spatially constrained.

  • Multi-Dimensional Quantitative Scoring Criteria Generation: While synthesizing tasks, the framework simultaneously breaks down three categories of quantitative scoring criteria: visual, specification, and functional. It also estimates geometric difficulty for subsequent score calibration. This mechanism resolves the challenge of verifying synthesized tasks without 3D ground truth, providing executable and quantifiable acceptance criteria for automated quality assessment.

  • Sandbox Multi-Round Interaction Sampling: Within an isolated sandbox environment, the code agent receives the synthesized task and autonomously executes a complete closed-loop process: "write code → render image → observe feedback → iterate and correct," repeating this process through multiple rounds of interaction until submitting the final product and full trajectory. This mechanism simulates the real working style of human developers who modify code while viewing rendering results, making the generated data naturally possess long-range, multi-round, and executable characteristics.

  • Real-Device Validation and Quality Filtering: During the validation phase, the product submitted by the code agent is mounted back into the same runtime environment for real-device evaluation, scoring across five dimensions: visual quality, specification compliance, and interactive functionality. The visual forensics agent actively changes the camera to collect multi-perspective images for detecting mesh penetration, flickering, and clipping. The acceptance agent checks the source code and runs test scripts to verify specifications, and individually triggers interactive controls to inspect state responses. Any dimension that fails to meet the admission threshold is excluded.

  • Training Dataset Construction and Open Sourcing: Based on the results of real-device validation, the framework produces and opens sources the 3DCodeFactory-Data dataset, which contains 5,045 high-quality trajectories and a total of 5.52B tokens. The median code length per scenario reaches 4,270 lines, and the average number of tokens per trajectory exceeds 1 million, providing high-quality supervised fine-tuning data resources for training large-scale models capable of complex 3D scene construction and interactive development.

3. Application Scenarios

  • Web 3D Interactive Application Development: Generate dynamic Three.js scenes with interactive elements such as component motion and perspective linkage using natural language descriptions in just one sentence. This capability enables rapid deployment in product showcase pages and data visualization applications, significantly lowering the development threshold for 3D interactive content on the web, and is ideal for frontend developers and interaction designers.

  • Game and Film Scene Prototyping: Low-cost generation of complex multi-object scenes such as libraries, neighborhoods, and natural forests, serving as materials for early concept design and layout validation. 87.7% of the synthesis tasks involve cross-domain composite scenes, effectively addressing the common requirement for multi-object spatial arrangements in game level design and film pre-visualization, assisting creative teams in completing rapid validation before formal modeling.

  • Industrial Design and Digital Twinning: The framework's 3D classification system covers long-tail categories such as industrial machinery, enabling the generation of structurally complete 3D scenes of factories and equipment. Combined with zero-shot scene editing capabilities to adjust lighting, object placement, and materials, it supports industrial simulation demonstrations, design reviews, and digital twin scene construction, offering a low-cost 3D environment generation solution for the manufacturing and engineering sectors.

  • Robotics/AI Simulation and Training Environments: Utilize the framework's zero-shot scene editing capabilities to mass-produce diverse 3D environments required for training intelligent agents. By adjusting lighting conditions, object spatial arrangements, and material properties, it can generate simulation training scenarios with distinct characteristics, supporting reinforcement learning and imitation learning for tasks such as robot navigation and manipulation.

  • 3D Development Education and Training: The framework's multi-round "write code—render—self-check—correct" trajectory can serve as teaching material, helping students master Blender/Three.js programming and 3D spatial thinking. The long-term interaction trajectory fully records the agent's debugging and correction process, offering valuable references for cultivating learners' problem-solving and iterative development skills.

4. How to Use

  1. Prepare Seed Text: Collect general plain text from the internet as the original corpus. Sources can include technical documents, encyclopedia entries, community discussions, and other public text resources. The text should cover multiple 3D domain categories to ensure diversity in subsequent synthesis tasks.

  2. Corpus Cleaning and Categorization Alignment: Perform deduplication and cleaning on the original text, extracting 3D subject entities and mapping them to classification leaf nodes. Downsample high-frequency categories to avoid data imbalance, while conducting targeted retrieval to supplement long-tail categories such as industrial equipment and scientific instruments. This results in a category-balanced seed corpus.

  3. Generate Visual Reference Images: Convert the seed text into candidate 3D images. After filtering out low-quality samples, retain images with clear structure and well-defined geometric relationships as visual anchors for subsequent synthesis tasks. This phase directly determines the richness of spatial details in the task description.

  4. Synthesis Tasks and Scoring Criteria: Based on the reference images, generate structured modeling/interaction task requirements that include application context, 3D scale ratios, and spatial arrangements. Simultaneously produce multi-dimensional quantitative scoring criteria for visual, specification, and functional aspects, and estimate geometric difficulty for subsequent score calibration.

  5. Sandbox Multi-round Sampling: Assign the synthesized tasks to the code agent, which performs multiple rounds of iteration in an isolated sandbox environment: "write code—render—view image—correct," until the agent submits the final product and complete trajectory. It is recommended to configure sufficient computational resources to support long-range trajectory sampling, with an average of over 1 million tokens per trajectory.

  6. Real-machine Validation and Filtering: Mount the agent's submitted product back into the same runtime environment and score it based on five dimensions: visual quality, specification compliance, and interaction functionality. Trajectories that do not meet the准入 threshold are filtered out. The framework achieves a defect interception accuracy of 87.2% and a recall rate of 91.1%.

  7. Build the Training Dataset: Retain all qualified trajectories that meet the standards and compile them into the 3DCodeFactory-Data dataset, which contains 5,045 trajectories and a total of 5.52B tokens, used for supervised fine-tuning of the code agent.

  8. Fine-tuning and Application: Perform supervised fine-tuning on the base model using this dataset (e.g., in the original experiment, fine-tuning a 27B model for just 1 epoch was sufficient). This enables the model to gain capabilities in complex 3D scene construction and interactive development, which can be directly applied to subsequent 3D content generation and 3D interaction tasks.

5. Pros and Cons Analysis

Pros
No dependency on existing 3D assets: Synthesizes data purely from internet text, breaking through the limitations of existing datasets that can only reverse-engineer existing assets in terms of scale and complexity. It has the capability to continuously expand data diversity.
Significantly increased task complexity: The median code volume per scene reaches 4,270 lines, and each trajectory averages over 1 million tokens. 87.7% of the tasks are cross-domain composite scenarios, far surpassing the previous single-round static single-object data with only dozens of lines of code.
Multi-dimensional real-machine quality assurance: All trajectories have undergone five-dimensional real-machine validation, including visual, specification, and interactive function checks, with a defect interception accuracy of 87.2% and a recall rate of 91.1%. The data quality is validated in real operational environments, not just through static code reviews.
Real iterative multi-round interaction: The data naturally includes the iterative process of "writing code—rendering—viewing the image—correcting," teaching the model to continuously refine code through visual self-inspection, just like human developers. This provides significant training value for long-term decision-making capabilities.
Training effectiveness is remarkable: Fine-tuning a 27B model for just one epoch based on this data outperforms the flagship 2.4T model in the same series and significantly surpasses models fine-tuned using existing open-source 3D data, validating the effectiveness of the data quality.
Executable acceptance criteria: Multi-dimensional quantitative scoring guidelines are generated alongside the tasks, with geometric difficulty estimated, enabling automated and objective quality evaluation for synthetic tasks without 3D ground truth, and ensuring reproducibility.

6. Comparative Analysis with Similar Tools

Comparison Dimension 3DCodeFactory (3DCodeFactory-Data) BlendNet (BlenderLLM)
Data Source Synthesized from general internet text without relying on existing 3D assets Iteratively self-expanding starting from predefined Blender seed scripts
Task Complexity Complex multi-object, cross-domain scenarios (87.7% are cross-domain composite scenarios), with interactive requirements Limited to simple objects or narrower category ranges
Interaction Form Multi-turn agent trajectories, with an average of 1,094.5K tokens and 413.6 tool calls per turn Only single-turn code pairs
Supported Platforms Blender + Three.js (dynamic interaction on the web) Only Blender, no Three.js data
Code Volume Median code volume per scene is 4,270 lines Code volume in existing datasets is generally in the tens of lines
Quality Validation Five-dimensional real-machine evaluation based on three criteria: visual, specification, and functional, with a defect interception accuracy of 87.2% Self-validation based on rendering results, lacking systematic multi-dimensional acceptance
Training Performance After one epoch of fine-tuning on a 27B model, it outperforms the 2.4T flagship Qwen3.8-Max model Performs poorly on complex scenarios in BlenderWorld and limited on P3D-Bench

Selection Recommendations: For research teams aiming to train code agents capable of building complex 3D scenes and interactions, the 3DCodeFactory dataset offers significant advantages in task complexity, completeness of interaction trajectories, and rigorous quality validation, making it particularly suitable for agent training scenarios requiring long-term decision-making and visual self-inspection capabilities. For applications requiring only basic Blender modeling capabilities, lightweight solutions like BlendNet are more user-friendly in terms of deployment and usage costs, enabling the quick generation of simple object modeling tasks. For research in 3D model generation and retrieval, traditional existing asset datasets (such as Objaverse-XL) still hold irreplaceable value in terms of model file scale and category coverage. Researchers can choose between or combine these two types of data sources based on the focus of their tasks.

7. Editor's Summary

3DCodeFactory has made technically profound explorations in the methodology of 3D data synthesis. Its core innovation lies in replacing the traditional "reverse conversion" data production paradigm with a "forward synthesis" approach—without relying on any existing 3D assets, it starts from pure text on the internet, and through classification alignment, reference image guidance, sandbox interactive sampling, and real-machine validation, it achieves automated generation of high-quality training data. This approach circumvents the structural limitations of conventional dataset construction methods in terms of data scale and task complexity. The median code length per scene reaches 4,270 lines, and the data scale for a single trajectory exceeds 1 million tokens, significantly outperforming existing open-source datasets.

The framework's design for data quality assurance is also worth noting. By implementing multi-round real-machine validation, it achieves a defect interception accuracy of 87.2%, providing the dataset with verifiable records of actual executability. The multi-dimensional quantitative scoring criteria generated alongside the task offer a reproducible and objective acceptance standard for synthesis tasks that lack true 3D ground truth. A 27B model fine-tuned on this dataset surpasses its 2.4T flagship counterpart within just one epoch, providing strong evidence of the effectiveness of synthetic data in training 3D agents.

In terms of practical value, 3DCodeFactory is suitable for two core groups of users: first, researchers in the field of 3D AI, who can use this dataset as a foundational resource for training complex scene construction and interaction capabilities; second, developers and educators involved in 3D content production, who can leverage the framework's automated data synthesis capabilities to reduce the costs of scene building and generating teaching examples. The open-source strategy of the framework, along with the full release of its accompanying dataset, provides a reproducible benchmark resource for advancing future research in the direction of 3D code agents.

8. FAQ

Q: Does the 3D modeling task generated by 3DCodeFactory require manual review?
A: No manual review is required on a per-item basis. The framework's built-in real-device verification mechanism automatically evaluates the submitted outputs across multiple dimensions: the visual forensics agent detects mesh penetration, flickering, and clipping by changing the camera perspective; the acceptance agent checks the source code and runs test scripts to verify compliance with specifications, and triggers interactive controls one by one to inspect functional responses. Any dimension that does not meet the admission threshold is excluded, and only trajectories that pass all-dimensional verification are included in the final dataset.

Q: How does the code scale of this dataset compare to previous open-source 3D datasets?
A: The difference is quite significant. The median code size per scene in 3DCodeFactory-Data is 4,270 lines, with an average of over 1 million tokens per trajectory, including approximately 413.6 tool calls. In contrast, existing open-source 3D datasets typically have code sizes ranging from 3 to 914 lines, mostly consisting of static code per round. The two datasets differ greatly in terms of task complexity and information density.

Q: What base model and computational resources are required for fine-tuning training?
A: The base model used in the original experiment had 27B parameters, and only one epoch of fine-tuning was needed to achieve performance surpassing that of a 2.4T flagship model. Specific computational requirements depend on the parameter size of the base model, but considering that the average trajectory in the dataset exceeds 1 million tokens, training should be conducted on a high-performance GPU cluster with sufficient VRAM. For actual deployment, refer to the experimental configuration described in the paper.

Q: Which 3D software/platforms does the dataset cover?
A: The current dataset covers two major platforms: Blender is used for static 3D scene modeling and rendering, while Three.js is used for building dynamic interactive scenes on the web, including implementations of component movement, state switching, and other interactive features. Data from mainstream game engines such as Unity is not yet covered and will be available after future project expansions.

Q: Can the synthetic data from 3DCodeFactory be used in commercial projects?
A: Both the framework code and the dataset are open-sourced and can be used for commercial and academic purposes according to the project's open-source license. However, note that the 3D structures in the synthetic tasks may be derived from internet text descriptions, and in extreme cases, they may resemble existing commercial 3D assets. For major commercial projects, it is recommended to conduct additional copyright compliance assessments on the specific generated content.

Q: How can I obtain the complete 3D classification system information?
A: The complete classification tree, which includes 10 primary domains and 56 subcategories, is defined in the code and configuration files within the project's GitHub repository. Additionally, the technical methods section of the paper provides a detailed explanation of the classification system's construction process and corpus alignment strategy, which can be referenced accordingly.

9. Project Links

© All Rights Reserved. Some content on this site is partially generated by AI with human review.