Files
VoxelForge/Standalone/Research/WorldAssemblerM3/Research24/REPORT.md
T
Fr0zkaandClaude Opus 5.5 aee1487410 perf(core): tile-drain instrumentation; parallel FI sign-edge repair, FI first tile 1.28 -> 0.85 s (L55); R24
Opt-in --instrument-tile-drain records per-tile queue/dispatch/finish timelines, stage spans and counters
(proof skips, X8 lanes, GradAt/midpoint memo, skirts, FI cache stats); <2% when off. Measured: SW 13.3 and
FI 50.2 worker-s across LOD0-8, tails are work-saturated. FI sign-edge repair now computes in parallel and
publishes in sorted serial order (exact output): sign-edge 535 -> 47 ms, FI first tile 1.28 -> 0.85 s, near
ring 1.46 -> 1.04 s, whole view 6.09 -> 5.65 s. Proof block size, lane batching, SW midpoint memo and helper
cap 12 measured and left off. fast/medium/full PASS, Clang and GCC. Research R24: slab + motif generator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
2026-10-25 06:16:07 +01:00

53 lines
10 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# R24 — Slab + Sparse-Motif Generator
## Design
Reuse the L53 `Heightfield2D` base: `D0 = min(z − h(x,y), c(x,y) − z)`, with `h` and `c` supplied by `flatField`, `periodicHills` or `mirroredRelief`. The L53 profiles already have exact interval checks. Add the court as a radial floor modifier, `h = hL53 + Σ Δj·s((r−rj)/wj)`, where `s(t)=3t²−2t³` is clamped to `[0,1]`. [L53](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux53/REPORT.md:14>) [R20](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research20/REPORT.md:127>)
Resolve fixed per-strate motif counts in stable-ID order. Derive each candidate sequence from `(seed, strate, ID)`, check route and mouth keepouts, resolved bands, and pairwise spacing, then fail if no safe position exists. The existing resolver already sorts IDs, uses bounded deterministic attempts and rejects unsafe placement; add the missing pairwise spacing rule. Use 80–240 m monolith spacing for the lone-object feel. [Stamp resolver](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ResolvedLayoutInternal.h:1502>) [R43](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux43/REPORT.md:13>)
Use the BVH to prove a tile misses all feature bounds. For candidate hits, evaluate each feature interval and compose in stable-ID order; classify all-air or all-solid only when the **final** interval excludes zero. Include bevel, smoothing and irregularity support in bounds. Extend `isTileShapeFree` for every rock feature; L44 showed that a missing feature envelope can make worker-count results diverge. [R20 interval guidance](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research20/REPORT.md:235>) [L44](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux44/REPORT.md:5>)
Keep profile floor/cap surfaces distinct from resolved ceiling and bedrock bands. Use profile intervals to seat features; keep their support inside the resolved content bounds.
## Motifs, bounds and walkability
All rock fields use negative-inside SDFs and union into the base with `D=min(D0,Sfeatures)`. Bounds include any extra support from smoothing or irregularity.
- **Monolith:** Use a vertical capped-cylinder SDF. Let `qr=ρ−R`, `qz=|z−zc|−H/2`, and `S=√(max(qr,0)²+max(qz,0)²)+min(max(qr,qz),0)`. Use `R=0.8–2 m`, `H=12–32 m`; its AABB is `[xc±R]×[yc±R]×[zc±H/2]`. For query tiles, compute exact radial min/max distance to the center and exact vertical distance bounds, then evaluate the monotone SDF at interval endpoints. Set equal X/Y extents if reusing `fillPillar` for a circular column. Keep it scenic: route clearance is at least `R+0.34 m` plus margin. [R20](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research20/REPORT.md:109>) [Pillar SDF](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:6495>)
- **Ramp fin:** Use `q=|Rᵀ(p−p0)|−a` and `S=length(max(q,0))+min(max(qx,qy,qz),0)`. For world bounds, use half-extents `e=|R|a`; transform the query box to conservative local coordinate intervals for SDF bounds. Suggested dimensions are 8–20 m face width, 1–2 m thickness and 12–32 m rise at 75–90°. The optional ~1 m crest is decorative. Faces and crest are non-walkable; keep a separate bypass at or below 15°. [R20](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research20/REPORT.md:91>)
- **Terrace and pool court:** This is a heightfield modifier, not an SDF stamp. Bound `r` exactly over each tile’s XY box and propagate its range through the smoothsteps; support ends at the outer ring radius. Use 2–5 rings, 0.15–0.4 m rise per ring, 3–6 m transition width, and 4–12 m court radius. Walkability depends on the composed floor grade and capsule support. On flat ground, a 0.4 m rise over 3 m is 11.3°; on the 7.9° periodic profile it can exceed 15°, so widen the transition or route around it. [R20](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research20/REPORT.md:136>) [L53](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux53/REPORT.md:10>)
- **Dais/platform:** Use an explicit rounded-box SDF: `q=|Rᵀ(p−p0)|−a+rb`, `S=length(max(q,0))+min(max(q),0)−rb`. Bounds are `p0±|R|a`. Keep platforms decorative until their top joins the route and passes the final-field support check. Current `fillDais` changes from rounded box in vocabulary v1 to ellipsoid in v2, so give platforms an explicit versioned shape kind. The L43 dais half-extents `(3.2, 2.8, 0.9) m` are a visual reference, not a walkability result. [Dais SDF](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:6484>) [L43](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux43/REPORT.md:23>)
## Water
Keep water as a separate positive-inside occupancy channel `W`. For the pool, use `Wpool=min(z−hpool(r), zw−z, Rp−r)`. For each fixed stream segment, use `Wstream=min(z−bed(s), zw(s)−z, width(s)/2−dxy)` with end caps; union segments and pool with `max`. Join the stream level to the pool surface and store its direction for the static material. Render a local pool top and stream surface; do not simulate flow.
The existing water fill is vertical and the renderer creates a player-following, non-colliding horizon plane. Local water needs body records, its own bounds/BVH and tile scheduler so an all-air rock tile can still emit water. Keep the bypass dry. [R20](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research20/REPORT.md:133>) [Water renderer](</home/jahni/VoxelM/Plugins/VoxelForge/Source/VoxelForge/Private/VoxelContentManager.cpp:2561>) [Current fill](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/WorldAssemblerInternal.h:2610>)
## Sharp geometry and cost
At 25 cm sampling, Marching Cubes can bevel a 90° edge by up to about 17.7 cm depending on phase. Encode intentional foot, cap and platform fillets in the geometry: R16 recommends at least 0.5 m at LOD0 and about 0.75 m preferred. Treat `smoothWidth` as a field-space width and measure the resulting geometric radius. Keep physical bevels fixed across LOD; an 8-voxel LOD8 step is 2 m, so a 1.6 m diameter monolith or 1 m crest may disappear without feature-aware LOD retention. [R20](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research20/REPORT.md:241>) [R16](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research16/REPORT.md:4>) [CGAL 6.3 Isosurfacing manual](https://cgal.github.io/9465/doc/Isosurfacing_3/index.html)
The existing sharp path is limited to tagged planar boxes at interior LOD0; tile borders and coarse LOD fall back to Marching Cubes, and the full 2:1 transition gate still fails. Gate fins on phase-shifted remeshes, tile borders, LOD transitions and matching collision. R21 also notes that L49’s one-void proposal is unvalidated in this checkout. [M2](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM2/REPORT.md:10>) [R21](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research21/REPORT.md:93>)
Expect profile-class cost plus local feature-hit work: L53 profiles measured about 1.33 s cold W12; L54 caves about 0.73 s. L43’s small stamp delta covers no-hit tiles only, so it does not measure motif evaluation. Use ≤1.75 s cold W12 as a provisional target and establish paired on-feature costs. [L53 timings](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux53/REPORT.md:32>) [L54 timings](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux54/REPORT.md:37>) [L43 cost scope](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux43/REPORT.md:35>)
## Authoring and slices
Add an optional `CoreGeometry` block to the existing per-strate `UVoxelStrateDefinition` asset. Per strate, author the base profile, fixed motif counts, stable IDs, metre size ranges, candidate regions, spacing/keepouts, quantized pose, attachment policy, bevel and palette IDs. Add pool/stream records for radius, depth, surface, path, width, bed and water palette. Convert metre fields once to integer micrometres at the adapter; include resolved geometry and water records in `stableIdentity`. [R17](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research17/REPORT.md:5>) [R8](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research8/REPORT.md:7>) [Epic Data Assets](https://dev.epicgames.com/documentation/unreal-engine/data-assets-in-unreal-engine) [UE units](https://dev.epicgames.com/documentation/en-us/unreal-engine/units-of-measurement-in-unreal-engine)
For each slice, extend `verify.py` with a custom fixture, brute-force interval and BVH checks, false all-air/all-solid controls, a whole-surface audit over feature-bound ROIs, final-field capsule reachability and W1/W8/W12 hash checks. The L48 whole-surface audit is not yet wired into the tiers. [Verify tiers](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Tools/verify/README.md:13>) [R21](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research21/REPORT.md:117>)
1. **Fast:** `flatField`, one monolith and one decorative platform. Audit monolith foot/cap and platform edges; check route clearance and deterministic placement.
2. **Medium:** add periodic/mirrored profiles and 1–4 fins. Audit fin foot, tip, crest and borders; add actual phase remesh, LOD0–8, 2:1 transition and collision gates.
3. **Full:** add the terrace court, pool and stream. Audit ring/shoreline/stream-bank surfaces, water intervals and wet tiles over rock-all-air regions; include dry-route reachability, Clang/GCC and the 30-cell determinism sweep.
Capture every slice with a wide eye-level view that keeps the cap and motif in frame, plus a high oblique overview that shows spacing and route. L53’s quality gates passed while its views missed both the hills and cap. [L53 capture review](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux53/REPORT.md:49>)
**Owner question:** Approve an authored ~0.5 m fin-edge radius for the first prototype, or hold fins until the feature-aware cross-LOD path passes?
Read-only review only; no files changed and no scripts, tests, builds or binaries were run.