Benchmarking 3D Code Generation in Multimodal LLMs: Evaluation Design and Findings
This article presents a comparative evaluation of how multimodal large language models generate 3D code. It explains why 3D code generation deserves a dedicated benchmark, outlines a four-layer evaluation framework covering runtime reliability, structural soundness, engineering quality, and efficiency, and describes a controlled-variable setup using unified prompts, agent configurations, acceptance criteria, and repeated sampling. It then walks through two representative tasks—an interactive exploded-view mechanical model and a physics-driven 3D animation scene—summarizing the observed strengths and weaknesses of three candidate outputs, their generation times, and a practical structural self-check list. The article closes with three recommendations for turning benchmark results into a repeatable model selection method.
1. Why 3D Code Generation Deserves Its Own Benchmark
In real-world AI agent workflows, models are no longer just completing a few lines of script. They are expected to deliver a runnable front-end artifact in a single pass: scene setup, geometric modeling, materials and lighting, interaction logic, and resource lifecycle management, all packed into one block of generated code. This kind of task places very different demands on a model than ordinary question answering. It tests three things at once:
- Spatial and structural reasoning: the model must understand how a mechanical assembly is broken down into parts and how those parts transmit motion to one another.
- Engineering discipline: resource disposal, exception handling, responsive layout, and accessibility.
- Aesthetics and narrative: the output should look like a credible product, not just a pile of geometric primitives.
For this reason, an evaluation cannot stop at “does it run.” A mature evaluation framework should include at least four layers:
- Runnability: zero script errors, zero resource-loading failures, and core interactions that genuinely work.
- Structural soundness: clear part hierarchy, with no clipping, floating components, or proportion imbalances.
- Engineering quality: accessibility annotations, motion-reduction fallbacks, controllable randomness, and proper resource disposal.
- Efficiency: the end-to-end time required to deliver a usable artifact under the same prompt and the same agent configuration.
It is worth stressing that efficiency and quality are not linearly correlated. A fast generation may mean the model chose a more conservative implementation path; a long generation time may mean the model was repeatedly self-checking. The value of a benchmark lies in plotting both curves at the same time.
2. Evaluation Design: Controlling Variables Matters More Than Piling Up Tasks
To make a comparative evaluation convincing, you first have to lock down the variables. The recommended minimal controllable setup is as follows:
- Unified prompt: a one-sentence, wish-style description with no step-by-step instructions, to test the model’s ability to decompose the task on its own.
- Unified agent: the same tool-calling permissions, the same maximum number of steps, and the same runtime sandbox.
- Unified acceptance criteria: the single hard gate is whether the artifact can be opened directly in a browser and the full interaction flow completed.
- Multiple samples: at least three generations for the same task, so that a single coincidental result does not dominate the conclusion.
A sample evaluation record structure can be written as:
{"task": "Exploded mechanical structure demo","prompt": "Use a general-purpose 3D rendering library to build an exploded-view mechanical insect","checks": {"runtime_error": 0,"resource_404": 0,"interaction_valid": true},"metrics": {"parts_count": 0,"clipping_issues": 0,"a11y_annotations": 0,"elapsed_minutes": 0}}
3. Task One: Interactive 3D Demo of an Exploded Mechanical Structure
This type of task looks simple but acts as a revealing test. All three candidate artifacts ran normally, and the exploded-view function genuinely worked—there were no fake implementations that “look right but cannot actually be taken apart”—which shows that the basic rendering capability of mainstream models has passed the bar. The differences appear at the detail level.
The first artifact pushed “explodability” to the extreme: more than thirty independent parts, a thorax composed of upper and lower shells and a seam ring, revealing a drive wheel, a secondary gear, a transmission shaft, and an energy-conducting structure once opened; a multi-segment abdomen that shifts backward section by section, forming a continuous accordion-like expansion; and support for staggered animation by index. The shortcoming was equally obvious—the default camera distance was too far, and it started by reassembling from a fully exploded state, which could easily lead users to think the program had errored.
The second artifact stood out in visuals and professionalism: it used a museum-specimen narrative, with part annotation lines and real-time projected positioning appearing once the explosion progress passed a threshold; it also reproduced the elytra structure, which is rare among similar implementations; and it offered three responsive layout tiers, more than ten accessibility annotations, motion-reduction preference detection, deterministic randomness, and rendering resource disposal. The weakness was coarse explosion granularity: only nine main parts, with the multiple legs merged into a single part.
The third artifact was the most distinctive: a cool-toned palette paired with a metallic finish, and wing membranes built from curved surfaces plus wing veins, making it the most refined of the three, with four wings and six legs all present. However, it had three hard flaws: clipping between the gears and the side panels, a low default exposure that lost detail in dark areas, and too few interactive controls with no loading-state feedback.
As for time, the three took roughly seven, nine, and thirty-two minutes respectively. The slowest one actually had an advantage in part count, showing that the extra time bought structural complexity—but whether that is worth it depends on the business’s tolerance for delivery latency.
4. Task Two: Physics-Driven 3D Animation Scene
The second task was upgraded to a composite “scene + mechanical motion” problem: build a container crane that operates properly in a port environment. It tests both physical structure design and web aesthetics, and scoring should focus on:
- Whether the kinematic chain is closed: whether hoisting, trolley traverse, gantry travel, and spreader unlocking constrain one another.
- Whether forces and supports are reasonable: whether the legs, tie rods, and counterweights are clearly represented, with no obvious floating.
- Whether the scene narrative is complete: whether the ground, yard, containers, sky, and fog form layers.
- Whether the interaction is explainable: whether users can understand the mechanism through a small number of controls.
In engineering practice, it is advisable to add a “structural self-check list” for this kind of task, asking the model to confirm each item before delivery. This can significantly reduce clipping and proportion distortion:
[ ] All moving parts have an explicit parent and constraint[ ] No geometry interpenetrates[ ] The default camera view shows the main subject in full[ ] The first-frame state is a runnable neutral state[ ] A placeholder and message appear when resource loading fails[ ] The user's reduced-motion preference is respected
5. Turning Evaluation Conclusions into a Selection Method
The point of a comparative evaluation is not to rank models but to establish transferable judgment criteria. Three practical recommendations for developers:
- Assign weights by scenario. For product prototypes, prioritize aesthetics and interaction completeness; for engineering delivery, prioritize structural soundness and resource management; for batch generation, prioritize end-to-end latency and stability.
- Treat accessibility and fallbacks as hard metrics. Responsive breakpoints, semantic annotations, reduced motion, loading states, and error states—these details determine whether an artifact can actually ship.
- Replace subjective impressions with automated acceptance. Write zero errors, zero resource failures, and a completable interaction flow into pipeline gates, and archive screenshots and screen recordings so the evaluation is reproducible.
If an organization already has mature model services and an engineering pipeline, it can use a container platform to host the sandbox, object storage to archive artifacts, and logging and monitoring with alerting to track generation quality—turning a one-off comparative evaluation into a long-term, observable quality baseline. This is how the question of “which model is stronger” moves from subjective debate to a measurable, iterable engineering metric.
