Parametric 3D Generation: Evaluating Spatial Reasoning in Large Language Models
A convincing render does not prove that a language model understands spatial relationships. This article presents a practical evaluation framework for parametric 3D generation, using explicit prompt contracts, geometric assertions, and parameter perturbations to test whether generated scripts preserve assembly constraints. It also outlines failure categories and a repeatable regression pipeline for model comparison.
1. The Real Challenge: Not Looking Right, but Surviving Changes
A persistent misconception in text-to-3D evaluation is treating a plausible rendered screenshot as sufficient evidence of capability. A screenshot only shows that a model assembled a set of values that happened to work together once. It does not demonstrate that the model established causal relationships between variables.
The engineering value lies in a parametric model: all geometry derives from a small set of constants, changing an input triggers a complete recalculation, and spatial relationships remain intact.
Evaluation should therefore shift from output quality to constraint satisfaction, assessed at three levels:
- Semantic interpretation: Can the model translate a natural-language scene—dusk, a coastal promenade, a forward-leaning body, and one raised foot—into a list of scene elements?
- Structural relationships: Can it establish the correct relationships between parts, such as grips enclosing wing tips, a webbed foot resting on a pedal, and a taut chain without unintended intersections?
- Parametric coupling: When parameters change, does the code automatically preserve those relationships, rather than relying on a lucky combination of initial values?
The third level is the dividing line. Most failures are not an inability to create geometry. They arise because critical dimensions are buried inside functions as magic numbers, causing the assembly to break as soon as an input changes.
2. The Prompt as a Contract: Define Acceptance Criteria Up Front
A useful evaluation starts with a prompt that functions as an executable acceptance contract. It should contain four blocks.
Block 1: Scene and Narrative
Use a concrete description to establish the semantic target. For example:
At dusk on a coastal promenade, a pelican rides a dark green steel-frame bicycle. Its body leans forward, and both wings extend to hold the handlebars. One webbed foot presses against a pedal, while the other hangs free at the lowest point of its return motion. The bicycle has a classic diamond frame, a canvas tool bag attached to the down tube, and a fishing net tied to the rear rack.
Make clear that the bicycle is not a static prop: the crank is driving the rear wheel, the chain is taut, and the riding pose must match the drivetrain phase. Stylization is acceptable, but the spatial relationships between parts must support parametric checks.
Block 2: Parameter Contract
Require all critical quantities to appear as global constants at the top of the script. All geometry must derive from those constants; functions must not contain disconnected magic numbers.
# Global parameter contract# Illustrative example: replace modeling calls with the chosen engine's API.WINGSPAN = 1.15 # Wingspan (m): drives handlebar width and grip spacingWHEELBASE = 1.02 # Wheelbase (m): drives frame geometryCHAINRING_TEETH = 44 # Chainring tooth count: drives chain length and gear ratioCOG_TEETH = 16 # Rear sprocket tooth countCRANK_PHASE_DEG = 35.0 # Crank phase (degrees): drives pedal position and foot contact# Derived quantities must be calculated explicitly, not hard-coded separately.GEAR_RATIO = CHAINRING_TEETH / COG_TEETHGRIP_SPAN = WINGSPAN # Grip spacing derives from wingspanCHAIN_PITCH = 0.0127 # Chain pitch (constant)CHAIN_LINKS = int(round(2 * CHAINRING_TEETH + 2 * COG_TEETH+ 2 * WHEELBASE / CHAIN_PITCH))FOOT_ANGLE = math.radians(CRANK_PHASE_DEG)
Block 3: Deliverable Format
Require a complete script that runs directly in the 3D modeling software’s headless batch mode. It must not depend on an interactive interface or external asset files.
This requirement filters out many outputs consisting of pseudocode or invented APIs.
Block 4: Change-Based Acceptance Criteria
Tell the model explicitly that the evaluator will change only numeric inputs, without modifying any code:
- Wingspan: 1.15 → 1.35
- Chainring tooth count: 44 → 52
- Crank phase: 35 → 140 degrees
After rerunning the script, check three things:
- Do the handlebars widen accordingly, with the grips still enclosing both wing tips?
- Does the chain path recalculate for the larger chainring, without unintended intersections or unsupported gaps?
- Does the pedaling foot remain against the pedal surface, while the raised foot remains in the low return position?
3. Three Regression Checks and How to Assess Them
Prioritize geometric assertions over visual inspection. Add self-checks at the end of the script to turn subjective judgments into comparable numeric results:
assert abs(GRIP_SPAN - WINGSPAN) < 1e-3, "Grip spacing did not track wingspan"assert contact_foot_z - pedal_z < 1e-3, "Pedaling foot lost contact with pedal"assert chain_clearance > 0, "Chain intersects chainring/frame geometry"print(f"ratio={GEAR_RATIO:.3f} links={CHAIN_LINKS} phase={CRANK_PHASE_DEG}")
Check 1: Scale Coupling
Evaluate the response to a parameter change, rather than only the initial absolute value. As wingspan increases, grip spacing must increase proportionally, and the deviation between each wing tip and its grip must remain within tolerance.
If the model embeds 1.15 inside a function instead of deriving the geometry from WINGSPAN, this check will fail.
Check 2: Drivetrain Path Recalculation
Changing the chainring tooth count changes both its pitch radius and the chain’s wrap angle. A correct implementation should derive chain length and path sample points from tooth counts and chain pitch.
A common failure is representing the chain as a fixed-length polyline. Once the tooth count changes, the chain develops gaps or intersects other geometry.
Check 3: Phase Consistency
Crank phase is a global driving parameter. Pedal positions, foot orientation, and leg joint angles should all be solved from it.
If foot coordinates are independent constants, changing the phase to 140 degrees will expose the inconsistency: the foot remains in midair instead of following the pedal.
4. Classify Failures to Make Results Actionable
Failure categories provide more useful feedback than a single overall score:
- Hard-coded magic numbers: The initial output looks correct but is not genuinely parametric; changes break it.
- Decoupled assembly: Individual parts are correct, but their relationships depend on coincidental placement.
- Missing constraints: The model overlooks implicit physical requirements such as chain tension, contact, or wrap angle.
- API hallucination: The script calls nonexistent interfaces or depends on an interactive UI, causing execution to fail in batch mode.
- Narrative loss: The model builds the bicycle but fails to reproduce the pelican’s pose or the scene’s intended action.
5. Turn Evaluation into a Repeatable Pipeline
Make the evaluation a repeatable pipeline:
- Submit the same prompt to multiple candidate models in batches.
- Execute generated scripts automatically in headless mode and capture exceptions.
- For each parameter configuration—a baseline plus several perturbation sets—render screenshots from fixed viewpoints.
- Aggregate three metrics: assertion pass rate, script execution success rate, and pass rate after parameter perturbation.
- Track these metrics across model versions to produce comparable trend lines.
Human review should focus on the screenshots and fidelity to the narrative. Automated checks handle script execution and constraint validation.
6. Conclusion
The key to evaluating a model’s 3D generation capability is not how attractive its first render looks. It is whether the model understands the causal chain from parameters to geometry to constraints.
Put acceptance criteria in the prompt, assertions in the generated artifact, and parameter perturbations in the evaluation pipeline. Together, these practices turn subjective impressions into reproducible engineering results.
The same framework applies to mechanical assemblies, architectural components, robot poses, and other generation tasks that combine parameter-driven geometry with spatial constraints. It can also serve as a foundation for internal model selection and continuous regression testing.
