The prop library was costing players more than it was worth. hunyuan3d
hands back ~120,000 triangles and 1024px textures per object, so a
COOKING POT was a 4MB download — and the fryer bench, which loads a pot,
a basket and a rack, made a phone fetch 13MB before it could show you
anything. Right after shipping touch controls, that is the wrong bill.
scripts/optimise-models.sh: simplify to 10% of the triangles with a
0.002 error bound, textures to 512. Across 51 models that is 214MB →
47MB, and at the distance this game frames anything, the before and
after screenshots are indistinguishable — I checked the pot at full
frame before trusting it on the rest. The fryer bench now costs under
3MB.
The script skips anything already under the threshold, so a second run
cannot grind an optimised mesh into mush; delete the file and re-run
gen-assets.sh to go back to an original.
Regression sweep after: toast scene pristine, grill 9.4, pan 8.0, steak
9.4, bruschetta 9.6, air fryer 9.5, chips 10.0, pasta 10.0, eggs 10.0.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The bread slice is the whole game's canvas, so it's built first and properly:
- Field: a 128x128 scalar field with bilinear sample, a mass-conserving brush,
self-levelling relax, and the masked statistics the judge will read.
- Slice: extruded loaf silhouette (domed top), planar-projected UVs so the sim
grid lines up with the bread, per-texel silhouette mask, and four fields
(browning/dryness/spread/damage) packed into one RGBA8 texture per frame.
- Custom shader: browning ramp with blotchy char, crumb/crust/inclusions,
spread wetting + opacity + thickness relief, gloss, gouge exposure, and
flat data views for the judge screen.
- bread.ts / spreads.ts: the archetypes and the rheology the difficulty
curve will live in.
- scripts/gen-assets.sh: reproducible fixed-seed asset generation through
MODELBEAST (flux_local -> bg_remove_local -> hunyuan3d_mlx). All on-device.
Legibility work that mattered: butter rendered invisible at first. Fixes were
a gamma-style wetting darkening (a multiply *brightens* pale crumb), a normal
perturbation taken in UV units rather than raw texel deltas (~30x too small),
and pulling the lighting back under 1.0 so ACES stops desaturating yellow to
cream.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>