Three.js 3D Generation Benchmark: Comparing Model Efficiency and Output Quality
This article presents a multi-model benchmark of AI-generated Three.js scenes, covering static structures, dynamic animation, physical simulation, and UI engineering. It explains the evaluation setup, including controlled variables, task design, and a three-tier delivery standard, then walks through three representative cases: a disassemblable mechanical firefly, a working container crane, and an engineering quality checklist. The findings highlight the trade-off between structural granularity and generation time, common failure patterns in motion and interaction, and why resource cleanup, fallback handling, and accessibility determine whether a generated scene is production-ready.
1. Why Evaluate 3D Generation Separately
In the capability landscape of AI coding tools, interactive 3D pages are far from an easy scenario. A single task stresses four things at once:
- Spatial structure understanding: the model must translate natural-language descriptions such as “mechanical firefly” or “container crane” into a hierarchical object tree.
- Math and geometry: coordinate systems, rotation matrices, interpolation curves, and physical constraints.
- Engineering discipline: resource disposal, event unbinding, and fallback strategies.
- Aesthetics: materials, lighting, and composition, which directly determine the first impression.
A deliverable that merely “runs” is therefore not the finish line. In this evaluation, deliverables are graded on three layers: runnable (no script errors, no missing resources), interactive (disassembly, reset, and responsive behavior all genuinely work), and maintainable (clear naming, adequate comments, no redundant assets). Only when all three layers pass is a delivery considered acceptable.
2. Methodology: Controlling Variables Matters More Than Sample Volume
This benchmark keeps the same prompt, the same runtime environment, and the same agent execution pipeline, changing only the underlying model. Six tasks are designed, covering four categories: static structure, dynamic animation, physical realism, and UI engineering. Controlling variables makes model choice the only independent variable. Timing covers the entire process of understanding, coding, self-verification, and writing the artifact to disk, rather than only first-screen rendering.
Teams building their own benchmarks should fix at least the following five items:
1. Prompt: a one-sentence wish-style description, with no extra constraints appended2. Runtime: the same browser engine and the same rendering library version3. Executor: the same agent, with the same max turns and timeout threshold4. Scoring criteria: number of script errors, number of failed resources, number of working interactions5. Timing criteria: wall-clock time from task dispatch to a usable artifact
3. Case 1: A Disassemblable Mechanical Structure
The task was to build a disassemblable mechanical firefly using a mainstream Web 3D rendering approach. All three outputs passed the runnable layer: zero script errors, zero resource-loading failures, and a disassembly action that genuinely works. None showed the “looks right, structure is fake” problem. The differences came down to structural granularity and narrative expression.
The first approach pushed disassembly to the extreme, producing more than thirty independent parts. The thorax uses upper and lower shells plus a seam ring, with a drive gear, a secondary gear, a transmission shaft, and an energy-conduction channel inside. The abdomen shifts backward section by section to create a layered unfolding effect, and supports staggered animation by index. The cost: the default camera distance is too far, and the scene starts fully disassembled and reassembles on load, which is easily mistaken for a failure.
The second approach stands out in professionalism and accessibility. Once disassembly progress passes a threshold, part labels appear with leader lines and real-time projected positioning. It includes elytra that match biological classification traits. It also provides multiple responsive layouts, fairly complete accessibility annotations, adaptation to the system “reduce motion” preference, deterministic randomness, and rendering resource recycling. Its weakness is that it splits into only a few large parts, with the feet merged, leaving structural detail insufficient.
The third approach has the highest recognizability, pairing a cool-color palette with a metallic finish. The wing membranes use curved surface patches with veins, and all four wings and six legs are present. However, it has three hard defects: gears intersect the side panels, the default exposure is too dark, and there are too few interactive controls with no loading state.
The timing comparison is revealing: the visually driven approach took about 7 minutes, the recognizability-driven one about 9 minutes, and the extreme-structure approach 32 minutes. Structural granularity and time cost rise non-linearly; doubling the part count does not deliver proportional quality gains.
4. Case 2: Dynamic Mechanical Animation
The second task was to generate a working container crane in a port scene, focusing on physical structure design and page aesthetics. Common failure points here are highly consistent:
- Broken motion chain: trolley movement is not linked to hoist raising/lowering, and cable length does not change with height.
- Missing constraints: the spreader swings without damping, causing clipping and jitter.
- Thin scene: no ground reflections, no sense of volumetric fog, and no depth in the background.
- Hollow interaction: only a play button, with no speed control, view switching, or state readback.
High-quality deliveries usually share three traits: first, kinematics is split into four independently interpolable states, travel, luffing, hoisting, and slewing; second, a damping model suppresses swing and clamps motion at the limits; third, the UI works like a dashboard, reading back load and height in real time.
5. Case 3: An Engineering Quality Checklist
The third dimension is engineering quality, which can be used directly as a review checklist:
// Example: unified resource and event cleanup to avoid memory growth in long tasksfunction disposeScene(root) {root.traverse((obj) => {obj.geometry?.dispose();for (const m of [].concat(obj.material ?? [])) {for (const k of ['map','normalMap','roughnessMap']) m[k]?.dispose();m.dispose();}});renderer.renderLists.dispose();}
Additional checks include: whether geometry and textures are reused, whether animation frames use a fixed time step, whether a loading state and failure fallback are provided, whether pixel ratio is reduced based on viewport, and whether keyboard operation works.
6. Conclusions and Selection Guidance
The core conclusion is not “who wins overall,” but three actionable judgments. First, the task goal sets priorities: choose visuals and narrative for demo scenarios, and structural granularity and annotations for teaching scenarios. Second, time is a hidden cost; structural complexity needs a cap, so keep the part count per task within a reasonable range and enforce self-verification. Third, engineering quality is the dividing line: resource disposal, fallback handling, and accessibility determine whether an artifact can go into production.
If a company wants to turn this evaluation into a pipeline, it can combine container platforms for environment isolation, object storage to archive artifacts, and logging services with monitoring alerts to track failure rates and time distributions. That shifts model selection from subjective experience to sustainable, observable data-driven decisions.
