Evaluating LLM Coding Ability: From Code Generation to Interactive 3D Scenes
This guide explains how to evaluate the coding capabilities of large language models through browser-based 3D scene generation. It covers how to turn open-ended creative prompts into verifiable acceptance criteria, what really makes character animation, volcanic eruption effects, and procedural ocean surfaces difficult, and how to build a reproducible evaluation workflow that measures first-pass generation and iterative quality separately. Key takeaways include attribute-based checklists, time-driven animation, particle render-cost optimization, and the engineering steps required before a demo becomes a shipped application.
Rethinking AI Coding: From Generating Text to Delivering Interactive Systems
Evaluating a large language model’s coding ability should not stop at whether it outputs complete code, and a single screenshot is never sufficient evidence. For 3D applications running in the browser, the generated code must simultaneously handle scene organization, geometry construction, material configuration, animation updates, input handling, and resource management.
These tasks are inherently cross-domain: the model must understand visual intent expressed in natural language, translate that intent into an executable program structure, and deal with runtime constraints. A “generate a 3D demo” request may look like a creativity exercise, but it actually serves as an effective entry point for assessing end-to-end engineering capability.
Two representative cases from the original material illustrate two typical task profiles:
- Character riding a bike: emphasizes shape modeling, motion coupling, scene composition, and interaction quality.
- Volcanic eruption: emphasizes dynamic processes, particle organization, timing control, and rendering cost.
It is worth stressing that such cases are good for probing capability boundaries, but they cannot alone prove how a model performs across all programming tasks. A rigorous judgment must rest on unified tasks, explicit constraints, and reproducible records.
Define Acceptance Criteria Before Letting the Model Code
“Show off your design skills and generate a beautiful 3D page” stimulates creativity but does not support reliable delivery. Developers need to break open-ended descriptions into requirements that can be checked.
1. Turn Visual Requirements into a Scene Checklist
Using a coastal cycling scene as an example, requirements can be split into four layers:
The first layer is the subject: the bird character, the bicycle, and their spatial relationship. The character must hold a plausible riding posture, the body must not visibly intersect the frame, and the feet should maintain an understandable connection to the pedals.
The second layer is the environment: road, sea, distant terrain, vegetation, and sky. The environment is not merely decoration; it provides scale references and motion cues for the subject.
The third layer is motion: wheel rotation, pedal movement, subtle body sway, and background dynamics. Different motions must not vary independently at random, otherwise viewers quickly sense the inconsistency.
The fourth layer is interaction: camera orbit, zoom, pause, and reset. Interactions need clear boundaries—for example, preventing the camera from going below the ground or passing through the subject.
This breakdown converts “aesthetic requirements” into engineering constraints and makes later revisions more targeted.
2. Clarify Runtime and Delivery Conditions
“A single-page file” does not automatically mean “runs offline.” The page may still load scripts, textures, fonts, or models from the network. The task specification should therefore make the following explicit:
- Whether external dependencies are allowed;
- Whether the page must run with the network disconnected;
- Whether images, audio, and prebuilt models are permitted;
- Whether mobile adaptation is required;
- Whether window resizing must be handled;
- Whether the source code must be easy to read and modify.
If everything must be constructed in code, you should also accept the trade-offs of procedural modeling in visual detail, rather than conflating it with a full asset production pipeline.
Character Riding Case: The Real Difficulty Is Relationships, Not Object Count
A model can quickly generate many geometries, but “there is a bird, a bike, and a road” does not add up to a believable cycling scene. What matters is whether objects obey consistent spatial and motion relationships.
1. Organize the Character with a Hierarchical Structure
The character and vehicle should use hierarchical organization. The bike body is a unit, with wheels, crank, and pedals as independently rotatable child parts; the character’s body, head, wings, and legs should be managed separately.
The value of this structure is that moving the whole does not break local relationships, and local animations do not require recomputing world positions of everything. For complex scenes generated from code, the hierarchy is also the primary basis for locating bugs.
For example, if the character’s overall position is correct but the feet clearly miss the pedals, you should first inspect local coordinates and rotation centers—not move the entire character to mask the problem.
2. Keep Bike Speed, Wheel Speed, and Pedal Cadence Consistent
If the bicycle moves forward along the road, wheel rotation speed should relate to linear velocity. In a simplified model, you can use:
Angular velocity = linear velocity ÷ wheel radius
If you adopt the “vehicle essentially stationary, road moving backward” staging, the road motion, wheel rotation, and character animation must still share a consistent set of speed parameters.
A constraint is also needed between pedals and feet. In a simple demo, the feet can follow pedal positions, with leg posture adjusted approximately; for higher fidelity, inverse kinematics can solve joint positions. Either way, be clear about whether you have built a visual approximation or a fully constrained motion system.
3. Improve the Look Through Composition, Not Endless Detail
Good visuals typically come from subject hierarchy, light and shadow, and color organization. In a coastal scene, a warm sky against a cool sea creates contrast, a curved road guides the eye, and distant terrain establishes depth.
Conversely, adding more gulls, lighthouses, vegetation, and spray without controlling visual weight can make the frame more crowded and bury the subject.
The optimization order should therefore be: first ensure clear silhouettes, then tune lighting and materials, then refine motion, and finally add environmental detail.
Volcanic Eruption Case: Visual Simulation Is Not Scientific Simulation
An eruption demo typically includes the mountain, lava, ejected material, smoke, and fire glow. It tests the model’s ability to organize multiple dynamic systems, but visual effects must be distinguished from physical simulation.
An eruption scene built from particle trajectories and material animation is, strictly speaking, a visual simulation. Unless an explicit physical model, boundary conditions, and a validation process have been established, you cannot claim it predicts real eruption behavior.
1. Split Dynamic Effects into Independent Systems
A sensible implementation might include:
- Mountain system: terrain silhouette, crater, and surface structure;
- Lava system: flow paths, brightness variation, and surface disturbance;
- Ejection system: initial velocity, gravity effects, and particle lifetime;
- Smoke system: rising, diffusion, opacity, and dissipation;
- Lighting system: local brightness changes across eruption phases.
Different systems should share the scene clock while keeping clear data boundaries. That way, changing ejection intensity does not require rewriting mountain or camera logic.
2. Drive Animation with Time, Not Frame Counts
If a particle moves a fixed distance every frame, the eruption speed varies with device frame rate. A more sound approach is to update state based on elapsed time.
The following is illustrative pseudocode and does not correspond to any specific tool’s API:
Each update:Get the time elapsed since the last updateClamp excessively large intervals if neededFor each active particle:velocity = velocity + acceleration × elapsed timeposition = position + velocity × elapsed timeremaining lifetime = remaining lifetime − elapsed timeIf remaining lifetime ≤ 0:Recycle the particle
Clamping abnormal time intervals prevents artifacts such as particles jumping suddenly when a page returns to the foreground after being backgrounded for a long time. For more complex simulations, you can also adopt fixed-timestep state updates and decouple rendering from simulation frequency.
3. Control the Render Cost of Transparent Particles
Smoke effects often rely on large numbers of transparent particles. Even with simple geometry, such particles can incur high pixel-processing costs due to screen overlap.
Optimization should go beyond reducing polygon counts; also check:
- The number of transparent particles visible at once;
- Their on-screen coverage area;
- Overlap layering and transparency sorting;
- Whether objects are frequently created and destroyed;
- Whether materials and geometry data can be reused;
- Whether effects should degrade based on device capability.
Returning spent particles to an object pool is usually better for memory allocation and GC pressure than constantly creating new ones.
Procedural Ocean: Build Credible Cues First, Then Chase Complexity
The ocean surface is often the part of a scene that most easily produces a wow effect—and is most easily misjudged. The water may look excellent in a screenshot, but flaws emerge once the camera moves or the scene runs for a while.
A relatively lightweight ocean approach superimposes several wave sets onto surface height or normals, then combines sky color, view-dependent reflection, and near-shore variation to shape the final look.
Three boundaries matter here:
First, the waves should not rely solely on bulk vertical movement. Superimposing waves of different directions, frequencies, and amplitudes is far more likely to produce layered surface variation.
Second, highlights and reflections do not mean full reflection is implemented. Environment-color approximation, screen-space effects, and true reflection differ in cost and limitations; documentation and delivery notes must state this accurately.
Third, procedural generation is not free. Heavy shading computations, large transparent surfaces, and high-resolution rendering can all create significant load.
Ocean acceptance testing should therefore include close-up views, distant views, oblique angles, and continuous motion observation—not just the most flattering screenshot.
Building a Reproducible Model Evaluation Workflow
If every test uses different prompts, devices, and numbers of manual revisions, your overall impression cannot form a credible comparison. A more practical approach is to maintain a fixed task set and a uniform record template.
1. Record First-Pass Generation and Iterations Separately
The first-pass output mainly reflects the model’s understanding of the requirements and its initial implementation capability; subsequent revisions reflect problem localization, feedback interpretation, and localized fixing ability.
These should be evaluated separately. A final result patched heavily by humans cannot be credited to first-pass generation; likewise, a model whose first attempt fails but then fixes the problem quickly from logs deserves positive note.
2. Use Itemized Acceptance Instead of a Single Score
Recommended evaluation dimensions:
- Functional completeness: are key objects, animations, and interactions implemented;
- Runtime reliability: any load failures, persistent errors, or abnormal stops;
- Spatial plausibility: are proportions, placement, occlusion, and motion constraints believable;
- Visual coherence: are materials, lighting, and style consistent;
- Performance: is it smooth on the target device, does resource usage keep growing;
- Maintainability: are scene parameters centrally managed, are code responsibilities clear;
- Requirement compliance: are dependency, offline, and asset-usage constraints respected.
Performance figures must come from real measurements, with the device, viewport size, observation duration, and scene state documented. Without measurement, use qualitative descriptions—do not produce precise-sounding numbers with no source.
3. Keep the Failure Samples
Common failures include character clipping through geometry, camera runaway, flickering transparent layers, broken proportions after window resizing, and breaking one module while fixing another effect.
These are not cosmetic issues; they are key evidence for judging engineering usability. Test records should preserve the code, error messages, reproduction steps, and revision outcomes so conclusions remain traceable.
From Demo to Application: What Still Needs to Be Done
Creative demos can serve as interaction prototypes, teaching material, product showcases, and design communication tools, but entering production requires further engineering.
First, generated code must undergo review. Check network requests, asset sources, input handling, error branches, and unnecessary permission usage—do not treat “it runs” as “it is ready to ship.”
Second, prepare fallback paths. On underpowered devices, you can reduce particles, disable expensive effects, lower render resolution, or offer a static presentation. A gorgeous scene with no degradation path rarely covers real user environments.
Third, consider accessibility. Continuous animation should support pausing, core operations should not depend solely on precise dragging, and textual descriptions or alternative content should be provided where necessary.
Finally, separate tunable parameters from business logic. When character speed, light intensity, eruption frequency, and camera ranges are centrally managed, designers and developers can collaborate more efficiently—and regressions introduced by changes become easier to track down.
Conclusion: Meaningful Progress Means Shortening the Path from Intent to Reliable Implementation
Code is becoming a key bridge between visual content and interactive experience. The real significance of large models is not just writing programs faster, but helping developers turn vague ideas into structured requirements, and then into runnable, modifiable prototypes.
Yet judging capability gains cannot stop at “the first impression is stunning.” Whether character motion is coherent, dynamic systems are stable, render cost is controllable, and the code is maintainable—these determine whether a demo can become a real application.
For developers, the most dependable path is: drive generation with explicit constraints, validate assumptions against runtime behavior, record quality with itemized metrics, and complete delivery through review, optimization, and testing. Only then does AI-assisted programming evolve from occasional surprise into sustainable production capability.
