Skip to content

Commit 506200d

Browse files
TMHSDigitalclaude
andcommitted
fix(showcase): turn the grindstone crank to camera and fill its trough
The hero showed the grindstone from the plain side, with the crank behind the stone and the trough empty. The piece now turns 180 degrees about Z, so the crank and handle face the camera, and the camera sits closer (fill y 0.83 from a far three-quarter view). Render-only dressing: water stands in the trough 12 mm under the rim, parented to the piece. The stone, 28 mm under the rim, runs 16 mm under water, and the stone material darkens and glosses in a band that fades out 45 mm above the water line. Neither is part of the asset: no budget reads them, the export does not carry them, and the asset sheet renders the grindstone dry. The key and a warmer wedge were relit. Geometry and every budget are unchanged (1668 tris). Evidence (live runs, local .scratch binaries): - Blender 5.2.1 LTS: default exits 0 (base 1668, LOD 0.5000 / 0.2194). --output passes framing: fill y 0.833, margins l 0.338 r 0.269 b 0.083 t 0.083. - 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, --flush-shoes 15, --lift-z 16, --short-legs 16, --float-crank 17, --float-legs 17, --no-dip 18, --narrow-trough 18, --low-stretchers 18, --sharp-handle 20, --low-bake 21, all as documented. - Contact sheet: luma 0.268, stage 0.249, warmth +0.218, sat 0.145. - Asset sheet (docs/gallery/asset-sheets/grindstone.webp): on a par with the well and the wheelbarrow; 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 4756b5d commit 506200d

8 files changed

Lines changed: 100 additions & 9 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Budget-conformance props. Not examples. Conventions: [`showcase/README.md`](show
125125
<a href="showcase/anvil/"><img src="showcase/anvil/preview.webp" width="24%" alt="Anvil: a forged-steel London-pattern anvil with a hammer-polished face on a hooped timber stump, a hammer at its foot" /></a>
126126
<a href="showcase/water-trough/"><img src="showcase/water-trough/preview.webp" width="24%" alt="Water trough: a watertight wooden trough with plank ends, rippled water, rust-streaked iron straps and trestle legs on a dark studio floor" /></a>
127127
<a href="showcase/hitching-post/"><img src="showcase/hitching-post/preview.webp" width="24%" alt="Hitching post: a square timber post with a pyramidal cap, a cross-arm on two knee braces with iron end caps, iron bands wrapped around it, two hitching rings and a nailed horseshoe on a dark studio floor" /></a>
128-
<a href="showcase/grindstone/"><img src="showcase/grindstone/preview.webp" width="24%" alt="Grindstone: a stone wheel on a timber A-frame with an iron axle, hubs, crank, and tray on a dark studio floor" /></a>
128+
<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>
131131
<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>
56.1 KB
Loading
7.42 KB
Loading
4.62 KB
Loading

‎showcase/gallery.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221
"name": "grindstone",
222222
"dir": "showcase/grindstone",
223223
"teaches": "A procedural grindstone on a timber trestle through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.",
224-
"alt": "A sandstone grindstone wheel with an iron crank, turning in a chamfered timber A-frame over an open trough, its sills capped by iron shoes.",
224+
"alt": "A sandstone grindstone wheel dipping into a water-filled trough, turning in a chamfered timber A-frame with its iron crank toward the viewer, the sills capped by iron shoes.",
225225
"witnessesFix": "Recomputed: 1668 tris, three materials with 400 wood / 240 stone / 364 metal faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.722×0.419×0.610 m, zmin 0, hygiene 0 including zero coplanar cross-shell pairs, four shoes planted, trough seated in the sills and biting both stretchers 4 mm, stone dip 24 mm, no unchamfered right-angle edge, 29.44 bake texels per UV cell, LOD ratios in band, convex collider 304 tris, non-empty glTF. --skip-decimate exits 9 on LOD1; --stray-vert / --flush-shoes exit 15 on hygiene; --lift-z / --short-legs exit 16 on grounded; --float-crank / --float-legs exit 17 on joint fit; --no-dip / --narrow-trough / --low-stretchers exit 18 on seat; --sharp-handle exits 20 on edge treatment; --low-bake exits 21 on texel density.",
226226
"hero": "docs/gallery/assets/grindstone-hero.webp",
227227
"preview": "showcase/grindstone/preview.webp",

‎showcase/grindstone/README.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ is chamfered. The stone is 48 smooth segments with hard chamfer rings, in
1515
a mottled sandstone material. Stated size is a 0.50 m × 0.095 m stone in a
1616
0.72 × 0.42 × 0.61 m frame.
1717

18+
The hero turns the crank toward the camera, since the crank is the part that
19+
says the wheel is turned by hand, and fills the trough. The water is
20+
render-only dressing parented to the piece, set 12 mm under the rim, so the
21+
stone (28 mm under the rim) runs 16 mm under water; the stone darkens and
22+
glosses in a band that fades out 45 mm above the water line. Neither the
23+
water nor the wet band is part of the asset: no budget reads them, the export
24+
does not carry them, and the asset sheet renders the grindstone dry.
25+
1826
It asserts **budget conformance** of the generated result. It does not
1927
witness an API contract. "It rendered without error" is not a check.
2028

‎showcase/grindstone/grindstone.py‎

Lines changed: 90 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,6 +1635,86 @@ def wire_normal(mat, tex):
16351635
nt.links.new(nrm.outputs["Normal"], bsdf.inputs["Normal"])
16361636

16371637

1638+
WATER_BELOW_RIM = 0.012 # render-only water line, below the trough rim
1639+
1640+
1641+
def add_trough_water(low):
1642+
"""Render-only dressing: water standing in the trough, parented to the
1643+
piece so it turns with it. Not part of the asset (no budget, no export).
1644+
1645+
The line sits WATER_BELOW_RIM under the rim, so the stone, whose bottom
1646+
is DIP under the rim, runs DIP - WATER_BELOW_RIM (16 mm) under water:
1647+
a grindstone turns wet or it burns the edge.
1648+
"""
1649+
inner_l = TROUGH_L - 2.0 * TROUGH_WALL - 0.002
1650+
inner_w = TROUGH_W - 2.0 * TROUGH_WALL - 0.002
1651+
z = TROUGH_Z0 + TROUGH_H - WATER_BELOW_RIM
1652+
me = bpy.data.meshes.new("TroughWater")
1653+
bm = bmesh.new()
1654+
try:
1655+
bmesh.ops.create_grid(bm, x_segments=24, y_segments=12, size=0.5)
1656+
for v in bm.verts:
1657+
v.co = Vector((v.co.x * inner_l, v.co.y * inner_w, z))
1658+
bm.to_mesh(me)
1659+
finally:
1660+
bm.free()
1661+
mat = bpy.data.materials.new("TroughWater")
1662+
mat.use_nodes = True
1663+
nt = mat.node_tree
1664+
b = nt.nodes["Principled BSDF"]
1665+
b.inputs["Base Color"].default_value = (0.020, 0.030, 0.028, 1.0)
1666+
b.inputs["Roughness"].default_value = 0.04
1667+
# a slow ripple so the key breaks into glints rather than one flat sheet
1668+
wave = nt.nodes.new("ShaderNodeTexNoise")
1669+
wave.inputs["Scale"].default_value = 28.0
1670+
wave.inputs["Detail"].default_value = 3.0
1671+
bump = nt.nodes.new("ShaderNodeBump")
1672+
bump.inputs["Strength"].default_value = 0.35
1673+
bump.inputs["Distance"].default_value = 0.002
1674+
nt.links.new(wave.outputs["Fac"], bump.inputs["Height"])
1675+
nt.links.new(bump.outputs["Normal"], b.inputs["Normal"])
1676+
me.materials.append(mat)
1677+
ob = bpy.data.objects.new("TroughWater", me)
1678+
bpy.context.scene.collection.objects.link(ob)
1679+
ob.parent = low
1680+
return ob
1681+
1682+
1683+
def wet_stone_band(low):
1684+
"""Render-only: the stone darkens and glosses where it runs through the
1685+
water, fading out WET_WICK above the water line (it wicks up)."""
1686+
stone = next((m for m in low.data.materials if m and m.name.startswith("GrindstoneStone")),
1687+
None)
1688+
if stone is None:
1689+
return
1690+
wet_wick = 0.045
1691+
z_water = TROUGH_Z0 + TROUGH_H - WATER_BELOW_RIM
1692+
nt = stone.node_tree
1693+
bsdf = nt.nodes["Principled BSDF"]
1694+
coord = nt.nodes.new("ShaderNodeTexCoord")
1695+
sep = nt.nodes.new("ShaderNodeSeparateXYZ")
1696+
nt.links.new(coord.outputs["Object"], sep.inputs["Vector"])
1697+
wet = nt.nodes.new("ShaderNodeMapRange")
1698+
wet.inputs["From Min"].default_value = z_water + wet_wick
1699+
wet.inputs["From Max"].default_value = z_water
1700+
nt.links.new(sep.outputs["Z"], wet.inputs["Value"])
1701+
col_link = bsdf.inputs["Base Color"].links[0]
1702+
darken = nt.nodes.new("ShaderNodeMix")
1703+
darken.data_type = "RGBA"
1704+
darken.blend_type = "MULTIPLY"
1705+
nt.links.new(wet.outputs["Result"], _sock(darken.inputs, "Factor_Float"))
1706+
nt.links.new(col_link.from_socket, _sock(darken.inputs, "A_Color"))
1707+
_sock(darken.inputs, "B_Color").default_value = (0.52, 0.50, 0.48, 1.0)
1708+
nt.links.new(_sock(darken.outputs, "Result_Color"), bsdf.inputs["Base Color"])
1709+
r_link = bsdf.inputs["Roughness"].links[0]
1710+
gloss = nt.nodes.new("ShaderNodeMix")
1711+
gloss.data_type = "FLOAT"
1712+
nt.links.new(wet.outputs["Result"], _sock(gloss.inputs, "Factor_Float"))
1713+
nt.links.new(r_link.from_socket, _sock(gloss.inputs, "A_Float"))
1714+
_sock(gloss.inputs, "B_Float").default_value = 0.30
1715+
nt.links.new(_sock(gloss.outputs, "Result_Float"), bsdf.inputs["Roughness"])
1716+
1717+
16381718
def render_still(low, hero_mat, tex, path, engine):
16391719
scene = bpy.context.scene
16401720
wire_normal(hero_mat, tex)
@@ -1643,8 +1723,11 @@ def render_still(low, hero_mat, tex, path, engine):
16431723
ob.hide_render = True
16441724
ob.hide_viewport = True
16451725

1646-
low.rotation_euler.z = math.radians(-22.0)
1726+
# crank toward the camera: it is the part that says "turned by hand"
1727+
low.rotation_euler.z = math.radians(158.0)
16471728
low.rotation_euler.x = math.radians(0.0)
1729+
water = add_trough_water(low)
1730+
wet_stone_band(low)
16481731

16491732
floor_me = bpy.data.meshes.new("Floor")
16501733
bm = bmesh.new()
@@ -1683,17 +1766,17 @@ def light(name, loc, energy, size, col, rot):
16831766
ob.rotation_euler = tuple(math.radians(a) for a in rot)
16841767
scene.collection.objects.link(ob)
16851768

1686-
light("Key", (-3.6, -5.0, 5.4), 660.0, 4.0, (1.0, 0.94, 0.86), (50, 0, -36))
1687-
light("Fill", (5.0, -3.4, 2.4), 46.0, 8.0, (0.72, 0.82, 1.0), (62, 0, 50))
1688-
light("Wedge", (2.2, 4.0, 3.8), 600.0, 5.5, (1.0, 0.70, 0.40), (-70, 0, 198))
1769+
light("Key", (-3.2, -4.4, 5.0), 940.0, 3.6, (1.0, 0.93, 0.84), (50, 0, -36))
1770+
light("Fill", (5.0, -3.4, 2.4), 60.0, 8.0, (0.72, 0.82, 1.0), (62, 0, 50))
1771+
light("Wedge", (1.6, 3.2, 3.2), 820.0, 5.0, (1.0, 0.66, 0.36), (-66, 0, 200))
16891772

16901773
cam_data = bpy.data.cameras.new("Cam")
16911774
cam_data.lens = 50.0
16921775
cam = bpy.data.objects.new("Cam", cam_data)
1693-
cam.location = (1.55, -1.95, 0.92)
1776+
cam.location = (1.30, -1.73, 0.90)
16941777
scene.collection.objects.link(cam)
16951778
aim = bpy.data.objects.new("Aim", None)
1696-
aim.location = (0.0, 0.0, 0.32)
1779+
aim.location = (0.0, 0.0, 0.235)
16971780
scene.collection.objects.link(aim)
16981781
con = cam.constraints.new("TRACK_TO")
16991782
con.target = aim
@@ -1721,7 +1804,7 @@ def light(name, loc, energy, size, col, rot):
17211804
scene.view_settings.view_transform = "Standard"
17221805

17231806
fcode = gallery_framing.check_framing(
1724-
scene, cam, hero=[low], elements=[low], stage=[floor, wall],
1807+
scene, cam, hero=[low], elements=[low, water], stage=[floor, wall],
17251808
)
17261809
if fcode:
17271810
return fcode

‎showcase/grindstone/preview.webp‎

6.59 KB
Loading

0 commit comments

Comments
 (0)