Repository navigation
Conversation
The cook skipped any mesh whose node or mesh name carries a level token (`hull_LOD1`) as hand-authored LOD. A Fab pack's `_LOD2` exported as a model of its own has no sibling level, so nothing selects it and the skip left it at full detail. On Machinefall map-walk these trees (`*_far_0_001`, mesh `*_far_LOD2`) are about 9.4 M of the 9.8 M main-pass triangles in the early route, and the adaptive LOD bias cannot coarsen a slot with one level. An asset is an authored chain only when it holds two or more level-named nodes. LOD_GENERATOR_VERSION goes to 4 so a stale cook cache cannot serve the old skip. Filed with PRD-539, which also makes card levels keep their coverage: a chain on these trees thins the needles visibly until it does.
A card level kept 50 % then 25 % of a crown's needle cards unscaled, so its card area fell to the keep ratio. On Machinefall, once the Fab `_LOD2` pines got a chain, mid-distance trees read as bare trunks. Each level now appends copies of its kept cards, scaled about their centroids by sqrt(LOD0 area / kept area) (at most 2), to the primitive's own vertex arrays, and its indices point at them. The chain stays index-only and LOD0's indices never reach a copy, so a stock loader and both runtime readers need no change. The model pass's self-check now counts the vertices LOD0's indices draw, so the copies are not drift; a LOD0 drift still throws. foliage-lod.spec.ts: red `expected 0.5162100266415837 to be greater than or equal to 0.95`, then 8 passed; packages/assets 485 passed.
…d selects The card cook now appends scaled copies after LOD0 and indexes them from the level (PRD-539). The loader and per-frame selection draw them with no core change.
`shadows.castLevels` defaulted to 1 on the reasoning that a far level's
shadow is sub-texel. That holds only past the shadow window, and a
shadow level draws only the caster clusters its own window covers.
Inside it the shadow is visible: once Machinefall's pines got a chain,
every pine past its first switch, tens of metres out, lost its shadow,
and 3 blind raters preferred the base on 6 of 8 poses ("weak shadows,
flatter"). With every level casting they prefer this build on 20 of 24
votes and tie on 4.
The default is now every level; a number still caps it.
world-cells.spec.ts: red `a far level minted no caster cluster`, then
green; packages/core + packages/assets 3086 passed.
…vels examples/auto-lod gains a generated 1,200-card crown (cards.glb, from scripts/make-cards.mjs). The scene reports the crown's drawn triangles and whether the drawn level reaches a vertex LOD0 never indexes, which is a scaled copy (PRD-539). Far scenarios require it; near scenarios drive it back to LOD0. Native desktop: far and near pass (cardCopies 1 -> 0, cardTriangles 1252 -> 2400).
Native desktop and web far scenarios pass on the auto-lod card crown. Web lod-near is red on develop too, so it carries no card check.
Contributor
Author
4 of 10 tasks
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




PRD:
docs/PRDs/assets/PRD-539-card-lod-levels-keep-the-canopy.md. PRD-478 (#437) AC-2 and AC-3 depend on it.Why: on a quiet RTX 2080, Machinefall
map-walk's early-route GPU p95 (9.2–9.8 ms) is the main pass drawing 8.2 M triangles. 9.4 M of 9.8 M are trees whose GLB holds only the Fab pack's*_far_LOD2mesh. The cook skipped those asauthored-lod, so the adaptive LOD bias had nothing to coarsen. With a chain, route GPU p95 falls to 7.73 ms max, but the needle cards' unscaled levels thinned the mid-distance canopy to bare trunks.What:
_LOD2gets a generated chain.shadows.castLevelsdefaulted to 1, and the pines lost their shadows past the first switch).Phase 1: The cook
lod-generation.spec.tsred-green, 44 passedfoliage-lod.spec.tsred0.516 ≥ 0.95, then 8 passedpackages/assets: 485 passed, 2 skippedPhase 2: Both runtimes draw it
model-lod-loader.spec.ts, 5 passedworld-cells.spec.tsred-green; core + assets 3086 passedexamples/auto-lodcard crown:lod-far-desktop/lod-near-desktoppass,cardCopies1 → 0,cardTriangles1252 → 2400Phase 3: Machinefall