feat(core): ore vein records and a materialAt query, off by default (L50); research R18, R19
Versioned capsule vein records (stable ID, resource ID, endpoints, radius, seeded irregularity) resolved into the snapshot only when requested, placed beside the route and away from passages, landings and landmarks (forced-passage control rejected). The bound field table gains materialAt (host + two resource IDs + Q16 weights) behind a per-tile BVH; mesh export v2 carries per-vertex materials; a measurement-only yield computes removed resource volume (0 on already-air space). With veins on, every density, mesh, payload and topology hash is unchanged; demo off: owner hashes identical to L47. fast/medium/full PASS. Research R18 (cavern-graph planner) and R19 (why FloatingIslands costs ~10x SurfaceWorld). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
This commit is contained in:
1 parent
b9ccff4ad6
commit
ca85e876ad
15 files changed
+1573
-19
No files matched your search
@@ -0,0 +1,51 @@
|
||||
# VoxelForge L50: ore veins in Core, slice 1
|
||||
|
||||
Scope: Core only on `assembler/world`. The owner demo is opt-in with `--ore-veins-demo`; no Unreal integration or mining gameplay is included.
|
||||
|
||||
## Representation and placement
|
||||
|
||||
Vocabulary v1 currently has one shape, `capsule`. A resolved record carries its stable ID, strate index, resource material ID, two endpoints, radius, irregularity amplitude and wavelength, blend width, seed, and conservative micrometre bounds. The `ore_veins` canonical field is emitted only when records exist. Stable IDs sort canonically; irregularity seeds derive from world seed, strate, and stable ID.
|
||||
|
||||
The seed-0 SW demo resolves three records in strate 1. Bounds include radius, irregularity, and blend:
|
||||
|
||||
| Stable ID | Resource | Endpoints (m) | Radius | Bounds (µm, half-open x × y × z) | Irregularity seed |
|
||||
|---|---:|---|---:|---|---:|
|
||||
| `ore/sw-arrival-route-copper-v1` | 1 copper | (16.510, 21.173, -502.909) → (18.277, 22.940, -502.950) | 0.65 m | `[15159830,19627354) × [19822674,24290198) × [-504300299,-501558872)` | 6689110868732322 |
|
||||
| `ore/sw-arrival-route-cobalt-v1` | 2 cobalt | (25.092, 21.192, -503.626) → (26.852, 22.952, -503.394) | 0.75 m | `[23641575,28301747) × [19741941,24402113) × [-505075523,-501944042)` | 2641701047127768 |
|
||||
| `ore/sw-chamber-approach-quartz-v1` | 3 quartz | (1.402, 27.019, -502.525) → (1.481, 29.459, -503.062) | 0.80 m | `[-98238,2981467) × [25518936,30959266) × [-504561729,-501024663)` | 882664590774173 |
|
||||
|
||||
Amplitude is 0.10 m; wavelengths are 1.4 m for copper/cobalt and 1.8 m for quartz; blend width is 0.60 m. A bounded, seeded candidate search biases capsules beside the route and toward side pockets/chamber approach. It rejects clear passage and mouth clearance, landing regions, and landmark/cavern footprints, using the resolved bounds. The forced-clear-passage control was rejected (1/1).
|
||||
|
||||
## Query, mesh, yield
|
||||
|
||||
The bound field table exposes deterministic `materialAt(x,y,z)`: host material, up to two resource IDs, and Q16 blend weights. A per-tile BVH narrows candidate veins; tiles with no vein bounds skip the query. Density and its sign are untouched. L44 shape-free and culling paths do not inspect veins: they depend only on density/geometry, and material lookup is a separate surface attribute query.
|
||||
|
||||
Mesh export v2 stores host ID plus two resource-ID/weight pairs per surface vertex, sampled at the vertex. The standalone renderer colors copper orange, cobalt blue, and quartz turquoise; v1 export remains available without ore.
|
||||
|
||||
Mining yield is measurement-only: a fixed 0.25 m grid evaluates the edit sphere before/after solid state and accumulates weighted removed resource volume by ID. The audited copper edit used a 1.25 m sphere and measured 0.000071 m³ (one removed solid sample, Q16 weight sum 296). This is a coarse-grid measurement, not a tuned reward amount. Repeating it on already-air space returned 0.000000 m³.
|
||||
|
||||
## Proofs and cost
|
||||
|
||||
With the demo off, owner SurfaceWorld W1/W12 hashes match L47: density `0x7dc75e2c09302258`, mesh `0x0cb34c40ceec4ce3`, payload `0x9d23e8c46b515cf1`, topology `0x2962c9464991eedd`.
|
||||
|
||||
At the 125-tile ore audit camera `(19.725, 19.725, -501.566)`, enabling veins leaves all geometry hashes unchanged:
|
||||
|
||||
| State | Density | Mesh | Payload | Topology | Material |
|
||||
|---|---|---|---|---|---|
|
||||
| Demo off | `0x5f9f1fdc0aabc8f0` | `0xed9e30865c98c2af` | `0xb8e3715300641fed` | `0x48584cc4e11c330c` | `0x58803ee275e9ba0a` |
|
||||
| Demo on | `0x5f9f1fdc0aabc8f0` | `0xed9e30865c98c2af` | `0xb8e3715300641fed` | `0x48584cc4e11c330c` | `0x5bfc71cbd5615b02` |
|
||||
|
||||
The random-camera and cavern sweeps ran with the demo enabled; material hash rows agreed across W1/W8/W12. Broad sweep positions outside all vein bounds recorded zero material queries. The ore audit changed six tile material hashes while preserving every density, mesh, payload, and topology tile hash.
|
||||
|
||||
At this audit, the on path queried 19,396 vertices and checked 24,871 candidates in 4.562 ms. 111/125 tiles had no vein candidate and recorded 0 ms query time; demo off queried zero vertices (also 0 ms). The off audit material hash above is the new empty-material result; the four owner geometry hashes remain the L47 values.
|
||||
|
||||
## Verification, captures, failures
|
||||
|
||||
- Fast: PASS, 211.2 s. Medium: PASS, 589.7 s. Full: PASS, 1,639.0 s; 1,084 checks, 0 failures. All tiers used source stamp `5f0f388366a4a6e7fb842459f035679e88da6b2a20af44e90e419c35f7c2fc06`.
|
||||
- Clean source stamp: `5f0f388366a4a6e7fb842459f035679e88da6b2a20af44e90e419c35f7c2fc06`; Clang 19 and GCC 14 builds passed.
|
||||
- Eye-height approach-wall capture: [`tunnel-quartz-eye.png`](captures/tunnel-quartz-eye.png). Wide arrival/approach capture: [`tunnel-approach-wide.png`](captures/tunnel-approach-wide.png). Mining-yield log: `Saved/Linux/l50/ore-tunnel-export.log`.
|
||||
- Failed runs: early seeded placements intersected the lower passage-mouth clearance and were rejected before moving the accepted candidate; the final demo passes the forced-clear-passage control. The first medium run caught a renderer shader-scope error, fixed before the clean rebuild and passing medium run. An initial off-angle surface capture was replaced after inspecting the exported material vertices.
|
||||
|
||||
## Orchestrator review (Claude)
|
||||
|
||||
Accepted, off by default. The stamp matches the final Clang and GCC builds (`5f0f3883…`). With veins on, all four geometry hashes are unchanged; only the material hash moves. Demo-off owner hashes are identical to L47. **Paused as a feature** after this slice: the owner made all-generators-at-about-1-s the priority (2026-10-24).
|
||||
Reference in new issue
Block a user