Skip to content

Commit 7356ecb

Browse files
TMHSDigitalclaude
andcommitted
fix(showcase): hay-bale visual quality pass with five new hygiene budgets
The inspection sheet found nine defects that every shipped budget passed. The belts were constant rectangles hung on a rounded, bulged loaf, so they stood proud at the middle of each face, were swallowed at the corners, and stopped 2.9-8.3 mm above the floor with a visible notch -- while the AABB zmin gate stayed green because the loaf grounded the box. The two belts were 5.4 mm out of step because the loaf's ridge term was odd in x. Nothing cinched: the waist measured 0.1 mm. All 426 faces were smooth-shaded, which erased every ridge and nap and left a bar of soap. Fixed structurally, not by nudging: - Build, bevel and ground the loaf FIRST, then raycast its finished cross-section per belt station and follow that profile at a named bite. Moving a belt now moves its seat with it. - Every closed-form shaping term is even in x (cos, not sin), so the two stations sample identical surface heights. - The cinch is derived from BELT_XS, and the ridge fades out under each belt because twine compresses straw flat where it bites. - Shading decided per part: flat loaf, smooth cord. - Straw detail moved to the high mesh, where the bake stage already exists to carry it onto the low mesh. Five budgets so none of it can come back, all recomputed from the generated mesh: cross-shell coplanar z-fight pairs (15), per-belt wrap zmin (16), shell count (17), banded per-station belt seat depth (18), belt mirror symmetry and cinch depth (19). Four new falsifiers, each landing on the budget it targets, proven on 4.5.11, 5.1.2 and 5.2.1: --stray-vert 15, --float-belts 16, --slack-belt 18, --skew-belt 19. --stray-vert parks its vertex inside the bale because above it the bbox budget fired first; --skew-belt shifts along X because a Z skew tripped the z-fight budget instead. Also deletes the temp glTF once its size is measured: Blender's TMPDIR resolves to the working directory on a portable build, so every run left a .glb in the repo root. Geometry is identical on all three binaries. The piece still reads as a wrapped parcel rather than straw at hero scale; that is recorded in the README as a material and bake problem, not a geometry one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
1 parent e2fb2fc commit 7356ecb

13 files changed

Lines changed: 1458 additions & 273 deletions

File tree

6.18 KB
Loading
48.2 KB
Loading

‎docs/gallery/gn-sdf-remesh/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ <h2>Source</h2>
401401
<span class="c"># EEVEE-id inversion witnessed for real: the OTHER era&#x27;s id must be</span>
402402
<span class="c"># rejected by this build, the helper&#x27;s accepted</span>
403403
eid = get_eevee_engine_id()
404-
wrong = <span class="s">&#x27;BLENDER_EEVEE_NEXT&#x27;</span> <span class="k">if</span> bpy.app.version &gt;= (<span class="n">5</span>, <span class="n">0</span>, <span class="n">0</span>) <span class="k">else</span> <span class="s">&#x27;BLENDER_EEVEE&#x27;</span>
404+
wrong = <span class="s">&#x27;BLENDER_EEVEE_NEXT&#x27;</span> <span class="k">if</span> bpy.app.version &gt;= (<span class="n">5</span>, <span class="n">0</span>, <span class="n">0</span>) <span class="k">else</span> <span class="s">&#x27;BLENDER_EEVEE&#x27;</span> <span class="c"># engine-id-exempt: the wrong-era id this example asserts is rejected</span>
405405
<span class="k">try</span>:
406406
bpy.context.scene.render.engine = wrong
407407
print(<span class="s">f&quot;</span><span class="s">ERROR: wrong-era EEVEE id &#x27;</span>{wrong}<span class="s">&#x27; was accepted</span><span class="s">&quot;</span>, file=sys.stderr); <span class="k">return</span> <span class="n">5</span>

‎docs/gallery/hay-bale/index.html‎

Lines changed: 660 additions & 113 deletions
Large diffs are not rendered by default.

‎docs/gallery/index.html‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,12 +1162,12 @@ <h2><a href="wooden-ladder/">wooden-ladder</a></h2>
11621162
</article>
11631163
<article class="card" data-tags="mesh export showcase">
11641164
<a class="card-media" href="hay-bale/" aria-label="hay-bale showcase piece detail page">
1165-
<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" />
1165+
<img src="assets/hay-bale-hero.webp" alt="hay-bale — A bound hay bale whose twine belts follow the loaf&#x27;s own raycast cross-section, asserting recomputed geometry budgets, not an API contract." loading="lazy" decoding="async" />
11661166
</a>
11671167
<div class="card-body">
11681168
<h2><a href="hay-bale/">hay-bale</a></h2>
1169-
<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>
1170-
<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>
1169+
<p class="teaches">A bound hay bale whose twine belts follow the loaf&#x27;s own raycast cross-section, asserting recomputed geometry budgets, not an API contract.</p>
1170+
<p class="witnesses"><span class="tag">witnesses</span> Recomputed: 2012 tris, two materials with 712 hay and 304 twine faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.921x0.530x0.409 m, zmin 0, hygiene and cross-shell z-fight 0, 5 shells, each belt wrapping under the loaf at zmin 2.6 mm, banded belt seat depth 4.0-16.8 mm over 20/20 stations on both belts, belt mirror error 0, cinch depth 14.2 mm, LOD ratios in band, convex collider 156 tris, non-empty glTF. --skip-decimate exits 9; --stray-vert 15; --lift-z and --float-belts 16; --slack-belt 18; --skew-belt 19.</p>
11711171
<a class="card-link" href="hay-bale/">View showcase piece <span aria-hidden="true">&rarr;</span></a>
11721172
</div>
11731173
</article>

‎docs/gallery/iron-cauldron/index.html‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,14 @@ <h2>Source</h2>
413413

414414

415415
<span class="k">def</span> eevee_engine_id():
416-
<span class="k">return</span> <span class="s">&quot;BLENDER_EEVEE_NEXT&quot;</span> <span class="k">if</span> bpy.app.version &gt;= (<span class="n">4</span>, <span class="n">2</span>, <span class="n">0</span>) <span class="k">else</span> <span class="s">&quot;BLENDER_EEVEE&quot;</span>
416+
<span class="s">&quot;&quot;&quot;EEVEE id: &#x27;BLENDER_EEVEE&#x27; on 5.0+, &#x27;BLENDER_EEVEE_NEXT&#x27; on 4.2-4.5.
417+
418+
Mapping matches examples/swatch-grid.get_eevee_engine_id, which asserts it
419+
against the running build (copied, not imported). Inherited the inverted
420+
form from showcase/shipping-crate; it returned &#x27;BLENDER_EEVEE_NEXT&#x27; on 5.x,
421+
where that id does not exist.
422+
&quot;&quot;&quot;</span>
423+
<span class="k">return</span> <span class="s">&quot;BLENDER_EEVEE&quot;</span> <span class="k">if</span> bpy.app.version &gt;= (<span class="n">5</span>, <span class="n">0</span>, <span class="n">0</span>) <span class="k">else</span> <span class="s">&quot;BLENDER_EEVEE_NEXT&quot;</span>
417424

418425

419426
<span class="k">def</span> fail(msg, code):

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,14 @@ <h2>Source</h2>
399399

400400

401401
<span class="k">def</span> eevee_engine_id():
402-
<span class="k">return</span> <span class="s">&quot;BLENDER_EEVEE_NEXT&quot;</span> <span class="k">if</span> bpy.app.version &gt;= (<span class="n">4</span>, <span class="n">2</span>, <span class="n">0</span>) <span class="k">else</span> <span class="s">&quot;BLENDER_EEVEE&quot;</span>
402+
<span class="s">&quot;&quot;&quot;EEVEE id: &#x27;BLENDER_EEVEE&#x27; on 5.0+, &#x27;BLENDER_EEVEE_NEXT&#x27; on 4.2-4.5.
403+
404+
Mapping matches examples/swatch-grid.get_eevee_engine_id, which asserts it
405+
against the running build (copied, not imported). The old form here keyed
406+
on &gt;= (4, 2, 0) and so returned &#x27;BLENDER_EEVEE_NEXT&#x27; on 5.x, where that id
407+
does not exist — the render path raised TypeError on 5.1 and 5.2.
408+
&quot;&quot;&quot;</span>
409+
<span class="k">return</span> <span class="s">&quot;BLENDER_EEVEE&quot;</span> <span class="k">if</span> bpy.app.version &gt;= (<span class="n">5</span>, <span class="n">0</span>, <span class="n">0</span>) <span class="k">else</span> <span class="s">&quot;BLENDER_EEVEE_NEXT&quot;</span>
403410

404411

405412
<span class="k">def</span> fail(msg, code):

‎docs/gallery/swatch-grid/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ <h2>Source</h2>
556556
<span class="c"># Cycles. Witness the inversion for real: the OTHER era&#x27;s id must be rejected</span>
557557
<span class="c"># by this build, and the helper&#x27;s id must be accepted.</span>
558558
eid = get_eevee_engine_id()
559-
wrong = <span class="s">&#x27;BLENDER_EEVEE_NEXT&#x27;</span> <span class="k">if</span> bpy.app.version &gt;= (<span class="n">5</span>, <span class="n">0</span>, <span class="n">0</span>) <span class="k">else</span> <span class="s">&#x27;BLENDER_EEVEE&#x27;</span>
559+
wrong = <span class="s">&#x27;BLENDER_EEVEE_NEXT&#x27;</span> <span class="k">if</span> bpy.app.version &gt;= (<span class="n">5</span>, <span class="n">0</span>, <span class="n">0</span>) <span class="k">else</span> <span class="s">&#x27;BLENDER_EEVEE&#x27;</span> <span class="c"># engine-id-exempt: the wrong-era id this example asserts is rejected</span>
560560
<span class="k">try</span>:
561561
sc.render.engine = wrong
562562
print(<span class="s">f&quot;</span><span class="s">ERROR: wrong-era EEVEE id &#x27;</span>{wrong}<span class="s">&#x27; was accepted by this build — </span><span class="s">&quot;</span>

‎docs/gallery/turntable/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ <h2>Source</h2>
420420
<span class="c"># the EEVEE-id mapping is asserted regardless of whether we render: the</span>
421421
<span class="c"># OTHER era&#x27;s id must be rejected by this build, the helper&#x27;s accepted</span>
422422
eid = get_eevee_engine_id()
423-
wrong = <span class="s">&#x27;BLENDER_EEVEE_NEXT&#x27;</span> <span class="k">if</span> bpy.app.version &gt;= (<span class="n">5</span>, <span class="n">0</span>, <span class="n">0</span>) <span class="k">else</span> <span class="s">&#x27;BLENDER_EEVEE&#x27;</span>
423+
wrong = <span class="s">&#x27;BLENDER_EEVEE_NEXT&#x27;</span> <span class="k">if</span> bpy.app.version &gt;= (<span class="n">5</span>, <span class="n">0</span>, <span class="n">0</span>) <span class="k">else</span> <span class="s">&#x27;BLENDER_EEVEE&#x27;</span> <span class="c"># engine-id-exempt: the wrong-era id this example asserts is rejected</span>
424424
<span class="k">try</span>:
425425
bpy.context.scene.render.engine = wrong
426426
print(<span class="s">f&quot;</span><span class="s">ERROR: wrong-era EEVEE id &#x27;</span>{wrong}<span class="s">&#x27; was accepted</span><span class="s">&quot;</span>, file=sys.stderr); <span class="k">return</span> <span class="n">5</span>

‎showcase/gallery.json‎

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,8 @@
308308
{
309309
"name": "hay-bale",
310310
"dir": "showcase/hay-bale",
311-
"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.",
312-
"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.",
311+
"teaches": "A bound hay bale whose twine belts follow the loaf's own raycast cross-section, asserting recomputed geometry budgets, not an API contract.",
312+
"witnessesFix": "Recomputed: 2012 tris, two materials with 712 hay and 304 twine faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.921x0.530x0.409 m, zmin 0, hygiene and cross-shell z-fight 0, 5 shells, each belt wrapping under the loaf at zmin 2.6 mm, banded belt seat depth 4.0-16.8 mm over 20/20 stations on both belts, belt mirror error 0, cinch depth 14.2 mm, LOD ratios in band, convex collider 156 tris, non-empty glTF. --skip-decimate exits 9; --stray-vert 15; --lift-z and --float-belts 16; --slack-belt 18; --skew-belt 19.",
313313
"hero": "docs/gallery/assets/hay-bale-hero.webp",
314314
"preview": "showcase/hay-bale/preview.webp",
315315
"tags": [
@@ -318,28 +318,28 @@
318318
]
319319
},
320320
{
321-
"name": "crate-stack",
322-
"dir": "showcase/crate-stack",
323-
"teaches": "A stack of three procedural shipping crates built by one generator called three times with a per-instance seed, carried through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.",
324-
"witnessesFix": "Recomputed: 4380 tris, two materials with 216 iron and 2436 timber faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.658×0.524×0.704 m, zmin 0, hygiene 0 including zero coplanar disjoint pairs, three ground runners at z=0, both crate-to-crate seats overlapping, each crate's own footprint 0.585×0.425 m measured in its own frame, yaw spread 0.026 rad and plank spread 2.05 mm across instances, LOD ratios in band, convex collider 202 tris, non-empty glTF. --float-stack exits 18 on the seat; --same-seed exits 20 on per-instance variation.",
325-
"hero": "docs/gallery/assets/crate-stack-hero.webp",
326-
"preview": "showcase/crate-stack/preview.webp",
327-
"tags": [
328-
"mesh",
329-
"export"
330-
]
321+
"name": "crate-stack",
322+
"dir": "showcase/crate-stack",
323+
"teaches": "A stack of three procedural shipping crates built by one generator called three times with a per-instance seed, carried through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.",
324+
"witnessesFix": "Recomputed: 4380 tris, two materials with 216 iron and 2436 timber faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.658×0.524×0.704 m, zmin 0, hygiene 0 including zero coplanar disjoint pairs, three ground runners at z=0, both crate-to-crate seats overlapping, each crate's own footprint 0.585×0.425 m measured in its own frame, yaw spread 0.026 rad and plank spread 2.05 mm across instances, LOD ratios in band, convex collider 202 tris, non-empty glTF. --float-stack exits 18 on the seat; --same-seed exits 20 on per-instance variation.",
325+
"hero": "docs/gallery/assets/crate-stack-hero.webp",
326+
"preview": "showcase/crate-stack/preview.webp",
327+
"tags": [
328+
"mesh",
329+
"export"
330+
]
331331
},
332332
{
333-
"name": "stone-archway",
334-
"dir": "showcase/stone-archway",
335-
"teaches": "A procedural masonry archway — coursed piers, projecting imposts, nine voussoirs and a proud keystone — carried through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.",
336-
"witnessesFix": "Recomputed: 924 tris, two materials with 182 dressed and 364 ashlar faces re-stamped after the chamfer, UVs in 0..1 with zero AABB overlap, outer AABB 1.644×0.510×2.057 m, clear opening 1.203 m, zmin 0, hygiene 0 including zero coplanar disjoint pairs, both piers grounded, the springing joint an overlap, all eight mortar joints at 9.70 mm inside the 6–17 mm band, and every intrados vertex within 0.97 mm of the declared 0.60 m radius over 178°. --off-circle exits 19 on the circle fit; --wide-mortar exits 18 on the joint band.",
337-
"hero": "docs/gallery/assets/stone-archway-hero.webp",
338-
"preview": "showcase/stone-archway/preview.webp",
339-
"tags": [
340-
"mesh",
341-
"export"
342-
]
333+
"name": "stone-archway",
334+
"dir": "showcase/stone-archway",
335+
"teaches": "A procedural masonry archway — coursed piers, projecting imposts, nine voussoirs and a proud keystone — carried through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.",
336+
"witnessesFix": "Recomputed: 924 tris, two materials with 182 dressed and 364 ashlar faces re-stamped after the chamfer, UVs in 0..1 with zero AABB overlap, outer AABB 1.644×0.510×2.057 m, clear opening 1.203 m, zmin 0, hygiene 0 including zero coplanar disjoint pairs, both piers grounded, the springing joint an overlap, all eight mortar joints at 9.70 mm inside the 6–17 mm band, and every intrados vertex within 0.97 mm of the declared 0.60 m radius over 178°. --off-circle exits 19 on the circle fit; --wide-mortar exits 18 on the joint band.",
337+
"hero": "docs/gallery/assets/stone-archway-hero.webp",
338+
"preview": "showcase/stone-archway/preview.webp",
339+
"tags": [
340+
"mesh",
341+
"export"
342+
]
343343
}
344344
]
345345
}

0 commit comments

Comments
 (0)