When 3D Modeling Meets Code Generation: Building Unified Training and Validation Infrastructure

    This article examines the shift toward code-based 3D content creation, where large language models generate executable modeling programs rather than relying solely on GUI-based workflows. It analyzes the fragmentation of existing data and tooling across CAD scripts, modeling software scripting interfaces, shading languages, and browser-side graphics code, then outlines a unified approach based on a large dataset of executable programs. The article covers multi-domain data coverage, the engineering pipeline from raw programs to instruction-code training pairs, multi-level geometric validation, and cloud infrastructure considerations for scalable execution, storage, orchestration, and monitoring. Readers will gain a structured understanding of how unified executable-program datasets and automated validation can support training, evaluation, and agent-based iteration for programmatic 3D generation.

    When 3D Modeling Meets Code Generation: Building Unified Training and Validation Infrastructure

    1. 3D Modeling Is Moving Toward Code

    In traditional 3D content production, artists rely on graphical software to drag, sculpt, and tune parameters. As large language models become increasingly capable of code generation, a new technical path is becoming clear: let models write executable modeling programs directly, and let those programs drive the generation of geometry, materials, lighting, and rendering.

    The appeal of this paradigm is straightforward:

    • Editability: Code is structured and parametric. Changing a variable can update a local part of a model without rebuilding the entire asset.
    • Reproducibility: Program outputs are deterministic. The same input produces the same result, which helps with version management and collaboration.
    • Verifiability: Programs can be executed, and execution results can be automatically compared with target geometry or target images to form objective evaluation signals.
    • Composability: Complex scenes can be assembled from modular programs, which aligns naturally with software engineering principles of reuse.

    In other words, 3D modeling is being abstracted into a “writing code” problem, and writing code is exactly what current large models are particularly good at.

    2. Fragmentation: The Real State of Data and Tooling

    Despite the promise, a review of existing work in the field reveals a prominent issue: the field is highly fragmented.

    2.1 Scale Bottlenecks in Single-Point Tasks

    Some benchmarks focus on graphics editing tasks, using scripts to drive open-source modeling software through modification operations. The direction is valuable, but task samples are often only in the hundreds. Hundreds of samples are far from enough to train a model with generalization ability, and they are even insufficient as an evaluation set for statistically credible conclusions.

    2.2 Depth Without Breadth

    Other work reaches considerable scale in a single dimension. For example, some datasets contain hundreds of thousands of material and lighting records and focus on shader program generation. Such resources can be high quality within their vertical domain, but 3D content is inherently multi-dimensional: geometry determines form, materials determine surfaces, lighting determines atmosphere, and cameras determine composition. A dataset that covers only one part of this chain cannot train a model that understands 3D scenes end to end.

    2.3 Workflow First, Data Missing

    Some projects attempt to build agent workflows: systems in which a model automatically generates code, executes it, observes errors or rendering results, and then iterates. These “execute—feedback—correct” orchestration frameworks are advanced in concept, but most do not release accompanying large-scale new datasets. They also often lack systematic geometric validation. Whether a generated shape is correct, and how large the deviation is, frequently depends on rendered screenshots and manual visual inspection, which cannot produce scalable supervision signals.

    2.4 The Root of the Problem

    Taken together, these efforts resemble different craftspeople polishing individual instruments: one focuses on strings, another on the body, but no one arranges the full score for the orchestra. Computer-aided design (CAD) scripts, scripting interfaces for open-source modeling software, shading languages, and browser-side graphics interfaces are essentially four mutually incompatible “dialects,” each with its own data format, execution environment, and validation method. This is similar to early railways with different track gauges: a train had to change cars and tracks at the border. The field’s infrastructure layer is missing a “standard track.”

    3. A Path Forward: A Unified Dataset of Executable Programs

    To address this fragmentation, the industry has begun exploring a new infrastructure form: unifying multiple 3D modeling dialects into a shared, trainable, and verifiable program dataset. One representative practice built a dataset containing more than 2.69 million independently executable programs, which after standardized export formed over 2.02 million training data pairs. Setting aside the specific project, its methodology is worth examining in detail.

    3.1 Multi-Domain Coverage Across Four Modeling Dialects

    A unified dataset first needs to cross the boundaries of different technical domains:

    1. Parametric CAD scripts: centered on geometric constraints and feature operations, producing precise engineering-grade solid models.
    2. Modeling software scripting interfaces: creating meshes, curves, modifiers, and animations through the scripting environment of host software.
    3. Shading language programs: describing material properties, lighting responses, and procedural textures.
    4. Browser-side graphics code: lightweight 3D representations for real-time rendering scenarios.

    These four program types have very different syntax, but semantically they all describe a “3D world.” The key to unification is an intermediate abstraction layer that binds the program, execution environment, and output artifacts—meshes, images, and parameter files—into one standardized record.

    3.2 From Programs to Training Pairs: Engineering the Data Pipeline

    Raw programs cannot be used directly for training. They need to pass through a rigorous data pipeline:

    1. Program collection → Executability filtering → Sandbox execution → Artifact extraction
    2. → Standardized export → Instruction-code pairing → Quality deduplication → Training set

    Several stages are especially important:

    • Executability filtering: Only programs that can run successfully in a controlled environment and produce valid 3D results are retained. This ensures the authenticity of supervision signals from the source.
    • Sandbox execution: Different dialects require their own runtime environments. Container platforms are often used to package and isolate execution environments, ensuring reproducibility while preventing malicious or abnormal code from affecting the collection system.
    • Instruction-code pairing: Natural language descriptions are generated in reverse from program structure, comments, and output artifacts to form “requirement description → modeling code” supervision pairs. This is the core step that turns the dataset into a training asset.
    • Balancing scale and quality: With millions of samples, homogeneous content is inevitable. Semantic deduplication and diversity sampling are needed to maintain a healthy data distribution.

    3.3 Geometric Validation: The Last Mile of the Loop

    Data scale solves the problem of “quantity,” while geometric validation solves the problem of “correctness.” Systematic validation usually includes multiple levels:

    • Execution level: Whether the program runs without errors and whether the output is valid.
    • Geometry level: Deviation between generated meshes and reference geometry using metrics such as Chamfer distance and intersection-over-union.
    • Visual level: Perceptual similarity between rendered results and target images.
    • Semantic level: Whether generated content satisfies constraints in the instruction, such as spatial relationships like “place a cup on the table.”

    With automated validation, “generate—execute—evaluate—correct” agent workflows can truly obtain scalable feedback signals, and model training can introduce reinforcement learning methods based on execution results.

    4. Infrastructure Considerations for Engineering Deployment

    For teams that want to reuse this approach, cloud infrastructure choices directly affect the throughput and cost of the data pipeline:

    • Storage for large volumes of programs and artifacts: Object storage is suitable for raw code, mesh files, and rendered images, with metadata indexes for retrieval.
    • Large-scale concurrent execution: Sandbox evaluation is naturally stateless and can be elastically scheduled by container platforms to run thousands of execution instances in parallel.
    • Task orchestration: Message queues can decouple collection, execution, and validation stages so that a single failure does not affect the entire pipeline.
    • Quality monitoring: Logging services and monitoring alerts can track fluctuations in execution success rates and validation pass rates, helping teams detect degradation in the data pipeline in time.

    This combination of general cloud capabilities gives smaller teams an opportunity to build data infrastructure that was once affordable only to large laboratories.

    5. Conclusion

    The core challenge of code-based 3D modeling has shifted from “Can models write code?” to “Is there enough large, unified, automatically verifiable data to teach them to write the right code?” A unified dataset spanning modeling dialects, executability guarantees, multi-level geometric validation, and elastic execution infrastructure together form a “standard track” for this field. Once the track is in place, upper-layer applications such as training, evaluation, and agent iteration can operate efficiently like direct international trains, and programmatic 3D generation can truly move from research prototypes toward engineering deployment.