Skip to content

Commit 3faf37a

Browse files
docs: add material face-floor convention and refresh showcase gallery
Adds the material face-floor convention to the showcase README: every declared material asserts a named minimum polygon count recomputed from polygon.material_index, which catches the slot-assignment wipe class (materials.clear() resets material_index to 0 on some versions while the slot count still passes). Slot assignment must be index-preserving. Refreshes the stone-well and cart witness strings in showcase/gallery.json for the quality-pass numbers and regenerates docs/gallery. The regeneration also picks up iron-cauldron detail-page drift whose README landed without a gallery rebuild. Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent a9b38a2 commit 3faf37a

4 files changed

Lines changed: 12 additions & 5 deletions

File tree

docs/gallery/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ <h2><a href="shipping-crate/">shipping-crate</a></h2>
903903
<div class="card-body">
904904
<h2><a href="stone-well/">stone-well</a></h2>
905905
<p class="teaches">A procedural stone well through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.</p>
906-
<p class="witnesses"><span class="tag">witnesses</span> Recomputed: 8388 tris, three materials, UVs in 0..1 with zero AABB overlap, outer AABB 1.640×1.640×1.688 m, LOD ratios in band, convex collider 230 tris, non-empty glTF. --skip-decimate exits 9 on the LOD1 ratio budget.</p>
906+
<p class="witnesses"><span class="tag">witnesses</span> Recomputed: 9380 tris, three materials with face floors, UVs in 0..1 with zero AABB overlap, outer AABB 1.640×1.640×1.761 m, LOD ratios in band, convex collider 306 tris, hygiene zero (loose, non-manifold, doubles, n-gons), grounded zmin, non-empty glTF. --skip-decimate exits 9 on the LOD1 ratio budget; --lift-z exits 16 on the grounded budget.</p>
907907
<a class="card-link" href="stone-well/">View example <span aria-hidden="true">&rarr;</span></a>
908908
</div>
909909
</article>
@@ -1002,7 +1002,7 @@ <h2><a href="watchtower/">watchtower</a></h2>
10021002
<div class="card-body">
10031003
<h2><a href="cart/">cart</a></h2>
10041004
<p class="teaches">A procedural two-wheel wooden cart through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.</p>
1005-
<p class="witnesses"><span class="tag">witnesses</span> Recomputed: 2572 tris, two materials with 100 metal faces, UVs in 0..1 with zero AABB overlap, outer AABB 1.547×0.749×0.656 m, LOD ratios in band, convex collider 306 tris, non-empty glTF. --skip-decimate exits 9 on the LOD1 ratio budget.</p>
1005+
<p class="witnesses"><span class="tag">witnesses</span> Recomputed: 2600 tris, two materials with metal and wood face floors, UVs in 0..1 with zero AABB overlap, outer AABB 1.539×0.749×0.640 m, LOD ratios in band, convex collider 122 tris, hygiene zero (loose, non-manifold, doubles, n-gons), grounded zmin, non-empty glTF. --skip-decimate exits 9 on the LOD1 ratio budget; --lift-z exits 16 on the grounded budget.</p>
10061006
<a class="card-link" href="cart/">View example <span aria-hidden="true">&rarr;</span></a>
10071007
</div>
10081008
</article>

docs/gallery/iron-cauldron/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ <h1>iron-cauldron</h1>
265265
<h2>Budgets</h2>
266266
<p>Declared as named constants; every gate <strong>recomputes</strong> from the mesh, materials, UVs, evaluated LOD, collider, or export file.</p>
267267
<p>| Axis | Declared | Measured (4.5.11 / 5.1.2 / 5.2.1) | | --- | --- | --- | | Base triangles | 3280–3520 | 3388 / 3388 / 3388 | | LOD1 ratio | 0.32–0.62 of base | 0.5000 / 0.5000 / 0.5000 | | LOD2 ratio | 0.10–0.35 of base | 0.2196 / 0.2196 / 0.2172 | | Materials | exactly 2 distinct, ≥12 wood, ≥24 metal | 2 slots, 450 wood, 1198 metal | | UVs | in <code>0..1</code>, AABB overlap ≤ 1e-5 | in range, overlap 0 | | Outer AABB | (1.013, 0.986, 0.827) m ± 0.01 | (1.0128, 0.9865, 0.8271), zmin 0.002 | | Pot–leg clearance | ≥ 0.04 m (recomputed vs pole axes) | 0.0513 / 0.0513 / 0.0513 | | Collider tris | ≤ 200 | 98 | | Export | written, size &gt; 0 | 245060 / 245060 / 245044 bytes |</p>
268-
<p>DECIMATE COLLAPSE triangle counts are <strong>not</strong> identical across series — 5.2.1 is 4 tris leaner on LOD2. The gate is a ratio band, not an exact count. Bake pixels are stochastic; the gate is <code>has_data</code> plus operator <code>FINISHED</code>, not byte-identity. Construction uses no RNG. Export byte counts differ by 12 B on 5.2.1 (glTF serializer), not a gated axis.</p>
268+
<p>DECIMATE COLLAPSE triangle counts are <strong>not</strong> identical across series — 5.2.1 is 8 tris leaner on LOD2. The gate is a ratio band, not an exact count. Bake pixels are stochastic; the gate is <code>has_data</code> plus operator <code>FINISHED</code>, not byte-identity. Construction uses no RNG. Export byte counts differ by 16 B on 5.2.1 (glTF serializer), not a gated axis. The pot–leg clearance is recomputed from shell verts vs the three pole axes; clipping exits 3.</p>
269269
<p><code>--skip-decimate</code> skips the LOD DECIMATE stage so LOD1 ratio is 1.0 and exit 9 fires. That is the named budget the falsifier violates.</p>
270270
<h2>Run</h2>
271271
<pre><code>blender --background --python iron_cauldron.py --

showcase/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ entry in `showcase/gallery.json`, and a rendered still.
4343
characteristic 2 — that is a single-shell contract. Pairs of parts
4444
meant to touch assert a BVH surface gap below a named epsilon
4545
(vert-vert is the wrong metric for thin straps and collars).
46+
- **Material face floors.** Every declared material asserts a named
47+
minimum face count on the finished mesh, recomputed from
48+
`polygon.material_index`. This catches the slot-assignment wipe class:
49+
`obj.data.materials.clear()` resets every polygon's `material_index`
50+
to 0 on some versions, which renders the piece single-material while
51+
the slot count still passes. Assign slots by index-preserving
52+
append/replace, never clear-and-rebuild.
4653
- **Exit codes** are file-local: `0` success, argparse `2`, `3` and above
4754
in check order. `9` is legal. FATAL `sys.exit(1)` is a crash, never a
4855
named check.

showcase/gallery.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"name": "stone-well",
2222
"dir": "showcase/stone-well",
2323
"teaches": "A procedural stone well through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.",
24-
"witnessesFix": "Recomputed: 8388 tris, three materials, UVs in 0..1 with zero AABB overlap, outer AABB 1.640×1.640×1.688 m, LOD ratios in band, convex collider 230 tris, non-empty glTF. --skip-decimate exits 9 on the LOD1 ratio budget.",
24+
"witnessesFix": "Recomputed: 9380 tris, three materials with face floors, UVs in 0..1 with zero AABB overlap, outer AABB 1.640×1.640×1.761 m, LOD ratios in band, convex collider 306 tris, hygiene zero (loose, non-manifold, doubles, n-gons), grounded zmin, non-empty glTF. --skip-decimate exits 9 on the LOD1 ratio budget; --lift-z exits 16 on the grounded budget.",
2525
"hero": "docs/gallery/assets/stone-well-hero.webp",
2626
"preview": "showcase/stone-well/preview.webp",
2727
"tags": [
@@ -129,7 +129,7 @@
129129
"name": "cart",
130130
"dir": "showcase/cart",
131131
"teaches": "A procedural two-wheel wooden cart through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.",
132-
"witnessesFix": "Recomputed: 2572 tris, two materials with 100 metal faces, UVs in 0..1 with zero AABB overlap, outer AABB 1.547×0.749×0.656 m, LOD ratios in band, convex collider 306 tris, non-empty glTF. --skip-decimate exits 9 on the LOD1 ratio budget.",
132+
"witnessesFix": "Recomputed: 2600 tris, two materials with metal and wood face floors, UVs in 0..1 with zero AABB overlap, outer AABB 1.539×0.749×0.640 m, LOD ratios in band, convex collider 122 tris, hygiene zero (loose, non-manifold, doubles, n-gons), grounded zmin, non-empty glTF. --skip-decimate exits 9 on the LOD1 ratio budget; --lift-z exits 16 on the grounded budget.",
133133
"hero": "docs/gallery/assets/cart-hero.webp",
134134
"preview": "showcase/cart/preview.webp",
135135
"tags": [

0 commit comments

Comments
 (0)