Cricket Wicket

showcase/cricket-wicket/

A procedural cricket wicket — three lacquered ash stumps with grooved domed crowns and red ball scuffs, two turned and collared bails lying in the grooves, a turf strip worn bare along a chalked crease and a red leather ball with a raised seam — carried through UVs, bake, LOD, compound collider, and Unity glTF, asserting Laws-of-Cricket sizes and bail seats recomputed from the mesh rather than an API contract.

Rendered headless by the showcase piece itself. Select it to enlarge.

witnesses Recomputed: 6448 tris, eight materials with 1344 ash, 672 bail, 112 turf, 152 earth, 6 chalk, 1344 grass, 200 leather and 240 seam faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.646×0.406×0.736 m, zmin 0, hygiene 0 including zero coplanar cross-shell pairs, three stumps each 711.2 mm proud, 36.5 mm thick, 228.6 mm over their faces with 59.55 mm gaps, four bail spigots seated 0.92–1.00 mm into the groove floors, bails 4.7 mm proud of the stumps, a 72.0 mm ball resting 0.6 mm into the turf with its seam 1.0 mm proud. --lift-bails exits 18 at −4.0 mm while every stump still grounds the AABB; --thin-stumps exits 19 at 32.85 mm.

category Sports

tags mesh export showcase

blender --background --python showcase/cricket-wicket/cricket_wicket.py --

A cricket wicket as Law 8 of the Laws of Cricket describes it: three turned ash stumps, 28 inches proud of the turf and 9 inches wide over their outer faces, each with a shoulder, a neck and a grooved domed crown; two turned bails whose spigots lie in the grooves and whose collared barrels hang across the gaps; a tight strip of turf worn bare along a chalked bowling crease, its grass thickening toward the edges; and a red leather ball with a raised seam resting in front of the stumps. A showcase piece, not an example — it witnesses no API contract. It asserts that generated geometry meets declared asset budgets, recomputed from the finished mesh.

What it composes#

Shipped contentUsed for
skills/mesh-editing-and-bmeshlathed stumps, bails and ball, a lofted turf slab, bipyramid grass blades, all in one bmesh
skills/custom-propertiesface attributes (PlankTone, GrainDir) read by the wood and grass shaders
skills/procedural-materials-and-shaderslacquered ash with turned bands and red ball scuffs that knock off the lacquer, stained bail wood, turf, earth, chalk, grass, leather, thread
skills/bake-high-to-lowCycles tangent-space normal bake, high onto low
skills/engine-export-presetsUnity glTF (export_yup=True)
skills/depsgraph-and-evaluated-dataevaluated triangle counts for the LOD ratios
snippets/decimate_to_budget.pyLOD1 / LOD2 COLLAPSE chain
snippets/convex_hull_collider.pya hull per stump, per bail, for the ball and for the slab, merged into a compound
snippets/lod_chain.pyLOD naming and ratio pattern
examples/mesh-hygiene-audithygiene combinatorics (copied, not imported)

The budgets that matter#

A wicket fails invisibly in two ways, and neither moves the bounding box.

The bails must lie in the grooves. A bail floating a few millimetres above its stumps still spans the gap, still sits over the stumps, still fits the outer AABB, and still renders as a bail. The piece measures the seat of each of the four spigots: the lowest point of the spigot against the floor of the groove it lies in, read off the finished stump mesh. Band 0.5–2.0 mm; measured 0.92–1.00 mm. --lift-bails raises both bails 5 mm, the seat goes to −4.0 mm, and the run exits 18 with every other budget green.

The stumps are a real size. Law 8 states numbers, and each is recomputed from the mesh:

--thin-stumps turns the shafts to 32.9 mm and exits 19 on the diameter. --fat-bails swells the barrels and the bails stand 13.7 mm proud, which Law 8 forbids. --small-ball makes a 60 mm ball. Each of these leaves every stump on the floor.

Budgets#

Declared in the script as named constants, recomputed from the generated mesh. Measured values are from Blender 5.2.1.

BudgetBandMeasured
Base triangles6100–68006448
LOD1 ratio0.32–0.620.5000
LOD2 ratio0.10–0.350.2199
Material slotsexactly 8, distinct8
Face floors (ash / bail / turf / earth / chalk / blade / leather / seam)≥ 1300 / 630 / 100 / 135 / 6 / 1250 / 180 / 2201344 / 672 / 112 / 152 / 6 / 1344 / 200 / 240
UV boundsinside 0..1(0.0012, 0.0011)–(0.9988, 0.9944)
UV AABB overlap≤ 1e-50.000000
Outer AABB0.646 × 0.406 × 0.7359 m ± 0.0100.6460 × 0.4060 × 0.7359
Collider triangles≤ 360294 (seven hulls)
Normal bake{'FINISHED'} with image data{'FINISHED'}, has_data=True
glTF exportfile written, non-empty~278 kB
Hygieneall zeroloose 0/0, non-manifold 0, zero-area 0, doubles 0, n-gons 0, coplanar cross-shell pairs 0
Grounded AABB\zmin\≤ 1e-40.00000
Named stumps3 stumps, each foot z ≤ 1e-43 at 0.00000
Spigot tip on its neck4 tips, ≥ 0.5 mm inside the neck radius1.03 mm
Barrel clear of stumps≥ 0.5 mm in x at the barrel's height6.92 mm
Bail pairgap between the two short spigots ≥ 0.3 mm0.85 mm
Spigot seat4 spigots, lowest point 0.5–2.0 mm below the groove floor0.92–1.00 mm
Chalk line0.8–3.0 mm proud of the turf, ≥ 0.5 mm bitten in1.50 / 1.00 mm
Ball restlowest point 0.2–1.5 mm below the turf top0.60 mm
Seam0.5–2.0 mm proud of the ball1.00 mm
Stump diameter34.9–38.1 mm (Law 8)36.5 mm
Stump height711.2 mm ± 1.5 above the turf top711.2 mm
Width over outer faces228.6 mm ± 3.0; every gap 40 mm to under 71.3 mm228.6 mm; gaps 59.55 mm
Mirrored stumpsleft/right axes mirrored within 1 mm0.000 mm
Bail projection2.0–12.7 mm above the stumps' highest point (Law 8)4.7 mm
Ball diameter71.3–72.9 mm (Law 5)72.0 mm

Construction#

The groove floor is flat where the dome is higher and follows the dome where it is lower, so the groove opens through the rim as a ramp. The crown's highest vertex is found by evaluating the crown once, and the crown is placed so that vertex lands exactly 711.2 mm above the turf.

Findings the budgets forced#

Conventions walked#

Every convention in showcase/README.md, and whether it applies here.

ConventionAppliesHow
Deterministic, budgets declared, assertions recomputeyesfixed-seed RNG for grass only; every value above is read off the mesh
Falsifier fails the budget it targetsyestable below, each run on 5.2.1
Hygiene incl. cross-shell coplanaryesexit 15
Named supportsyesthe three stumps' feet (--float-stump)
Even shaping terms and mirror symmetryyesleft and right stumps paired (--skew-stump)
Plumb and real-world sizeyesstump diameter, height, width, gaps, ball size (--thin-stumps, --small-ball)
Joint-fit budgetsyesspigot tips on their necks, barrels clear of the stumps (--shift-bails)
Seat conformanceyesspigots in the grooves, ball on the turf, seam on the ball, chalk in the turf (--lift-bails, --float-ball, --sink-seam, --sink-chalk)
A member is tenoned into its seat, never stood on ityesspigots 1 mm into the groove floor, chalk 1 mm into the turf, ball 0.6 mm, stumps through the slab
Orthogonal membersn/anothing is a board
Wrappers follow the host's profilen/ano band or hoop
Rope, masonry, roofs, vessels, scattern/agrass tufts are decoration, not a scatter budget
Shading is part of the modelyesstumps, bails, ball smooth (turned); every edge over 40° hard (slab, groove walls, blades)
One substance, one slotyesash, bail wood, turf, earth, chalk, grass, leather, thread
Edge treatment: no right anglesn/aturned and lofted, no box edges; the asset-quality edge90 is 0.090
Material face floorsyesall eight slots
The bake cage is narrower than the nearest neighbouryesCAGE_EXTRUSION 4 mm, well under the 59 mm gaps
Level on the stage; stage 60 myesturned about Z only; 60 m floor and wall
Keep a falsifier's envelope stillyesevery falsifier stays inside the 10 mm bounding-box tolerance

Falsifiers#

Each breaks one pipeline stage so a named budget fails. All thirteen were run on Blender 5.2.1 and exited the declared code. 4.5 and 5.1 were not available locally; CI exercises the default path on both.

FlagTarget budgetBreaksExit
--skip-decimateLOD1 ratiodrops the DECIMATE modifiers, LOD1 ratio goes to 1.00009
--stray-vertmesh hygieneadds one loose vertex above the turf15
--lift-zgrounded AABBlifts the whole mesh 50 mm16
--float-stumpnamed stumpslifts the left stump 8 mm; the other two and the slab still ground the AABB16
--shift-bailsbail footprintslides both bails 8 mm outward; a tip lies 7.0 mm outside its neck17
--lift-bailsspigot seatlifts both bails 5 mm; seats go to −4.0 mm18
--sink-chalkchalk lineburies the chalk 4 mm; −4.0 mm proud18
--float-ballball restlifts the ball 5 mm; −4.4 mm18
--sink-seamseamsinks the seam 3 mm; −2.0 mm proud18
--thin-stumpsstump diameterturns the shafts to 0.9 of their radius; 32.85 mm19
--skew-stumpmirrored stumpsmoves the right stump 2 mm along the wicket; 2.0 mm19
--fat-bailsbail projectionswells the barrels to 19 mm radius; 13.7 mm proud19
--small-ballball diametershrinks the ball to 30 mm radius; 60.0 mm19

Exit codes#

File-local and sequential. 9 is a valid check code. 1 is the FATAL wrapper — a crash, never a named check.

CodeMeaning
0Success
1Uncaught exception (FATAL wrapper)
2argparse / usage
3Mesh did not build, or has no UV layer
4Base triangle count outside band
5Material slots, or a material's face floor
6UVs outside 0..1
7UV AABB overlap above tolerance
8Outer AABB off declared size
9LOD1 or LOD2 ratio outside band (--skip-decimate)
10Framing gate (examples/gallery_framing.py, render path only)
11Collider triangles above ceiling, or asset-quality gate (render path only)
12Normal bake failed or produced no image data
13glTF export missing or empty
14--output produced no file
15Mesh hygiene (--stray-vert)
16Grounded AABB zmin, or a stump floating (--lift-z, --float-stump)
17Bails not located, spigot tip off its neck, barrel against a stump, or bails touching (--shift-bails)
18Spigot seat, chalk line, ball rest or seam (--lift-bails, --sink-chalk, --float-ball, --sink-seam)
19Stump diameter, height, width or gaps, mirrored stumps, bail projection, ball diameter (--thin-stumps, --skew-stump, --fat-bails, --small-ball)

Run it#

# Budget check, no render.
blender --background --python cricket_wicket.py --

# Falsifier: the bails float over the grooves. Must exit 18.
blender --background --python cricket_wicket.py -- --lift-bails

# Falsifier: the stump shafts are too thin for Law 8. Must exit 19.
blender --background --python cricket_wicket.py -- --thin-stumps

# Render the gallery still (EEVEE; --engine cycles on a GPU-less host).
blender --background --python cricket_wicket.py -- --output cricket_wicket.webp

Smoke runs the check-only path. It does not pass --output or any falsifier.

Measurements#

Blender 5.2.1 only; 4.5.11 and 5.1.2 were not available locally.

Value5.2.1
Base triangles6448
LOD1 / LOD2 tris3224 / 1418
Face counts (ash / bail / turf / earth / chalk / blade / leather / seam)1344 / 672 / 112 / 152 / 6 / 1344 / 200 / 240
Outer AABB0.6460 × 0.4060 × 0.7359
Collider tris294
Stump 711.2 mm, 36.5 mm, 228.6 mm, gaps 59.55 mmexact
Spigot seats0.92–1.00 mm

Source

showcase/cricket-wicket/cricket_wicket.py View the script on GitHub →
A cricket wicket of three lacquered ash stumps, red-scuffed where the ball struck, two turned bails in their grooves, on a turf strip worn bare along the chalk crease.