Evaluating Code LLMs for 3D and SVG Visual Output: A Practical Benchmark Guide

    This article documents a hands-on evaluation of a preview-version code LLM's ability to turn code into runnable visual output. It covers dynamic SVG animation, code-drawn lighting and shadow scenes, and WebGL/3D rendering, with reproducible test conditions and evidence tied to specific tasks. It also provides a reusable 100-point scoring rubric, guidance on choosing models, tips for writing prompts that produce visually stable results, a checklist for verifying 3D renders, and a blueprint for an automated enterprise evaluation pipeline. The main takeaway: today's code LLMs are solid for prototyping, interactive drafts, and visualization validation, but high-fidelity production assets still depend on human review.

    1. Evaluation Summary and Reproducible Conditions

    Bottom line first: this preview-version code model can already close the basic loop from “code to a runnable visual result.” It performs most reliably on dynamic SVG, basic WebGL scenes, and prompt-constraint adherence. However, it still leans heavily on human review when it comes to high-fidelity lighting, complex occlusion, consistent materials, 3D engineering, and aesthetic judgment. It is therefore best suited to prototype generation, interactive drafts, and visualization validation, and not yet fit to serve as a high-precision production-asset generator.

    1.1 Subject and Reproducible Conditions

    So the conclusions can be verified, here are the full original test conditions:

    • Subject: an anonymous preview-version code LLM, internal test ID CM-3D-SVG-001. Because the model has no public release version yet, and the goal is a capability comparison rather than a vendor shootout, the specific brand is not disclosed.
    • Number of task samples: 12 tasks total — 4 dynamic SVG, 4 code drawing, 4 WebGL/3D scenes. Each task was generated 3 times; the single most stable, best-performing run was used as the main sample, and failed samples were recorded.
    • Runtime environment: Windows 11, Chrome 126, Edge 126, Firefox 127, Safari 17.4; test machine with an 8-core CPU, 16GB RAM, and integrated graphics. Offline SVG and WebGL pages were opened via the local file protocol.
    • Export method: SVG tasks required a single .svg file; WebGL tasks required a single .html file or a static bundle runnable through a local server; CPU rendering tasks required a PNG output plus rendering-parameter notes.
    • Scoring standard: a 100-point scale with weights given in the scoring table below; the 1–5 anchors are used for quick grading, and the final score is normalized by weight. Any single item that triggers “cannot open, core interaction unusable, obvious blank screen, or missing key visuals” immediately triggers a failure verdict.

    2. Task One: Dynamic SVG Animation — State Management and Interactive Motion

    Task goal: generate a dynamic SVG of “a pelican riding a bicycle along the seaside,” which must open offline and support pause/resume, speed control, and day/night switching.

    Bottom line first: the model completed a fairly complete front-end interaction loop and is well suited to generating demonstrable small works. It still falls short on complex character poses, physical continuity, and cross-browser stability.

    2.1 Implementation and Evidence

    The main sample’s animation is not a purely static SVG. It uses a combination of techniques:

    • Base graphics: SVG 1.1 inline paths, circles, rectangles, and gradients to draw the pelican, bicycle, sea, beach, and scarf.
    • Animation: mainly CSS @keyframes to drive wheel rotation, scarf flutter, and background movement; SMIL was not used, to avoid compatibility issues in some browsers.
    • Interaction script: inline JavaScript handling click, touchstart, and input events to control pause, speed, and day/night mode.
    • Export dependencies: a single .svg file with no external images, fonts, or CDN dependencies; it opens correctly even with the network disconnected.
    • Browser verification: playback works in Chrome 126, Edge 126, Firefox 127, and Safari 17.4; in Safari, a rapid sequence of clicks on the pause button occasionally caused a single animation rebound.
    • Failed samples: SVG-F02 showed slight detachment at the scarf-to-body connection point when speed was set to 2.5x; SVG-F03 showed a ~2° jump in wheel angle after pausing and resuming in Firefox.

    2.2 Strengths: A Fairly Complete Functional Loop

    The value of this task is not merely “drawing a pelican” but whether the model can assemble an interactive mini-application. This sample closed the loop on:

    • describing the character, vehicle, and background with structured elements;
    • using a timeline to control the rhythm of the wheels, scarf, and sea surface;
    • using event listeners to handle user input;
    • using parameters to control pedaling speed;
    • using theme switching to handle day/night state.

    This shows the model has some multi-step planning ability: it is not generating a single static image but organizing a combined structure of “graphics + animation + interaction + export.”

    2.3 Weaknesses: Limited Complex Occlusion and Physical Consistency

    Severity: medium. The issues are mainly in character animation and spatial relationships.

    Specifically: occlusion between the pelican’s body and the bike frame is not stable enough; the wheel-to-ground contact feels like a “visual approximation”; and the scarf flutter lacks coupling with wind, inertia, and body motion. Complex character animation generally requires finer skeletal hierarchies, layer ordering, motion constraints, and physical approximation, whereas the current model is better at generating “looks reasonable” results than strictly continuous motion simulation.

    Optimization suggestions:

    • Group and name character parts, e.g. body, wheel_left, wheel_right, scarf_root, for easier later edits;
    • give the wheels a unified rotation center;
    • use a small amount of script to control scarf anchor points, avoiding detachment from pure-CSS paths;
    • state explicitly in the prompt: “keep the wheels in contact with the ground” and “avoid body clipping.”

    3. Task Two: A Code-Drawn Light-and-Shadow Room — Rendering Understanding and Aesthetic Control

    Task goal: without any external assets, generate an afternoon light-and-shadow room using code only, including window-pane shadows, wall light and shade, floor material, a small round stool, a potted plant, and spatial depth.

    Bottom line first: the model can establish basic spatial relationships and primary light-source logic, but materials, edge transitions, and realistic light falloff are still lacking. The result is closer to a “stage set” than a “physical render.”

    3.1 Rendering Parameters and Evidence

    This generation includes two versions: a real-time WebGL version and a CPU offline version.

    WebGL real-time version parameters:

    • Resolution: 1280×720;
    • Rendering pipeline: WebGL 1.0, anti-aliasing enabled;
    • Shadows: directional-light shadow map 1024×1024, PCFSoft;
    • Light source: top-left directional light simulating afternoon window light, intensity ~1.2;
    • Materials: simplified materials for walls, floor, potted plant, and stool; full PBR not enabled;
    • Evidence ID: WEBGL-05.

    CPU offline version parameters:

    • Resolution: 960×540;
    • Rendering method: simplified path tracing, 32 spp;
    • Light bounces: 2 diffuse;
    • Denoising: not enabled;
    • Light source: a single window-shaped area light, intensity manually calibrated;
    • Render time: ~86 seconds, 8-core CPU;
    • Evidence ID: CPU-02.

    Screenshot notes: in WEBGL-05, the window-pane light band falls diagonally from the upper left to the lower right, with a shadow behind the stool; in CPU-02, the light-band edges are softer, but there is still a break in the dark area where the potted plant meets the floor. Comparing the two, the CPU version is closer to real lighting in its light-to-dark transitions, but neither shows complete global illumination, caustics, or fine material response.

    3.2 Highlights: Basic Lighting Logic Is Established

    The model did not simply stack the window, shadow, and floor together; it tried to establish a primary light-source relationship. The window-pane light crosses over the stool and lands on the lower edge of the frame, showing some understanding of light direction, shadow region, and visual guidance. A common problem with code drawing in the past was “elements isolated from one another,” whereas at least this result shows the model trying to connect light source, objects, and space.

    3.3 Shortcomings: Rough Materials and Edge Handling

    Severity: medium-high. Main issues:

    • overly uniform black lines appear at wall corners, lacking ambient occlusion and soft transitions;
    • the potted plant and floor lack a contact shadow where they meet;
    • the floor texture is rather flat and does not naturally fall off with the light angle;
    • material differentiation between walls, stool, and potted plant is insufficient.

    Optimization suggestions:

    • add an ambient occlusion approximation;
    • add gradient shadows at wall corners and the base of the potted plant;
    • use a noise texture to simulate floor roughness;
    • state explicitly in the prompt: “avoid hard-edged black lines” and “reduce uniform high contrast.”

    4. 3D and Rendering Capability: From “Looks 3D” to “Controllable 3D”

    Bottom line first: the model’s spatial-assembly ability is stronger than its professional-asset generation ability. It can produce visually acceptable 3D scenes, but it is still not rigorous enough on engineered 3D assets, material channels, camera parameters, and rendering pipelines.

    Three changes observed:

    1. Stronger spatial-structure awareness: it understands basic occlusion and perspective relationships among windows, walls, floors, and furniture.
    2. Awareness of multiple technical routes: it can choose between WebGL real-time rendering or CPU offline rendering depending on the task.
    3. Scene assembly outpaces professional modeling: it can generate a scene that “looks like a room,” but it lacks engineering fields such as a scene graph, mesh topology, normals, roughness, and metalness.

    Therefore, if the goal is production-grade 3D assets, the model should additionally be required to output a structure manifest, not just a runnable piece of code.

    5. An Executable Scoring Table: Turning Subjective Observation into Reusable Metrics

    Use the following scoring table. Total is 100 points; if any single item triggers the failure verdict, the whole evaluation fails.

    Dimension Weight 1–5 Anchors Evidence Field Failure Verdict
    Runnability 20% 1: cannot open; 3: opens but needs manual fixes; 5: runs on double-click or local startup Browser version, error screenshots, startup method Blank screen, script errors, unparseable file
    Functional completeness 15% 1: core features missing; 3: some interactions work; 5: all core requirements met Feature list, interaction recording, state screenshots Core interaction unusable
    Visual quality 20% 1: misaligned elements; 3: basic composition holds; 5: unified lighting, materials, composition Screenshots, parameter notes, failed samples Missing key subject or severe occlusion
    Code quality 10% 1: single-file pile-up; 3: basic grouping; 5: clear naming, modules, comments Code structure, function list, dependency notes Unresolvable dependencies or critical logic hardcoded to the point of being unmaintainable
    Offline capability 10% 1: depends on external network; 3: needs a local server; 5: works offline as a single file Offline open method, dependency list Requires network or has missing resources
    3D/rendering correctness 15% 1: wrong spatial relationships; 3: basic perspective correct; 5: reasonable lighting, occlusion, materials Rendering parameters, light direction, sample count, timing Camera errors, spatial clipping, contradictory light direction
    Aesthetic control 10% 1: cluttered; 3: theme is legible; 5: clear hierarchy, restrained color Composition notes, checklists, change records Over-dense information, no visual focus

    How to use it: record evidence first, then score. Any dimension below 3 must be written into the failed samples. If “runnability” or “functional completeness” is below 3, it is not recommended to proceed to the next review round.

    6. The Essence of Aesthetic Ability: Not Decoration, but Judgment Under Constraints

    Bottom line first: the core of the model’s weak aesthetics is not that it does not know how to add effects, but that it does not know how to subtract. It tends to put every describable element into the frame, resulting in information overload.

    Aesthetic checklist:

    • Composition focus: can you spot the subject at a glance?
    • Light-and-shade rhythm: are there clear highlights, mid-tones, and shadows?
    • Color restraint: are there more than three main colors?
    • Material consistency: are walls, floor, metal, and fabric distinguishable?
    • Negative space: is there room for the visual focus?
    • Noise control: are there meaningless specks or cluttered lines?
    • Prohibited items: does it violate the “must avoid” items in the prompt?

    Recommended visual prompt template:

    1. Task goal: Generate an afternoon light-and-shadow room
    2. Scene content: window, small stool, potted plant, floor with window-pane projection
    3. Visual style: low-saturation warm tones, realistic but simple
    4. Light direction: a single window light from the upper left
    5. Main colors: off-white, light wood, warm gray
    6. Emphasize: the window-pane light and shadow on the floor
    7. Must avoid: hard-edged black lines, complex decorations, excessive clutter
    8. Output format: a single runnable WebGL page

    The value of this kind of prompt lies not in piling up adjectives but in making constraints explicit: light source, tone, focus, and prohibited items. Only when a model makes trade-offs under constraints will its aesthetic stability improve.

    7. Developer Selection and FAQ

    7.1 How Do You Choose a Code LLM?

    Recommended in three categories:

    Scenario Verdict Notes
    Interactive prototypes, small SVG animations, visualization demos Production-ready Fast to validate, but cross-browser stability needs a human check
    Brand pages, design-spec reproduction, 3D showcase pages Needs human review Visually usable, but materials, lighting, and aesthetics need design involvement
    High-precision offline rendering, game assets, film-grade scenes Not recommended for now Lacks path tracing, material channels, asset standards, and stable engineering output

    7.2 What Are the Common Failures?

    • SVG animations show component detachment at high speed;
    • WebGL scenes lack shadows or have wrong shadow direction;
    • Offline files depend on external links, becoming unusable when disconnected;
    • Prompts pile up too many elements, making the frame cluttered;
    • Generated code lacks comments and naming, making later maintenance impossible.

    7.3 How Do Prompts Avoid a Cluttered Frame?

    Use the structure of “one subject + one light source + one emphasis point + explicit prohibited items.” For example: “a single window light, low-saturation warm tones, emphasize the floor projection, avoid complex decorations.” Do not simultaneously ask for “rich detail, complex scene, cyberpunk, photorealistic, minimalist” — such conflicting terms reduce stability.

    7.4 How Do You Verify a 3D Render?

    Check at least five things: whether the camera is correct, whether the light direction is consistent, whether occlusion is natural, whether materials are differentiated, and whether rendering parameters are reproducible. It is advisable to save resolution, sample count, light intensity, shadow settings, and timing; otherwise, you cannot compare different generation results.

    8. Enterprise Adoption: From Demo to an Operational Evaluation System

    When this capability enters enterprise scenarios, do not rely on manual experience alone; instead, build an automated evaluation pipeline.

    Example general cloud capabilities:

    • Object storage: store generated code, screenshots, logs, failed samples, and scoring records;
    • Container platform: run browser screenshots, rendering tasks, and regression tests;
    • Logging service: collect execution logs, error stacks, and build info;
    • Monitoring and alerting: detect anomalies in blank-screen rate, timeout rate, and failure rate;
    • Task scheduling: automatically regress by model version, prompt template, and task set.

    Governance requirements must also be added:

    • Generated-code review: perform static scans on model output to check for dangerous APIs, external dependencies, untrusted resource loading, and permission requests;
    • Asset copyright: prohibit directly using images, fonts, or model assets of unknown origin; record the source and reuse scope of prompt-generated content;
    • Data security: if evaluation screenshots, prompts, or business code contain sensitive information, redact it before uploading;
    • Evaluation record retention: keep records for at least 90 days; records involving model comparisons, compliance audits, or client projects may be extended to 180 days or follow enterprise compliance requirements.

    The value of this engineering approach: every model update can be compared automatically, failed samples can accumulate, and selection no longer relies on subjective feeling.

    9. Conclusion: The Next Stop for Code LLMs Is the Fusion of Visual, Engineering, and Evaluation Capabilities

    This hands-on test shows that the preview-version code model can already generate interactive SVG mini-works, a basically coherent light-and-shadow room, and multi-route 3D scenes. Its strength is rapidly turning natural language into runnable prototypes, lowering the barrier to visualization development.

    But to enter more demanding production scenarios, four things still need to be completed: a more rigorous rendering pipeline, more natural material expression, more stable aesthetic control, and more complete engineering output. For developers, evaluating this kind of model cannot rest on “does it run” alone; it must also consider “does it run stably, are the results trustworthy, is the structure maintainable, and is the aesthetics controllable.” Only by combining code capability, visual capability, engineering capability, and an evaluation system can you accurately judge whether a model is truly ready to enter complex production scenarios.