Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/gallery/assets/hay-bale-hero.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/gallery/assets/hitching-post-hero.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
405 changes: 332 additions & 73 deletions docs/gallery/hay-bale/index.html

Large diffs are not rendered by default.

376 changes: 298 additions & 78 deletions docs/gallery/hitching-post/index.html

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions docs/gallery/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1052,12 +1052,12 @@ <h2><a href="water-trough/">water-trough</a></h2>
</article>
<article class="card" data-tags="mesh export showcase">
<a class="card-media" href="hitching-post/" aria-label="hitching-post example detail page">
<img src="assets/hitching-post-hero.webp" alt="hitching-post — A procedural hitching post through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract." loading="lazy" decoding="async" />
<img src="assets/hitching-post-hero.webp" alt="hitching-post — A procedural hitching post (corner-aligned cap, stub-and-tenon arm, collar shoe, eye-threaded rings) through UVs, bake, LOD, collider, and Unity glTF" loading="lazy" decoding="async" />
</a>
<div class="card-body">
<h2><a href="hitching-post/">hitching-post</a></h2>
<p class="teaches">A procedural hitching post through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.</p>
<p class="witnesses"><span class="tag">witnesses</span> Recomputed: 848 tris, two materials with 262 metal faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.460×0.194×1.260 m, LOD ratios in band (5.2 COLLAPSE more aggressive on LOD2), convex collider 144 tris, non-empty glTF. --skip-decimate exits 9 on the LOD1 ratio budget.</p>
<p class="teaches">A procedural hitching post (corner-aligned cap, stub-and-tenon arm, collar shoe, eye-threaded rings) through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.</p>
<p class="witnesses"><span class="tag">witnesses</span> Recomputed: 1598 tris, two materials with 269 wood and 532 metal faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.460×0.191×1.258 m, zmin 0, hygiene 0, wood-metal BVH gap 0.45 mm, LOD ratios in band, convex collider 78 tris, non-empty glTF. --skip-decimate exits 9 on LOD1; --lift-z exits 16 on grounded zmin.</p>
<a class="card-link" href="hitching-post/">View example <span aria-hidden="true">&rarr;</span></a>
</div>
</article>
Expand Down Expand Up @@ -1162,12 +1162,12 @@ <h2><a href="wooden-ladder/">wooden-ladder</a></h2>
</article>
<article class="card" data-tags="mesh export showcase">
<a class="card-media" href="hay-bale/" aria-label="hay-bale example detail page">
<img src="assets/hay-bale-hero.webp" alt="hay-bale — A procedural bound hay bale with a bevelled loaf, end nap, and two sisal twine belts through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed…" loading="lazy" decoding="async" />
<img src="assets/hay-bale-hero.webp" alt="hay-bale — A procedural bound hay bale with a cinched pillow loaf, end nap, and two sisal twine belts through UVs, bake, LOD, collider, and Unity glTF, asserting…" loading="lazy" decoding="async" />
</a>
<div class="card-body">
<h2><a href="hay-bale/">hay-bale</a></h2>
<p class="teaches">A procedural bound hay bale with a bevelled loaf, end nap, and two sisal twine belts through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.</p>
<p class="witnesses"><span class="tag">witnesses</span> Recomputed: 252 tris, two materials with 66 hay and 60 twine faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.916×0.520×0.401 m, LOD ratios in band (5.2 COLLAPSE more aggressive), convex collider 68 tris, non-empty glTF. --skip-decimate exits 9 on the LOD1 ratio budget.</p>
<p class="teaches">A procedural bound hay bale with a cinched pillow loaf, end nap, and two sisal twine belts through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.</p>
<p class="witnesses"><span class="tag">witnesses</span> Recomputed: 852 tris, two materials with 294 hay and 132 twine faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.920×0.517×0.426 m, zmin 0, hygiene 0, hay-twine BVH gap 0.07 mm, LOD ratios in band, convex collider 78 tris, non-empty glTF. --skip-decimate exits 9 on LOD1; --lift-z exits 16 on grounded zmin.</p>
<a class="card-link" href="hay-bale/">View example <span aria-hidden="true">&rarr;</span></a>
</div>
</article>
Expand Down
11 changes: 10 additions & 1 deletion showcase/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,16 @@ entry in `showcase/gallery.json`, and a rendered still.
assigned `DECLARED` is not a check).
- **Falsifier** breaks one pipeline stage so a **named** budget fails and
the piece exits its documented code. Prove default and falsifier on
4.5.11, 5.1.2, and 5.2.1.
4.5.11, 5.1.2, and 5.2.1. `--skip-decimate` is the LOD-ratio
falsifier (exit 9). `--lift-z` is the grounded-zmin falsifier (exit 16).
- **Hygiene budgets.** Copied combinatorics from
`examples/mesh-hygiene-audit` (do not import the example). Every piece
asserts on the generated mesh: non-manifold edges 0, loose verts 0,
loose edges 0, doubles at 1e-5 0, zero-area faces 0, n-gons 0, world
AABB min Z within 1e-4 of 0. Multi-body props do **not** require Euler
characteristic 2 — that is a single-shell contract. Pairs of parts
meant to touch assert a BVH surface gap below a named epsilon
(vert-vert is the wrong metric for thin straps and collars).
- **Exit codes** are file-local: `0` success, argparse `2`, `3` and above
in check order. `9` is legal. FATAL `sys.exit(1)` is a crash, never a
named check.
Expand Down
8 changes: 4 additions & 4 deletions showcase/gallery.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@
{
"name": "hitching-post",
"dir": "showcase/hitching-post",
"teaches": "A procedural hitching post through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.",
"witnessesFix": "Recomputed: 848 tris, two materials with 262 metal faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.460×0.194×1.260 m, LOD ratios in band (5.2 COLLAPSE more aggressive on LOD2), convex collider 144 tris, non-empty glTF. --skip-decimate exits 9 on the LOD1 ratio budget.",
"teaches": "A procedural hitching post (corner-aligned cap, stub-and-tenon arm, collar shoe, eye-threaded rings) through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.",
"witnessesFix": "Recomputed: 1598 tris, two materials with 269 wood and 532 metal faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.460×0.191×1.258 m, zmin 0, hygiene 0, wood-metal BVH gap 0.45 mm, LOD ratios in band, convex collider 78 tris, non-empty glTF. --skip-decimate exits 9 on LOD1; --lift-z exits 16 on grounded zmin.",
"hero": "docs/gallery/assets/hitching-post-hero.webp",
"preview": "showcase/hitching-post/preview.webp",
"tags": [
Expand Down Expand Up @@ -308,8 +308,8 @@
{
"name": "hay-bale",
"dir": "showcase/hay-bale",
"teaches": "A procedural bound hay bale with a bevelled loaf, end nap, and two sisal twine belts through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.",
"witnessesFix": "Recomputed: 252 tris, two materials with 66 hay and 60 twine faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.916×0.520×0.401 m, LOD ratios in band (5.2 COLLAPSE more aggressive), convex collider 68 tris, non-empty glTF. --skip-decimate exits 9 on the LOD1 ratio budget.",
"teaches": "A procedural bound hay bale with a cinched pillow loaf, end nap, and two sisal twine belts through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.",
"witnessesFix": "Recomputed: 852 tris, two materials with 294 hay and 132 twine faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.920×0.517×0.426 m, zmin 0, hygiene 0, hay-twine BVH gap 0.07 mm, LOD ratios in band, convex collider 78 tris, non-empty glTF. --skip-decimate exits 9 on LOD1; --lift-z exits 16 on grounded zmin.",
"hero": "docs/gallery/assets/hay-bale-hero.webp",
"preview": "showcase/hay-bale/preview.webp",
"tags": [
Expand Down
48 changes: 30 additions & 18 deletions showcase/hay-bale/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Hay bale

A showcase piece, not an example. Procedural bound straw bale (bevelled
loaf, end nap, two sisal twine belts) then the shipped pipeline:
unique-cell UVs, Cycles high-to-low normal bake, LOD chain, convex
collider, Unity glTF export.
A showcase piece, not an example. Procedural bound straw bale (cinched
pillow loaf, end nap, two square-torus sisal belts with hitch loops)
then the shipped pipeline: unique-cell UVs, Cycles high-to-low normal
bake, LOD chain, convex collider, Unity glTF export.

It asserts **budget conformance** of the generated result. It does not
witness an API contract. "It rendered without error" is not a check.
Expand All @@ -13,6 +13,11 @@ witness an API contract. "It rendered without error" is not a check.
`bake_normal_high_to_low.py`, `setup_bake_target_image.py`,
`lod_chain.py` / `decimate_to_budget.py`, `convex_hull_collider.py`,
`export_preset_unity.py` (helpers copied, not imported as a package).
Hygiene combinatorics match `examples/mesh-hygiene-audit` (copied, not
imported).

Intended size: 0.90 × 0.48 × 0.38 m core loaf; outer AABB includes
cinch bulge and belts.

## Budgets

Expand All @@ -21,34 +26,38 @@ materials, UVs, evaluated LOD, collider, or export file.

| Axis | Declared | Measured (4.5.11 / 5.1.2 / 5.2.1) |
| --- | --- | --- |
| Base triangles | 220–290 | 252 / 252 / 252 |
| LOD1 ratio | 0.32–0.62 of base | 0.5000 / 0.5000 / 0.4683 |
| LOD2 ratio | 0.10–0.35 of base | 0.2143 / 0.2143 / 0.1429 |
| Materials | exactly 2 distinct, ≥24 hay, ≥24 twine | 2 slots, 66 hay, 60 twine |
| Base triangles | 750–1100 | 852 / 852 / 852 |
| LOD1 ratio | 0.32–0.62 of base | 0.5000 / 0.5000 / 0.5000 |
| LOD2 ratio | 0.10–0.35 of base | 0.2183 / 0.2183 / 0.2183 |
| Materials | exactly 2 distinct, ≥24 hay, ≥24 twine | 2 slots, 294 hay, 132 twine |
| UVs | in `0..1`, AABB overlap ≤ 1e-5 | in range, overlap 0 |
| Outer AABB | (0.916, 0.520, 0.401) m ± 0.01 | (0.9160, 0.5200, 0.4010), zmin 0 |
| Collider tris | ≤ 120 | 68 |
| Export | written, size > 0 | 25944 / 25944 / 25936 bytes |
| Outer AABB | (0.920, 0.517, 0.426) m ± 0.01 | (0.9199, 0.5170, 0.4257) |
| Grounded zmin | within 1e-4 of 0 | 0 / 0 / 0 |
| Hygiene | loose/nonman/zero-area/doubles/ngons = 0 | 0 / 0 / 0 |
| Hay–twine gap | BVH surface < 0.008 m | 0.00007 / 0.00007 / 0.00007 |
| Collider tris | ≤ 400 | 78 |
| Export | written, size > 0 | 70720 / 70720 / 70712 bytes |

DECIMATE COLLAPSE triangle counts are **not** identical across series —
5.2.1 is more aggressive on both LOD ratios. The gate is a ratio band,
not an exact count. Bake pixels are stochastic; the gate is `has_data`
plus operator `FINISHED`, not byte-identity. Construction uses no RNG.
Export byte counts differ by 8 B on 5.2.1 (glTF serializer), not a
gated axis.
the gate is a ratio band, not an exact count. Bake pixels are
stochastic; the gate is `has_data` plus operator `FINISHED`, not
byte-identity. Construction uses no RNG. Export byte counts differ by
8 B on 5.2.1 (glTF serializer), not a gated axis.

`--skip-decimate` skips the LOD DECIMATE stage so LOD1 ratio is 1.0 and
exit 9 fires. That is the named budget the falsifier violates.
exit 9 fires. `--lift-z` raises the mesh 5 cm so the grounded-zmin
hygiene budget fails and exit 16 fires.

## Run

```bash
blender --background --python hay_bale.py --
blender --background --python hay_bale.py -- --skip-decimate
blender --background --python hay_bale.py -- --lift-z
blender --background --python hay_bale.py -- --output bale.png
```

Smoke does not pass `--output` or `--skip-decimate`.
Smoke does not pass `--output`, `--skip-decimate`, or `--lift-z`.

## Exit codes

Expand All @@ -72,3 +81,6 @@ File-local. `9` is a valid check code. `10` is reserved for
| 12 | Bake did not finish or image has no data |
| 13 | Export file missing or empty |
| 14 | `--output` produced no file |
| 15 | Hygiene: loose verts/edges, non-manifold, zero-area, doubles, or n-gons |
| 16 | Grounded zmin (`--lift-z` lands here) |
| 17 | Hay–twine BVH gap above 8 mm |
Loading
Loading