Repository navigation
ground-plan step 3: the mesh on level-17 terrain nodes (#3196) - #3207
Conversation
…-17 halves draw last Each strip cell's fan now cuts along the terrain's diagonal (north-east to south-west), so three triangles tile each half of the cell. A half with all three corners on the region's border is the terrain's own level-17 triangle: its strip triangles go to runs of their own after all others, and head word 9 counts those runs (HEAD 10, MAGIC 0x4f424d03). Over a level-17 node the viewer skips them; over a level-18 node it draws them. The strip test checks over 400 shapes of R that each strip cell is drawn once, by the strip or by the terrain, at level 18 and at level 17, and that no fixed point stands on the side of a terrain half. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The meshes draw over the nodes of mesh level M = min(finest, 18), and none below 17. At level M the terrain sinks its vertices nearer than level 18's morph start and takes no snap there; at finest 17 a terrain vertex of the strip is the terrain's own level-17 vertex, and the draw skips the level-18 runs. The meshes fade out in metres, so the band is the same at 18 and 17. Below level 17 the meshes stop in that frame and return after CALM frames in a row at 17 or finer. Their cells stay wanted and built at any finest level, so a return builds nothing again. A page of level M waits for its cell's mesh, as the level-18 page did. Debug options: `finest=16..18` caps the finest level, and `debug=owned` draws the meshes green and the terrain red, blue where the strip's rule gives the point to the mesh: a fault from any view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
…e zero-area strip triangle The 400-shape test now builds each cell with `mesh_cell` and draws, at level 18 and 17, its mesh and the terrain's triangles without a sunk corner. Every sample point must be drawn once and every edge must close. Every other shape forces two parts of R to touch at a corner, and the test asserts that such contacts occur. It also asserts that the level-18 runs hold exactly the strip triangles of halves with three corners on the border of R. strip.rs now says that at morph 1 a strip triangle can lose its plan area and still close the surface, so no step may drop one for a zero area. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and no vertex snaps where they draw whole - While the meshes count calm frames to draw again, the terrain keeps the frames going, so a still view gets them back without input. - Below level 17 the meshes rest: they ask for no stamp and make no corner, and the records build their cells only after the whole target, so the recovery from the shortage comes first. - The terrain takes no snap to S + two level-17 cells, as far as the mesh draws whole. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fixesNew commits
Not run again: frame time, time to a clean frame, renders. The draw path changed only in the snap band S … S + 6.5 m. Public docs: not changed. Requirements: none |
`touched` names only the pages of one frame, so pages that arrived or left during the rest did not mark a piece stale, and its plain-ground corners kept the old heights. When a rest begins, each piece forgets its plain key and reads it again on return. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Delta finding D4 and merge of
|
| Gate on the merged build | Result |
|---|---|
cargo test -p obc-ground-plan |
113/113 |
vitest src/lib/trailview |
414/414 |
npm run check, check:wgsl |
0 / 0; 69 ok |
| WASM guard | raw 1,868,974 / 1,904,640 B (98 %), gzip + glue 717,144 / 731,136 B (98 %) |
debug=owned, 50 top views, 18 |
1 blue px, on an edge. 1 black px in conn-path-off-track-top at (1009, 442), deep inside the mesh's green. It comes back on each new shot of the merged build (2 of 2). The build before the merge gives 0 there. |
debug=owned, 50 top views, 17 |
5 blue px, all on edges; 0 black |
The black pixel is a pinhole inside a mesh, away from the strip. It first shows with the merge of #3188. I did not check whether ground-plan alone shows it.
Not run: clippy and check 7 on the merged build.
Step 3 of the ground plan (#3196, epic #3096): the mesh on level-17 terrain nodes, candidate (a′) of the design comment on #3196. Into
ground-plan, not develop.What changes
mesh/strip.rs,mesh/mod.rs): the fan of a strip cell cuts along the terrain's level-17 diagonal (north-east to south-west), so three triangles tile each half.halves(i, j)gives the two halves. The strip triangles of a half whose three corners lie on ∂R go to runs of their own, last. Head word 9 counts those runs:HEAD10,MAGIC0x4f424d03. New test: over 400 shapes of R, each strip cell is drawn once, by the strip or by the terrain, at level 18 and 17, and no fixed point stands on the side of a terrain half.meshLevel, pieces.ts). At M = 17 the draw skips the level-18 runs.terrain.wgsl,cells.wgsl).piece.wgsl).corridor.wgsl).meshCellskeeps the cells at every finest level.CALM(120) frames in a row at 17 or finer.CALMmoved tolod.ts, and the terrain's quality uses the same value.finest=16..18is a page option, read once (finestOf).debug=owneddraws the meshes green and the terrain red. It draws blue where the strip's rule gives the point to the mesh, so a blue pixel is a fault from any view.tie,hold,owned=cover,probe=frames,probe_a.Deviation from the prototype:
debug=owneddoes not blend additively. A runtime debug view would need a second set of terrain pipelines for that. The meshes draw before the terrain with the depth test, so a blue pixel already marks terrain in front of the mesh or in a hole. The count is the blue pixels.Gates
GTX 1660 SUPER, Engelberg fixture, one page at a time under the GPU lock. Frame time is GP0's method (
flight.mjs --gpu, clock held). The finest level is pinned by the quality (one step past the screen's steps), as for the prototype, except where noted.obc test -p obc-ground-plan-p obc-ground-plan --all-targets -D warnings,cargo fmt --allcheck-bytes.sh)src/lib/trailviewmeshLevel, which holds the mesh level and the hysteresis)npm run check,npm run check:wgsldebug=owned, 50 top viewsfinest=17from the address (3 views): 0.debug=owned, walk and drive, every 10th frameFrame time, all passes per frame (ms), walk / drive:
At 17 the mesh draws 436 k / 216 k triangles (18: 438 k / 217 k). At 18 the branch is 0.07–0.09 ms over ground-plan, as the prototype measured. Not traced.
Time to a clean frame (shots every 0.5 s from navigation; clean = every later shot is within 1 % of the final idle frame). This is the fixture page, not live data, so the loads are short. One run each:
finest=17, cold / warmRenders at finest 17, develop | ground-plan | this branch, labelled, 9 owner views at eye height and from above:
step3/runs/gates/renders/sheets/on timosPC. At 17 this branch draws the mesh (kerbs, walls, markings). Ground-plan draws the far look there.Not done here: the iPhone probe (
IPHONE-PROBE.md). The owner runs it on the phone.Public docs: not changed.
Requirements: none
🤖 Generated with Claude Code