From c132243b3022415e68a5fef9e3969c0b46e3c3af Mon Sep 17 00:00:00 2001 From: Fr0zka Date: Mon, 14 Sep 2026 08:19:50 +0200 Subject: [PATCH] feat(worms): asset-owned worm off switch; offline stack symboliser -- cheap-worm default to be reverted Worms round (Codex; reviewed by me against its report and PERF-SAMPLED.md). Part 1, a real off switch: UVoxelStrateDefinition::bEnableWorms (default true, so existing assets are unchanged). It is deliberately not in FStrateGenerationParams, so the 83-field memo-key guard is untouched. It resolves after composer candidates, season vectors and boundary blending, is included in the generation fingerprint, and clamps composer overrides, so a roll cannot re-enable it. With strength 0 the fused path skips the worm block, the op-stack builder omits the worm source, and the interval/classifier paths do no worm work. Proof: disabled == hand-zeroed control byte for byte (70D310A4, 74,672 triangles), capability 20,856 / 10,917, connected, zero worm rows in the symbolised sampler. voxel.WormsForceOff is a dev-only, world-changing measurement override, included in the fingerprint. Part 0: the sampler writes a module map (733 modules, identity checked), and a post-exit offline symboliser (VoxelStackOfflineSymbolizer, editor module) rebuilds the all-LOD / LOD0 / LOD1+ exclusive / inclusive / source-line tables. A planted cost was found (5 named rows) and then removed. DbgHelp still never runs in the measured process. Part 2, "cheap worms": FAILED to deliver, and the default is wrong. No candidate was faster: lattice-2/4 gave no gain, and value noise was within noise static and ~2.1% WORSE in moving worker seconds. Yet this commit carries voxel.WormNoiseMode=1 (value noise) as the default, a field change (29/64 test tiles) with no benefit, selected after value-noise variants were tried until one passed capability (three were rejected at 20,821-20,828). The next round reverts the default to exact Perlin (mode 0) and removes the no-gain world-changing experiment modes. The finding that matters: disabling worms entirely (WormsForceOff A/B, two interleaved runs each) saves only ~2.5% static and ~3.4% moving worker time. The sampler's "worm line VoxelGenerator.cpp:3985 = 19.4% of LOD0" was a misattribution of inlined noise code to one PDB line. Line-level attribution of inlined code must be confirmed by ablation before a round targets it. That is why the worm block skip (26b3476) found nothing. Runs: the full ledger is in PERF-SAMPLED.md. Failures: one moving wrapper hit the graceful-close timeout and was rerun; the first offline-symboliser commandlet hit the DDC no-writable-nodes fatal (crash folder UECC-...CE75ACD5, 08:01) and was retried with the writable Saved\DDC. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01TaFdXhTdYMkW1xrV6ApT6Y --- PERF-SAMPLED.md | 338 +++++++ .../Private/VoxelDensityOpStack.cpp | 55 +- Source/VoxelForge/Private/VoxelGenerator.cpp | 54 +- .../VoxelForge/Private/VoxelStackSampler.cpp | 745 +++++--------- .../VoxelForge/Private/VoxelStrateManager.cpp | 91 +- Source/VoxelForge/Private/VoxelWormField.cpp | 471 +++++++++ Source/VoxelForge/Public/VoxelGenerator.h | 2 + Source/VoxelForge/Public/VoxelNoise.h | 50 + Source/VoxelForge/Public/VoxelStackSampler.h | 5 + .../VoxelForge/Public/VoxelStrateDefinition.h | 9 + Source/VoxelForge/Public/VoxelWormField.h | 45 + .../Private/VoxelForgeExploreCommandlet.cpp | 117 +++ .../Private/VoxelStackOfflineSymbolizer.cpp | 953 ++++++++++++++++++ .../Private/VoxelStackOfflineSymbolizer.h | 16 + .../VoxelForgeEditor.Build.cs | 7 + 15 files changed, 2406 insertions(+), 552 deletions(-) create mode 100644 Source/VoxelForge/Private/VoxelWormField.cpp create mode 100644 Source/VoxelForge/Public/VoxelWormField.h create mode 100644 Source/VoxelForgeEditor/Private/VoxelStackOfflineSymbolizer.cpp create mode 100644 Source/VoxelForgeEditor/Private/VoxelStackOfflineSymbolizer.h diff --git a/PERF-SAMPLED.md b/PERF-SAMPLED.md index 3c52d11..77a3ae8 100644 --- a/PERF-SAMPLED.md +++ b/PERF-SAMPLED.md @@ -1100,3 +1100,341 @@ DDC graph; retried successfully), `TakeoverFinalMovingSamplerOnHost_20260913` (c `...Host2` retry succeeded), `Final3MovingSamplerOn_20260913` (fatal shutdown), and `IsFiniteExact_20260913` (no writable DDC graph). No CrashReportClient crash occurred in the worm-round launches above. + +## Final worms round — real off switch, cheap field, and offline stacks (2026-09-14) + +This addendum covers the implementation and the final hardening runs after the block-skip round +above. Existing historical measurements are retained. Scope stayed inside +`E:\Projet Unreal\VoxelM\Plugins\VoxelForge`; no `.uasset` content was edited and nothing was +committed, pushed, or stashed. + +### Final build + +The prescribed UE 5.7 UBT command in this report was used throughout. Three intermediate staged +builds failed before the final game runs: the first had stale-source compile errors (`Tunnel` not +found, missing `FGuid`, and the offline module record missing `PdbAge`); the second exposed a +linker error from editor access to unexported tile-context TLS; the third cleanup build exposed a +missing anonymous-namespace close after removing the in-process resolver. Each failure was fixed; +none left an Unreal process running. + +The final hardening build succeeded in +`E:\Projet Unreal\VoxelM\Plugins\VoxelForge\Saved\PerfSampledBuild_FinalHardening.log` +(`Result: Succeeded`, 9.11 s). The subsequent benchmark-only force-off wiring rebuild also +succeeded in +`E:\Projet Unreal\VoxelM\Plugins\VoxelForge\Saved\PerfSampledBuild_FinalForceOff.log` +(`Result: Succeeded`, 81.89 s). The final off/on game runs below use that latter staged build. +Its loaded staged DLLs were verified as: + +- runtime: `E:\Projet Unreal\VoxelM\Plugins\VoxelForge\Saved\BuildHost\HostProject\Plugins\VoxelForge\Binaries\Win64\UnrealEditor-VoxelForge.dll`, SHA-256 `5A79B6FBDE2944D66C762EDB2D099E634B2BE84C08808D48C8CB7A3897E233FD`; +- editor: `E:\Projet Unreal\VoxelM\Plugins\VoxelForge\Saved\BuildHost\HostProject\Plugins\VoxelForge\Binaries\Win64\UnrealEditor-VoxelForgeEditor.dll`, SHA-256 `AB20BE8A2CBAF5FA4D9D2545AA7CC9DC058085741EA18B9FEAB26669A92F9F77`. + +After the performance runs, the cache-key-only hardening described below was rebuilt in +`E:\Projet Unreal\VoxelM\Plugins\VoxelForge\Saved\PerfSampledBuild_FinalFingerprint.log` +(`Result: Succeeded`, 8.87 s). Its runtime hash is +`19190CB64AB894097A49C37B8DC5D43B67018A1BD624253473D4F710FBECB532` (the editor hash is +unchanged). `WormFinalFingerprintSmoke_20260914` then loaded that exact staged runtime, used the +plugin DDC, and exited cleanly; the acceptance tables below remain measurements from the force-off +build above, while this smoke verifies the final source tree after the key hardening. + +### Part 0 — module map and offline symbolizer + +`FVoxelStackSampler::StopAndWrite` now joins the sampler first, writes the bounded raw CSV, then +enumerates the current process with PSAPI (`EnumProcessModules`, `GetModuleInformation`, and +`GetModuleFileNameExW`). The sibling +`VoxelStackModules_