Evaluating Code-Generated Interactive 3D Scenes: Methods and Criteria
This article presents a practical framework for evaluating code-generated interactive 3D scenes—standalone browser pages built from natural-language prompts. It explains why self-contained 3D pages make effective evaluation probes, defines scorable dimensions with clear pass/fail lines (geometry, motion, lighting, materials, interaction, performance, maintainability), and shows how to organize scene structure, drive animation from a unified clock, and keep resources offline and self-contained. It also covers where visual quality actually comes from, how to iterate one failure dimension at a time, common failure patterns and fixes, and how to turn demos into a reusable regression set with human final review.
Turning a piece of natural language into a draggable, close-up-inspectable 3D page is no longer just a party trick among programmers. Video storyboards, game levels, spatial diagrams, and simplified physics are increasingly collapsed into the same kind of deliverable: a standalone page that opens directly in a browser. Code here acts as a universal interface—it describes geometry, timing, interaction, and appearance all at once, rather than emitting a static description.
To judge whether such a generated result holds up, “are objects moving” is not enough. The more valuable questions are: does the scene survive close inspection; does motion match human intuition for weight and rhythm; is the environment self-consistent; are resources self-contained; is interaction stable. The sections below cover evaluation design, scene structure, visual implementation, and engineering constraints.
Why Use Standalone 3D Pages as Probes
A deceptively simple prompt often stresses many capabilities at once. For example, “a character cycling along a coast under a warm sunset, freely observable” involves at least: subject modeling and expression, a pedaling loop, the spatial relationship between road and vegetation, color transitions in sky and water, layered distance, and orbit-style observation. A prompt like “a volcano eruption demo page” further demands particle or mesh deformation, layered glow and smoke, ground lighting, and the ability to run with no external assets.
Such prompts are well suited as held-out evaluations for four reasons. First, input is short and output is runnable, making lateral comparison easy. Second, both aesthetics and correctness can be checked by eye and by simple metrics at the same time. Third, when external assets are forbidden, a model cannot “borrow” completeness through textures and must express material quality procedurally. Fourth, failure modes are clear: clipping, incoherent loops, water that looks like a flat color block, the camera passing through geometry, and sudden frame-rate drops can all be reproduced without specialized instruments.
The evaluation should fix three constraints and write them into the task description: the deliverable is a single page that opens offline; it references no remote images, models, or fonts; interaction includes at least rotation, zoom, and reset. The more explicit the constraints, the fairer the comparison.
Evaluation Dimensions and Pass Lines
Break observation into scorable items rather than a single “does it look good.”
Geometry and proportion. Is the subject’s silhouette recognizable; are part connections reasonable; do broken faces, flipped normals, or obvious stretching appear up close. Characters or natural objects need not be photorealistic to film standards, but structure should be stable: consistent wheel axles, and wings or limbs that do not intersect the frame over long periods.
Motion. Do loop animations jump at the seam; does speed match the object’s mass; do secondary motions (fur, spray, smoke) lag the primary action by half a beat rather than the whole scene vibrating at one frequency.
Lighting and color. The key light direction should explain the shadows; warm-cool contrast should serve time and weather, not random neon. Lowering contrast in the distance while preserving edges up close is a cheap but effective depth cue.
Materials and procedural textures. With no external textures, use noise, gradients, and Fresnel-style edge highlights to distinguish skin, metal, vegetation, and water. Water should have both color variation and moving highlights; otherwise it is just a blue polygon.
Interaction and robustness. Dragging should not drop events; zoom should have limits; after a window resize the canvas should still fill without stretching or distortion. Running for tens of seconds without errors or accumulating memory-style stutter matters more than a first-frame screenshot.
Performance budget. Targeting integrated graphics on ordinary laptops, aim for stable performance near the display refresh rate at the interaction resolution, and prepare fallbacks: reduce particle counts, disable soft shadows, simplify meshes at distance. Evaluation records should include approximate triangle counts, whether draw calls are merged, and whether geometry is needlessly rebuilt each frame.
Maintainability. If generated code scatters magic numbers everywhere, changing the sunset angle or eruption intensity later becomes painful. A passing result should centralize time, color, camera, and intensity into a few named parameters.
Scoring can use five tiers, but must include a “veto”: inability to run offline, dependence on uncontrollable external links, or completely broken interaction results in an automatic fail. Track aesthetic and engineering scores separately, so that “good-looking but unmaintainable” or “runs but not inspectable” is not hidden by an average.
How Scenes Should Be Organized
Whatever browser graphics interface is used underneath, the skeleton of an interactive 3D page is highly similar.
First build the scene graph: under a world node hang the environment (sky, distance, terrain), the subject (character and vehicle), and effects (particles, post-processing). The camera is not bound directly to the subject but uses orbit controls around a target point, set slightly above the character’s center of gravity, so observation does not always fixate on the wheels.
Time is driven by a single clock. The primary animation, water phase, eruption pulse, and corona-style glow all read the same time, differing only in frequency and phase. This gives pause, slow motion, and single-frame capture consistent semantics.
Space should be pinned down with a few coordinate conventions: up axis, forward direction, model units (for example, 1 unit ≈ 1 meter). Generated code most easily contradicts itself here, causing shadow direction and sign text orientation to be wrong at the same time.
Self-contained resources mean geometry is generated by code or embedded text, colors come from parameters, and fonts use a system sans-serif stack. If a “sign” is required, draw text on a canvas and use it as a texture, still keeping a single file.
The illustrative structure need not bind to a specific library; it only expresses responsibility separation:
init()renderer = createRenderer(canvas, { antialias, pixelRatioCap })scene = createScene()camera = createPerspectiveCamera(fov, aspect, near, far)controls = createOrbitControls(camera, canvas, { minDistance, maxDistance })world = buildWorld(params) // terrain, water, propsactor = buildActor(params) // rig + cycle clipsfx = buildEffects(params) // particles, lightsclock = createClock()frame(t)dt = clock.delta(t)actor.update(dt, params)water.update(t, camera)fx.update(dt, params.intensity)controls.update()renderer.draw(scene, camera)onResize()syncAspect(camera, canvas)renderer.setSize(width, height)
The parameter object should include at least: time of day (which sets sun elevation and color temperature), sea amplitude, cycling speed, eruption intensity, particle cap, and shadow toggle. An evaluator changing one parameter should see a predictable change—this tests that “code is an interface” rather than a pile of hard-wired constants.
Where Visual Quality Comes From
Many pages “rotate” but do not survive close inspection, and the gap is usually not in model polygon count but in light and layering.
For a sunset coast scene, use a low-angle warm key light, with fill from the cool ambient of the sky at far lower intensity than the key. Do not just apply a horizontal gradient to the water: drive highlights with two normal perturbations at different frequencies, reduce perturbation amplitude at distance, and keep broken highlights up close; near the skyline, use fog or depth fade to push islands and lighthouses into the atmosphere. Birds and shapes leaping from the water should be sparse accents—few in number, with scale varying by distance—or they become noise.
Vegetation and signs carry the semantics of “this is a road.” They should be placed by sampling along a curve with slight random rotation, avoiding the evenly spaced copy of a game level. Randomness must be seedable, otherwise the composition changes on every refresh and regression comparison becomes impossible.
Volcano demos depend more on time structure. Make the eruption a pulse rather than a constant fountain: build-up, main burst, falloff, embers. Particle size and opacity decay with lifetime; heavy fragments fall on parabolic paths, while light smoke rises and drifts with a weak wind. Use a few additive planes around glowing bodies to simulate a halo, but limit the number of layers, or fill rate becomes the bottleneck before triangle count does. Use a dark base tone with a heavier contact shadow on the ground, so viewers believe matter landed somewhere.
The “naturalness” of characters or animals comes mainly from phase, not facial precision. Steps, body bob, and head stabilization should not be synchronized; expression needs only a few morph targets or texture offsets, avoiding recomputing the entire mesh every frame. If the task requires close inspection, prioritize silhouette and joint axes over piling on meaningless high-poly detail.
Post-processing should be restrained: mild tone mapping and vignetting are enough. Strong halos, oversaturation, and full-screen glitch-style scanlines hide geometry errors and should be off by default in evaluation, kept only as an optional tier.
Iteration Approach and Common Failures
Effective iteration is not repeatedly saying “make it prettier,” but changing one failure dimension at a time and writing the evidence back into the constraints. For example: if water looks like a sticker from the side, require higher edge reflection and lower head-on reflection based on the view angle; if the cycling loop jumps at frame 0, require identical start and end poses and output the cycle duration; if dragging scrolls the page, require preventing the default drag behavior on the canvas.
Common failures can be handled by category. Geometry clipping: first separate decorative parts unrelated to collision, then fix the rig or parent-child hierarchy. Flicker: check whether near/far clip planes are too wide and how transparent objects are sorted. Dullness: increase the color difference between key and ambient light rather than raising overall exposure. Stutter: merge static meshes, use object pools for particles, cap pixel ratio at 2, and pause rendering in background tabs. Illegibility: make debug axes and performance counters toggleable, off by default for viewers.
When comparing different generated results, fix the resolution, fix the seed, fix the parameter panel, and save two records: the first screen and the state after 30 seconds of interaction. Looking only at the first screen overestimates “posed” composition and underestimates state-accumulation problems.
From Demo Pages to Reusable Capability
Once code reliably connects visuals, interaction, and simplified physics, the same page can serve many non-entertainment needs: using orbit observation to explain spatial relationships, using parameter sliders to demonstrate sunlight or eruption intensity, and exporting key frames as storyboard references. The prerequisite remains a clear interface—named parameters, meaningful units, graceful degradation on failure, and offline-capable assets.
When adopting this in a team, fix the evaluation prompts into a small regression set: one roaming scene emphasizing aesthetics and atmosphere, one phenomenon demo emphasizing particles and time structure, and one informational scene emphasizing layout and text readability. Whenever the generation pipeline or prompting strategy changes, run the same veto items and per-dimension scores. The regression set does not chase volume; it aims to answer, every time: has it gone beyond “can draw objects” to “can be used as a spatial interface.”
Finally, keep human final review for aesthetic judgment. Procedural water and sunsets can approach the first impression of a polished game, but whether the style is unified, whether the metaphors are excessive, and whether the motion feels uncomfortable should still be confirmed by the target audience on a real screen. The role of evaluation is to turn excitement into a repeatable standard, not to replace the act of watching itself.
