Repository navigation
feat: quality wave — reworked assets, textured sheets, per-asset materials, budget bands - #62
Conversation
…rials, budget bands Library: - contact sheets show trim-sheet base colour, alpha-cut cards and glass - trim-sheet custom rows are per asset (sheetFor); glow renders in heroes - per-asset hero camera; triangle bands from the playbooks with a ratchet - model bodies take extra bone chains (dragon wings flap); creature kind: density control, plantigrade heel, topline hump, 8-sided far legs - tree far LOD from the crown's own cards; cityBlock LOD gating; terrain no longer bands; Blender isolate gains contact (wolf_hybrid D253 closed) - test isolation for recipe-defined materials; queue test flake Recipes: every committed asset reworked (wear, materials, far LOD, triangle counts) and re-judged by an independent reviewer. Criteria below 8: 416 -> 352; two assets pass on all seven; over-band baseline 44 -> 10. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Fix failing CI on #62
Queued — waiting for a free box. |
The recipes gate refuses an import that reaches into another asset folder. Moved: texture paint kit (creature), tree clumps/bark/trunk/leaf-cards/wear, terrain ground, armour field finish. No output bytes change. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
🟡 Reviewed60 actionable comment(s) · 2 refuted by verification · 30 suppressed (anti-noise) · grounded on your code |
| sheets.set(key, s); | ||
| s.catch(() => sheets.delete(key)); |
There was a problem hiding this comment.
major · performance Every visited asset/LOD/size retains its resolved sheet buffers in this module-global map indefinitely, so browsing the gallery accumulates tens of megabytes per sheet even after models are disposed. Bound the cache by bytes or evict sheets when their viewer ownership ends.
| const a = find(m.indices[t] ?? 0); | ||
| for (const k of [1, 2]) { | ||
| const b = find(m.indices[t + k] ?? 0); | ||
| if (a !== b) parent[Math.max(a, b)] = Math.min(a, b); |
There was a problem hiding this comment.
major · bug For a triangle ordered [2, 1, 0], pieces first links 2 to 1, then overwrites that link with 0, leaving one triangle split across components; withinBox can consequently retain triangles with dropped vertices and emit index 4294967295. Recompute the first vertex's root before each union and test reversed triangle ordering.
| if (grew || !written) await writeSheet(args.out, sheetWith([...shared.values()], recipe)); | ||
| written = true; | ||
| return { external: true, prefix: '../trim_sheet' }; |
There was a problem hiding this comment.
major · bug Building rock and then snake in separate runs into the same output directory overwrites the shared row-4 texture still referenced by rock's GLBs, changing rock's material without rebuilding it. Use asset-local external sheets or persist and validate ownership of shared rows across runs.
| (org[2] ?? 0) + Math.floor(i / (nx * ny)) * o.cell, | ||
| ]; | ||
| // Depth under the skin per cell: 0 = not asked yet, < 0 = outside. | ||
| const depth = new Float32Array(nx * ny * nz); |
There was a problem hiding this comment.
major · performance Tracing a metre-long diagonal limb with cell: 0.001 allocates over a billion grid entries, then cost and back arrays at lines 119–120 bring storage above 16 GB even for a thin limb. Cap the grid size with a coded error or store visited cells sparsely before allocating these arrays.
| const d = depthOf(j); | ||
| if (d <= 0) continue; | ||
| const next = c + (Math.hypot(dx, dy, dz) * o.cell) / (d * d); |
There was a problem hiding this comment.
major · bug Two disconnected solids separated by less than one grid step can be joined because the search checks only the destination cell, not the segment between cells. Reject edges that cross the mesh boundary and add a narrow-gap regression test.
| triangles) and still reads stringy at the temples; the skin is one roughness (the shared skin | ||
| mesher puts it on the `plain` strip and takes no finish); the braid is a 4 mm-cell cord, lumpy up |
There was a problem hiding this comment.
minor · docs The plain-strip/no-finish skin limitation here and in recipes/goblin_head/README.md:77–78 contradicts both build.ts files, which enable pores and finish: 'skin'. Update both limitations to describe the configured pore strip and skin finish rather than directing readers toward an already implemented change.
| | 0 | one Catmull–Clark level over the base | cap at 3.8 mm + cards | | ||
| | 1 | the base topology | cap at 5 mm + a quarter of the cards, twice as wide | | ||
| | 2 | the painted, AO-baked base mesh QEM-simplified to 5.2k triangles (a CC0 base mesh, so ADR 011 allows it): ears, colour zones and the clean bust edge survive | the cap alone at 12 mm | | ||
|
|
||
| ## Materials | ||
| Skin sits on the shared `face_skin` strip (`recipes/_lib/face/skin-strip.ts`: pores, glossier | ||
| crowns, its own roughness) under the `skin` finish (a soft grazing sheen); the sculpted cap takes | ||
| the `hair` finish (anisotropic highlights); corneas a clearcoat. Tone is vertex colour: flush |
There was a problem hiding this comment.
minor · docs The LOD table promises base topology, 5.2k far skin and cap-only far hair, and the materials section promises a hair finish; base-lod.ts instead targets 26k/5.6k/1k, cardHair emits far cards, and face_demo.ts declares no hair finish. Update the table's skin counts, hair cells (7.5/12/17 mm), far cards and finish description.
| const hr = Math.max(rAt(z - 0.022), rAt(z + 0.022)) - 0.001; | ||
| const ring: Vec2[] = | ||
| lod === 2 | ||
| ? [ | ||
| [hr + 0.004, z - 0.022], | ||
| [hr + 0.004, z + 0.022], |
There was a problem hiding this comment.
minor · bug At LOD2, hoop radii use the smooth sine profile rather than the three-segment body: with the demo dimensions, the lower hoop's upper edge has radius ≈0.2765 m while the body there is ≈0.2713 m, leaving the hoop floating. Interpolate the emitted side profile at the hoop edges and seat the bands against it.
| | shirt | `canvas` | linen, sleeves out of the armholes, zigzag and sleeve folds, grime at neck and placket, old stains | | ||
| | vest | `leather` | sleeveless 9 mm hide, rolled edges rubbed pale, shoulder seam, sweat-dark under the arms and down the back, two sewn patches | | ||
| | hood | `canvas` | wool roll behind the neck, U folds, road dust on top | | ||
| | scarf | `canvas` | three flat wraps (sun-faded outer fold), a flat knot, two ragged tails muddy at the ends | | ||
| | `toggle` (own part, LOD0) | `plain` | a horn toggle on a thong across the vest's opening | |
There was a problem hiding this comment.
minor · docs The material table names canvas for the shirt, hood and scarf, and lines 77–78 claim plain skin with no finish, but clothes.ts uses LINEN/WOOL and build.ts enables pores plus the skin finish. Update both sections to the materials actually emitted so material edits target the correct strips.
| | 0 | ≈ 83k (budget 86k) | head 4.6 mm (eyes ×4, ears ×2 finer), garment layers 5–8.5 mm | | ||
| | 1 | ≈ 21k (24k) | head 7.5 mm, layers 8–13 mm, a quarter of the hair cards | | ||
| | 2 | ≈ 3.6k (4k) | one coarse head; the ears as tapered blades the 16 mm cell can hold (`farEars`); every garment layer in ONE sculpt on `canvas` with flat colour blocks (`far`); the crown wisps and ear tufts as a few wide cards | |
There was a problem hiding this comment.
minor · docs The LOD table lists budgets of 86k/24k/4k and head cells of 4.6/7.5/16 mm, but the recipe declares 58k/14.5k/2.7k and 6/10/21 mm. Replace the outdated table and correct line 86's four-layer LOD2 justification: outfitLayers merges those garments into one far sculpt. Also at recipes/human_head/README.md:70, recipes/elf_head/README.md:57.
There was a problem hiding this comment.
Review summary — 491 file(s), 60 finding(s).
Critical 0 · Major 7 · Minor 53 · Nit 0
Adds per-asset material tracking, sheet caching and gallery consumers. Mixed prebuilt/in-build meshes can silently receive the wrong material, and gallery sheet retention grows substantially with browsing; the snapshot helper also contradicts its documented contract.
| File | Findings |
|---|---|
apps/site/src/compile.ts |
1 major |
examples/blender/tasks/steps/test_limbs.py |
1 minor |
recipes/_lib/bust/layers.test.ts |
1 minor |
recipes/_lib/creature/wild-paint.ts |
1 minor |
recipes/_lib/creature/wild-parts.ts |
1 major |
recipes/_lib/terrain/ground.ts |
1 minor |
recipes/amur_tiger/README.md |
1 minor |
recipes/amur_tiger/amur_tiger.ts |
1 minor |
recipes/asteroid/asteroid.ts |
1 minor |
recipes/bear_hybrid/bear_hybrid.test.ts |
1 minor |
recipes/bluefin_tuna/fins.ts |
1 minor |
recipes/brown_bear/README.md |
2 minor |
recipes/city_block/README.md |
1 minor |
recipes/city_block/block.ts |
1 minor |
recipes/dragon/field.ts |
1 minor |
recipes/dragon/pose.ts |
1 minor |
recipes/dragon_hybrid/dragon_hybrid.test.ts |
1 minor |
recipes/elf_head/README.md |
3 minor |
recipes/face_demo/README.md |
1 minor |
recipes/finish_demo/props.ts |
1 minor |
recipes/goblin_head/README.md |
2 minor |
recipes/great_white/great_white.test.ts |
1 minor |
recipes/human_head/README.md |
1 minor |
recipes/import_demo/README.md |
1 minor |
recipes/joint_demo/sword.ts |
1 minor |
recipes/mountain_range/mountain_range.ts |
1 minor |
recipes/pine/pine.ts |
2 minor |
recipes/roadster_v10/README.md |
1 minor |
recipes/roadster_v10/wheels/tyre.ts |
1 minor |
recipes/rts_barracks/site.ts |
1 minor |
recipes/rts_barracks/walls.ts |
1 minor |
recipes/rts_resource/rts_resource.ts |
2 minor |
recipes/signal_gantry/signal_gantry.ts |
2 minor |
recipes/tiger_1/tiger_1.ts |
1 minor |
recipes/wolf/README.md |
1 minor |
scripts/budget-bands.test.ts |
2 minor |
src/cli/run-sheets.test.ts |
1 minor |
src/cli/run-sheets.ts |
1 major |
src/cli/run.test.ts |
1 minor |
src/kinds/city-facade.ts |
1 minor |
src/kinds/creature-feet.ts |
1 minor |
src/kinds/model-extra-trace.ts |
2 major, 1 minor |
src/kinds/vegetation-impostor.ts |
1 minor |
src/material/asset-sheet.ts |
2 major |
src/material/define.ts |
3 minor |
src/qa/skin-sides.ts |
1 minor |
src/render/beauty-glow.test.ts |
1 minor |
- 152 noise file(s) auto-skipped (lockfiles/generated/vendored — re-include with path_filters)
- 540 binary file(s) skipped (images, fonts, archives — no text diff)
- some test files were not shown to the reviewer — they were read at the reviewed commit, but did not fit the tests section; the least-changed ones were left out
| it('carries its fights: a notch bitten from the first dorsal, copepods clinging to it', () => { | ||
| expect(dorsalNotch(0.56)).toBeGreaterThan(0.3); | ||
| expect(dorsalNotch(0.2)).toBeLessThan(0.01); | ||
| const seats = dorsalCopepods(); | ||
| expect(seats.length).toBeGreaterThan(4); | ||
| const fin = mesh('dorsal_fin'); | ||
| expect(triangleCount(fin)).toBeGreaterThan(triangleCount(dorsalFin(0))); | ||
| expect(copepods(2, seats)).toEqual([]); |
There was a problem hiding this comment.
minor · test Removing the notch deformation from dorsalFin still passes this test: it checks dorsalNotch directly, while the triangle-count assertion only detects added copepods. Assert the generated trailing-edge positions near span 0.56 against the unnotched profile.
| `head`, `bust` (split at the neck seam under the collar; LOD2 unsplit), `eye_l` / `eye_r` (yawed | ||
| to converge 1.5 m ahead, `cornea` clearcoat finish), `brooch`, `plinth`, `hair` (one cut-out draw). | ||
| `head`, `bust` (split at the neck seam under the collar; LOD2 unsplit), `clothes` (shirt, tunic, | ||
| braid, cord), `mantle` (finish `wool`: sheen over the weave), `eye_l` / `eye_r` (yawed to converge |
There was a problem hiding this comment.
minor · docs The material guide names a wool finish here and at line 62, while lines 85–86 say skin takes no finish, contradicting human_head.ts and HUMAN_BUST.finish. Update these sections to describe the dedicated cloth strips without a wool finish and the pore skin with its skin sheen finish.
| | albedo → vertex colour, UVs → `plain` strip | `projectAlbedo`, `onSheet` | one skin material on the trim sheet | | ||
| | LODs | `simplify` (QEM) | head 12 000 / 4 000 / 1 200 triangles | | ||
| | albedo → vertex colour, UVs → the shared `face_skin` pore strip | `projectAlbedo`, `onSkin` (`recipes/_lib/face/skin-strip.ts`) | one skin material on the trim sheet, pores in its normal map, a `skin` sheen finish | | ||
| | LODs | `simplify` (QEM) | head 12 000 / 4 000 / 1 800 triangles (the far head keeps its eye sockets) | |
There was a problem hiding this comment.
minor · docs The LOD guide promises a 1,800-triangle far head, but source.ts now sets HEAD_TRIS[2] to 680, misleading readers about the demo's retained detail. Change the table to the current target and reassess the eye-socket claim against that LOD.
| b.quad(a, c, e, d); | ||
| } | ||
| } | ||
| return b.build(); |
There was a problem hiding this comment.
minor · bug The new blade ends in a finite ring (0.8 mm wide at t = 1), but facets() emits only side quads, leaving an open hole at the sword tip at every LOD. Cap the final ring or collapse it to a single tip vertex, and test that the tip has no boundary edges.
| // LOD (hydraulic droplets, thermal 45° cap, needle clamp), erosion faded out at the cut so the | ||
| // tile's boundary is the raw field (neighbour tiles of the same field meet flush). |
There was a problem hiding this comment.
minor · docs The header promises raw-field boundaries and flush neighbouring tiles, but tileField() erodes the padded grid and crops it without fading erosion, as the README's measured edge mismatches confirm. Replace this claim with the actual per-tile erosion contract and its seam limitation.
| defined.set(id, def); | ||
| seen.set(id, def); |
There was a problem hiding this comment.
minor · performance Every new material ID is retained in seen even after resetMaterials(), so long-lived workers reloading recipes accumulate definitions and their painter/graph closures indefinitely. Remove the unused history map or give it a bounded lifetime tied to active snapshots.
| * Remember what is defined now; the returned function puts that back, plus every material defined | ||
| * since (a recipe module imported while the test file ran defines its materials once, at import, | ||
| * and is never evaluated again). For tests that call `resetMaterials()`: without this, a later | ||
| * test in the process that compiles such a recipe fails with T3D_MATERIAL_UNKNOWN (D334). |
There was a problem hiding this comment.
minor · docs The helper promises to restore materials defined after the snapshot, but its closure restores only saved and deletes all later definitions via resetMaterials(). Either implement that preservation with a regression test or document that only definitions present at snapshot time survive.
| const saved = [...defined.values()]; | ||
| return () => { | ||
| resetMaterials(); | ||
| // One material that cannot come back (its texture provider is gone) must not cost the rest. | ||
| const lost: unknown[] = []; | ||
| for (const def of saved) { |
There was a problem hiding this comment.
minor · bug A material registered after materialSnapshot() is deleted by restore(), contrary to its promised preservation of late-imported recipe materials, because only saved is replayed and seen is never read. Preserve the intended later definitions and add a snapshot → register → reset → restore regression test.
| message: `T3D_SKIN_CROSSED part '${p.name}': ${count} vertices ${raised ? 'above' : 'below'} ${below.toFixed(3)} m (the ${limb} joint 2) carry weight of both ${limb}_l and ${limb}_r (first: vertex ${first}); those paws move with both legs`, | ||
| fix: `give each ${limb} paw its own leg only below the wrist/hock: a Blender 'weights' step (kind 'scale', value 0) on the other side's ${limb} bones in a box round each paw, or keep the paws further apart before bind`, |
There was a problem hiding this comment.
minor · docs For raised wings, the finding identifies crossed weights above the wrist but its fix still instructs the author to change weights only below it, leaving the reported vertices untouched. Make the fix's direction conditional on raised, matching the detection and message.
| const sum = (a: CompiledAsset): number => | ||
| renderPath(a, { width: 48, height: 48, spp: 32, azDeg: 90, elDeg: 5 }).linear.reduce( | ||
| (s, v) => s + v, | ||
| 0, | ||
| ); | ||
| expect(sum(scene(true))).toBeGreaterThan(sum(scene(false)) * 1.05); |
There was a problem hiding this comment.
minor · test Summing the entire image includes the visible glowing core, so this test can pass when emission brightens only the source and never illuminates the wall. Measure pixels on the wall alone, or hide the emitter from camera rays while keeping it visible to bounce rays.
|
CI is green as of 7d33638 (the failure was recipes importing modules from other recipe folders; those modules now live in 🤖 Generated with Claude Code |
…gallery model tier - 58 of 60 review findings fixed with tests; one (module-level meshes carry no material provenance) recorded as open - king_cobra: resting coil for idle_ground, a planted rear, the coil no longer floats above the floor - gallery: bear_hybrid opens on its model outputs - shared modules moved earlier stay in recipes/_lib; outputs re-rendered and re-judged for every changed asset Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Review handled in 2d096e6: 58 of the 60 findings are fixed, each with a test where it was a bug (catalogue rows D340–D396). Two are not code changes: 🤖 Generated with Claude Code |
A quality pass over every committed asset, plus the library changes that pass needed. Each defect has a row in
docs/architecture/defect-catalogue.md(D297–D338).Result, stated plainly
Every
critique.jsonwas re-judged from fresh renders by a reviewer other than the recipe's author.ranger,pbr_showcase)The set is not at the pass mark. Wear, materials on code-built organics, and some far LODs remain the weak criteria; each low score carries a specific fix in its critique. The critique gate stays warn-only until 2027-01-15.
Library
sheetFor). Breaking forcheckSheetForand a barepaintTrimSheetonce two materials share a row.glowparts emit; glass no longer shadows its contents; a recipe can set its own hero camera.Budget why:line excuses one.dragon_hybrid's wings flap.wolf_hybridpassesdeformwith no tolerance (D253 closed) through a newcontactblend in the Blenderisolatestep.cityBlockLOD gating; terrain without banding.Recipes
roadster_v10909k → 155k triangles,hydra348k → 210k,weather_demo95k → 21k,orc_head180k → 116k.Known and not fixed
common_octopusneck collar, the dwarf's stray moustache card, boxcar lettering chopped by braces (needs a change in the pixel-text primitive).🤖 Generated with Claude Code