Sundial

showcase/sundial/

A procedural garden sundial — a stepped stone plinth under a tapered octagonal column and cap, a bronze dial plate with inked hour lines and a curved-backed gnomon — carried through UVs, bake, LOD, compound collider, and Unity glTF, asserting recomputed budgets rather than an API contract.

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

witnesses Recomputed: 3924 tris, three materials with 276 stone, 507 bronze and 1489 ink faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.600×0.600×1.010 m, zmin 0, hygiene 0 including zero coplanar cross-shell pairs, the gnomon's style edge inclined 45.0000° to the plate at latitude 45° and meeting it at the dial centre, twenty hour and half-hour lines, two chapter rings and 28 Roman-numeral strokes on their hour lines, the lines within 0.00001° of tan(H) = sin(lat)·tan(15°h), the gnomon 3.5 mm into the plate, every line 2.0 mm proud and 2.5 mm buried, the noon arrow on the gnomon's meridian, and a plumb 0.670 m column. --wrong-latitude exits 17 at 38.000° while the envelope is unchanged; --linear-hours exits 17 with the lines 9.84° out.

category Village

tags mesh export showcase

blender --background --python showcase/sundial/sundial.py --

A horizontal garden sundial for 45° north: a stepped stone plinth, a tapered octagonal granite column with a flared foot and collar, a cap, a bronze dial plate with a bead rim, a curved-backed bronze gnomon, twenty inked hour and half-hour lines laid out by the dial formula, two chapter rings and Roman numerals VII–XI and I–V, each numeral on its own hour line. Astragal beads ring the column at its foot and under its collar. 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-bmeshfrusta, octagonal astragal beads, lathed plate and rings, swept ink bars and numeral strokes and a lofted gnomon, all in one bmesh, chamfered with bmesh.ops.bevel
skills/custom-propertiesa face attribute (StoneTone) read by the granite shader
skills/procedural-materials-and-shadersspeckled granite with grime and a low-contrast lichen held to the plinth joints, and a pitted bump; bronze going green in patches; satin ink
skills/bake-high-to-lowCycles tangent-space normal bake, a 128-segment high onto the 64-segment 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 stone block, the plate and the gnomon, merged into a compound
snippets/lod_chain.pyLOD naming and ratio pattern
examples/mesh-hygiene-audithygiene combinatorics (copied, not imported)

The budget that matters#

A sundial exists to tell the time, and it can fail at that without looking wrong. Two things decide it:

The piece measures both off the finished mesh:

--wrong-latitude is the falsifier built for the first. It keeps the apex where it is and tilts the style edge to 38°, so the foot slides 41 mm south of the centre and the envelope does not move. Every other budget passes and the run exits 17. --linear-hours is built for the second: the lines go in at 15° an hour and the bearings are out by 9.84°.

Budgets#

Declared in the script as named constants, recomputed from the generated mesh. Measured values are from Blender 5.2.1; 4.5 and 5.1 were not run locally (see the cross-version note below).

BudgetBandMeasured
Base triangles3600–42003924
LOD1 ratio0.32–0.620.5000
LOD2 ratio0.10–0.350.2196
Material slotsexactly 3, distinct3
Stone / bronze / ink faces≥ 240 / 430 / 1300276 / 507 / 1489
UV boundsinside 0..1(0.0011, 0.0011)–(0.9989, 0.9989)
UV AABB overlap≤ 1e-50.000000
Outer AABB0.600 × 0.600 × 1.010 m ± 0.0200.6000 × 0.6000 × 1.0100
Collider triangles≤ 480444 (eight hulls)
Normal bake{'FINISHED'} with image data{'FINISHED'}, has_data=True
glTF exportfile written, non-empty~322 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
Parts6 stone, 2 beads, 1 plate, 1 gnomon, 2 rings, 1 noon, 10 bars, 10 ticks, 28 numeral strokesas stated
Style angle45° ± 0.25°45.0000°
Hour-line bearingsformula ± 0.10°, radial ± 1°0.00001°, 0.0000°
Gnomon bite2.0–5.0 mm below the plate's top3.50 mm
Style footwithin 0.5 mm of the dial centre at the plate's top0.00 mm
Ink seat0.5–2.5 mm proud, 0.8–3.0 mm buried, every line2.00 mm / 2.50 mm
Noon on the meridian≤ 0.5 mm from the gnomon0.00 mm
Plumb columnbottom ring vs top ring centroid ≤ 1.5 mm0.00 mm
Real-world sizecolumn 0.670 ± 0.020, plate Ø 0.400 ± 0.004, gnomon 0.130 ± 0.003 m0.670, 0.400, 0.130

Real-world size: a 1.01 m garden sundial. A 0.40 m dial at hip height (0.88 m), on a 0.67 m column, with a 0.13 m gnomon at 45°.

Construction#

Findings the budgets forced#

Conventions walked#

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

ConventionAppliesHow
Deterministic, budgets declared, assertions recomputeyesno RNG; every value above is read off the mesh
Falsifier fails the budget it targetsyestable below
Hygiene incl. cross-shell coplanaryesexit 15
Plumb and real-world sizeyescolumn plumb and height, plate and gnomon size (--lean-pedestal); exit 19
A member is tenoned into its seatyeseach stone part into its host; the gnomon 3.5 mm into the plate (--float-gnomon)
Seat conformance (a band: minimum so it cannot float)yesthe gnomon bite and every ink line's proud and buried depth (--float-gnomon, --float-lines)
Mirrored assembliespartlythe gnomon and noon arrow are centred on the meridian; asserted as one centroid offset (--shift-noon)
Material face floorsyesstone 240, bronze 430, ink 1300
One substance, one slotyesgranite, bronze, ink
Shading is part of the modelyesstone, beads and gnomon faceted (dressed stone, a bronze plate); the lathed plate and both rings smooth, every edge over 35° hard
Edge treatmentpartlychamfered, but no separate budget: removing the chamfers moves the triangle band first
Sort bmesh operator inputsyesthe bevel's edge list is sorted by index
The bake cage is narrower than the nearest neighbouryesCAGE_EXTRUSION 0.01 m
Level on the stage; stage 60 myesturned about Z only; 60 m floor and wall
Keep a falsifier's envelope stillyesno falsifier moves the AABB; --wrong-latitude holds the apex
Named supports, wrappers, rope, roofs, vessels, scatter, fastenersnothe piece has none of these

Falsifiers#

Each breaks one pipeline stage so a named budget fails. All nine were run on Blender 5.2.1 and exited the declared code.

FlagTarget budgetBreaksExit
--skip-decimateLOD1 ratiodrops the DECIMATE modifiers, LOD1 ratio goes to 1.00009
--stray-vertmesh hygieneadds one loose vertex inside the column15
--lift-zgrounded zminlifts the whole mesh 50 mm16
--wrong-latitudestyle angleholds the apex and tilts the style edge to 38°17
--linear-hourshour-line bearingsputs every line at 15° an hour; 9.839° out17
--float-gnomongnomon bitelifts the gnomon 5 mm; the bite goes to −1.5 mm18
--float-linesink seatlifts every ink line 4 mm; 6.0 mm proud, buried −1.5 mm18
--shift-noonnoon on the meridianmoves the noon arrow 3 mm east; 3.00 mm off19
--lean-pedestalplumb columnshears the column's top ring 12 mm east; 11.93 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, has no UV layer, or a part count is wrong
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
12Normal bake failed or produced no image data
13glTF export missing or empty
14--output produced no file
15Mesh hygiene (--stray-vert)
16Grounded zmin (--lift-z)
17Style angle or hour-line bearings (--wrong-latitude, --linear-hours)
18Gnomon bite, style foot or ink seat (--float-gnomon, --float-lines)
19Noon on the meridian, plumb column or real-world size (--shift-noon, --lean-pedestal)
20Gallery asset-quality violation (render path; the floors' 11 is remapped here)

Run it#

# Budget check, no render. A few seconds warm.
blender --background --python sundial.py --

# Falsifier: the lines are spaced at 15 degrees an hour. Must exit 17.
blender --background --python sundial.py -- --linear-hours

# Falsifier: the style edge is tilted to 38 degrees. Must exit 17.
blender --background --python sundial.py -- --wrong-latitude

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

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

Cross-version measurements#

Measured on Blender 5.2.1 only. 4.5 and 5.1 were not run for this piece. Nothing here depends on a version-specific API beyond the EEVEE engine id, which the script branches on, and the DECIMATE triangle counts, which are a ratio band.

Value5.2.1
Base triangles3924
LOD1 / LOD2 tris1962 / 862
Face counts (stone / bronze / ink)276 / 507 / 1489
Outer AABB0.6000 × 0.6000 × 1.0100
Collider tris444
Style angle45.0000°
glTF bytes321636

Source

showcase/sundial/sundial.py View the script on GitHub →
A garden sundial: a stepped stone plinth and tapered octagonal granite column under a cap, carrying a round bronze dial with Roman numerals, chapter rings and a triangular gnomon.