Code-Defined 3D Models: A Verifiable Approach to 3D Modeling
This article explains why 3D content creation needs executable, verifiable representations, reviews the limitations of fragmented existing work, and outlines 3DCodeVerse’s unified intermediate representation, multiple execution backends, and paired code-render-validation samples. It also covers how geometric assertions work, where code-defined modeling is unsuitable, what the approach means for agents, industrial software, and automated production, and practical steps for getting started.
Three-dimensional content creation has long relied on intuition and visual feedback. Whether in digital sculpting or parametric modeling, operators adjust shapes in a graphical interface and then observe whether the result looks satisfactory. This approach is intuitive, but the results are difficult for programs to check automatically. An AI-generated image can be debated on whether it looks good; a robot joint model, however, has clear right and wrong answers about whether its rotation axis angle is within the allowed range and whether parts penetrate each other. Writing a 3D model as an executable program is intended to make such questions machine-checkable.
Why Code-Based Verification?
Traditional pipelines usually produce static mesh files or parametric history records. These files record shape but rarely record kinematic constraints, collision volumes, material logic, and interactive behavior. Without that information, a program cannot determine whether a model is acceptable. The problem becomes more obvious when AI generates models automatically. Generated results are often intended for direct use in industrial design, robot simulation, or automated game development; joint range errors or part intersections can cause rework.
The core value of code-defined modeling is verifiability and traceability. The rotation matrix of each joint and the motion range of each actuator are written as explicit parameters and expressions. When evaluating a model, the criterion can shift from “does it look appropriate” to “do the tests pass.” For example, when checking a door model, the hinge can be rotated around its axis to specified angles, followed by collision detection. If the door panel intersects the door frame at some angle, the test fails and reports the specific angle and location.
Why Existing Work Remains Fragmented
Research related to 3D code has accumulated, but each effort covers a limited scope. Some datasets focus on CAD model construction sequences, recording modeling steps but covering less of an object’s dynamic properties and scene semantics. Some work focuses on procedural materials, with many node types, but mainly serves textures and lighting and is hard to extend to geometry and kinematics. Other code generation systems for agents lack sufficient training data and are difficult to use for systematic geometric verification.
Overall, these efforts can be measured along four dimensions: static objects, articulated objects, complex scenes, and materials and lighting. Most work covers only one or two of these dimensions and rarely all four. This fragmentation makes research results hard to reuse and prevents data from different tools from connecting directly.
How 3DCodeVerse Approaches the Problem
The system described in the original work is called 3DCodeVerse. It attempts to unify the representations used by different 3D software into a shared, trainable, and verifiable general representation. The focus is not only expanding a dataset but building unified infrastructure. Its core design includes three points.
First, a unified intermediate representation. A parser converts CAD command streams, Blender operation histories, and shader code into a software-agnostic intermediate representation. In this representation, “extrude” and “stretch” are generic operations with parameter lists, not specific buttons in a particular application. Researchers therefore do not need to care which software the program originally came from.
Second, multiple executable backends. Explicit modeling procedures generated procedurally can be compiled into standard graphics API code. Articulated objects can be passed to a physics engine for rigid-body dynamics simulation, which returns collision results. Different content types are executed by appropriate backends and then compared in a unified virtual environment.
Third, code, rendered images, and verification results are paired. Each sample contains a program, a rendered image, and verification results. A model can therefore be inferred from an image to generate code, or modeling can start from a textual description. The original work reports a large data scale, but specific numbers should be verified against the original paper or project page before citation.
Putting Geometric Assertions into Practice
The key to verification is writing “acceptable” as runnable assertions. Using a door hinge as an example, the process can proceed as follows:
- Define the position and direction of the hinge axis.
- Set the rotation range, for example 0 to 90 degrees.
- Rotate the door panel at a fixed step size and run collision detection at each step.
- Assert that the door panel and door frame do not intersect across the entire range.
- Record the test results, including the failing angle and collision location.
The value of this process is repeatability. The same code produces the same judgment each time it runs. But there are clear boundaries. Assertions only check rules that have been written; problems not written into assertions will not be found. Intersection detection accuracy depends on mesh resolution and step size, and a step size that is too large may miss brief collisions. Physics simulation results also depend on material parameters and friction settings.
Where Code-Defined Modeling Is a Poor Fit
Code-defined modeling is not suitable for all work. Rapid visual exploration, artistic sculpting, and stylized creation rely more on immediate feedback, and editing parameters line by line is usually less efficient than direct manipulation. For tasks dominated by aesthetic judgment, assertions are often hard to define. Teams without programming experience also face a learning curve. To decide whether to adopt this approach, first determine whether the core requirement is “looks good” or “is correct.” When correctness and reproducibility matter more, code-defined modeling offers clearer benefits.
What This Means for Several Fields
For agents, executable programs allow repeated experimentation in simulated environments and learning of physical laws. This can reduce the cost and risk of real-world experiments. However, whether learned laws transfer to real environments depends on the gap between simulation and reality.
For industrial software, a unified intermediate representation helps reduce feature loss caused by format conversion. For different software to truly interoperate, parsers need to cover enough operation types, which depends on the completeness of the specific implementation.
For automated production, programmatic quality gates can automatically check virtual prototypes before release. More complete checks make the gates more reliable. Problems outside the checks still require manual review.
How Readers Can Get Started
To try this approach, readers can proceed in the following order:
- Choose a small model with clear criteria, such as a hinged door or a drawer.
- Write dimensions, axes, and motion ranges as parameters instead of placing them manually.
- Write an assertion for each constraint, such as no intersection, gravity balance, or angle range.
- Run all assertions after each change and save the results for traceability.
- Trust results only within the coverage of the assertions; parts outside that coverage still need manual inspection.
3D content is shifting from a presentation medium to a computable object. Code-defined modeling makes “correctness” testable, but it cannot replace visual judgment or automatically cover all problems. A practical approach is to give objectively checkable parts to programs and leave subjective judgment to people.
