Evaluating 3D Code Generation in Chinese Large Language Models: A Practical Benchmark

    This article presents a practical methodology for evaluating 3D code generation in Chinese large language models. It covers task design, six evaluation dimensions, observations on lighting, water shaders, camera behavior, and animation, as well as prompt engineering and the infrastructure required to turn generated code into reliable creative workflows. It concludes with current strengths, remaining limitations, and recommendations for building a reusable evaluation set.

    Evaluating 3D Code Generation in Chinese Large Language Models: A Practical Benchmark

    1. Background: Why 3D Generation Is a Stress Test for Large Models

    Chinese large language models have made visible progress in text reasoning and conventional code completion. However, the biggest differences increasingly emerge in the combination of multimodal understanding and complex engineering-oriented code generation.

    When a model can transform a short natural-language description into a structurally complete, correctly rendered, and interactive 3D scene, it demonstrates at least three capabilities:

    • Semantic understanding: Breaking down a vague description such as “a pelican riding a bicycle” into engineering subtasks involving geometry, materials, animation, cameras, and more.
    • Software engineering ability: Organizing a self-contained HTML file and correctly calling the underlying rendering APIs.
    • Aesthetic judgment and attention to detail: Making professional-looking decisions about lighting, color, and composition.

    For this reason, 3D generation tasks can provide a more realistic measure of model capability than conventional benchmark-style exercises.

    2. Evaluation Methodology: Designing a Reproducible Test Process

    2.1 Task Selection Principles

    An effective evaluation should cover multiple levels of difficulty. At minimum, it should include three categories of tasks:

    1. Recreating recognizable subjects: For example, “Create a 3D HTML version of a pelican riding a bicycle.” Although this may sound simple, it tests the model’s ability to design forms and its aesthetic baseline. Since many high-quality references already exist in the community, distorted proportions and rigid poses are immediately apparent.
    2. Physics and particle simulation: Examples include volcanic eruptions, fluids, and smoke. These tasks place demanding requirements on performance optimization, particle-system design, and shader development, making them useful for evaluating overall technical ability.
    3. Open-world scenes: Scenes containing elements such as a coastal highway, lighthouse, seagulls, and dolphins can be used to assess spatial layout, lighting atmosphere, and control over detail density.

    2.2 Evaluation Dimensions

    A practical scoring system can use the following six dimensions, with each category rated from 1 to 5:

    Dimension Evaluation focus
    First-run usability Whether the output runs directly without errors
    Visual completeness Whether the lighting, materials, and composition remain convincing on close inspection
    Animation and interaction Whether camera orbiting and character movement feel natural
    Code quality Structural clarity, maintainability, and module reuse
    Performance Frame-rate stability and resource-loading strategy
    Iteration response Whether the model can make precise changes without damaging existing effects

    One important practical lesson is not to evaluate only the first output. The result after several rounds of refinement better reflects how deeply the model understands context.

    An ideal iteration process changes only one clearly defined variable at a time. For example, ask the model to “make the sunset color temperature warmer” or “randomize the timing of the dolphin’s jumps,” then observe whether it modifies only the relevant part of the implementation.

    3. Practical Observations: From “Runnable” to “Worth Watching”

    In testing, the outputs that stand out usually share the following characteristics.

    3.1 Establishing Atmosphere Before Adding Objects

    Consider a coastal scene. A strong result first establishes the global lighting direction: warm golden sunset light as the key light and reflections from the ocean as part of the ambient environment. Road signs, palm trees, and wild grass are then placed within that visual framework.

    This “set the lighting first, then arrange the objects” approach is a key distinction between template-like output and genuinely creative output.

    3.2 Water Rendering as a Measure of Technical Capability

    Water that approaches the visual quality of a modern game typically requires several techniques to work together:

    • Normal perturbation: Dynamically perturbing surface normals with a noise function to create fine-scale highlights and waves.
    • Fresnel reflection: Increasing the strength of reflections at flatter viewing angles, helping the distant ocean blend into the sky.
    • Depth-based color gradients: Using lighter turquoise tones near the shore and deeper blue-green tones farther away to create a sense of volume.
    • Interactive details: Adding ripples when dolphins jump out of the water and reflecting the lighthouse glow across the surface.

    If a model can generate all of these effects in code without relying on external assets, it demonstrates a strong foundation in shader programming and computer graphics.

    3.3 Natural Camera Behavior and Motion

    A camera that supports free 360-degree orbiting, smooth inertial damping, and a looping animation of a pelican pressing bicycle pedals can determine whether a demonstration feels like a static exhibit or a space that users can explore.

    During evaluation, check the following details:

    • Whether extreme camera angles cause clipping or pass through objects
    • Whether zooming remains smooth
    • Whether animation loops contain visible jumps or discontinuities

    4. Prompt Design Recommendations

    To obtain higher-quality results, the prompt itself should be designed like an engineering specification. The following structure is recommended:

    1. Role: You are a senior 3D graphics engineer and art director.
    2. Task: Using [mainstream WebGL rendering technology], generate a self-contained HTML file.
    3. Theme: [One-sentence description of the scene and the subject’s action]
    4. Hard requirements:
    5. 1. Use a single file with no external asset dependencies. Generate all geometry and textures in code.
    6. 2. Support mouse-drag orbit controls and scroll-wheel zoom with inertial damping.
    7. 3. Use a consistent lighting system: [key-light direction and color temperature], ambient light, and shadows.
    8. 4. Include the following key animations: [list 2–3 effects, such as a dolphin jumping or seagulls circling].
    9. 5. Maintain smooth 60 FPS performance and control the particle count reasonably.
    10. Style reference: Choose one style, such as cinematic realism, low poly, or cyberpunk, and explain the trade-offs.
    11. Output: Complete HTML code plus an implementation summary of no more than 50 words.

    The value of this template is that it makes aesthetic requirements explicit. Without sufficient constraints, models tend to produce results that are safe but mediocre. Clear requirements for lighting, animation, and performance encourage the model to apply more advanced graphics knowledge.

    5. From Developer Tools to General-Purpose Creative Interfaces

    The most important insight from these tests is that code is becoming a general-purpose interface connecting video, games, 3D spaces, and the physical world.

    When a model can translate natural language directly into a runnable 3D experience, the beneficiaries extend well beyond software developers:

    • Content creators can produce interactive demonstrations with a single instruction.
    • Educators can quickly build manipulable scientific visualizations.
    • Product teams can validate spatial interaction concepts through low-cost prototypes.

    From an engineering perspective, deploying this capability also requires supporting infrastructure:

    • Object storage for hosting generated artifacts
    • Logging and monitoring services for tracking generation latency and failure rates
    • Container platforms for isolating untrusted generated code
    • Message queues for smoothing bursts of concurrent generation requests

    These are general cloud infrastructure capabilities. When selecting them, the key considerations should include elastic scaling and sandbox security.

    6. Conclusion and Evaluation Results

    Based on multiple rounds of testing, leading Chinese large language models have reached a first-tier level in 3D code generation. Their first-run usability is relatively high, and their shader-level performance in areas such as lighting atmosphere and water details can compare favorably with advanced international models.

    At the same time, important limitations remain. Numerical stability in complex physics simulations, memory management in very large scenes, and consistency across multiple iterations—especially avoiding damage to effects that already work—still require improvement.

    For developers, building an internal evaluation set is more useful than focusing solely on a model’s benchmark score. A practical set should include three categories of representative tasks, six scoring dimensions, and a structured prompt template. Tracking real improvements across model updates provides not only an evaluation tool but also an engineering foundation for turning large models into reliable production tools.