Procedural 3D Generation: Evaluation and Data Infrastructure for Code-Based Modeling

    As 3D modeling transitions from manual interaction to code generation, it becomes increasingly compatible with Large Language Models (LLMs). However, current research faces fragmentation, with isolated benchmarks and incomplete workflows lacking robust geometric validation. This article explores the necessity of a unified infrastructure—spanning data, execution, validation, and workflow layers—to drive procedural 3D generation from concept to production.

    Procedural 3D Generation: Evaluation and Data Infrastructure for Code-Based Modeling

    1. Why “3D via Code” Suddenly Matters

    Traditional 3D modeling relies on manual operations within interactive software: pulling vertices, adjusting curves, and baking textures. Along this route, there is limited room for AI intervention—operation sequences are difficult to express as learnable signals, and intermediate states cannot be reproduced at low costs like text or images.

    Procedural modeling, however, expresses 3D scenes as executable code: a script describes geometry, boolean operations, material parameters, and lighting configurations. Running it once yields a reproducible scene. This paradigm is naturally friendly to AI training for three reasons:

    • Executable means verifiable: Code either runs successfully or throws an error. The clear boundary between success and failure makes it a natural reward signal for reinforcement learning.
    • Composable and generalizable: Changing a few variables in a parameterized script can generate a family of similar assets, providing leverage for large-scale data synthesis.
    • Versionable and iterable: Model-generated code can be continuously refined through multi-turn dialogues, forming a “generate—execute—feedback—revise” closed loop, which is the standard form of current agent workflows.

    In short, 3D modeling is shifting from a manual craft to a programming task, and language models happen to excel at writing code.

    2. The Fragmentation Dilemma in Current Evaluation and Datasets

    In recent years, a batch of research has emerged around this direction, but looking at them together reveals a clear issue: each work dives deep into a single point, lacking systematic integration.

    2.1 Evaluation Side: Small Scale, Narrow Dimensions

    Some graphics editing benchmarks only include a couple of hundred tasks, which is far from enough to train models and even appears thin for reliable evaluation. Other works focus on a single dimension, such as materials and lighting. While they can collect hundreds of thousands of data points, equally critical dimensions like geometric structure, assembly relationships, and physical properties are entirely absent.

    These efforts are like different craftsmen building parts of an instrument separately: one focuses on the strings, another on the body, but no one orchestrates the score for the entire band. Individually, each part is exquisite, but together they fail to play a symphony.

    2.2 Workflow Side: Systems Without Data or Validation

    Projects specifically building harness systems (the complete workflow allowing agents to automatically generate, execute, and fix code) mostly revolve around their own processes. However, they do not release accompanying large-scale datasets and lack systematic geometric validation capabilities. Geometric validation goes beyond “the code runs”; it must answer:

    • Is the generated mesh manifold, and free of self-intersections?
    • Do the dimensions and proportions match the input description?
    • Are the topological relationships between multiple parts logical (e.g., are holes actually punched through the shell, do assembly faces fit)?

    Without this validation, models can “run but be wrong,” leading to systematic distortion in evaluation results.

    3. What a Unified Infrastructure Should Look Like

    To solve fragmentation, the core idea is to unify the mutually unintelligible “dialects” of CAD, script modeling, shaders, and browser-side graphics rendering into a shared, trainable, and verifiable infrastructure. This is akin to standardizing railway gauges across borders so trains no longer need to switch tracks at boundaries. In engineering terms, it requires at least four layers of design:

    3.1 Data Layer: Large-scale, Executable Training Corpora

    The ideal data is not image pairs, but “instruction—code—executable scene” triplets. Industry efforts have already exported millions of independent executable programs, forming over a million training pairs covering dimensions like geometric modeling, materials, and lighting. Key quality metrics for the data include: execution rate, geometric validity (non-degenerate meshes, no illegal topologies), and consistency between instructions and results.

    3.2 Execution Layer: Isolated and Efficient Sandbox

    Executing model-generated code must account for security and efficiency. A typical engineering solution is to run it in isolation using containers or subprocesses, limit CPU time and memory caps, and capture the exception stack for feedback:

    1. def run_sandboxed(script: str, timeout=10):
    2. # Pseudo-code: execute modeling script in a restricted environment
    3. proc = start_isolated_process(script, limits={
    4. "cpu_time": timeout, "memory_mb": 2048
    5. })
    6. proc.wait()
    7. return {
    8. "exit_code": proc.exit_code,
    9. "stderr": proc.stderr, # Error messages can be fed back to the model for correction
    10. "mesh_stats": validate_geometry(proc.output) # Geometric validity check
    11. }

    3.3 Validation Layer: Multi-level Feedback Signals

    Validation should be layered; the finer the granularity, the more effective the training signal:

    • Syntactic level: Can the code be parsed and executed?
    • Semantic level: Is the execution output a valid mesh (non-degenerate, non-self-intersecting)?
    • Consistency level: Is the result semantically aligned with the text description (can be scored multimodally using Vision-Language Models)?
    • Assembly level: Are the relative positions and relationships of objects in a multi-part scene correct?

    3.4 Workflow Layer: Closed-loop Agent Harness

    The harness that connects the above three layers should support multi-turn “generate—execute—read errors—revise” loops. An effective pattern in practice is: generate code in the first round, and if execution fails, feed the stderr and geometric check results back into the context to allow the model to make targeted patches. Experience shows that structured error feedback significantly accelerates convergence compared to a simple binary “failure/success” signal.

    4. Practical Takeaways for Developers

    Even if you are not directly involved in research in this direction, the concepts of procedural 3D generation offer valuable lessons for engineering practices:

    • Bake validation into the pipeline: For any generative task, as long as the output is executable and testable, you should establish automated validation rather than relying on manual spot-checks.
    • Data is scarcer than models: The current bottleneck is clearly not model architecture, but high-quality, verifiable, multimodal-aligned data assets.
    • Beware of single-dimension dataset bias: Data with only materials but no geometry, or only geometry but no semantics, will lock in a model’s weaknesses.

    5. Conclusion

    The shift toward code-based 3D modeling essentially translates graphics knowledge into a symbolic system that language models can learn. To make this path viable, the key is not a single-point tool, but a four-in-one infrastructure encompassing data, execution, validation, and workflow. As more fragments are pieced into the same blueprint, “text-to-3D” can transition from demos to production, and the once-disjointed band will finally be able to play in harmony from the same score.