wip(assembler): M2 round 3 -- opt-in hybrid sharp mesher (WorldAssemblerHybridV1) in the Unreal Core route

Default MarchingCubesV1 unchanged (W1/W8/W16 = round-6 hashes). Hybrid DC only in LOD0 interior cells
with tagged features; tile-border cells and LOD1+ stay MC. BuildHost: fixtures repeat exactly, cooked
collision bounds = render bounds, same-LOD borders pass, sampled SurfaceWorld cliff bit-identical to MC.
Open: tagged tiles cost 5.7-6.7x MC; corner-top field contact error 20 cm; 5 MC doorway LOD cases.

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-10 09:53:04 +02:00
1 parent a3b7d2015e
commit 22a6b30494
21 files changed
+3009 -23

No files matched your search

+99 -4
View File
@@ -1,7 +1,11 @@
[CmdletBinding()]
param(
[ValidateRange(60, 900)][int]$TimeoutSeconds = 900,
[string]$WorldAssemblyManifestPath = ''
[string]$WorldAssemblyManifestPath = '',
[ValidateSet('MarchingCubesV1', 'WorldAssemblerHybridV1')][string]$CoreMesherRecipe = 'MarchingCubesV1',
[switch]$EnableHybridFixturePlacement,
[switch]$HybridCliffOnly,
[switch]$HybridFixturesOnly
)
# Exercise AVoxelWorld Core streaming, collision, anchor movement, and carving in BuildHost only.
@@ -83,6 +87,21 @@ $ManifestData = Get-Content -LiteralPath $StagedWorldAssembly -Raw | ConvertFrom
if ($ManifestData.content_hash -ne '8933693d9560ba9f') {
throw "BuildHost world assembly input is not the reviewed round-4 manifest: $($ManifestData.content_hash)"
}
if ($EnableHybridFixturePlacement -and $CoreMesherRecipe -ne 'WorldAssemblerHybridV1') {
throw 'Hybrid fixture placement requires -CoreMesherRecipe WorldAssemblerHybridV1.'
}
if ($HybridCliffOnly -and $CoreMesherRecipe -ne 'WorldAssemblerHybridV1') {
throw '-HybridCliffOnly requires -CoreMesherRecipe WorldAssemblerHybridV1.'
}
if ($HybridCliffOnly -and $EnableHybridFixturePlacement) {
throw '-HybridCliffOnly uses the reviewed native cliff manifest and cannot add the surface fixtures.'
}
if ($HybridFixturesOnly -and $CoreMesherRecipe -ne 'WorldAssemblerHybridV1') {
throw '-HybridFixturesOnly requires -CoreMesherRecipe WorldAssemblerHybridV1.'
}
if ($HybridFixturesOnly -and ($HybridCliffOnly -or $EnableHybridFixturePlacement)) {
throw '-HybridFixturesOnly cannot be combined with the other focused hybrid modes.'
}
$CrashBefore = @{}
foreach ($CrashRoot in $CrashRoots) {
@@ -107,6 +126,10 @@ function Get-NewCrashFolders {
return @($Found.ToArray())
}
$HybridMesherFlag = if ($CoreMesherRecipe -eq 'WorldAssemblerHybridV1') { 1 } else { 0 }
$HybridFixturePlacementFlag = if ($EnableHybridFixturePlacement) { 1 } else { 0 }
$HybridCliffOnlyFlag = if ($HybridCliffOnly) { 1 } else { 0 }
$HybridFixturesOnlyFlag = if ($HybridFixturesOnly) { 1 } else { 0 }
$BaseArguments = @(
('-project="{0}"' -f $HostProject),
'-nullrhi', '-unattended', '-nop4', '-nosplash', '-NoSound',
@@ -119,6 +142,10 @@ $BaseArguments = @(
'-modes=export', '-gameconfig=1', '-coreworldtest=1',
'-settingsref=/Game/VoxelForge/DA_Settings.DA_Settings',
('-coreworldassembly="{0}"' -f $StagedWorldAssembly),
("-corehybridmesher=$HybridMesherFlag"),
("-corehybridfixtureplacement=$HybridFixturePlacementFlag"),
("-corehybridcliffonly=$HybridCliffOnlyFlag"),
("-corehybridfixturesonly=$HybridFixturesOnlyFlag"),
('-out="{0}"' -f $OutputDirectory)
)
@@ -199,6 +226,40 @@ if (-not (Test-Path -LiteralPath $FinalLog -PathType Leaf)) {
$FinalLog = Join-Path $LogDirectory 'CoreWorldValidation.retry.log'
}
$Text = Get-Content -LiteralPath $FinalLog -Raw
if ($HybridFixturesOnly) {
foreach ($Fixture in @('corner90', 'doorway', 'riser1m', 'cliff_ledge', 'organic_cave_chamber')) {
$FixtureMarker = '\[WorldAssemblerHybridPluginFixture\] name=' +
[regex]::Escape($Fixture) + ' lod=0 .*exact_repeat=1'
if ($Text -notmatch $FixtureMarker) {
throw "BuildHost fixture log is missing '$Fixture'. See $FinalLog."
}
}
if ($Text -notmatch '\[WorldAssemblerHybridPluginBorder\] same_lod=PASS independent=1' -or
$Text -notmatch '\[WorldAssemblerHybridPluginBorder\] lod0_lod1_doorway=1 cases=125 over_50cm_cases=0') {
throw "BuildHost fixture log is missing passing border probes. See $FinalLog."
}
$NewCrashes = @(Get-NewCrashFolders)
if ($NewCrashes.Count -gt 0) {
throw "New UECC crash folders appeared during plugin fixture checks: $($NewCrashes -join '; ')"
}
Write-Host "VOXELFORGE_CORE_HYBRID_FIXTURES_PASS recipe=$CoreMesherRecipe analytic=5 borders=1"
Write-Host "Core actor log: $FinalLog"
Write-Host "Peak commandlet private bytes sampled: $PeakPrivateBytes"
return
}
if ($HybridCliffOnly) {
if ($Text -notmatch '\[WorldAssemblerHybridNativeCliff\] key=\(-22,13,-58\) lod=0 .*bit_identical=1 type4_only=1') {
throw "BuildHost log is missing the sampled native SurfaceWorld cliff identity proof. See $FinalLog."
}
$NewCrashes = @(Get-NewCrashFolders)
if ($NewCrashes.Count -gt 0) {
throw "New UECC crash folders appeared during the native cliff check: $($NewCrashes -join '; ')"
}
Write-Host "VOXELFORGE_CORE_HYBRID_CLIFF_PASS recipe=$CoreMesherRecipe bit_identical=1"
Write-Host "Core actor log: $FinalLog"
Write-Host "Peak commandlet private bytes sampled: $PeakPrivateBytes"
return
}
foreach ($Phase in @('initial', 'anchor', 'edit', 'surface_travel', 'surface_strate_travel')) {
if ($Text -notmatch "\[VoxelForgeCoreWorldTest\] pass phase=$Phase") {
throw "BuildHost Core actor log is missing the '$Phase' validation marker. See $FinalLog."
@@ -207,8 +268,42 @@ foreach ($Phase in @('initial', 'anchor', 'edit', 'surface_travel', 'surface_str
if ($Text -notmatch '\[VoxelForgeCoreWorldTest\] worker_hash_matrix=1/8/16 stable=1') {
throw "BuildHost Core actor log is missing the W1/W8/W16 determinism marker. See $FinalLog."
}
if ($Text -notmatch '\[VoxelForgeCoreWorldTest\] world_assembly_hash=8933693d9560ba9f plans=1 native=1') {
throw "BuildHost Core actor log does not prove the reviewed native SurfaceWorld plan was attached. See $FinalLog."
$ExpectedRuntimeAssemblyHash = $ManifestData.content_hash
if ($EnableHybridFixturePlacement) {
$FixtureHashMatch = [regex]::Match($Text,
'\[VoxelForgeCoreWorldTest\] hybrid_fixture_placement=1 boxes=9 contacts=5 manifest_hash=([0-9a-f]{16})')
if (-not $FixtureHashMatch.Success) {
throw "BuildHost actor log is missing the generated hybrid fixture manifest hash. See $FinalLog."
}
$ExpectedRuntimeAssemblyHash = $FixtureHashMatch.Groups[1].Value
}
$AssemblyMarker = '\[VoxelForgeCoreWorldTest\] world_assembly_hash=' +
[regex]::Escape($ExpectedRuntimeAssemblyHash) + ' plans=1 native=1'
if ($Text -notmatch $AssemblyMarker) {
throw "BuildHost actor log does not prove the expected native SurfaceWorld plan was attached. See $FinalLog."
}
$RecipeMarker = '\[VoxelForgeCoreWorldTest\] world_initialized=1 recipe=' +
[regex]::Escape($CoreMesherRecipe)
if ($Text -notmatch $RecipeMarker) {
throw "BuildHost actor log does not confirm the requested $CoreMesherRecipe runtime selection. See $FinalLog."
}
if ($CoreMesherRecipe -eq 'WorldAssemblerHybridV1') {
foreach ($Fixture in @('corner90', 'doorway', 'riser1m', 'cliff_ledge', 'organic_cave_chamber')) {
$FixtureMarker = '\[WorldAssemblerHybridPluginFixture\] name=' +
[regex]::Escape($Fixture) + ' lod=0 .*exact_repeat=1'
if ($Text -notmatch $FixtureMarker) {
throw "BuildHost log is missing the production mesher fixture '$Fixture'. See $FinalLog."
}
}
if ($Text -notmatch '\[WorldAssemblerHybridPluginBorder\] same_lod=PASS independent=1') {
throw "BuildHost log is missing the independent same-LOD border proof. See $FinalLog."
}
if ($Text -notmatch '\[WorldAssemblerHybridPluginBorder\] lod0_lod1_doorway=1 cases=125 over_50cm_cases=0') {
throw "BuildHost log is missing a passing 125-phase MC doorway contour result. See $FinalLog."
}
}
if ($EnableHybridFixturePlacement -and $Text -notmatch '\[VoxelForgeHybridCollisionContact\] pass=1 probes=5') {
throw "BuildHost log is missing the cooked hybrid fixture trace contacts. See $FinalLog."
}
if ($Text -notmatch '\[VoxelForgeCoreWorldTest\] native_biome_field=1 .*sampled_biomes=[2-9]') {
throw "BuildHost Core actor log does not prove native SurfaceWorld biome assignment. See $FinalLog."
@@ -241,6 +336,6 @@ $NewCrashes = @(Get-NewCrashFolders)
if ($NewCrashes.Count -gt 0) {
throw "New UECC crash folders appeared during Core actor validation: $($NewCrashes -join '; ')"
}
Write-Host 'VOXELFORGE_CORE_WORLD_PASS streaming=1 collision=1 anchor_move=1 carve=1'
Write-Host "VOXELFORGE_CORE_WORLD_PASS recipe=$CoreMesherRecipe fixtures=$HybridFixturePlacementFlag streaming=1 collision=1 anchor_move=1 carve=1"
Write-Host "Core actor log: $FinalLog"
Write-Host "Peak commandlet private bytes sampled: $PeakPrivateBytes"