Comparing 3D Code Generation in Large Language Models: An Engineering Evaluation
This article compares how large language models generate runnable, interactive 3D pages from a single prompt. Using a unified evaluation framework across two task types—deconstructible mechanical models and animated mechanical scenes—it examines structural logic, interaction completeness, code quality, runtime stability, and generation time. It also explains the technical factors behind the differences and offers practical engineering recommendations for prompting, acceptance testing, performance tuning, and cost control.
1. Background and Problem Definition
As AI coding tools evolve quickly, generating a runnable, interactive 3D page from a single sentence has become a practical test of a model’s engineering delivery capability. Unlike conventional Q&A benchmarks, 3D scene generation requires a model to do four things at once: understand natural-language intent, design a sound physical structure, organize maintainable code, and ensure the result runs in a browser without errors. If any of these is missing, the output degrades into a demo that looks right but does not actually work.
This evaluation uses two task categories: mechanical 3D models that can be taken apart, and scenario-based mechanical assemblies with working logic. Every sample uses the same prompt, the same agent execution framework, and the same runtime environment, isolating the model itself as the variable.
2. Unified Evaluation Framework
To keep the conclusions credible, the evaluation fixes the following:
- Consistent prompts: a single “wish-style” sentence with no additional constraints, testing the model’s ability to fill in requirements on its own.
- Consistent runtime: the same browser engine, network conditions, and resource-loading strategy.
- Consistent pass criteria: zero script errors, zero resource-loading failures, and genuinely functional interaction.
- Consistent metrics: both code quality scores and task duration are recorded, so cost is considered alongside results.
The scoring dimensions can be abstracted as:
Total = Structural soundness (30) + Interaction completeness (25)+ Visuals and aesthetics (20) + Code engineering quality (15)+ Runtime stability (10)
3. Task 1: Deconstructible 3D Mechanical Models
All three outputs passed the hard criteria, but their engineering priorities differed clearly.
The first approach pushed deconstruction to the extreme: dozens of independent parts, layered shells, drive shafts, and energy-conducting structures, with staggered expansion by index and a clear mechanical narrative. Its weaknesses were a default camera distance that was too far and an opening state that started fully disassembled, which users could mistake for a malfunction.
The second approach was stronger in visual professionalism. It used a specimen-style narrative: once disassembly passed a certain ratio, part annotation lines appeared with real-time projected positioning. It was also more rigorous in biological form, including elytra structures, and handled engineering details such as responsive breakpoints, accessibility attributes, motion degradation, deterministic randomness, and explicit GPU memory release. Its limitation was coarse disassembly granularity, with multiple legs merged into a single part.
The third approach was the most distinctive, with careful color schemes and detailed modeling of wing membranes and wing ribs, plus complete limb structures. However, it had three clear problems: gears and side panels clipping through each other, low default exposure, and missing interaction controls and loading states.
Generation times were roughly seven, nine, and thirty-two minutes, showing that finer part granularity often comes at the cost of significantly longer generation time.
4. Task 2: Scenario-Based Animated Mechanical Assemblies
This task adds physical constraints on top of the structural one: a hoist must translate along a track, raise and lower, and follow correct force and limit logic. The evaluation therefore focuses on three points:
- Whether the kinematics are correct and whether parts penetrate each other.
- Whether the control logic is closed-loop, with buttons and states mapped one-to-one.
- Whether the scene aesthetics hold up, with coherent lighting, materials, and composition.
Common failure points in practice include building only the appearance without limits, animation loops that do not match the real mechanism, missing loading and error states, and sharp frame-rate drops under heavy load.
5. Technical Attribution
From an engineering perspective, the differences come mainly from three capabilities:
- Sparse architecture and activated parameter scale, which determine effective inference throughput per unit time and directly affect generation time.
- Long-context capability, which determines whether the model can hold a complete engineering codebase at once without losing earlier constraints.
- Native multimodal understanding, which determines how precisely the model grasps visual semantics such as “mechanical feel” and “biological form.”
Equal parameter counts do not mean equal capability. Training data mix and post-training strategies have a more direct impact on code and task-oriented scenarios.
6. Actionable Engineering Recommendations
- Prompting: express key constraints as “goal + acceptance criteria,” for example, “must be deconstructible with every part independent.”
- Output acceptance: build automated checks covering script error capture, resource-loading failure monitoring, and interaction reachability traversal.
- Performance governance: for complex scenes, use instanced rendering, geometry merging, on-demand loading, and explicit resource release.
- Cost control: include generation time in selection metrics. Long-duration approaches suit offline batch runs; short-duration approaches suit interactive iteration.
- Platform support: use container platforms for batch evaluation, object storage to archive outputs, and logging and monitoring services with alerting to track failure rates.
7. Conclusion
Competition in 3D code generation has shifted from “does it run” to balancing engineering completeness and efficiency. Selection should not rely on a single impressive effect. Instead, weigh structural soundness, interaction closure, code maintainability, and generation time together, and keep regressing through a unified evaluation framework to build a stable, reusable AI coding delivery pipeline.
