Parametric 3D Generation in Practice: Evaluating Spatial Reasoning Skills
This article presents a practical, script-based approach to evaluating the spatial reasoning abilities of AI coding tools in parametric 3D generation. Using the prompt "generate a pelican riding a bicycle" as a unified test case, it explains why rendered images are misleading, how to structure prompts with separate narrative and constraint layers, and how to build complete dependency chains so that dimensions such as wingspan, wheelbase, gear ratios, and crank phase drive the geometry. It also provides a scoring checklist, common failure patterns, and a single-variable debugging method for fair, reproducible comparison across tools.
1. The Problem: From “It Renders” to “It Passes Acceptance”
Once AI coding tools entered the field of 3D content generation, a common evaluation mistake emerged: judging output only by whether the rendered image “looks right.” Renders are highly deceptive. A model can produce a passable-looking pelican and a bicycle, yet the spatial relationship between them can be completely wrong—the feet never touch the pedals, the chain floats in mid-air, and the handlebar width does not match the wingspan. Such results prove only that the model can imitate visuals, not that it can reason about space.
A meaningful evaluation must introduce acceptance criteria that can be checked parametrically. This article uses a single prompt—“generate a pelican riding a bicycle”—and requires the tool under test to deliver a script that runs in headless mode, with correctness verified by changing a few global constants and checking whether the geometry updates coherently. The method is product-agnostic and works for side-by-side comparison of any AI coding tool.
2. Evaluation Design: Why Scripts Instead of Instant Rendering
Early evaluations often used browser-based 3D rendering. The advantage is fast feedback, but the drawbacks are clear: as the scene grows, code organization quickly gets out of control. More importantly, browser-based solutions tend to scatter geometry parameters across the code, making it hard to verify “change one number, update the whole scene.”
Switching to script-based modeling shifts the focus from “visual output” to “parameter topology.” The deliverable is a plain-text script that a headless interpreter executes directly, generating geometry and saving a scene file. This brings three benefits:
- Reproducible: the same script produces identical results on any machine;
- Inspectable: positions, rotations, and scales are explicit numbers that can be asserted;
- Linked: all dimensions derive from top-level constants, so changing a parameter changes the structure.
3. Prompt Design: Separate Narrative from Constraints
A high-quality evaluation prompt needs both a narrative layer and a constraint layer. The narrative layer gives the model enough semantic context; the constraint layer turns that context into verifiable numerical relationships. An example structure:
From the text description alone, generate a modeling script that runs in headless (no-GUI) mode.[Narrative] A seaside promenade at dusk. A pelican rides a dark green steel-frame bicycle,leaning forward, both wings extended to grip the handlebar. One webbed foot rests on a pedal;the other hangs at the lowest point of the return stroke. A fishing net is strapped to the rear rack,and a tool bag hangs from the down tube.[Parameters] Declare global constants at the top of the script:wingspan, wheelbase, chainring teeth, cog teeth, crank phase angle.All geometry must derive from these constants; no decoupled magic numbers inside functions.[Acceptance] Change only the constant values and rerun the script, then check:handlebar width changes with wingspan and the grips enclose the wing tips;the chain path is recomputed from the gear ratio, with no clipping and no floating;pedal positions move with the phase, and the contact foot stays flush with the pedal surface.
The key technique here is to write “physical relationships that must hold” as acceptance items, not as adjectives. A model that merely piles up parts cannot pass.
4. Implementing Parameter Linkage
The difficulty of parametric modeling lies not in modeling itself but in the completeness of dependencies. Take the drivetrain as an example: the tooth ratio between chainring and cog determines chain length and the rear wheel’s rotational relationship; the crank phase determines pedal coordinates; and the pedal coordinates determine the foot contact point. These three form a dependency chain—if any link uses a hard-coded value, the linkage breaks.
The recommended implementation order:
- Build a “constants → derived values” middle layer, e.g., derive front and rear axle positions from the wheelbase, and handlebar width and grip spacing from the wingspan;
- Build a “derived values → geometry” construction layer, where geometry sizes and positions reference only the middle layer;
- Build a “phase → contact relationship” constraint layer, using trigonometry to compute pedal positions and deriving the contact foot position from the pedal position.
Illustrative code:
WINGSPAN = 1.15 # Wingspan; drives handlebar widthWHEELBASE = 1.02 # Wheelbase; drives frame geometryCHAINRING = 44 # Chainring teethCOG = 16 # Cog teethPHASE = 35.0 # Crank phase angle# Derived layer: all geometry references only these valueshandlebar_width = WINGSPAN * 0.92grip_span = WINGSPAN * 0.88rear_axle = (0.0, 0.0, 0.0)front_axle = (WHEELBASE, 0.0, 0.0)# Constraint layer: pedal position is determined by phase; contact foot is derived from the pedalpedal_pos = crank_center + crank_radius * vector(cos(PHASE), sin(PHASE), 0)contact_foot.position = pedal_pos + foot_offset
Note that the chain path cannot simply connect two circles with straight lines. It should be computed from the external tangent lines and re-solved whenever the gear ratio changes; otherwise, changing parameters will inevitably cause clipping or floating.
5. Side-by-Side Comparison: Gauging Spatial Reasoning Strength
Having multiple AI coding tools generate from the same prompt in parallel and scoring them against a unified checklist is the lowest-cost, highest-discrimination approach. Suggested scoring dimensions:
- Parameter completeness: are all constants declared, and are there decoupled magic numbers;
- Linkage correctness: after changing parameters, do the handlebar, chain, and pedals update in sync;
- Contact relationships: does the contact foot stay flush with the pedal, and is the free foot at the low point of the return stroke;
- Structural soundness: is the frame a closed load-bearing structure, and do parts intersect;
- Executability: does the script run successfully in headless mode on the first try.
As a general pattern, most models do well at “stacking parts” but differ markedly in “dependency chain completeness”: some hard-code the phase angle, others fix the chain path and clip immediately after the tooth count changes. Such failures are not visual issues but a lack of spatial reasoning and engineering-constraint awareness.
6. Common Failure Modes and a Debugging Checklist
- Residual magic numbers: values inside functions unrelated to the constants, causing misalignment after parameter changes;
- Phase disconnection: the pedals move but the feet do not, or foot positions come from fixed coordinates;
- Chain simplification: straight lines used instead of tangents, leaving the chain floating after tooth-count changes;
- Open frame: axle positions derived from the wheelbase, but frame tubes still use fixed lengths;
- Grip detachment: handlebar width not bound to wingspan, leaving wing tips exposed.
When debugging, stick to the single-variable principle: change one constant at a time, observe which geometry updates, and treat anything that does not change as a broken dependency point.
7. Conclusion
Evaluating 3D generation capability should shift from “looking at renders” to “checking dependencies.” Writing the narrative clearly, expressing constraints as executable assertions, and making parameters the single source of truth allows different tools to be compared fairly under the same standard. The same approach applies to real engineering: when stakeholders ask to “change one dimension and have the whole model adapt,” dependency chain completeness is the dividing line for delivery quality. With the general-purpose compute and containerized environments provided by Baidu AI Cloud, teams can run such script-based evaluations in batch and in parallel, and consolidate the results into a regression-ready automated acceptance pipeline.
