Skip to content

Commit af7a90c

Browse files
TMHSDigitalclaude
andcommitted
fix(showcase): set the chopping-block hero to work with split billets and chips
The hero showed the block alone on an empty floor. Render-only dressing now lays three split billets at its foot: each is a quarter of a small round, laid on one split face or the other so some show bark and some the split. Sixteen seeded chips lie among them. The dressing has its own materials, because the block's sample its baked normal map through UVs the dressing does not have. It is not part of the asset: no budget reads it, the export does not carry it, and the asset sheet renders the block alone. The key and wedge were eased (900 to 760 and 700 W), since the first contact sheet read brighter than the calibration set. Geometry and every budget are unchanged (1800 tris). Evidence (live runs, local .scratch binaries): - Blender 5.2.1 LTS: default exits 0 (base 1800, LOD 0.5000 / 0.2200). --output passes framing: fill y 0.794, margins l 0.263 r 0.344 b 0.022 t 0.061. - Blender 4.5.11 LTS: default and --output exit 0, same counts, framing ok. - tests/check_falsifier_targets.py --run on both versions: --skip-decimate 9, --stray-vert 15, --lift-z 16, --fat-haft 17, --round-band 18, --float-rivets 18, --round-haft 19, all as documented. - Contact sheet: luma 0.270, stage 0.264, warmth +0.173, sat 0.137. - Asset sheet (docs/gallery/asset-sheets/chopping-block.webp): a small, simple object, but its rings, hoop, rivets and axe read as designed; not the least-designed object in the lineup. 5.1.2 was not run. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent 506200d commit af7a90c

8 files changed

Lines changed: 109 additions & 6 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Budget-conformance props. Not examples. Conventions: [`showcase/README.md`](show
128128
<a href="showcase/grindstone/"><img src="showcase/grindstone/preview.webp" width="24%" alt="Grindstone: a sandstone wheel dipping into a water-filled trough on a timber A-frame, with iron axle, hubs and a crank turned toward the viewer, on a dark studio floor" /></a>
129129
<a href="showcase/hand-pump/"><img src="showcase/hand-pump/preview.webp" width="24%" alt="Hand pump: a green-enamelled cast-iron village pump on a stepped wooden plinth with a spout and handle on a dark studio floor" /></a>
130130
<a href="showcase/signpost/"><img src="showcase/signpost/preview.webp" width="24%" alt="Signpost: a timber crossroads post with three painted fingerboards lettered MILLBROOK 2, OAKHAM 5 and FORD 1, iron straps, and a pyramidal cap on a dark studio floor" /></a>
131-
<a href="showcase/chopping-block/"><img src="showcase/chopping-block/preview.webp" width="24%" alt="Chopping block: a bark-sided log round with growth rings and drying checks on its sawn top, a riveted iron hoop, and a felling axe buried in the top, on a dark studio floor" /></a>
131+
<a href="showcase/chopping-block/"><img src="showcase/chopping-block/preview.webp" width="24%" alt="Chopping block: a bark-sided log round with growth rings and drying checks on its sawn top, a riveted iron hoop, a felling axe buried in the top, and split billets and chips at its foot, on a dark studio floor" /></a>
132132
<a href="showcase/wooden-bucket/"><img src="showcase/wooden-bucket/preview.webp" width="24%" alt="Wooden bucket: a coopered pail with a three-strand rope bail through iron ear rings and chord-lofted iron hoops on a dark studio floor" /></a>
133133
<a href="showcase/wall-torch/"><img src="showcase/wall-torch/preview.webp" width="24%" alt="Wall torch: a dressed stone plaque with an iron plate and arm holding a cup, a leaning wooden torch with a pitch-wrapped head and a bright flame, on a dark studio floor" /></a>
134134
<a href="showcase/tavern-stool/"><img src="showcase/tavern-stool/preview.webp" width="24%" alt="Tavern stool: a dished round wooden seat holding a pewter tankard, on turned splayed legs with stretchers at two heights and iron ferrules on flat treads, on a dark studio floor" /></a>
52.3 KB
Loading
3.4 KB
Loading
7.97 KB
Loading

‎showcase/chopping-block/README.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ bit with its chamfers modelled into the section profile, and the haft is
1414
swept through the eye rather than pushed into it. The haft is oval,
1515
bows away from the bit, and hooks toward it at the knob.
1616

17+
The hero sets the block to work: three split billets lie at its foot, each a
18+
quarter of a small round laid on one split face or the other so some show
19+
bark and some the split, among sixteen seeded chips. The dressing is
20+
render-only with its own materials (the block's materials sample its baked
21+
normal map through UVs the dressing does not have). It is not part of the
22+
asset: no budget reads it, the export does not carry it, and the asset sheet
23+
renders the block alone.
24+
1725
It asserts **budget conformance** of the generated result. It does not
1826
witness an API contract. "It rendered without error" is not a check.
1927

‎showcase/chopping-block/chopping_block.py‎

Lines changed: 99 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import argparse
3737
import math
3838
import os
39+
import random
3940
import sys
4041
import tempfile
4142
import traceback
@@ -1790,6 +1791,99 @@ def wire_normal(mat, tex):
17901791
nt.links.new(nrm.outputs["Normal"], target)
17911792

17921793

1794+
def _dressing_materials():
1795+
"""Split face and bark for the render-only kindling and chips. Their own
1796+
materials: the block's are wired to its baked normal map through UVs the
1797+
dressing does not have."""
1798+
def mat(name, base, rough, stripes):
1799+
m = bpy.data.materials.new(name)
1800+
m.use_nodes = True
1801+
nt = m.node_tree
1802+
b = nt.nodes["Principled BSDF"]
1803+
b.inputs["Roughness"].default_value = rough
1804+
coord = nt.nodes.new("ShaderNodeTexCoord")
1805+
wave = nt.nodes.new("ShaderNodeTexWave")
1806+
wave.wave_type = "BANDS"
1807+
wave.bands_direction = "Z" if stripes else "X"
1808+
wave.inputs["Scale"].default_value = 6.0 if stripes else 2.0
1809+
wave.inputs["Distortion"].default_value = 6.0
1810+
wave.inputs["Detail"].default_value = 3.0
1811+
nt.links.new(coord.outputs["Object"], wave.inputs["Vector"])
1812+
ramp = nt.nodes.new("ShaderNodeValToRGB")
1813+
ramp.color_ramp.elements[0].color = tuple(c * 0.72 for c in base) + (1.0,)
1814+
ramp.color_ramp.elements[1].color = base + (1.0,)
1815+
nt.links.new(wave.outputs["Fac"], ramp.inputs["Fac"])
1816+
nt.links.new(ramp.outputs["Color"], b.inputs["Base Color"])
1817+
return m
1818+
split = mat("KindlingSplit", (0.62, 0.46, 0.28), 0.72, True)
1819+
bark = mat("KindlingBark", (0.16, 0.11, 0.075), 0.9, False)
1820+
return split, bark
1821+
1822+
1823+
def add_split_kindling(scene):
1824+
"""Render-only dressing: split billets and chips at the block's foot.
1825+
1826+
A chopping block is read by what it splits. Each billet is a quarter of
1827+
a small round (two split faces meeting at the pith, bark on the arc),
1828+
laid on the floor; chips are thin seeded slivers. None of it is part of
1829+
the asset: no budget reads it, the export does not carry it, and the
1830+
asset sheet renders the block alone.
1831+
"""
1832+
split, bark = _dressing_materials()
1833+
rng = random.Random(71)
1834+
me = bpy.data.meshes.new("Kindling")
1835+
me.materials.append(split)
1836+
me.materials.append(bark)
1837+
bm = bmesh.new()
1838+
try:
1839+
def billet(cx, cy, yaw, r, length, roll):
1840+
segs = 6
1841+
rings = []
1842+
for end in (-0.5, 0.5):
1843+
ring = [Vector((end * length, 0.0, 0.0))]
1844+
for k in range(segs + 1):
1845+
a = (math.pi / 2.0) * k / segs
1846+
ring.append(Vector((end * length, r * math.cos(a), r * math.sin(a))))
1847+
rings.append(ring)
1848+
rot = Matrix.Rotation(yaw, 3, "Z") @ Matrix.Rotation(roll, 3, "X")
1849+
vs = [[bm.verts.new(rot @ p + Vector((cx, cy, 0.0))) for p in ring] for ring in rings]
1850+
a, b = vs
1851+
n = len(a)
1852+
for k in range(n):
1853+
j = (k + 1) % n
1854+
f = bm.faces.new((a[k], a[j], b[j], b[k]))
1855+
# faces between arc vertices carry bark; the two through the
1856+
# pith are split faces
1857+
f.material_index = 1 if (k >= 1 and j >= 2) else 0
1858+
bm.faces.new(list(reversed(a))).material_index = 0
1859+
bm.faces.new(b).material_index = 0
1860+
1861+
# three billets beside the foot, two left and one right;
1862+
# roll 0 or +90 degrees lays a billet on one split face or the other, so\n # some show their bark and some their split face
1863+
billet(-0.45, -0.02, math.radians(62.0), 0.088, 0.31, 0.0)
1864+
billet(-0.43, -0.19, math.radians(38.0), 0.080, 0.28, math.radians(90.0))
1865+
billet(0.42, -0.12, math.radians(118.0), 0.084, 0.29, math.radians(90.0))
1866+
for i in range(16):
1867+
ang = rng.uniform(math.radians(200.0), math.radians(340.0))
1868+
d = rng.uniform(0.31, 0.42)
1869+
cx, cy = d * math.cos(ang), d * math.sin(ang)
1870+
sx, sy, sz = rng.uniform(0.020, 0.045), rng.uniform(0.008, 0.018), 0.003
1871+
geo = bmesh.ops.create_cube(bm, size=1.0)
1872+
rot = Matrix.Rotation(rng.uniform(0.0, math.pi), 3, "Z")
1873+
for v in geo["verts"]:
1874+
v.co = rot @ Vector((v.co.x * sx, v.co.y * sy, v.co.z * sz + sz / 2.0)) \
1875+
+ Vector((cx, cy, 0.0))
1876+
for f in {f for v in geo["verts"] for f in v.link_faces}:
1877+
f.material_index = 0
1878+
bmesh.ops.recalc_face_normals(bm, faces=bm.faces)
1879+
bm.to_mesh(me)
1880+
finally:
1881+
bm.free()
1882+
ob = bpy.data.objects.new("Kindling", me)
1883+
scene.collection.objects.link(ob)
1884+
return ob
1885+
1886+
17931887
def render_still(low, wood, tex, path, engine):
17941888
scene = bpy.context.scene
17951889
wire_normal(wood, tex)
@@ -1802,6 +1896,7 @@ def render_still(low, wood, tex, path, engine):
18021896
# vector or the axe reads as a dark blob seen down its own length; the
18031897
# haft then falls across frame as a diagonal instead of a vertical stick.
18041898
low.rotation_euler.z = math.radians(2.0)
1899+
kindling = add_split_kindling(scene)
18051900

18061901
floor_me = bpy.data.meshes.new("Floor")
18071902
bm = bmesh.new()
@@ -1841,17 +1936,17 @@ def light(name, loc, energy, size, col, rot):
18411936
ob.rotation_euler = tuple(math.radians(a) for a in rot)
18421937
scene.collection.objects.link(ob)
18431938

1844-
light("Key", (-3.1, -4.3, 4.6), 900.0, 3.4, (1.0, 0.94, 0.86), (46, 0, -36))
1939+
light("Key", (-3.1, -4.3, 4.6), 760.0, 3.4, (1.0, 0.94, 0.86), (46, 0, -36))
18451940
light("Fill", (5.0, -3.4, 2.4), 60.0, 8.0, (0.72, 0.82, 1.0), (62, 0, 50))
1846-
light("Wedge", (2.35, 2.5, 1.55), 900.0, 2.4, (1.0, 0.68, 0.38), (-64, 0, 218))
1941+
light("Wedge", (2.35, 2.5, 1.55), 700.0, 2.4, (1.0, 0.68, 0.38), (-64, 0, 218))
18471942

18481943
cam_data = bpy.data.cameras.new("Cam")
18491944
cam_data.lens = 50.0
18501945
cam = bpy.data.objects.new("Cam", cam_data)
18511946
cam.location = (1.72, -2.34, 1.96)
18521947
scene.collection.objects.link(cam)
18531948
aim = bpy.data.objects.new("Aim", None)
1854-
aim.location = (0.0, 0.0, 0.42)
1949+
aim.location = (0.0, 0.0, 0.40)
18551950
scene.collection.objects.link(aim)
18561951
con = cam.constraints.new("TRACK_TO")
18571952
con.target = aim
@@ -1879,7 +1974,7 @@ def light(name, loc, energy, size, col, rot):
18791974
scene.view_settings.view_transform = "Standard"
18801975

18811976
fcode = gallery_framing.check_framing(
1882-
scene, cam, hero=[low], elements=[low], stage=[floor, wall],
1977+
scene, cam, hero=[low], elements=[low, kindling], stage=[floor, wall],
18831978
)
18841979
if fcode:
18851980
return fcode
2.88 KB
Loading

‎showcase/gallery.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@
260260
"name": "chopping-block",
261261
"dir": "showcase/chopping-block",
262262
"teaches": "A procedural log-round chopping block with a riveted iron hoop and a felling axe buried in the sawn face, through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.",
263-
"alt": "A log-round chopping block bound with an iron hoop, an axe buried in its top.",
263+
"alt": "A log-round chopping block bound with a riveted iron hoop, a felling axe buried in its ringed top, split billets and wood chips scattered at its foot.",
264264
"witnessesFix": "Recomputed: 1800 tris, four materials with 180 bark / 216 grain / 404 metal / 176 haft faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.526 x 0.526 x 1.006 m, LOD ratios in band, convex collider 538 tris, non-empty glTF. Hygiene: zero non-manifold edges, loose geometry, doubles, zero-area faces, n-gons and coplanar disjoint face pairs, grounded at zmin 0, log plumb to 1e-7, oval haft 1.35 wide-to-thick. Joint fit: six shells, 18.0 mm haft clearance in the eye, 78.7 mm bit bury, hoop biting 3.7-4.2 mm into the log on every segment, two lap rivets seated 1.50 and 1.54 mm. --fat-haft exits 17 on eye clearance; --round-band and --float-rivets exit 18 on their seats; --round-haft exits 19 on the haft section.",
265265
"hero": "docs/gallery/assets/chopping-block-hero.webp",
266266
"preview": "showcase/chopping-block/preview.webp",

0 commit comments

Comments
 (0)