Skip to content

Commit a9f7840

Browse files
TMHSDigitalclaude
andcommitted
fix(showcase): crate-stack quality pass — chamfered one-shell iron, seated nails, grained planks
Adds two budgets: nail seat (exit 18, --float-nails) and zero right-angle edges (exit 21, --sharp-iron). The corner strap is now one L-section extrusion; two overlapping boxes put coplanar chamfer strips on every outer corner. The iron bevel pins material=METAL_IDX. Per-plank tone and grain direction ride as face attributes read by the wood shader. The temp glTF export is removed after it is measured. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
1 parent 026b568 commit a9f7840

7 files changed

Lines changed: 843 additions & 108 deletions

File tree

2.98 KB
Loading
1.51 KB
Loading

‎docs/gallery/crate-stack/index.html‎

Lines changed: 400 additions & 48 deletions
Large diffs are not rendered by default.

‎showcase/crate-stack/README.md‎

Lines changed: 63 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ then the shipped pipeline:
1414
| Shipped content | Used for |
1515
| --- | --- |
1616
| `skills/mesh-editing-and-bmesh` | box, bevel and UV construction in one `bmesh` |
17-
| `skills/procedural-materials-and-shaders` | two Principled materials with noise-driven wear |
17+
| `skills/procedural-materials-and-shaders` | attribute-driven timber (per-plank tone, grain along each board) and rusted iron |
1818
| `skills/bake-high-to-low` | Cycles tangent-space normal bake, high onto low |
1919
| `skills/engine-export-presets` | Unity glTF (`export_yup=True`) |
2020
| `skills/depsgraph-and-evaluated-data` | evaluated triangle counts for the LOD ratios |
@@ -49,28 +49,30 @@ for the 4.5.11 / 5.1.2 figures.
4949

5050
| Budget | Band | Measured |
5151
| --- | --- | --- |
52-
| Base triangles | 3200–7200 | 4380 |
52+
| Base triangles | 5200–7000 | 6060 |
5353
| LOD1 ratio | 0.32–0.62 | 0.5000 |
54-
| LOD2 ratio | 0.10–0.35 | 0.2005 (5.2) / 0.2199 (4.5, 5.1) |
54+
| LOD2 ratio | 0.10–0.35 | 0.2198 |
5555
| Material slots | exactly 2, distinct | 2 |
56-
| Iron faces | ≥ 120 | 216 |
57-
| Timber faces | ≥ 600 | 2436 |
58-
| UV bounds | inside 0..1 | (0.0008, 0.0008)–(0.9992, 0.9992) |
56+
| Iron faces | ≥ 900 | 1344 |
57+
| Timber faces | ≥ 1800 | 2418 |
58+
| UV bounds | inside 0..1 | (0.0006, 0.0007)–(0.9994, 0.9993) |
5959
| UV AABB overlap | ≤ 1e-5 | 0.000000 |
60-
| Outer AABB | 0.658 × 0.524 × 0.704 m ± 0.020 | 0.6582 × 0.5235 × 0.7040 |
61-
| Crate body footprint | 0.585 × 0.425 m ± 0.015, in the crate's own frame | 0.5846 × 0.4246 (all three) |
62-
| Collider triangles | ≤ 260 | 202 |
60+
| Outer AABB | 0.658 × 0.524 × 0.704 m ± 0.020 | 0.6583 × 0.5235 × 0.7040 |
61+
| Crate body footprint | 0.588 × 0.428 m ± 0.015, in the crate's own frame | 0.5882 × 0.4282 (all three) |
62+
| Collider triangles | ≤ 260 | 230 |
6363
| Normal bake | `{'FINISHED'}` with image data | `{'FINISHED'}`, `has_data=True` |
64-
| glTF export | file written, non-empty | ~340 kB |
64+
| glTF export | file written, non-empty | ~490 kB |
6565
| Hygiene | all zero | loose 0/0, non-manifold 0, zero-area 0, doubles 0, n-gons 0, coplanar disjoint pairs 0 |
6666
| Grounded AABB | \|zmin\| ≤ 1e-4 | 0.00000 |
6767
| Ground runners | 3 named supports, each zmin ≤ 1e-3 | 3 at 0.00000 |
6868
| Crate-to-crate seat | both seats, surface gap ≤ 0.0015 m | 0.00000 (overlapping) |
6969
| Yaw band | each \|yaw\| in 0.040–0.192 rad | 0.0681, 0.0943, 0.1093 |
7070
| Per-instance variation | yaw spread ≥ 0.020 rad, plank spread ≥ 0.0008 m | 0.0262 rad, 0.00205 m |
71+
| Nail seat | 48 nails; bite 0.3–1.0 mm into the strap, head ≥ 1.0 mm proud | 48; bite 0.60 mm, proud 1.80 mm |
72+
| Edge treatment | manifold edges within 5° of a right angle: 0 | timber 0, iron 0 |
7173

72-
Real-world size: each crate is 0.58 × 0.42 m at the timber and 0.585 × 0.425 m
73-
over the corner iron, 0.244 m tall including runners and lid. Three stacked
74+
Real-world size: each crate is 0.58 × 0.42 m at the timber and 0.588 × 0.428 m
75+
over the corner iron and its nail heads, 0.244 m tall including runners and lid. Three stacked
7476
come to 0.70 m — knee height, wider than tall.
7577

7678
### Why the footprint is measured in the crate's own frame
@@ -79,7 +81,7 @@ The stack AABB is the union of three yawed boxes, so a crate could drift to
7981
any size underneath it and the outer budget would not notice. Each crate's
8082
footprint is therefore measured after un-rotating by the yaw that crate was
8183
*measured* to have, not the yaw it was built with. All three land on
82-
0.5846 × 0.4246 m exactly, which is what makes the un-rotation trustworthy.
84+
0.5882 × 0.4282 m exactly, which is what makes the un-rotation trustworthy.
8385

8486
### Why parts are classified by principal axes
8587

@@ -98,18 +100,48 @@ shifted a crate, and the seat budget then compared a crate against itself.
98100
The bands are clustered from the runner heights the mesh actually has, so
99101
they follow the geometry including when a falsifier moves it.
100102

103+
### Why the corner iron is one shell
104+
105+
Each strap used to be two overlapping boxes, one per leg of the L. Both
106+
boxes had a vertical edge on the strap's outer corner, and once the iron
107+
was chamfered each box laid a chamfer strip on that same line: a coplanar
108+
cross-shell pair at all twelve corners, which the z-fight budget caught.
109+
The strap is now a single L-section extrusion — each cap two convex quads
110+
meeting on the inner-corner diagonal, so no n-gon — with one outer corner.
111+
The iron bevel passes `material=METAL_IDX`; left to its default, bevel
112+
gave the chamfer faces slot 0 and the plates rendered and classified as
113+
timber.
114+
115+
### Why nails are told from plates by the strap's size
116+
117+
Nail and plate shells are both iron; the nail audit separates them by
118+
world-AABB extent. The threshold is `IRON_WRAP * 0.5`, derived from the
119+
strap. A fixed 10 mm threshold dropped 8 of 48 nails as soon as the heads
120+
grew to 10 mm, because a yawed head's world AABB is wider than the head.
121+
122+
### Timber surface
123+
124+
`paint_planks` writes two face attributes: `PlankTone`, a seeded tone per
125+
shell, and `GrainDir`, the shell's own long axis recovered from its
126+
vertices. The wood shader samples noise in object space with the
127+
component along `GrainDir` compressed, so the grain streaks run along
128+
each board whatever the crate's yaw, and scales the colour by the plank's
129+
tone. Neither attribute is a budget: a tone cannot be seen by an
130+
assertion, which is why the inspection sheet looked at it.
131+
101132
## Determinism
102133

103134
Fixed seed 41; no unseeded randomness. Identical geometry across runs on one
104135
binary and across 4.5.11, 5.1.2 and 5.2.1 — every measured value above is
105-
byte-identical on the three **except** LOD2, where `DECIMATE COLLAPSE`
106-
produces 878 triangles on 5.2 and 934 on 4.5 and 5.1. That is why the LOD
107-
gate is a ratio band (0.10–0.35, measured 0.2005 and 0.2199) and not an exact
108-
count.
136+
byte-identical on the three. LOD2 used to differ — `DECIMATE COLLAPSE`
137+
produced 878 triangles on 5.2 and 934 on 4.5 and 5.1 on the earlier mesh —
138+
and on the current mesh lands on 1332 on all three. The LOD gate stays a
139+
ratio band (0.10–0.35) rather than an exact count, because that agreement
140+
is a property of this mesh, not of the modifier.
109141

110142
## Falsifiers
111143

112-
Each breaks one pipeline stage so a **named** budget fails. All six were run
144+
Each breaks one pipeline stage so a **named** budget fails. All eight were run
113145
on 4.5.11, 5.1.2 and 5.2.1 and produced the same exit code on all three.
114146

115147
| Flag | Breaks | Exit |
@@ -120,6 +152,8 @@ on 4.5.11, 5.1.2 and 5.2.1 and produced the same exit code on all three.
120152
| `--short-skids` | floats **one** of the three ground runners 12 mm; the other two still ground the AABB, so only the named-support budget sees it | 16 |
121153
| `--float-stack` | lifts the top crate 9 mm clear of the lid below, opening a 34 mm seat gap | 18 |
122154
| `--same-seed` | gives all three crates the same design seed; yaw spread and plank spread both go to 0 | 20 |
155+
| `--float-nails` | lifts every nail head 1.5 mm along its plate normal; bite goes to −0.90 mm, nail seat budget | 18 |
156+
| `--sharp-iron` | skips the iron chamfer pass; 216 right-angle iron edges, edge-treatment budget | 21 |
123157

124158
## Exit codes
125159

@@ -145,9 +179,10 @@ against it. `1` is the FATAL wrapper — a crash, never a named check.
145179
| 14 | `--output` produced no file |
146180
| 15 | Mesh hygiene (`--stray-vert`) |
147181
| 16 | Grounded zmin, or a named ground runner floating (`--lift-z`, `--short-skids`) |
148-
| 18 | Crate-to-crate seat gap (`--float-stack`) |
182+
| 18 | Crate-to-crate seat gap (`--float-stack`), or a nail head off its strap seat band (`--float-nails`) |
149183
| 19 | Crate body footprint off declared size |
150184
| 20 | Per-instance variation collapsed (`--same-seed`) |
185+
| 21 | A manifold edge within 5° of a right angle: a chamfer pass skipped (`--sharp-iron`) |
151186

152187
`17` is unused here: this piece has no diagonal member. `15`–`19` are
153188
reserved across showcase pieces for the hygiene family, so the numbering
@@ -156,7 +191,7 @@ skips rather than reuses.
156191
## Run it
157192

158193
```bash
159-
# Budget check, no render. ~1.0 s on 4.5/5.1, ~1.2 s on 5.2.
194+
# Budget check, no render. ~1.4-1.7 s on 4.5 / 5.1 / 5.2.
160195
blender --background --python crate_stack.py --
161196

162197
# Falsifier: the three crates become copies. Must exit 20.
@@ -175,11 +210,13 @@ Smoke runs the check-only path. It does not pass `--output` or any falsifier.
175210

176211
| Value | 4.5.11 | 5.1.2 | 5.2.1 |
177212
| --- | --- | --- | --- |
178-
| Base triangles | 4380 | 4380 | 4380 |
179-
| LOD1 tris / ratio | 2190 / 0.5000 | 2190 / 0.5000 | 2190 / 0.5000 |
180-
| LOD2 tris / ratio | 934 / 0.2199 | 934 / 0.2199 | 878 / 0.2005 |
181-
| Outer AABB | 0.6582 × 0.5235 × 0.7040 | same | same |
182-
| Collider tris | 202 | 202 | 202 |
213+
| Base triangles | 6060 | 6060 | 6060 |
214+
| LOD1 tris / ratio | 3030 / 0.5000 | 3030 / 0.5000 | 3030 / 0.5000 |
215+
| LOD2 tris / ratio | 1332 / 0.2198 | 1332 / 0.2198 | 1332 / 0.2198 |
216+
| Outer AABB | 0.6583 × 0.5235 × 0.7040 | same | same |
217+
| Collider tris | 230 | 230 | 230 |
183218
| Yaws (rad) | 0.0943, −0.1093, 0.0681 | same | same |
184219
| Seat gap | 0.00000 | 0.00000 | 0.00000 |
185-
| Check wall-clock | ~0.99 s | ~1.01 s | ~1.20 s |
220+
| Nails / bite / proud | 48 / 0.60 mm / 1.80 mm | same | same |
221+
| Right-angle edges | 0 | 0 | 0 |
222+
| Check wall-clock | ~1.59 s | ~1.41 s | ~1.65 s |

0 commit comments

Comments
 (0)