From Code Generation to Spatial Reasoning: A Guide to Evaluating 3D Scene Modeling

    Evaluating text-driven 3D scene generation requires more than checking whether a script runs. This guide explains how to translate natural language requirements into verifiable constraint systems, build a unified coordinate system and parameter dependency graph, validate mechanical structures such as bike frames and chain drives, and test contact relationships in animated scenes. It also outlines a five-layer automated acceptance workflow for measuring execution reliability, structural correctness, parameter consistency, and motion coherence in generative model outputs.

    1. Evaluating Generative Models: From “Task Completion” to “Constraint Satisfaction”

    In complex code generation tasks, a program that runs successfully has only passed the most basic execution check. It does not mean the model correctly understood the task. This is especially true for text-driven 3D modeling: a script may successfully create a bird, a bicycle, a coastline, and lighting, yet still contain misaligned wheels, chain clipping, or wings that never touch the handlebars.

    Therefore, evaluating such models should go beyond asking “did it generate a scene” to asking:

    • Does the scene satisfy the structural requirements in the text description?
    • Do geometric objects maintain correct spatial relationships?
    • When input parameters change, do related components update accordingly?
    • If animation is generated, does the motion follow mechanical transmission rules?
    • Can the result be reproduced in the same environment and verified automatically?

    The “pelican riding a bicycle” task is representative. It involves animal posture, mechanical structure, contact constraints, parametric geometry, and motion coupling, making it effective at distinguishing “assembling a scene that looks similar” from “building a model with internally consistent relationships.”

    That said, without the full script, run logs, parameter modification results, and unified evaluation conditions, you cannot judge a model’s spatial reasoning ability based solely on completion order or a single rendered image. A more reliable approach is to shift the evaluation target from brands or model names to verifiable technical capabilities.

    2. Converting Natural Language Requirements into a Constraint System

    Text descriptions typically mix narrative, visual style, and engineering requirements. Before modeling, split them into three categories.

    2.1 Narrative and Appearance Requirements

    For example: a dusk coastline, a dark green bicycle, a toolkit, and a fishing net. These requirements determine scene recognizability and visual presentation, but usually do not determine whether the mechanical system is correct.

    During evaluation, you can check whether objects exist, whether their positions are plausible, and whether materials match the description—but do not let beautiful lighting mask critical structural errors.

    2.2 Geometric and Topological Requirements

    For example: a classic diamond frame, two wheels, front and rear axle spacing, and handlebars in contact with both wings. These requirements concern not only object positions but also connection relationships.

    A frame is not a few arbitrarily placed tubes. It is a connection network formed by the head tube, top tube, down tube, seat tube, and rear support structures. Even with stylized rendering, the main nodes and connections should remain clear.

    2.3 Motion and Contact Requirements

    For example: cranks driving the pedals, a chain connecting the chainring to the rear sprocket, and feet resting on the pedals. These requirements demand explicit linkage rules, not just visual placement.

    One detail must be clarified here: if the left and right cranks differ by 180 degrees, changing the crank phase changes the pedal heights on both sides. You cannot simultaneously allow arbitrary crank angles and require one pedal to stay at the lowest point at all times.

    Therefore, interpret “the other foot is at the low recovery position” as a narrative requirement for a specific pose, or refine it as “the other foot maintains a specified clearance according to the current pedal phase.” If you must always choose the lower side, the support foot and recovery foot need to swap dynamically based on phase, rather than keeping the foot roles fixed.

    Identifying and handling this type of conflict is itself an important part of spatial reasoning and requirements understanding.

    3. Establishing a Unified Coordinate System and Parameter Dependency Graph

    The most common problem in complex scenes is different modules using their own coordinate assumptions. Start with unified conventions:

    • Forward direction as the longitudinal axis;
    • The bicycle’s left-right direction as the lateral axis;
    • Vertical direction as the height axis;
    • Lengths in meters, with angle computations in radians internally;
    • A phase difference of 180 degrees between left and right cranks.

    Then organize input parameters as a dependency graph rather than numbers scattered across different functions. For example:

    Wingspan → grip spacing → wingtip target positions → wing posture
    Axle distance → front/rear wheel centers → frame nodes → saddle and handlebar positions
    Chainring tooth count → pitch circle radius → chain path → link layout
    Crank phase → pedal positions → foot contact targets → leg posture

    This dependency graph determines which objects must be updated when parameters change.

    Note that “no magic numbers” does not mean no fixed ratios are allowed. Stylized modeling inevitably needs design parameters such as wheel radius, saddle height, and bird body length. The correct approach is to define these ratios centrally, document their meaning, and state their applicable range—rather than hardcoding constants inside geometry functions.

    Also, wingspan does not need to equal handlebar width. Wingspan describes the span with both wings fully extended, while grip spacing in a riding posture is affected by shoulder width, wing segment length, and joint bending. You can define an explicit proportional mapping, but you still need to check whether wingtips can actually reach the target positions.

    4. Mechanical Structure Is the Key to Evaluating Spatial Reasoning

    4.1 Generate the Frame from Nodes, Not Assembled Tubes

    A robust approach is to first compute the front axle, rear axle, crank center, seat tube top, and head tube endpoints, then generate tubes based on node connection relationships.

    This way, when axle distance changes, the entire frame can be rebuilt according to established rules. Conversely, if every tube has independent world coordinates, adjusting axle distance easily produces gaps or intersections.

    Acceptance should simultaneously check connection endpoint distances, the presence of main components, and obvious interference between wheels and frame. Checking only bounding box size cannot prove structural correctness.

    4.2 Tooth Count Must Be Converted to Scale via Chain Pitch

    Chainring tooth count is a discrete quantity and cannot be used directly as a radius. Given chain pitch (p) and tooth count (N), the ideal pitch circle radius is:

    (r = p / [2\sin(\pi/N)])

    The pitch circle here describes the geometric relationship between link joint points and gear meshing; it is not the same as the outer tooth profile.

    When the chainring tooth count increases, the pitch circle radius grows, and the chain path must be recomputed. If you merely scale up the chainring’s appearance while keeping the original chain position, no true parameter coupling has been achieved.

    4.3 The Chain Should Consist of Tangent Segments and Envelope Arcs

    In a simplified single-plane transmission model, the chain centerline can be composed of external common tangent lines between two pitch circles, plus arcs wrapping around each pitch circle.

    Let the two pitch circle radii be (r_1) and (r_2), with center distance (d). The basic geometric condition for external common tangents to exist is:

    (d > |r_1-r_2|)

    But this is only the tangent existence condition, not proof of mechanical feasibility. You must further check whether gear profiles interfere, and whether the chain collides with the frame, cranks, or other attachments.

    After computing the chain path, verify:

    • Tangent line segments and arcs connect smoothly;
    • The path is closed;
    • The chain and gears lie in a consistent chain plane;
    • Chain links are distributed continuously along the path;
    • No clipping appears after parameter changes.

    Real chains also have discrete link lengths. The perimeter of a continuous geometric path does not necessarily equal an integer number of chain links. For visual modeling, a simplified representation is acceptable; for mechanical realizability, you need to consider link count and tension adjustment, and cannot claim that a continuous curve alone constitutes real assembly verification.

    5. Turning Animal Posture into Checkable Contact Relationships

    “Wings gripping the handlebars” and “webbed feet on the pedals” are not simple position requirements. They are combined constraints of local coordinates, orientation, and contact surfaces.

    5.1 Wingtips Should Follow Grip Targets

    First establish contact targets on the left and right grips, then solve for wing posture based on bird body position, wing segment length, and joint range of motion.

    When the wingspan parameter changes, do not merely scale up the wing mesh. The correct process is to recompute grip targets and wing posture, then check whether the targets are reachable.

    If the target distance exceeds wing length, the system should report constraint failure or adjust the bird body position according to pre-declared rules. Silently stretching the wings may make the image look plausible, but it destroys the actual meaning of the parameter.

    5.2 Feet Should Conform to the Pedal Surface, Not the Pedal Center

    If the crank center is ((x_c,z_c)), crank length is (l), and phase angle is (\theta), one coordinate convention gives the pedal position as:

    (x_p=x_c+l\cos\theta)

    (z_p=z_c+l\sin\theta)

    The other side uses (\theta+\pi) and is placed laterally on the opposite side of the frame.

    However, simply moving the foot origin to the pedal center is not enough. You should also consider pedal thickness, sole local height, sole orientation, and acceptable penetration tolerance.

    Set multiple sample points on the sole and check each point’s distance to the pedal surface. This reveals problems such as “center contact, but one end of the foot floating or the other end penetrating.”

    5.3 Clearance Rules for the Recovery Foot Should Be Explicit

    The recovery foot can follow its corresponding pedal and maintain a small positive clearance along the pedal surface normal. This clearance should be an explicit parameter, not adjusted by eye.

    For a natural posture, also check whether leg joints are reachable and whether bending directions are reasonable. Valid contact does not automatically mean the animal posture is anatomically correct.

    6. Extending from Static Scenes to Code-Generated Video

    Static scenes verify geometric relationships at a single moment; video requires those relationships to hold continuously over time.

    Under simplified no-slip chain drive conditions, the rear sprocket angular speed and chainring angular speed satisfy:

    (\omega{\text{rear}}=\omega{\text{front}}\times N{\text{front}}/N{\text{rear}})

    However, rear sprocket rotation should not in all cases be equated with rear wheel rotation. If the model includes a freewheel mechanism, driving and coasting states must be distinguished; if simplified rigid coupling is used, that assumption should be stated explicitly.

    If the scene also shows the bicycle moving forward, wheel rotational speed and translational speed must be consistent. Under ideal pure rolling conditions:

    (v=\omega R)

    Spinning wheels while the ground stays still can work as a demo animation. But if the narrative emphasizes actual forward motion, you must synchronize body displacement, background relative motion, and camera movement.

    Video acceptance cannot rely on sampling only the first and last frames. It should cover multiple crank phases and check for jumps in foot contact, chain continuity, and joint posture. One correct frame does not prove the entire animation is correct.

    7. Designing a Reproducible Automated Acceptance Workflow

    Professional evaluation should separate rendered results from structural validation.

    • Layer 1 — Execution acceptance: Does the script run in a headless environment, produce the expected assets, and avoid undeclared external dependencies?
    • Layer 2 — Static structure acceptance: Check required objects, frame connections, axle distance, grip spacing, and chain closure.
    • Layer 3 — Contact acceptance: Measure distances between wingtips and grips, and between soles and pedals, and verify local orientations.
    • Layer 4 — Parameter perturbation acceptance: Change only wingspan, tooth count, and crank phase, regenerate the scene, and confirm all related objects update.
    • Layer 5 — Dynamic acceptance: Check transmission ratios, contact errors, and animation continuity at multiple time points.

    An illustrative workflow:

    1. Read input parameters
    2. Check parameter ranges and mutual constraints
    3. Build mechanical nodes and local coordinate systems
    4. Generate frame, wheels, and drivetrain
    5. Solve wing and foot posture
    6. Run geometry and contact checks
    7. Output inspection report
    8. Generate preview and animation after passing checks

    Parameter testing should cover both isolated and combined modifications. Isolated tests help locate error sources; combined tests reveal problems caused by intersecting dependencies.

    Error thresholds must be defined relative to scene scale and purpose. A stylized asset for concept presentation and a model for precision assembly verification should not share the same tolerance standard.

    8. How to Interpret Evaluation Results

    Compressing all performance into a single unexplained score is not recommended. A more valuable report should present, separately:

    • Execution reliability: Does it run stably?
    • Structural correctness: Do topology and spatial relationships hold?
    • Parameter consistency: Do changes propagate correctly?
    • Motion consistency: Do multi-frame states satisfy constraints?
    • Visual completeness: Are narrative, materials, and camera work clear?
    • Engineering maintainability: Are module boundaries and error reporting reasonable?

    Key constraints can use pass/fail judgments, while visual presentation is evaluated separately. This prevents results that “look beautiful but contain mechanical errors” from being misjudged as high quality, and prevents structurally rigorous but visually plain deliverables from being undervalued.

    Ultimately, the key highlight of generative models in 3D tasks should not be more code or more complex visuals. It should be the ability to identify requirement conflicts, establish explicit parameter dependencies, maintain geometric and motion constraints, and provide reproducible verification evidence. Moving from “generating a scene” to “generating an explainable, modifiable, and verifiable system” is the true sign that spatial reasoning capability has engineering value.