Commit graph

2 commits

Author SHA1 Message Date
CRT
74068b13f5 Enforce "nothing floats", and rebuild the barrel from a reference photo
Two rules were missing, and each one had been quietly failing for a while.

The first is structural. Every check in this repo asked about surfaces --
winding, coplanarity, triangle counts -- and none of them could see a piece
of a model hanging in the air with nothing holding it up. A chest lid
separated from its chest passed everything we had. scripts/support.ts
voxelises the model, finds the connected components of occupied space and
requires each one to reach the floor; scripts/audit.ts runs that across
default, min, max, both sweep ends, actions and the midpoint of a morph, so
a variation cannot break what the default gets right. That audit started at
22 failing cases: the bell and the sign had no supporting structure at all
and now have a frame and a post, the lantern was in four pieces, the sack's
collar floated above its body, the basket's fruit hung level with the rim
instead of resting on the base, and the ladder's rungs were sized by a
formula that disagreed with where the rails actually were. It now reports 0.

The second is that we had no target. The feedback loop was an offline
render of our own output, which can only answer "is this broken", never
"is this right". Given a reference photograph of a cask, five defects were
obvious in seconds that three rounds of self-review had missed: four hoops
where there should be six, no rivets at all, a chime cut so shallow it did
not read, and a stave count low enough to leave a visibly polygonal
silhouette. All four are fixed here.

Two things the rivets taught us, both kept as comments rather than as
scars: a stud that tapers outward tilts its side normals back towards the
axis, which the radial check correctly reports as reversed winding -- a
real rivet head flares, so the honest shape is also the passing one. And
once seated deep enough to look right, the stud's buried inner cap falls
inside the shell the check inspects, so it is not generated at all, exactly
as bandGeometry already declines to build the inside of a hoop.

27 models, 16973 triangles, all checks pass, 0 floating cases.
2026-08-21 12:23:11 +00:00
CRT
5070b2eda2 Add a recordable cinematic showcase, with real vertex morphing
A hands-off tour of the whole kit, built to be screen-free: it hides the
UI, drives every slider, fires the action on the models that have one and
holds a caption with the registry address. 30 / 60 / 90 s, also startable
from the URL (viewer.html?showcase=60) so an unattended recording is
possible. "Record to file" captures the canvas via MediaRecorder and
downloads a WebM instead of asking anyone to screen-record.

Three things came out of watching the first run:

- The parameter sweep was choppy. It was throttling `configure()` to
  ~14 Hz, which is a full rebuild — geometry, occlusion bake, mottle —
  and at that rate it reads as the model freezing and jumping. Replaced
  with actual morphing (src/morph.ts): both ends of a beat are built
  once, their vertex buffers captured, and every frame blends between
  them. Measured: 21 consecutive samples now give 21 distinct vertex
  positions where before they stepped. The constraint is that integer
  parameters must hold still within a beat, since they change the
  triangle count; they change at the cuts instead.

- The bottom of models was being cropped. Two causes. The framing margin
  was 1.32× the bounding sphere and the chase rate was slow, so a sweep
  that grew the model outran the camera. And, more seriously,
  `Box3.setFromObject` reuses `geometry.boundingBox` once it exists — the
  morph was writing new positions without invalidating it, so the camera
  was re-fitting against the shape the model had before the sweep began.
  Margin is now 1.55, the chase is twice as fast, the bounds are dropped
  on every blend, and the look-at point sits slightly below centre so the
  model rides higher in frame.

- It felt rushed. Part of that was pacing, part was the cut: the dip to
  black ran 0.22 s at each end, so a 2.2 s beat spent a fifth of itself
  dimmed. Cut to 0.13 s, and 90 s added as the unhurried length.
2026-08-21 07:47:41 +00:00