Evaluating LLM-Generated 3D Scripts: From Runnable Code to Acceptance Testing
A successful run or convincing screenshot is not enough to evaluate LLM-generated 3D scripts. This article presents an engineering-oriented evaluation framework covering parameterization, spatial consistency, self-checks, reproducibility, and extensibility. Using a parameterized cycling scene, it explains how geometry dependencies, parameter mutation tests, automated assertions, and a weighted scoring rubric can distinguish reliable scripts from visually plausible but fragile demonstrations.
Evaluating LLM-Generated 3D Scripts: From Runnable Code to Acceptance Testing
When general-purpose large language models generate 3D scene scripts from text, demonstrations can create a misleading impression. A script runs successfully, the scene contains recognizable characters and props, and the main subject looks plausible in a screenshot. These results are often treated as evidence of strong spatial reasoning and engineering capability.
Problems emerge quickly in production or research workflows. Changing the wingspan leaves the handlebars unchanged. Increasing the chainring tooth count leaves the chain floating in space. Adjusting the crank phase separates the rider’s foot from the pedal. Or the scene looks correct, but its geometry relies on hard-coded coordinates, with “parameterization” existing only in comments.
Evaluating a model for 3D content generation therefore requires more than checking whether it produces runnable code. The question is whether it can deliver an engineering-quality script that is parameterized, verifiable, reproducible, and extensible.
An acceptance procedure that changes only constants, reruns the script, and checks geometric relationships directly addresses this distinction. It tests whether the model understands the causal chain connecting parameters, geometry, motion, and acceptance criteria—not merely whether it can assemble modeling commands.
1. Treat the Task as Generative Engineering with Acceptance Criteria
Consider a parameterized 3D scene generated by a script in headless batch mode: a character riding a bicycle along a coastal promenade at dusk.
The character leans forward, extends both wings to grip the handlebars, places one webbed foot on a pedal, and holds the other airborne near the low return position. The bicycle includes a diamond frame, a tool bag, a rolled fishing net on the rear rack, and a drivetrain. The crank and rear-wheel drivetrain relationship must be consistent with the riding pose.
This task involves at least four categories of constraints:
- Narrative and style constraints: Required scene elements must be present, and composition and stylization must match the description without sacrificing geometric relationships.
- Parameterization constraints: Wingspan, wheelbase, chainring tooth count, rear cog tooth count, and crank phase must be defined at the top of the script. Geometry must derive from these constants rather than unrelated magic numbers inside functions.
- Physical and spatial constraints: Handlebar width and grip spacing must respond to wingspan changes. The chain path must be recalculated when chainring or cog dimensions change. Pedals must move with crank phase, while foot contact and drivetrain phase remain consistent.
- Reproducibility and inspectability constraints: The script must run in a clean environment and produce stable outputs. Critical dimensions, contact distances, clearances, and collisions must support automated assertions through scene-graph inspection, bounding boxes, or geometry queries.
The objective is not to determine whether a model has memorized a particular scene. It is to assess whether it can translate natural-language requirements into a parameterized geometric system.
2. Six Capability Dimensions to Evaluate
2.1 Executability: Does the Code Run Reliably?
Executability is the minimum requirement, not the complete evaluation.
The script should be self-contained, have clearly specified dependencies, provide traceable errors, and complete without interactive input. Checks should cover missing dependencies, undefined variables, hard-coded paths, uncontrolled randomness, and runtime crashes.
Repeated runs, timeout limits, and complete logs help verify this dimension.
2.2 Parameterized Abstraction: Do Constants Actually Drive Geometry?
A well-designed script does not independently hard-code handlebar width, grip positions, chain routing, and pedal height. It establishes dependencies.
For example:
- Wingspan determines shoulder width, wing length, grip spacing, and handlebar width. Grip positions then constrain wingtip poses.
- Chainring tooth count is converted into a pitch-circle radius, which feeds chain tangent and wrap-angle calculations.
- Crank phase determines crank endpoints, after which foot-contact constraints determine the relevant limb pose.
Evaluation should distinguish two failures:
- Inactive parameters: Changing a constant produces no corresponding scene change.
- Broken dependencies: One component changes, but connected components do not.
The first indicates hard-coding. The second indicates inadequate modeling of spatial relationships.
2.3 Spatial Reasoning and Physical Consistency
A 3D scene is not simply a collection of parts. The frame, wheels, chainring, rear cog, chain, cranks, pedals, and rider’s feet have specific positional and motion relationships.
The chain must form a continuous closed path with appropriate tangency to the chainring and cog. The supporting foot must contact the pedal surface, while the airborne foot must occupy the specified low return position. When the handlebars widen, the grips must still accommodate the wing ends without unintended penetration or floating contact.
These relationships distinguish meaningful 3D spatial reasoning from a scene that happens to look reasonable in a 2D screenshot.
2.4 Self-Checks and Explicit Constraints
Strong scripts include internal assertions or helper functions that check conditions such as:
- Critical dimensions are positive.
- The chain path is closed.
- The sole-to-pedal distance is within tolerance.
- Handlebar grips are close to the wing ends.
Even when external tests perform final acceptance, internal checks demonstrate that the script explicitly represents its constraints.
2.5 Reproducibility
Identical parameters, random seeds, and environments should produce consistent results.
Uncontrolled random sampling, missing seeds, or unstable ordering can change screenshots between runs and make automated assertions difficult to reproduce.
Reproducibility also depends on consistent units, explicit coordinate conventions, sensible scale, and output paths and filenames that do not depend on the current working directory.
2.6 Extensibility
An evaluator will change parameters and rerun the script. Supporting those changes without editing logic is central to parameterization.
Additional perturbations—such as changes to wheelbase, rear cog tooth count, character scale, or scene scale—can reveal whether the script is overfitted to a single example.
3. Parameterized Design: Model Relationships Before Shapes
An acceptance-ready script should first define units, coordinate conventions, and global constants, then calculate derived values, and finally generate geometry.
The following pseudocode illustrates this structure:
# Global parameters: evaluators may modify only this sectionWINGSPAN = 1.15 # Total wingspanWHEELBASE = 1.02 # WheelbaseCHAINRING_TEETH = 44 # Chainring tooth countCOG_TEETH = 16 # Rear cog tooth countCRANK_PHASE_DEG = 35.0 # Crank phase# Named ratios and tolerances avoid isolated magic numbers in functionsHANDLEBAR_SPAN_RATIO = 0.88GRIP_CLEARANCE = 0.012CHAIN_PITCH = 0.0127CONTACT_EPS = 0.002CLEARANCE_EPS = 0.003def derive_handlebar():half_span = WINGSPAN * HANDLEBAR_SPAN_RATIO / 2grip_center = half_span - GRIP_CLEARANCEreturn {"bar_half_width": half_span,"grip_center": grip_center,"grip_radius": WINGSPAN * 0.025}def pitch_radius(teeth):return teeth * CHAIN_PITCH / (2 * PI)def pedal_world_position(center, crank_length, phase_deg):theta = radians(phase_deg)return center + vector(crank_length * cos(theta),crank_length * sin(theta),0.0)def build_scene():handlebar = derive_handlebar()r_chainring = pitch_radius(CHAINRING_TEETH)r_cog = pitch_radius(COG_TEETH)chain = compute_chain_path(chainring_center=BB_CENTER,cog_center=REAR_AXLE,r1=r_chainring,r2=r_cog)stance_pedal = pedal_world_position(BB_CENTER, CRANK_LENGTH, CRANK_PHASE_DEG)swing_pedal = pedal_world_position(BB_CENTER, CRANK_LENGTH, (CRANK_PHASE_DEG + 180.0) % 360.0)place_rider_feet(stance_pedal, swing_pedal)assert_chain_continuous(chain, CONTACT_EPS)assert_foot_contact(stance_pedal, CONTACT_EPS)assert_handlebar_contains_wingtip(handlebar)
The important point is the design principle rather than the implementation of individual functions: constants before geometry, derived values before shapes, and constraints before decoration.
Every dimension should be traceable to a parameter or an explained ratio. Unexplained values such as 0.73 or 1.42 inside functions can break the scene when parameters change.
Linking Handlebar Geometry to Wingspan
A wingspan change should not merely scale the entire character. It should trigger recalculation of handlebar width, grip spacing, shoulder width, and wingtip envelopes.
Acceptance checks should establish whether:
- The handlebars widen with wingspan.
- Grip centers remain within the wings’ reachable range.
- Grip radius and wingtip collision tolerances are reasonable.
- Wingtips avoid unintended penetration or obvious intersections with the handlebars.
Changing the handlebars without updating the rider’s pose produces false parameterization: the bars become wider, but the wings still grip their old positions.
Linking Drivetrain Geometry
Changing the chainring tooth count changes its pitch-circle radius, which affects chain tangent points, wrap angles, and total path length.
Simply connecting components with a spline or straight line can cause penetration or floating segments when the chainring grows. A geometric construction can calculate the external common tangents of the two circles, then combine tangent segments and wrap arcs to define the chain path. Tolerance-based assertions can check contact at the relevant tangent points.
Chain tension should also be represented as a constraint. Path length must be consistent with the center distance and radii of the chainring and cog. Clearly sagging segments should not appear unless the narrative explicitly allows them.
Linking Crank Phase to Foot Contact
Crank phase determines the circular positions of both pedals.
The supporting foot should be positioned through inverse kinematics or direct pose transformations so that its sole contacts the pedal surface within tolerance. The airborne foot should remain near the specified low return position rather than floating arbitrarily.
After a phase change, the relevant limb pose must be solved again instead of retaining old coordinates.
Automated acceptance can measure:
- Distances from sampled sole points to the pedal plane.
- The angle between the sole normal and pedal normal.
- Agreement between airborne-foot height and the phase-dependent expected position.
4. Use Parameter Mutation Tests to Detect False Parameterization
One of the most effective evaluation methods combines a baseline run with parameter mutation tests.
Once the baseline passes, change only the constants at the top of the script. Leave all logic unchanged, rerun the script, and apply automated assertions.
A test matrix can include:
- Wingspan mutation: Change wingspan from
1.15to1.35. Handlebar width, grip spacing, and wingtip envelopes should update together, with both wing ends still accommodated by the grips. - Chainring mutation: Change chainring tooth count from
44to52. The pitch-circle radius should increase, the chain path should be recalculated, and chain contact with the chainring and cog should remain continuous without intersecting the frame. - Phase mutation: Change crank phase from
35degrees to140degrees. The supporting foot should remain in contact with the pedal, while the airborne foot remains near the required low return position. - Combined mutations: Change several parameters simultaneously. Check for conflicting dependencies and whether the script either resolves them or reports a clear error.
- Boundary mutations: Move parameters toward reasonable limits. Check for division by zero, negative radii, component penetration, and abnormal bounding boxes.
Automated assertions can verify that:
handlebar_width ≈ f(WINGSPAN), and grip-center spacing exceeds shoulder width.distance(wingtip_surface, grip_envelope)is within tolerance, with no unintended penetration.chain_endpointsremain within tolerance of the chainring and cog tangent points.- Minimum chain clearance from the frame, tires, and cranks exceeds the specified threshold.
- Supporting-foot distance and orientation relative to the pedal plane are within tolerance.
- Airborne-foot height is close to the calculated low return position.
- No critical scene dimensions are disconnected from global parameters.
- Repeated runs produce consistent outputs, complete logs, and traceable exceptions.
5. A Suggested Scoring Rubric
A weighted rubric makes evaluation results more comparable. The following example totals 100 points:
| Dimension | Suggested Weight | Core Question |
|---|---|---|
| Executability | 20 | Does the script run reliably, with traceable errors? |
| Parameterized abstraction | 25 | Do constants genuinely drive geometry, or is it hard-coded? |
| Spatial and physical consistency | 25 | Are contact, clearance, drivetrain relationships, and collisions correct? |
| Automated acceptance support | 10 | Does the script expose self-checks, assertions, and queryable metrics? |
| Reproducibility | 10 | Are randomness, units, coordinates, and outputs controlled? |
| Maintainability and extensibility | 10 | Is the structure clear, and can it accommodate parameter changes? |
Record failure categories as well as scores. Examples include:
- Runnable code with inactive parameters.
- Working parameter updates but chain penetration.
- Plausible visuals but a floating supporting foot.
- Successful single-parameter tests but crashes under combined changes.
Failure categories often reveal a model’s practical capability boundaries more clearly than a single aggregate score.
6. Common Failure Modes
Screenshot-Driven Modeling
The script uses fixed coordinates and carefully arranged occlusion to look convincing from the default camera. Parameter changes expose intersections and misalignment.
Superficial Parameterization
Variables appear at the top of the script, but functions still use old constants or duplicated coordinate sets.
Partial Dependency Updates
The handlebars widen, but the wings do not move. The chainring grows, but the chain is not recalculated. The crank rotates, but the feet retain their previous poses.
Poor Tolerance Handling
Exact-equality contact checks fail under floating-point error. Conversely, overly generous tolerances allow visibly incorrect intersections to pass.
Missing Verifiable Outputs
The script generates geometry but exposes no dimensions, contact points, bounding boxes, or useful logs. External acceptance is reduced to visual inspection.
Conclusion
The meaningful capability of an LLM for 3D content generation is not simply producing a scene that looks credible. It is understanding the causal relationships between parameters and geometry, translating narrative requirements into verifiable constraints, running reliably in headless batch environments, and preserving spatial and physical consistency after constants change.
An acceptance workflow built around changing parameters without changing code, rerunning, and checking automatically reduces misleading demo-based judgments. It turns subjective visual assessment into an engineering-oriented evaluation that is reproducible and comparable.
For development teams, this approach can help identify more reliable models while also establishing clearer prompting guidelines, scene-modeling conventions, and automated acceptance baselines.
