wip(unreal): VoxelForgeCore UBT module + asset adapter reproduce the standalone world

Luna, integration round 1 (BuildHost only; owner's project and assets untouched):
- New runtime module VoxelForgeCore: one shim per Standalone/Core/core_sources.txt row
  (sources stay canonical under Standalone/), NoPCH/no unity, manifest check; VoxelForge
  links it (no runtime routing yet). UE link-safety audit: 18 shims, 83,843 symbol lines
  vs 399 Unreal-style names, 0 clashes.
- Adapter (editor commandlet path) turns staged copies of the owner's DA_* assets into
  schema-v1 JSON; with clip_radius=3/max_clip_level=8 it reproduces all four Core hashes
  (0xdb2991c73215af4c, 0x8236c5edd7fc8e4f, 0x4c48fa75a543d58e, 0xbea22e76b34a4dfc) and
  walkability 5,642/5,642 at worker limits 1, 8 and 16.
- Noted: the owner's settings asset says max clip level 6 (standalone used 8); Core uses
  25 cm voxels vs the plugin runtime's 12.5 cm.
Not done yet: AVoxelWorld switch and Core runtime route (round 2).
Docs: CODEMAP, ARCHITECTURE, SHARED_CPP_LIBRARY_PLAN, UNREAL_INTEGRATION_REPORT.

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-08 19:38:18 +02:00
1 parent a1dfc0422e
commit 29ca99af7f
32 files changed
+919 -69

No files matched your search

+37
View File
@@ -1065,6 +1065,43 @@ timings are intentionally diagnostic metadata and do not affect world or image c
viewer remains a separate display-only consumer: it must load this OBJ/manifest and never evaluate
density or generate geometry.
### 8.17 Standalone Core in Unreal — integration round 1
**Status (2026-10-08):** the `VoxelForgeCore` runtime module and manifest shims build and link in the
isolated BuildHost. The editor commandlet can adapt the owner's copied settings/strate assets into
schema-v1 JSON, resolve it through `ResolvedWorldSnapshot::FromJson`, and reproduce the standalone
hashes at compile worker limits 1, 8, and 16. This has not yet changed the `AVoxelWorld` generation
route. There is no `bUseVoxelForgeCore` property, and no world should be switched yet.
The commandlet adapter is game-thread-only: it resolves UObjects and soft references, writes stable
property/map/set order, and emits values rather than UObject pointers. It writes the standalone
schema scale of 25 cm per voxel. The plugin's existing Runtime generator still defines
`VOXEL_SIZE=12.5 cm`, so a Core mesh-to-`FVoxelMeshData` bridge must define the coordinate/scale
conversion before runtime use. The staged `DA_Settings` also says `MaxClipLevel=6`, while the
standalone owner JSON says 8; hash validation keeps the authored JSON unchanged and applies the
reference harness view (`clip_radius=3`, `max_clip_level=8`) only to its validation copy.
The intended side-by-side runtime route is:
1. Add `bUseVoxelForgeCore=false` to `AVoxelWorld`. The false branch must retain the existing field,
mesher, output, streaming, and collision behavior.
2. On the game thread, adapt owner assets to an immutable schema-v1 snapshot. Keep UObjects out of
Core and worker data.
3. On the Core branch, ask `World::desiredTiles` and `prioritizeTiles` for the target set/order;
compile the initial field using a `JobScheduler` backed by Unreal's task system. The plugin still
owns work admission, worker lifetime, cancellation, `bShuttingDown`, and the generation `Epoch`.
4. Run `generateTile` on the plugin workers, explicitly reconcile Core centimetre positions with
the Runtime voxel scale, then copy mesh arrays/groups into `FVoxelMeshData`. Let the existing
`BuildTileStreamSet` → MPSC result → epoch check → RealtimeMesh upload/collision-cook path consume
the result.
5. For carving, drain Core calls on the current `World`, call `applyEditTransaction` with an
authority sequence and ordered brushes, bump the epoch, and regenerate its returned desired tiles.
Keep the current plugin behavior when the switch is false.
The module-link and asset-adapter evidence, including the settings mismatch and incomplete runtime
work, is recorded in [`Standalone/UNREAL_INTEGRATION_REPORT.md`](Standalone/UNREAL_INTEGRATION_REPORT.md).
Keep every §8.10 streaming, cancellation, epoch, collision-handoff, and per-frame-budget invariant
when implementing this route; Core does not own those systems.
## 9. Multiplayer model (listen-server first, dedicated-friendly)
> **Status: transport is DESIGN ONLY — nothing is networked in-tree yet** (no `Replicated`/`HasAuthority`/RPCs; a