Benchmarking Multimodal LLMs for 3D Code Generation: A Practical Comparison

    This article presents a practical benchmark of multimodal large language models on 3D code generation, covering why three-dimensional scenes are harder than flat web pages, how to control variables across prompts, agent frameworks, and task sets, and how to score functional completeness, code quality, visuals, physical plausibility, and speed. It walks through two case studies—a disassemblable 3D mechanical firefly and a physics-driven container crane animation—distills a reusable scoring framework, and closes with model selection guidance for engineering teams.

    1. Why 3D Code Generation Is a Hard Problem for LLMs

    Models can already produce a working interactive web page from a single sentence. But when the task moves from forms and lists to three-dimensional scenes, difficulty rises non-linearly. The model must get the syntax right while simultaneously maintaining geometry and topology, materials and lighting, camera narrative, an interaction state machine, and resource lifecycles. Any single weak link surfaces as a black screen, mesh clipping, or a click that does nothing.

    A model that briefly went viral under the codename “HungerG” was later revealed to be a vendor’s new sparse-architecture model, and its technical profile is representative: a mixture-of-experts (MoE) sparse architecture, a million-token context window, native multimodal input (text/image/video), a maximum single output of tens of thousands of tokens, and a total-to-active parameter ratio above roughly twenty to one. Configurations like this signal a trend—long context and multimodal input are becoming standard on flagship models, and the real point of differentiation has shifted to how completely complex deliverables are finished.

    Evaluation focus should shift accordingly: stop asking only “can it generate,” and start asking “is what it generates actually usable, maintainable, and extensible.”

    2. Evaluation Design: Controlling Variables Matters More Than Piling On Tasks

    A convincing comparison depends on controlling variables. We fixed three:

    • Same prompt: every model received an identical natural-language requirement, with no prompt-engineering compensation.
    • Same agent framework: tool calls, file writes, and preview rendering all ran through one pipeline, eliminating scaffold differences.
    • Same task set: six tasks covering static reconstruction, interaction logic, physics simulation, responsiveness, and accessibility.

    Scoring was split into two metric groups. Task quality covers functional completeness (requirement coverage), code quality (structural clarity, error handling, resource release), visual and aesthetic quality (composition, color, lighting), and physical plausibility (structural self-consistency, mesh clipping). Task efficiency is measured by end-to-end time and the number of human rework rounds. The value of this design is that it turns model “magic” into reproducible engineering metrics.

    3. Case One: A Disassemblable 3D Mechanical Device

    The requirement was a single sentence: build a disassemblable 3D mechanical firefly using a given 3D rendering library. This is a classic “wish-style” prompt with extremely sparse information, testing the model’s ability to fill in design intent on its own.

    All three outputs deserve credit for the same baseline: zero script errors, zero resource-loading failures, and a genuinely functional disassembly interaction. The differences appeared in depth.

    The first pushed “disassemblable” to the extreme: thirty-two independent parts, a thorax split into upper and lower shells with an equatorial seam ring, revealing a drive gear, a secondary gear, a transmission shaft, and energy conduits once opened; a six-segment abdomen that slides back segment by segment like an accordion; and staggered, index-based expansion. Its weakness was a default camera set too far away, plus an opening animation that reassembled from the fully disassembled state, which is easy to mistake for a program error.

    The second excelled at visuals and professionalism: a museum-specimen narrative, with part annotation lines and real-time projected callouts appearing once disassembly passed roughly a quarter; the only one of the three to correctly represent the elytra structure (fireflies belong to Coleoptera); plus three responsive breakpoints, a dozen accessibility annotations, adaptation to the system “reduce motion” preference, deterministic randomness, and explicit release of rendering resources. Its weakness was splitting into only nine large parts, with all six legs merged into a single component.

    The third was the most distinctive: a steampunk palette of teal cold light and brass, wings built from Bézier surfaces with vein ribs, the most detailed of the three, with four wings and six legs all present. But it had three hard defects: gears clipping through the thorax side panels, low default exposure, and a UI with only two buttons and no loading state.

    The efficiency gap was far wider: the fastest model delivered in about seven minutes, the middle one in about nine, and the slowest took about thirty-two minutes. Quality did not correlate positively with time spent, a point with real value for engineering selection.

    4. Case Two: A Physics-Driven 3D Animation

    The second task stepped up: create a fully functional container crane at a port dock in a given 3D engine. It tests both physical structural design (tower load paths, boom rotation, coordinated ropes and spreader) and web aesthetics (materials and atmosphere for an industrial scene).

    The scoring points for this kind of task reduce to a checklist:

    1. Physical structure: self-consistent supports / reasonable joints / no mesh clipping
    2. Animation logic: closed-loop state machine / smooth cycles / tunable parameters
    3. Visuals: material differentiation / lighting depth / camera framing
    4. Engineering quality: modular decomposition / exception fallbacks / resource release

    The most common failure in practice is models that “pile up parts” instead of “building structure”: the silhouette is right, but the kinematic relationships do not hold, and the spreader detaches from or passes through the boom. This shows that spatial reasoning still lags behind code generation, so physical plausibility must be scored separately rather than folded into the visual score.

    5. A Reusable Scoring Framework

    Teams should turn evaluation into an executable script rather than a one-off spreadsheet:

    1. SCORE = {
    2. "function": 0.30, # requirement coverage
    3. "code": 0.25, # structure, fallbacks, resource release
    4. "visual": 0.20, # composition, materials, lighting
    5. "physics": 0.15, # structural self-consistency, clipping detection
    6. "speed": 0.10, # normalized end-to-end time
    7. }

    Mesh clipping detection can use bounding-box intersection as a coarse filter; resource release can be checked by looking for explicit disposal calls on the renderer and geometries; requirement coverage is produced by manually decomposing the prompt into binary checks. The advantage of this framework is that it is regression-friendly: every model iteration runs the same task batch and yields comparable curves.

    6. Conclusions and Selection Guidance

    The real output of a comparison is not a ranking but a basis for decisions. If maximum functional depth and maintainability matter, weight code structure and resource governance. If the deliverable is a demo or a presentation, weight visuals and narrative higher. If generation is high-volume and cost-sensitive, prioritize efficiency and stability. The safer engineering approach is to split models across the pipeline by capability rather than betting on one model to do everything.

    For teams building their own evaluation, the path is: start with two or three information-dense 3D tasks as a cold-start baseline, fix the prompts and the agent pipeline, decompose quality into binary checks, then fold time into a normalized score. Run continuously and archive continuously, and model selection turns from subjective impression into an auditable engineering conclusion. Hosting batch evaluation jobs on a cloud container platform with logging and monitoring/alerting services adds observability and cost control.