Evaluating Spatial Reasoning in Large Models: A Practical Guide to 3D Generation

    This article presents a methodology for evaluating the spatial reasoning capabilities of large language models through a procedural 3D generation task. Using the example of a pelican riding a bicycle, it explains why coding speed does not equal modeling ability, how to design prompts with narrative, mechanical, and engineering constraints, and how parametric linkage separates one-off scripts from real models. It also defines four observable dimensions of spatial reasoning, a scoring rubric for comparative evaluation, and recommendations for building a repeatable evaluation pipeline.

    1. Background: Why Writing Code Is Not the Same as Building a Model

    A recurring pattern in recent model evaluations is that, given the same 3D scene generation task, some models finish first, some finish successfully, and others fail to complete it. On the surface this looks like a difference in generation speed. In practice, it exposes a分层 of spatial reasoning ability. Speed only reflects throughput; completion reveals how deeply a model understands geometric relationships.

    Traditional evaluations often use lightweight front-end 3D libraries to build demo scenes. The advantage is intuitive rendering; the drawback is that spatial relationships between parts are hard to check parametrically. When the evaluation goal shifts to “engineering usability,” a more suitable vehicle is scripted modeling: a script that runs in headless mode procedurally creates geometry, constraints, and hierarchy, and the acceptance side reads the scene data to make assertions. This article uses the highly complex task of “a pelican riding a bicycle” to abstract a general evaluation methodology.

    2. Task Design: Compressing the Model’s Room for Improvisation with Narrative Constraints

    A good evaluation prompt is not shorter-is-better; it makes implicit constraints explicit. The original task contains three layers of constraints:

    1. Narrative layer: a seaside promenade at dusk, a dark green steel frame, a forward-leaning body, both wings extended forward to grip the handlebars, one foot on a pedal, the other suspended at the lowest point of the return stroke, a canvas tool bag hanging from the down tube, and a fishing net tied to the rear rack.
    2. Mechanical layer: a classic diamond frame, crank-driven rear wheel, a tensioned chain, and a riding pose that must match the current phase of the drivetrain.
    3. Engineering layer: stylization is allowed, but the spatial relationships between parts must pass parametric checks.

    None of the three layers can be omitted. With narrative only, models tend to pile up geometry; with engineering constraints only, models tend to output empty shells. Only when all three are stacked can genuine spatial reasoning be forced out.

    3. Parametric Linkage: The Dividing Line Between Generating a Script and Building a Model

    The core of the evaluation is not the first-frame result but self-consistency after parameter changes. Global constants should be declared centrally at the top of the script, all geometry generation must derive from these constants, and no magic numbers disconnected from the constants may appear inside functions. A sketch:

    1. # Global parameter block: all geometry derives from these
    2. PELICAN_WINGSPAN = 1.15 # Wingspan (m); controls handlebar width and grip spacing
    3. BICYCLE_WHEELBASE = 1.02 # Wheelbase (m); drives frame geometry
    4. BICYCLE_CHAINRING_TEETH = 44 # Chainring teeth; drives chain length and gear ratio
    5. BICYCLE_COG_TEETH = 16 # Rear cog teeth
    6. BICYCLE_CRANK_PHASE = 35.0 # Crank phase angle (deg); drives pedal and foot contact
    7. def derive_frame():
    8. # Derive bottom bracket, seat tube, and head tube positions from wheelbase and wheel diameter
    9. ...
    10. def derive_drivetrain():
    11. # Derive chain length, cog radius, and tension direction from the tooth ratio
    12. ...
    13. def derive_pose():
    14. # Derive pedal coordinates from crank phase, then solve for the pelican's foot and wingtip positions
    15. ...

    What the acceptance side does is very clear: change only the numbers, never the code. For example, change the wingspan from 1.15 to 1.35, the chainring teeth from 44 to 52, and the crank phase from 35 to 140, then rerun the script and check whether grip spacing changes with wingspan, whether chain length and tension direction change with the tooth ratio, and whether pedal position and foot contact change with phase. If any of these requires hand-editing the code to “line up,” the model has produced a one-off script rather than a parametric model.

    4. Four Observable Dimensions of Spatial Reasoning

    1. Contact constraints: feet on pedals and wingtips on grips must be coplanar and flush, with no floating or interpenetration.
    2. Drivetrain consistency: crank phase determines pedal coordinates, the chain must be closed and on the tension side, and rear wheel orientation must match crank direction.
    3. Hierarchy and naming: parts need searchable object names and parent-child hierarchy so acceptance scripts can locate them.
    4. Runnability: the script must execute successfully in one pass in headless mode, with no interactive dialogs and no external resource dependencies.

    5. How to Run Comparative Evaluations Correctly

    Have multiple models generate the same script simultaneously; what is compared is completion, not prose. A suggested scoring sheet: runnability 30 points, parametric linkage 30 points, spatial contact 20 points, narrative fidelity 20 points. A solution that finishes first but has zero parametric linkage should score lower than a slightly slower but fully green one. Claims of being “roughly on par with a flagship model” are only meaningful when reproduced with the same prompt and the same acceptance script.

    6. Engineering Recommendations

    To adopt this kind of evaluation within a team, put the task templates, parameter lists, and acceptance scripts into a code repository, use a container platform to standardize the headless runtime, and use logging and monitoring/alerting to record the success rate and failure stack traces of each generation, forming a sustainable regression evaluation pipeline. This way, the gains and regressions from model iterations can be quantified rather than remaining at the level of subjective experience.