standalone: speed round 3 -- local detail envelope + 8-voxel owner roughness lattice (band ~590 -> ~500 ms)

- Profiled the band: detail noise ~70% of worker time, workers balanced (2.5% spread).
- Local amplitude envelope skips detail on 34% of candidates; owner cave roughness evaluated on
  global 8-voxel Z anchors and interpolated. Detail evaluations 7.07 M -> 3.53 M.
- The field changes slightly (mean channel delta ~1.7-5.4 /255 in the six captures); all look
  audits pass, routes 5642/5642, W1/W8 hashes equal on all nine outputs.
- Whole view 1.953 s @8w full payload: no end-to-end gain shown (stream timing noise ~10%).
- Rejected: detail band radius 5 (fails GridStair).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MmSoF64BbRFmk9C3p1VsBJ
This commit is contained in:
Fr0zkaandClaude Opus 5.5 committed 2026-10-04 18:12:08 +02:00
1 parent a3cb26b5c8
commit 9ffe296cd1
10 files changed
+399 -36

No files matched your search

@@ -60,13 +60,100 @@ The exported-LOD6 captures use the same six fixed cameras as the previous set. E
The opt-in LOD8 candidate is in [StandaloneViewer.cpp](../../../Source/StandaloneViewer.cpp). After the final clean build, its W1/W8 hash runs matched all 11 aggregate outputs with zero mismatches; the full-clipmap hashes are density `0x2809003356cf8162`, geometry `0x0123c52b74ad7e7c`, payload `0xcdef10ebb6b24321`, topology `0x1fa3bf7db18a2c8d`. Cache hits were zero and the route audit stayed at 5,642/5,642. Logs: [W1](round3_maxlevel8_final_clean_hash_w1.stdout.log), [W8](round3_maxlevel8_final_clean_hash_w8.stdout.log).
All six fixed captures were rerun with the override. Five match the LOD6 images pixel-for-pixel; passage changes 382/1,024,000 pixels, with maximum channel delta 16 and mean absolute channel delta 0.003917. The change is not visible in side-by-side review. Candidate images: [chamber](round3_maxlevel8_candidate_chamber.png), [tunnel](round3_maxlevel8_candidate_tunnel.png), [passage](round3_maxlevel8_candidate_passage.png), [far view](round3_maxlevel8_candidate_far.png), [floor close-up](round3_maxlevel8_candidate_passage_floor_closeup.png), [tunnel bend](round3_maxlevel8_candidate_tunnel_bend.png). Numeric comparison: [diff log](round3_maxlevel8_capture_diffs.log), using [compare_capture_pair.py](compare_capture_pair.py). The six fixed views and existing shape audits pass; the screenshots do not prove every remote thin stratum across the whole world.
## Round 4 — surface detail band
### Round 3 logs, limits, and failed invocations
### Profile and cost
Latest exported-LOD6 timing logs: [run A](round3_post_classifier_full_w8_a.stdout.log), [run B](round3_post_classifier_full_w8_b.stdout.log). Latest opt-in LOD8 timings: [A](round3_maxlevel8_final_w8_a.stdout.log), [B](round3_maxlevel8_final_w8_b.stdout.log), with [runner A](round3_maxlevel8_final_w8_a.runner.log) and [runner B](round3_maxlevel8_final_w8_b.runner.log). Final opt-in LOD8 hashes: [W1](round3_maxlevel8_final_clean_hash_w1.stdout.log) and [W8](round3_maxlevel8_final_clean_hash_w8.stdout.log). The clean build for these outputs is [round3_maxlevel8_final_build.log](round3_maxlevel8_final_build.log). All workload processes ran BelowNormal with affinity `0xFF00`; builds used `/MP8`. The build succeeded. Its existing setup emitted the French `vswhere.exe` diagnostic and six C4838 narrowing warnings in `VoxelStrateManager.cpp`.
The original W8 profile used the unchanged coherent field and sampled one in 256 distance calls and one in 64 detail calls. It completed the shape audit at BelowNormal priority and affinity `0xFF00`; routes were 5,642/5,642. Logs: [profile output](round4_profile_w8.stdout.log), [runner](round4_profile_w8.runner.log).
The first final-build wrapper could not open its relative log path after `Build.ps1` changed into `Standalone\Build`; it produced no usable build log. I reran the build with an absolute log path and verified exit code 0. An initial C# `System.Drawing.Bitmap` image-diff helper also failed to resolve its assembly; the capture comparison was completed with Pillow and NumPy. The unsupported `--stream-max-lod=8` run completed with exit code 0 but did not exercise the supertile path; the corrected `--stream-max-level=8` run confirmed zero groups and exited 0. The first classifier build failed because its new `std::unordered_set` member lacked the header; the corrected build succeeded, and the prototype was later removed. One classifier benchmark launch was rejected with Win32 267 before a child process started because its working directory was invalid; the corrected launch exited 0. The first capture launched with `--max-clip-level=8` exited 0 but the viewer reload reverted to level 6 and generated 6,498 tiles; I fixed runtime override persistence and reran the six captures at 2,226 tiles. The Step=256 proof build succeeded but produced no sample reduction and was reverted. A final build-wrapper setup line attempted to assign PowerShell's reserved `$Host` variable and emitted assignment errors; `Build.ps1` then set its own BelowNormal/`0xFF00` limits and the build completed successfully. No final benchmark process failed. No viewer belonging to another process was closed, and no commit, push, or stash was made.
| Surface-band profile | Original W8 path |
| --- | ---: |
| Candidate visits / `EffectiveRockDistance` evaluations | 12.021 M / 12.021 M |
| `DetailNoiseOnLine` evaluations / retained proxies | 7.072 M / 7.072 M |
| Detail evaluations per candidate | 0.588 |
| Sign flips | 570,546 |
| Band wall / worker sum | 609.4 ms / 4.848 s |
| Worker time per candidate | 403 ns |
| Sampled distance evaluation | 134.7 ns; 1.619 worker-s estimated |
| Sampled detail evaluation | 478.2 ns; 3.382 worker-s estimated |
| Per-worker candidates / active time | 1.479–1.516 M / 605.9–606.1 ms |
The sampled work estimates total about 5.00 worker-s, slightly above the measured 4.85 worker-s. They are attribution estimates, not an additive timing decomposition. `DetailNoiseOnLine` is the largest measured cost at about 70% of worker time. It evaluates the three line-cached relief octaves and, on applicable strata, owner cave roughness (FBM/ridged/cellular noise and possible domain warps). The workers finish evenly; candidate-count spread is 2.5%, so thread balance is not the bottleneck.
### Retained candidate and measured result
The retained standalone candidate combines a conservative local amplitude envelope with an 8-voxel Z lattice for owner cave roughness. `DetailBand` stays at 6, because a radius-5 candidate mask fails the grid-stair audit. At each candidate, the local fade uses the macro relief, surface depth, cave/floor influence, and layer roughness bound; the plateau is 1.5 voxels and the edge is clamped to the coherent field’s supremum plus its 0.125-voxel margin. Owner roughness cores are evaluated at globally aligned 8-voxel Z anchors and linearly interpolated. The same deterministic owner path is used at all worker counts. This changes the relief field; the captures and hashes below are for the changed field.
The final W8 sampled profile reports 9.389 M candidates, 9.389 M distance evaluations, 3.527 M detail-noise evaluations, 6.755 M proxies, and 550,169 sign flips. Detail evaluations fell 50.1% from the original profile; 3.228 M candidates skip local detail, or 34.4% of candidate visits. Detail evaluations per candidate fell from 0.588 to 0.376. Per-worker candidates were 1.136–1.210 M and detail evaluations 426–455 K; active times were 510.54–510.74 ms. The output is [round4_owner_coarse8_profile_w8.stdout.log](round4_owner_coarse8_profile_w8.stdout.log), with [runner record](round4_owner_coarse8_profile_w8.runner.log).
The profile also reports a sampled 875 ns detail call, with nested relief/layer/owner scopes. Those added clocks run inside the sampled call and materially perturb it; the 875 ns value and its nested estimates are not production costs and should not be compared directly with the original 478 ns. The uninstrumented interleaved shape-audit timings give a better speed comparison:
| Owner roughness lattice | W8 surface-band samples | Median |
| --- | ---: | ---: |
| 4 voxels | 613.166 ms, 559.883 ms | 586.525 ms |
| 8 voxels | 522.047 ms, 588.253 ms | 555.150 ms |
The step-8 median is 5.3% below step 4, but spread remains substantial. The separate first step-8 audit was 538.295 ms. The paired logs are [step 4 A](round4_coarse_ab_step4_a_w8.stdout.log), [step 8 A](round4_coarse_ab_step8_a_w8.stdout.log), [step 8 B](round4_coarse_ab_step8_b_w8.stdout.log), and [step 4 B](round4_coarse_ab_step4_b_w8.stdout.log). The speed target is not met: the best repeated band measurements remain around 0.50–0.59 s, well above 200 ms.
### Full-payload headline
Two cold no-hash W8 runs used full UVs, colors, and material groups, generated all 6,498 clipmap tiles, and recorded zero cache hits. Process wall includes executable startup and world setup; collision cooking and GPU upload are not included.
| Cold full-payload run | Process wall | Shape stage | Surface band | Full-detail stream | Full clipmap stream | Cache hits |
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
| A | 1.929 s | 0.800 s | 0.505 s | 0.249 s | 0.995 s | 0 |
| B | 1.976 s | 0.790 s | 0.498 s | 0.250 s | 0.981 s | 0 |
| Mean | **1.953 s** | **0.795 s** | **0.502 s** | **0.250 s** | **0.988 s** | **0** |
The full clipmap allocated 235.29 MiB (115.57 MiB standalone viewer output); LOD6 contributed 4,770 tiles, 32.717 M density samples, 1,834,820 vertices, and 10,272,252 indices. Logs: [run A](round4_step8_final_payload_w8_a.stdout.log), [run B](round4_step8_final_payload_w8_b.stdout.log), with [runner A](round4_step8_final_payload_w8_a.runner.log) and [runner B](round4_step8_final_payload_w8_b.runner.log). Timing varied during this continuation. Against the previous round’s 0.876 s full-clipmap mean, this pair does not show an end-to-end stream improvement; the surface-band audit pair supports only a modest step-8 versus step-4 reduction.
### W1/W8 hashes and audits
The exact step-8 executable produced matching hashes for all nine aggregate outputs at W1 and W8. Both cold hash runs had zero cache hits, emitted full payload, and retained 5,642/5,642 open route samples. Hash logs: [W1](round4_step8_final_hash_w1.stdout.log) and [W8](round4_step8_final_hash_w8.stdout.log); runner logs: [W1](round4_step8_final_hash_w1.runner.log), [W8](round4_step8_final_hash_w8.runner.log).
| Output | Density hash | Mesh hash | Full-payload hash | Oriented-topology hash |
| --- | --- | --- | --- | --- |
| Full detail | `0x67609e3f9aa3a0b0` | `0xd98eb46b92a59917` | `0x8f148240ca4a4a8f` | `0x954e28f6fd44967f` |
| Whole clipmap | `0x11e7c03ed9bbd1f9` | `0xab871e9191389cd7` | `0xf0d1bd9d26592feb` | `0xfbfd275ff05c3c8a` |
| LOD0 | `0xa40e0e5bcee1fa94` | `0x5376053528f938d0` | `0x6c545a92724cb2ef` | `0x9607f9b6a57e0ee0` |
| LOD1 | `0x94e62d7b0bfa25f9` | `0xd793622d676d8152` | `0xb31b4fd33bf48af5` | `0xe3bb5eb0cd0388ae` |
| LOD2 | `0xc4445b7ece46d37d` | `0x413f1af51a6be5aa` | `0xe374e053b00beb34` | `0x36abcd1505201234` |
| LOD3 | `0x9a7a0ce16ae6bc73` | `0x61c0d5eff17d7b13` | `0x596c8d6a850468bf` | `0x86c10f856855083e` |
| LOD4 | `0xe3d15c9695e1960a` | `0xfc24a13f616fa647` | `0x92cb4114a697493d` | `0x92cf751f3e7fd0aa` |
| LOD5 | `0xe3130577ec7f5b23` | `0x5040b88204df27df` | `0x98c9278497e126fc` | `0x61986faf2cd91ba5` |
| LOD6 | `0xf5342998545c37e7` | `0x7c6436bc51bdba44` | `0xb7f44b30f7fb0797` | `0x202cee15737c1705` |
The W8 shape audit passed RoomFloorJoin, FloorSlopeJoin, TunnelRadius, FlatSurface, GridStair, ThinSheet, SurfaceBandFamily, FlatPatch, and DetailAudit. GridStair `relative_join_step=0.090` is below the 0.400 limit; there are zero isolated thin sheets, cave detail standard deviation is 0.8737 voxels, largest flat patch is 440 samples, and the detail audit reports supremum 4 voxels, band 6, adjacent correlation 0.9910. See [step-8 shape audit](round4_owner_coarse8_audit_w8.stdout.log). The whole-view shard audit in the W8 hash run found zero thin sheets and zero isolated small components (three boundary-touching small components).
### Six fixed captures
These six images were captured from the exact step-8 W8 executable. Every capture process exited 0. The before images are the preceding full-payload references; the field change produces small average pixel deltas but affects many shaded pixels, so these are not pixel-identical claims. The numeric comparison is [round4_step8_capture_pixel_compare.stdout.log](round4_step8_capture_pixel_compare.stdout.log), using [compare_capture_pair.py](compare_capture_pair.py).
| Fixed view and camera (metres; yaw/pitch) | Before | Step-8 capture | Changed pixels | Mean channel delta | Max channel delta |
| --- | --- | --- | ---: | ---: | ---: |
| Chamber `(-11.75,-123.25,-19.85; 0/0)` | [before](final_halflimit_after_chamber.png) | [after](round4_after_chamber.png) | 903,112 / 1,024,000 | 1.856 | 128 |
| Tunnel `(-11.75,-123.25,-19.85; 90/0)` | [before](final_halflimit_after_tunnel.png) | [after](round4_after_tunnel.png) | 910,352 / 1,024,000 | 1.920 | 129 |
| Passage `(-39.19,6.27,-28.51; 63/0)` | [before](final_halflimit_after_passage.png) | [after](round4_after_passage.png) | 804,901 / 1,024,000 | 5.364 | 135 |
| Far `(-11.61244,-118.2212,-19.8452; 0/0)` | [before](final_halflimit_after_far.png) | [after](round4_after_far.png) | 895,399 / 1,024,000 | 1.992 | 131 |
| Passage floor close-up `(-39.19,6.27,-25.51; 63/-25)` | [before](final_halflimit_after_passage_floor_closeup.png) | [after](round4_after_passage_floor_closeup.png) | 902,403 / 1,024,000 | 1.699 | 95 |
| Tunnel bend `(-198.97,-99.57,-45.58; 33.59/23.17)` | [before](final_halflimit_after_tunnel_bend.png) | [after](round4_after_tunnel_bend.png) | 942,860 / 1,024,000 | 1.777 | 55 |
Capture runner records: [chamber](round4_step8_capture_chamber_w8.runner.log), [tunnel](round4_step8_capture_tunnel_w8.runner.log), [passage](round4_step8_capture_passage_w8.runner.log), [far](round4_step8_capture_far_w8.runner.log), [floor close-up](round4_step8_capture_floor_closeup_w8.runner.log), and [tunnel bend](round4_step8_capture_tunnel_bend_w8.runner.log).
### Rejected experiments and limits
| Experiment | Result | Evidence |
| --- | --- | --- |
| Candidate mask radius 5, with global detail support | GridStair audit failed, exit 7. | [build](round4_band5_build.log), [audit](round4_band5_audit_w8.stdout.log), [runner](round4_band5_audit_w8.runner.log) |
| Radius 5 with local bound and 1.5-voxel plateau | GridStair audit failed, exit 7. | [build](round4_local_band5_build.log), [audit](round4_local_band5_audit_w8.stdout.log), [runner](round4_local_band5_audit_w8.runner.log); the later step-4 variant also failed in [this audit](round4_inner15_band5_audit_w8.stdout.log) with [runner](round4_inner15_band5_audit_w8.runner.log) |
| Exact XY plane-interpolation cache | First implementation changed flips from 570,546 to 582,493. The corrected version restored the flip count, but paired timings had no stable gain; removed. | [first audit](round4_plane_cache_audit_w8.stdout.log), [corrected audit](round4_plane_cache_fixed_audit_w8.stdout.log), [A](round4_ab_cache_a_w8.stdout.log), [B](round4_ab_cache_b_w8.stdout.log) |
| Three-at-once Perlin domain-warp helper | Audit flips matched; paired W8 timings were not faster, so scalar calls were restored. | [audit](round4_warp_x3_audit_w8.stdout.log), [A](round4_warp_ab_x3_a_w8.stdout.log), [B](round4_warp_ab_x3_b_w8.stdout.log) |
| Z-to-layer direct map | Hashes/audits matched, but paired W8 timings were no faster and tended slower; removed. | [audit](round4_layer_lookup_audit_w8.stdout.log), [A](round4_lookup_ab_local_a_w8.stdout.log), [B](round4_lookup_ab_local_b_w8.stdout.log) |
| Owner roughness interpolation at Z step 2 | Audits passed but paired W8 median was slower than local-bound baseline; step 4 then measured better and step 8 is retained. | [profile](round4_owner_coarse2_profile_w8.stdout.log), [A](round4_coarse_ab_local_a_w8.stdout.log), [B](round4_coarse_ab_local_b_w8.stdout.log) |
The step-4 to original-path A/B was too noisy to support a speedup claim: original band runs were 633 and 1,511 ms; step-4 candidate runs were 1,276 and 906 ms. All four processes exited 0, but they show no stable old-versus-new gain. AVX2 batching of the three value-noise octaves was not implemented; the narrower Perlin helper did not help. Far-mesh overlap was not tested because it can hide time in the total stream but cannot reduce the measured pre-mesh surface-band wall, and the prior overlap mixed fine bins with far work. The `--max-clip-level=8` all-strata shell proof was also not implemented: fixed captures and the LOD0 shard audit do not establish survival of every remote thin stratum, and a trustworthy proof needs an exhaustive far-shell stratum walk. LOD6 remains the default.
Builds for the final candidate and step-8 trial succeeded with `/MP8`; logs: [step-4 candidate](round4_final_candidate_build.log) and [step-8 candidate](round4_owner_coarse8_build.log). Both retain the existing French `vswhere.exe` setup diagnostic and C4838 narrowing warnings from `VoxelStrateManager.cpp`. The initial continuation profiler wrapper failed with exit 2 after a PowerShell console-title pipe error. Shell starts then returned `0xC0000142`; the machine owner identified memory pressure from a game process using about 13 GB. That prototype was removed. During the resumed work no shell-start failure recurred and no build failed. The only nonzero workload exits in this round were the three radius-5 audit runs listed above (all exit 7 on GridStair). No external viewer was closed. No commit, push, or stash was made.
## Previous-round result (superseded above)