wip(assembler): M3 round 3 -- separated islands + Unreal island route (owner build 18:46)

Islands read as separate (91.89% open sky at mid-height), underside cavity closed,
rim teeth were capture shading. Island manifest import + BuildHost proof passed on the
pre-cache tree; M1 SurfaceWorld and M2 V1/V2 gates passed.

Known open: final XY-column cache compiled in the owner build but is unverified;
island LOD0 p95 ~155 ms misses the 133 ms sprint deadline (legacy ~43 ms); the island
manifest only fits the BuildHost fixture layout (owner's world: Core init fails,
empty world) -> round 4 builds plans inside Unreal.

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 20:53:03 +02:00
1 parent 4afea7c802
commit 48fa028086
37 files changed
+3788 -107

No files matched your search

@@ -0,0 +1,118 @@
[CmdletBinding()]
param(
[string]$ProbePath = (Join-Path $PSScriptRoot '..\..\OwnerShapeWorld\core_strate_coverage\probes\type_6_FloatingIslands.json'),
[string]$OutputDirectory = (Join-Path $PSScriptRoot 'results')
)
$ErrorActionPreference = 'Stop'
$ScriptProcess = Get-Process -Id $PID
$ScriptProcess.PriorityClass = 'BelowNormal'
$StandaloneRoot = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..\..\..'))
$BuildRoot = Join-Path $StandaloneRoot 'Build\VoxelForgeCore'
$CoreLibrary = Join-Path $BuildRoot 'VoxelForgeCore.lib'
$AuditSource = Join-Path $PSScriptRoot 'FloatingIslandsAudit.cpp'
$AuditExe = Join-Path $BuildRoot 'FloatingIslandsAudit.exe'
$ProbePath = [IO.Path]::GetFullPath($ProbePath)
$OutputDirectory = [IO.Path]::GetFullPath($OutputDirectory)
$VcVars = 'E:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat'
if (-not (Test-Path -LiteralPath $CoreLibrary -PathType Leaf)) { throw "Core library is missing: $CoreLibrary" }
if (-not (Test-Path -LiteralPath $ProbePath -PathType Leaf)) { throw "Legacy probe is missing: $ProbePath" }
if (-not (Test-Path -LiteralPath $VcVars -PathType Leaf)) { throw "MSVC environment script is missing: $VcVars" }
[IO.Directory]::CreateDirectory($OutputDirectory) | Out-Null
$IncludeArgs = @(
('/I"{0}"' -f (Join-Path $StandaloneRoot 'Core\include')),
('/I"{0}"' -f (Join-Path $StandaloneRoot 'Core\src')),
('/I"{0}"' -f (Join-Path $StandaloneRoot 'Compat')),
('/I"{0}"' -f (Join-Path $StandaloneRoot 'Source')),
('/I"{0}"' -f (Join-Path $StandaloneRoot 'Source\VoxelForge\Public')),
('/I"{0}"' -f (Join-Path $StandaloneRoot 'Source\VoxelForge\Private'))
)
$LegacyObjectNames = @(
'UnrealPerlin.obj','StandaloneDataAssetGlue.obj','VoxelBiomeDefinition.obj','VoxelCaveMorphology.obj',
'VoxelDensityAblation.obj','VoxelDensityOpStack.obj','VoxelDensityProfile.obj','VoxelDiffLayer.obj',
'VoxelGenerator.obj','VoxelHeightOpStack.obj','VoxelMarchingCubesMesher.obj','VoxelSettings.obj',
'VoxelStrateComposer.obj','VoxelStrateManager.obj','VoxelStrateMeasure.obj','VoxelTerrainOpDefinition.obj',
'VoxelWormField.obj','GpuFarViewerLinkStubs.obj'
)
foreach ($ObjectName in $LegacyObjectNames) {
if (-not (Test-Path -LiteralPath (Join-Path $BuildRoot $ObjectName) -PathType Leaf)) {
throw "Required legacy bridge object is missing: $ObjectName; run Standalone/Build.ps1 -Target All first."
}
}
$ResponsePath = Join-Path $BuildRoot 'floating-islands-audit.rsp'
$ResponseLines = @('/nologo','/std:c++20','/O2','/arch:AVX2','/fp:precise','/EHsc','/D_CRT_SECURE_NO_WARNINGS') +
$IncludeArgs + @(('/Fe"{0}"' -f $AuditExe),('"{0}"' -f $AuditSource)) +
@($LegacyObjectNames | ForEach-Object { '"{0}"' -f $_ }) + @(
('"{0}"' -f $CoreLibrary),'/link','d3d11.lib','dxgi.lib','d3dcompiler.lib','user32.lib','gdi32.lib'
)
[IO.File]::WriteAllLines($ResponsePath,$ResponseLines,[Text.UTF8Encoding]::new($false))
Push-Location $BuildRoot
try {
$CompileCommand = 'call "{0}" >nul && cl.exe @"{1}"' -f $VcVars,$ResponsePath
& $env:ComSpec /d /s /c $CompileCommand
if ($LASTEXITCODE -eq -1073741502) { throw 'Audit build exited with 0xC0000142; retry once using this same wrapper.' }
if ($LASTEXITCODE -ne 0) { throw "Floating-island audit build failed with exit code $LASTEXITCODE" }
if (-not (Test-Path -LiteralPath $AuditExe -PathType Leaf)) { throw "Audit executable was not produced: $AuditExe" }
} finally { Pop-Location }
$RunLedger = Join-Path $OutputDirectory 'run_ledger.txt'
$RunRecords = [Collections.Generic.List[string]]::new()
$Succeeded = $false
for ($Attempt = 1; $Attempt -le 2 -and -not $Succeeded; ++$Attempt) {
$StartInfo = [Diagnostics.ProcessStartInfo]::new()
$StartInfo.FileName = $AuditExe
$StartInfo.Arguments = '"{0}" "{1}"' -f $ProbePath.Replace('"','\"'),$OutputDirectory.Replace('"','\"')
$StartInfo.WorkingDirectory = $BuildRoot
$StartInfo.UseShellExecute = $false
$StartInfo.CreateNoWindow = $true
$StartInfo.RedirectStandardOutput = $true
$StartInfo.RedirectStandardError = $true
$Process = [Diagnostics.Process]::new()
$Process.StartInfo = $StartInfo
[void]$Process.Start()
try { $Process.PriorityClass = 'BelowNormal' } catch { }
$StdoutTask = $Process.StandardOutput.ReadToEndAsync()
$StderrTask = $Process.StandardError.ReadToEndAsync()
$Clock = [Diagnostics.Stopwatch]::StartNew()
[int64]$PeakPrivateBytes = 0
$LimitFailure = $null
while (-not $Process.WaitForExit(250)) {
$Process.Refresh()
$PeakPrivateBytes = [Math]::Max($PeakPrivateBytes,$Process.PrivateMemorySize64)
if ($PeakPrivateBytes -gt 8GB) {
$LimitFailure = 'process private bytes exceeded 8 GiB'
$Process.Kill()
break
}
if ($Clock.Elapsed.TotalMinutes -ge 15.0) {
$LimitFailure = 'audit test exceeded the 15-minute time box'
$Process.Kill()
break
}
}
$Process.WaitForExit()
$Clock.Stop()
$Process.Refresh()
$PeakPrivateBytes = [Math]::Max($PeakPrivateBytes,$Process.PrivateMemorySize64)
$Stdout = $StdoutTask.GetAwaiter().GetResult()
$Stderr = $StderrTask.GetAwaiter().GetResult()
if ($Stdout) { Write-Output $Stdout.TrimEnd() }
if ($Stderr) { [Console]::Error.WriteLine($Stderr.TrimEnd()) }
$ExitCode = $Process.ExitCode
$Status = if ($LimitFailure) { $LimitFailure } elseif ($ExitCode -eq 0) { 'passed' } else { "failed exit=$ExitCode" }
$RunRecords.Add("attempt=$Attempt status=$Status elapsed_s=$([Math]::Round($Clock.Elapsed.TotalSeconds,2)) peak_private_MiB=$([Math]::Round($PeakPrivateBytes/1MB,1)) exit=$ExitCode")
if ($LimitFailure) { break }
if ($ExitCode -eq 0) { $Succeeded = $true; break }
if ($ExitCode -eq -1073741502 -and $Attempt -eq 1) {
$RunRecords.Add('retry_reason=0xC0000142 single permitted retry')
continue
}
break
}
[IO.File]::WriteAllLines($RunLedger,$RunRecords,[Text.UTF8Encoding]::new($false))
Get-Content -LiteralPath $RunLedger | Write-Output
if (-not $Succeeded) { throw "Floating-island audit run failed or exceeded a process limit. See $RunLedger" }
Write-Output "audit_executable=$AuditExe"
Write-Output "audit_results=$OutputDirectory"
@@ -0,0 +1,923 @@
#include "CoreMinimal.h"
#include "OwnerWorldLoader.h"
#include "VoxelForgeCore/VoxelForgeCore.h"
#include <algorithm>
#include <array>
#include <chrono>
#include <cmath>
#include <cstdint>
#include <filesystem>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <numeric>
#include <sstream>
#include <stdexcept>
#include <string>
#include <thread>
#include <vector>
#if defined(_WIN32)
#ifdef TEXT
#undef TEXT
#endif
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <Windows.h>
#ifdef TEXT
#undef TEXT
#endif
#endif
namespace
{
using namespace VoxelForgeCore;
constexpr std::int64_t Q = WorldAssemblySubvoxelsPerVoxel;
using Clock = std::chrono::steady_clock;
using Point = std::array<std::int64_t, 3>;
struct OracleAnchor
{
Point surfaceQ{};
std::uint32_t supportScore = 0;
};
struct SampleStats
{
std::string hash;
double legacyMilliseconds = 0.0;
double nativeMilliseconds = 0.0;
std::uint64_t signMismatches = 0;
std::uint64_t legacySolidSamples = 0;
std::uint64_t nativeSolidSamples = 0;
std::uint64_t legacyOnlySolidSamples = 0;
std::uint64_t nativeOnlySolidSamples = 0;
double legacyChecksum = 0.0;
double nativeChecksum = 0.0;
};
struct Triangle
{
std::array<float, 12> values{}; // Three xyz vertices followed by one flat normal.
};
struct MeshResult
{
std::uint64_t gridSamples = 0;
std::uint64_t triangles = 0;
std::uint64_t bytes = 0;
};
struct ExistingHashes
{
std::string round1Manifest;
std::string surfaceWorldRound4Manifest;
};
struct OpenSkyAudit
{
std::array<std::int64_t, 2> minimumXY{};
std::array<std::int64_t, 2> maximumXY{};
std::int64_t midHeight = 0;
std::uint64_t openSamples = 0;
std::uint64_t totalSamples = 0;
};
std::uint64_t Mix(std::uint64_t value)
{
value += 0x9e3779b97f4a7c15ull;
value = (value ^ (value >> 30)) * 0xbf58476d1ce4e5b9ull;
value = (value ^ (value >> 27)) * 0x94d049bb133111ebull;
return value ^ (value >> 31);
}
std::uint64_t Next(std::uint64_t& state)
{
state += 0x9e3779b97f4a7c15ull;
return Mix(state);
}
std::int64_t VoxQ(double value)
{ return static_cast<std::int64_t>(std::llround(value * static_cast<double>(Q))); }
std::string Hex64(std::uint64_t value)
{
std::ostringstream output;
output << std::hex << std::setfill('0') << std::setw(16) << value;
return output.str();
}
std::string HashValues(const std::vector<std::int64_t>& values)
{
std::uint64_t hash = 14695981039346656037ull;
for (const auto value : values)
for (int byte = 0; byte < 8; ++byte)
{
hash ^= static_cast<std::uint8_t>(static_cast<std::uint64_t>(value) >> (byte * 8));
hash *= 1099511628211ull;
}
return Hex64(hash);
}
ExistingHashes VerifyExistingManifests(const std::filesystem::path& standaloneRoot)
{
const auto read = [](const std::filesystem::path& path)
{
std::ifstream input(path, std::ios::binary);
if (!input) throw std::runtime_error("cannot read existing manifest: " + path.string());
return std::string(std::istreambuf_iterator<char>(input), std::istreambuf_iterator<char>());
};
ExistingHashes hashes;
std::string error;
const auto round1 = WorldAssemblyManifest::FromJson(read(
standaloneRoot / "Research/WorldAssemblerM1/round1-manifest.json"), error);
if (!round1 || !round1->validate(error)
|| Hex64(round1->contentHash) != "c87ae279b0e26f53")
throw std::runtime_error("existing M1 manifest hash changed or failed validation: " + error);
hashes.round1Manifest = Hex64(round1->contentHash);
error.clear();
const auto surface = WorldAssemblyManifest::FromJson(read(
standaloneRoot / "Research/WorldAssemblerM1/round4/world_assembly.json"), error);
if (!surface || !surface->validate(error)
|| Hex64(surface->contentHash) != "8933693d9560ba9f")
throw std::runtime_error("existing SurfaceWorld round-4 hash changed or failed validation: " + error);
hashes.surfaceWorldRound4Manifest = Hex64(surface->contentHash);
return hashes;
}
float LegacyDensity(const FStandaloneOwnerWorld& owner, const Point& q)
{
constexpr double CoreToLegacyVoxelScale = 2.0;
return owner.Generator->GetDensityAt(
static_cast<float>(CoreToLegacyVoxelScale * q[0] / static_cast<double>(Q)),
static_cast<float>(CoreToLegacyVoxelScale * q[1] / static_cast<double>(Q)),
static_cast<float>(CoreToLegacyVoxelScale * q[2] / static_cast<double>(Q)));
}
OracleAnchor FindLegacyAnchor(const FStandaloneOwnerWorld& owner)
{
OracleAnchor best;
const float highZ = -560.0f;
const float lowZ = -2480.0f;
constexpr float ScanStep = 8.0f;
for (int y = -448; y <= 448; y += 16)
for (int x = -448; x <= 448; x += 16)
{
float airZ = highZ;
float above = owner.Generator->GetDensityAt(static_cast<float>(x),
static_cast<float>(y), airZ);
if (above < 0.0f) continue;
for (float solidZ = highZ - ScanStep; solidZ >= lowZ; solidZ -= ScanStep)
{
const float density = owner.Generator->GetDensityAt(static_cast<float>(x),
static_cast<float>(y), solidZ);
if (density < 0.0f)
{
float outside = airZ, inside = solidZ;
for (int iteration = 0; iteration < 12; ++iteration)
{
const float middle = (outside + inside) * 0.5f;
if (owner.Generator->GetDensityAt(static_cast<float>(x),
static_cast<float>(y), middle) < 0.0f) inside = middle;
else outside = middle;
}
const std::int64_t topQ = VoxQ(outside);
std::uint32_t score = 0;
for (int dy = -16; dy <= 16; dy += 8)
for (int dx = -16; dx <= 16; dx += 8)
if (owner.Generator->GetDensityAt(static_cast<float>(x + dx),
static_cast<float>(y + dy),
static_cast<float>((topQ - 4 * Q) / static_cast<double>(Q))) < 0.0f)
++score;
if (score > best.supportScore
|| (score == best.supportScore
&& std::abs(x) + std::abs(y)
< std::abs(best.surfaceQ[0] / Q) + std::abs(best.surfaceQ[1] / Q)))
{
best.surfaceQ = {static_cast<std::int64_t>(x) * Q,
static_cast<std::int64_t>(y) * Q, topQ};
best.supportScore = score;
}
break; // The first air-to-solid crossing is the island top.
}
airZ = solidZ;
}
}
return best;
}
std::vector<Point> MakeSamples(const FloatingIslandInfluenceBounds& bounds,
std::size_t count, std::uint64_t seed)
{
std::vector<Point> points(count);
std::uint64_t state = seed;
for (auto& point : points)
for (std::size_t axis = 0; axis < 3; ++axis)
{
const std::uint64_t span = static_cast<std::uint64_t>(
bounds.maximumSubvoxels[axis] - bounds.minimumSubvoxels[axis] + 1);
point[axis] = bounds.minimumSubvoxels[axis]
+ static_cast<std::int64_t>(Next(state) % std::max<std::uint64_t>(span, 1));
}
return points;
}
OpenSkyAudit MeasureOpenSky(const FloatingIslandFieldV1& field)
{
OpenSkyAudit result;
const FloatingIslandInfluenceBounds bounds = field.influenceBounds();
if (!bounds.finite) throw std::runtime_error("floating-island cluster has no finite bounds");
result.minimumXY = {bounds.minimumSubvoxels[0], bounds.minimumSubvoxels[1]};
result.maximumXY = {bounds.maximumSubvoxels[0], bounds.maximumSubvoxels[1]};
result.midHeight = (bounds.minimumSubvoxels[2] + bounds.maximumSubvoxels[2]) / 2;
constexpr std::int64_t SampleStep = 4 * Q;
for (std::int64_t y = result.minimumXY[1]; y <= result.maximumXY[1]; y += SampleStep)
for (std::int64_t x = result.minimumXY[0]; x <= result.maximumXY[0]; x += SampleStep)
{
if (field.densitySubvoxels(x, y, result.midHeight) >= 0) ++result.openSamples;
++result.totalSamples;
}
return result;
}
void WriteIslandImportManifest(const std::filesystem::path& standaloneRoot,
const FloatingIslandManifestV1& islands, const FStrateSlot& slot,
const std::filesystem::path& outputDir)
{
const auto parentPath = standaloneRoot / "Research/WorldAssemblerM1/round4/world_assembly.json";
std::ifstream parentInput(parentPath, std::ios::binary);
if (!parentInput) throw std::runtime_error("cannot read seed-matched parent world assembly recipe");
const std::string parentText{std::istreambuf_iterator<char>(parentInput),
std::istreambuf_iterator<char>()};
std::string error;
auto parsedParent = WorldAssemblyManifest::FromJson(parentText, error);
if (!parsedParent) throw std::runtime_error("cannot parse parent world assembly recipe: " + error);
parsedParent->plan.strates.clear();
parsedParent->floatingIslands.clear();
WorldAssemblyFloatingIslandPlanV1 entry;
entry.strateIndex = slot.StrateIndex;
entry.topChunkZ = slot.TopChunkZ;
entry.bottomChunkZ = slot.BottomChunkZ;
entry.manifest = islands;
parsedParent->floatingIslands.push_back(std::move(entry));
if (!parsedParent->finalize(error))
throw std::runtime_error("combined island import manifest is invalid: " + error);
const std::string canonical = parsedParent->ToJson();
const auto roundTrip = WorldAssemblyManifest::FromJson(canonical, error);
if (canonical.empty() || !roundTrip || roundTrip->ToJson() != canonical)
throw std::runtime_error("combined island import manifest failed canonical round-trip: " + error);
std::ofstream nested(outputDir / "floating_island_manifest.json", std::ios::trunc);
nested << islands.ToJson() << '\n';
if (!nested) throw std::runtime_error("cannot write nested floating-island manifest");
std::ofstream combined(outputDir / "world_assembly_floating_islands.json", std::ios::trunc);
combined << canonical << '\n';
if (!combined) throw std::runtime_error("cannot write combined floating-island import manifest");
}
SampleStats HashWithWorkers(const FloatingIslandFieldV1& field,
const FStandaloneOwnerWorld& owner, const std::vector<Point>& points,
std::uint32_t workers, bool measure)
{
std::vector<std::int64_t> values(points.size());
std::vector<std::thread> threads;
threads.reserve(workers);
const auto evaluate = [&](std::uint32_t worker)
{
for (std::size_t i = worker; i < points.size(); i += workers)
values[i] = field.densitySubvoxels(points[i][0], points[i][1], points[i][2]);
};
for (std::uint32_t worker = 0; worker < workers; ++worker)
threads.emplace_back(evaluate, worker);
for (auto& thread : threads) thread.join();
SampleStats stats;
stats.hash = HashValues(values);
if (!measure) return stats;
std::vector<float> legacyValues(points.size());
const auto beginLegacy = Clock::now();
double legacyChecksum = 0.0;
for (std::size_t i = 0; i < points.size(); ++i)
{
const float value = LegacyDensity(owner, points[i]);
legacyValues[i] = value;
legacyChecksum += value;
}
const auto endLegacy = Clock::now();
const auto beginNative = Clock::now();
double nativeChecksum = 0.0;
for (const Point& point : points)
nativeChecksum += static_cast<double>(field.densitySubvoxels(
point[0], point[1], point[2])) / static_cast<double>(Q);
const auto endNative = Clock::now();
for (std::size_t i = 0; i < values.size(); ++i)
{
const bool legacySolid = legacyValues[i] < 0.0f;
const bool nativeSolid = values[i] < 0;
if (legacySolid) ++stats.legacySolidSamples;
if (nativeSolid) ++stats.nativeSolidSamples;
if (legacySolid && !nativeSolid) ++stats.legacyOnlySolidSamples;
if (nativeSolid && !legacySolid) ++stats.nativeOnlySolidSamples;
if (legacySolid != nativeSolid) ++stats.signMismatches;
}
stats.legacyMilliseconds = std::chrono::duration<double, std::milli>(endLegacy - beginLegacy).count();
stats.nativeMilliseconds = std::chrono::duration<double, std::milli>(endNative - beginNative).count();
stats.legacyChecksum = legacyChecksum;
stats.nativeChecksum = nativeChecksum;
return stats;
}
using D3 = std::array<double, 3>;
D3 Add(D3 a, D3 b) { return {a[0] + b[0], a[1] + b[1], a[2] + b[2]}; }
D3 Sub(D3 a, D3 b) { return {a[0] - b[0], a[1] - b[1], a[2] - b[2]}; }
D3 Mul(D3 a, double s) { return {a[0] * s, a[1] * s, a[2] * s}; }
double Dot(D3 a, D3 b) { return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; }
D3 Cross(D3 a, D3 b)
{ return {a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]}; }
double Length(D3 a) { return std::sqrt(Dot(a, a)); }
D3 Normalize(D3 a)
{
const double length = Length(a);
return length > 1e-12 ? Mul(a, 1.0 / length) : D3{0.0, 0.0, 1.0};
}
double SampleNative(const FloatingIslandFieldV1& field, const Point& q)
{ return static_cast<double>(field.densitySubvoxels(q[0], q[1], q[2])) / static_cast<double>(Q); }
double SampleLegacy(const FStandaloneOwnerWorld& owner, const Point& q)
{ return static_cast<double>(LegacyDensity(owner, q)); }
double TetGradient(const std::array<D3, 4>& points, const std::array<double, 4>& values, D3& output)
{
const D3 a = Sub(points[1], points[0]);
const D3 b = Sub(points[2], points[0]);
const D3 c = Sub(points[3], points[0]);
const D3 bc = Cross(b, c), ca = Cross(c, a), ab = Cross(a, b);
const double determinant = Dot(a, bc);
if (std::abs(determinant) < 1e-12) { output = {0.0, 0.0, 1.0}; return 0.0; }
output = Mul(Add(Add(Mul(bc, values[1] - values[0]),
Mul(ca, values[2] - values[0])), Mul(ab, values[3] - values[0])), 1.0 / determinant);
return Length(output);
}
MeshResult ExtractMesh(const std::filesystem::path& outputPath,
Point minimumQ, Point maximumQ, std::int64_t stepQ,
const std::function<double(const Point&)>& density)
{
const std::size_t nx = static_cast<std::size_t>((maximumQ[0] - minimumQ[0]) / stepQ + 1);
const std::size_t ny = static_cast<std::size_t>((maximumQ[1] - minimumQ[1]) / stepQ + 1);
const std::size_t nz = static_cast<std::size_t>((maximumQ[2] - minimumQ[2]) / stepQ + 1);
const std::size_t gridCount = nx * ny * nz;
if (gridCount > 4'000'000) throw std::runtime_error("mesh grid exceeds the 4M-sample cap");
std::vector<float> grid(gridCount);
const auto gridIndex = [=](std::size_t x, std::size_t y, std::size_t z)
{ return (z * ny + y) * nx + x; };
for (std::size_t z = 0; z < nz; ++z)
for (std::size_t y = 0; y < ny; ++y)
for (std::size_t x = 0; x < nx; ++x)
{
const Point q{minimumQ[0] + static_cast<std::int64_t>(x) * stepQ,
minimumQ[1] + static_cast<std::int64_t>(y) * stepQ,
minimumQ[2] + static_cast<std::int64_t>(z) * stepQ};
grid[gridIndex(x, y, z)] = static_cast<float>(density(q));
}
constexpr std::array<std::array<int, 3>, 8> Corner = {{{0,0,0},{1,0,0},{1,1,0},{0,1,0},
{0,0,1},{1,0,1},{1,1,1},{0,1,1}}};
constexpr std::array<std::array<int, 4>, 6> Tets = {{{0,5,1,6},{0,1,2,6},{0,2,3,6},
{0,3,7,6},{0,7,4,6},{0,4,5,6}}};
constexpr std::array<std::array<int, 2>, 6> TetEdges = {{{0,1},{0,2},{0,3},{1,2},{1,3},{2,3}}};
std::vector<Triangle> triangles;
triangles.reserve(8192);
for (std::size_t z = 0; z + 1 < nz; ++z)
for (std::size_t y = 0; y + 1 < ny; ++y)
for (std::size_t x = 0; x + 1 < nx; ++x)
{
std::array<D3, 8> cubePoints{};
std::array<double, 8> cubeValues{};
double low = std::numeric_limits<double>::infinity();
double high = -std::numeric_limits<double>::infinity();
for (std::size_t corner = 0; corner < Corner.size(); ++corner)
{
const auto& offset = Corner[corner];
cubePoints[corner] = {
static_cast<double>(minimumQ[0] + static_cast<std::int64_t>(x + offset[0]) * stepQ) / Q,
static_cast<double>(minimumQ[1] + static_cast<std::int64_t>(y + offset[1]) * stepQ) / Q,
static_cast<double>(minimumQ[2] + static_cast<std::int64_t>(z + offset[2]) * stepQ) / Q};
cubeValues[corner] = grid[gridIndex(x + offset[0], y + offset[1], z + offset[2])];
low = std::min(low, cubeValues[corner]);
high = std::max(high, cubeValues[corner]);
}
if (low >= 0.0 || high < 0.0) continue;
for (const auto& tet : Tets)
{
std::array<D3, 4> points{};
std::array<double, 4> values{};
for (std::size_t i = 0; i < 4; ++i)
{ points[i] = cubePoints[tet[i]]; values[i] = cubeValues[tet[i]]; }
std::array<D3, 4> polygon{};
std::size_t polygonCount = 0;
for (const auto& edge : TetEdges)
{
const int ia = edge[0], ib = edge[1];
if ((values[ia] < 0.0) == (values[ib] < 0.0)) continue;
const double t = values[ia] / (values[ia] - values[ib]);
const D3 point = Add(points[ia], Mul(Sub(points[ib], points[ia]), t));
bool duplicate = false;
for (std::size_t i = 0; i < polygonCount; ++i)
if (Length(Sub(polygon[i], point)) < 1e-7) { duplicate = true; break; }
if (!duplicate && polygonCount < polygon.size()) polygon[polygonCount++] = point;
}
if (polygonCount < 3) continue;
D3 normal{};
TetGradient(points, values, normal);
normal = Normalize(normal);
D3 center{};
for (std::size_t i = 0; i < polygonCount; ++i) center = Add(center, polygon[i]);
center = Mul(center, 1.0 / polygonCount);
const D3 axis = std::abs(normal[2]) < 0.85 ? D3{0,0,1} : D3{0,1,0};
const D3 right = Normalize(Cross(axis, normal));
const D3 up = Normalize(Cross(normal, right));
std::array<std::pair<double, D3>, 4> ordered{};
for (std::size_t i = 0; i < polygonCount; ++i)
{
const D3 delta = Sub(polygon[i], center);
ordered[i] = {std::atan2(Dot(delta, up), Dot(delta, right)), polygon[i]};
}
std::sort(ordered.begin(), ordered.begin() + polygonCount,
[](const auto& a, const auto& b) { return a.first < b.first; });
for (std::size_t i = 1; i + 1 < polygonCount; ++i)
{
D3 a = ordered[0].second, b = ordered[i].second, c = ordered[i + 1].second;
if (Dot(Cross(Sub(b, a), Sub(c, a)), normal) < 0.0) std::swap(b, c);
Triangle triangle;
for (std::size_t axisIndex = 0; axisIndex < 3; ++axisIndex)
{
triangle.values[axisIndex] = static_cast<float>(a[axisIndex]);
triangle.values[3 + axisIndex] = static_cast<float>(b[axisIndex]);
triangle.values[6 + axisIndex] = static_cast<float>(c[axisIndex]);
triangle.values[9 + axisIndex] = static_cast<float>(normal[axisIndex]);
}
triangles.push_back(triangle);
}
}
}
std::ofstream output(outputPath, std::ios::binary | std::ios::trunc);
if (!output) throw std::runtime_error("cannot create mesh capture: " + outputPath.string());
const std::uint32_t count = static_cast<std::uint32_t>(triangles.size());
output.write("VFMI", 4);
output.write(reinterpret_cast<const char*>(&count), sizeof(count));
for (const auto& triangle : triangles)
output.write(reinterpret_cast<const char*>(triangle.values.data()),
static_cast<std::streamsize>(sizeof(triangle.values)));
output.close();
MeshResult result;
result.gridSamples = gridCount;
result.triangles = triangles.size();
result.bytes = std::filesystem::file_size(outputPath);
return result;
}
void WriteJson(const std::filesystem::path& path, const FloatingIslandManifestV1& manifest,
const FloatingIslandBoundsAuditResult& bounds, const FloatingIslandRouteAuditResult& route,
const FloatingIslandRouteAuditResult& raised, const SampleStats& sample,
const FloatingIslandThicknessAuditResult& thickness,
const FloatingIslandThicknessAuditResult& thinThickness,
const OracleAnchor& anchor, const std::array<MeshResult, 4>& meshes,
const std::array<std::string, 3>& fieldHashes, const ExistingHashes& oldHashes,
const OpenSkyAudit& openSky)
{
const Point ownerAnchorQ = anchor.surfaceQ;
const Point coreAnchorQ{ownerAnchorQ[0] / 2, ownerAnchorQ[1] / 2, ownerAnchorQ[2] / 2};
std::ofstream out(path, std::ios::trunc);
if (!out) throw std::runtime_error("cannot create audit result JSON");
out << std::setprecision(12);
out << "{\n \"recipe_hash\":\"" << Hex64(manifest.recipe.contentHash)
<< "\",\n \"plan_hash\":\"" << Hex64(manifest.plan.contentHash)
<< "\",\n \"manifest_hash\":\"" << Hex64(manifest.contentHash)
<< "\",\n \"unchanged_existing_hashes\":{\"m1_round1_manifest\":\""
<< oldHashes.round1Manifest << "\",\"surfaceworld_round4_manifest\":\""
<< oldHashes.surfaceWorldRound4Manifest << "\"}"
<< ",\n \"geometry_version\":" << manifest.recipe.geometryVersion
<< ",\n \"owner_voxel_size_cm\":12.5,\n \"core_voxel_size_cm\":25"
<< ",\n \"owner_to_core_length_scale\":0.5"
<< ",\n \"plan_islands\":" << manifest.plan.islands.size()
<< ",\n \"mid_height_open_sky\":{\"sampling_step_m\":1.0,\"z_core_voxels\":"
<< openSky.midHeight / static_cast<double>(Q)
<< ",\"bounds_xy_core_voxels\":["
<< openSky.minimumXY[0] / static_cast<double>(Q) << ','
<< openSky.minimumXY[1] / static_cast<double>(Q) << ','
<< openSky.maximumXY[0] / static_cast<double>(Q) << ','
<< openSky.maximumXY[1] / static_cast<double>(Q)
<< "],\"open_samples\":" << openSky.openSamples
<< ",\"total_samples\":" << openSky.totalSamples
<< ",\"open_fraction\":" << (openSky.totalSamples
? static_cast<double>(openSky.openSamples) / openSky.totalSamples : 0.0) << "}"
<< ",\n \"plan_connectors\":" << manifest.plan.clusterEdges.size()
<< ",\n \"route_points\":" << manifest.plan.route.size()
<< ",\n \"legacy_anchor_owner_voxels\":[" << ownerAnchorQ[0] / static_cast<double>(Q)
<< ',' << ownerAnchorQ[1] / static_cast<double>(Q) << ','
<< ownerAnchorQ[2] / static_cast<double>(Q) << ']'
<< ",\n \"comparison_anchor_core_voxels\":[" << coreAnchorQ[0] / static_cast<double>(Q)
<< ',' << coreAnchorQ[1] / static_cast<double>(Q) << ','
<< coreAnchorQ[2] / static_cast<double>(Q) << "],\n \"legacy_anchor_plateau_samples\":"
<< anchor.supportScore << ",\n \"recipe_parameters\":{\"seed\":" << manifest.recipe.seed
<< ",\"primary_island_count\":" << manifest.recipe.primaryIslandCount
<< ",\"density_q16\":" << manifest.recipe.islandDensityQ16
<< ",\"spacing_voxels\":" << manifest.recipe.spacingSubvoxels / static_cast<double>(Q)
<< ",\"radius_voxels\":[" << manifest.recipe.minimumRadiusSubvoxels / static_cast<double>(Q)
<< ',' << manifest.recipe.maximumRadiusSubvoxels / static_cast<double>(Q)
<< "],\"thickness_ratio_q16\":" << manifest.recipe.thicknessRatioQ16
<< ",\"vertical_jitter_q16\":" << manifest.recipe.verticalJitterQ16
<< ",\"top_flatten_q16\":" << manifest.recipe.topFlattenQ16
<< ",\"contour_warp_voxels\":" << manifest.recipe.contourWarpSubvoxels / static_cast<double>(Q)
<< ",\"crust_depth_bonus_q16\":" << manifest.recipe.crustDepthBonusQ16
<< ",\"root_depth_ratio_q16\":" << manifest.recipe.rootDepthRatioQ16
<< ",\"roughness_voxels\":" << manifest.recipe.roughnessSubvoxels / static_cast<double>(Q)
<< ",\"blend_voxels\":" << manifest.recipe.blendRadiusSubvoxels / static_cast<double>(Q)
<< ",\"bridge_half_width_voxels\":" << manifest.recipe.bridgeHalfWidthSubvoxels / static_cast<double>(Q)
<< ",\"bridge_thickness_voxels\":" << manifest.recipe.bridgeThicknessSubvoxels / static_cast<double>(Q)
<< "},\n \"stable_island_ids\":[";
for (std::size_t i = 0; i < manifest.plan.islands.size(); ++i)
{ if (i) out << ','; out << '\"' << Hex64(manifest.plan.islands[i].stableId) << '\"'; }
out << "],\n \"stable_connector_ids\":[";
for (std::size_t i = 0; i < manifest.plan.clusterEdges.size(); ++i)
{ if (i) out << ','; out << '\"' << Hex64(manifest.plan.clusterEdges[i].stableId) << '\"'; }
out << "],\n \"island_profiles\":[";
for (std::size_t i = 0; i < manifest.plan.islands.size(); ++i)
{
if (i) out << ',';
const auto& island = manifest.plan.islands[i];
const double ratio = static_cast<double>(island.topZSubvoxels - island.bottomZSubvoxels)
/ (2.0 * static_cast<double>(island.radiusSubvoxels));
out << "{\"id\":\"" << Hex64(island.stableId) << "\",\"ordinal\":" << island.ordinal
<< ",\"center_voxels\":[" << island.centerSubvoxels[0] / static_cast<double>(Q)
<< ',' << island.centerSubvoxels[1] / static_cast<double>(Q)
<< ',' << island.centerSubvoxels[2] / static_cast<double>(Q)
<< "],\"radius_voxels\":" << island.radiusSubvoxels / static_cast<double>(Q)
<< ",\"top_voxels\":" << island.topZSubvoxels / static_cast<double>(Q)
<< ",\"bottom_voxels\":" << island.bottomZSubvoxels / static_cast<double>(Q)
<< ",\"depth_to_diameter\":" << ratio << '}';
}
out << "],\n \"bounds\":{\"passed\":" << (bounds.passed ? "true" : "false")
<< ",\"negative_control_detected\":" << (bounds.negativeControlDetected ? "true" : "false")
<< ",\"boxes\":" << bounds.boxesTested << ",\"samples\":" << bounds.pointSamples
<< ",\"unknown\":" << bounds.unknownBounds << ",\"missed\":" << bounds.missedBounds
<< ",\"island_boxes\":" << bounds.islandBoundsTested
<< ",\"connector_boxes\":" << bounds.connectorBoundsTested
<< ",\"void_boxes_proved_air\":" << bounds.voidBoxesProvedAir << "},\n \"thickness\":{\"passed\":"
<< (thickness.passed ? "true" : "false")
<< ",\"islands_tested\":" << thickness.islandsTested
<< ",\"islands_below_minimum\":" << thickness.islandsBelowMinimum
<< ",\"minimum_depth_to_diameter_ratio\":" << thickness.minimumDepthToDiameterRatio
<< ",\"required_depth_to_diameter_ratio\":" << thickness.requiredDepthToDiameterRatio
<< ",\"minimum_island_id\":\"" << Hex64(thickness.minimumIslandStableId) << "\"}"
<< ",\n \"thin_pad_negative_control\":{\"detected\":"
<< ((!thinThickness.passed && thinThickness.islandsBelowMinimum == thinThickness.islandsTested)
? "true" : "false")
<< ",\"failed_islands\":" << thinThickness.islandsBelowMinimum
<< ",\"minimum_depth_to_diameter_ratio\":" << thinThickness.minimumDepthToDiameterRatio << "}"
<< ",\n \"route\":{\"passed\":"
<< (route.passed ? "true" : "false") << ",\"segments\":" << route.segmentsTested
<< ",\"centers\":" << route.centerSamples << ",\"capsule_samples\":"
<< route.capsuleFieldSamples << ",\"blocked\":" << route.blockedCapsuleSamples
<< ",\"support_samples\":" << route.supportProbeSamples << ",\"unsupported\":"
<< route.unsupportedCenterSamples << ",\"grade_failures\":" << route.gradeFailures
<< ",\"minimum_clearance_subvoxels\":" << route.minimumClearanceSubvoxels
<< "},\n \"raised_route_negative_control\":{\"detected\":"
<< ((!raised.passed && (raised.unsupportedCenterSamples || raised.blockedCapsuleSamples)) ? "true" : "false")
<< ",\"passed\":" << (raised.passed ? "true" : "false")
<< ",\"unsupported\":" << raised.unsupportedCenterSamples
<< ",\"blocked\":" << raised.blockedCapsuleSamples << "},\n \"determinism\":{\"W1\":\""
<< fieldHashes[0] << "\",\"W8\":\"" << fieldHashes[1] << "\",\"W16\":\""
<< fieldHashes[2] << "\",\"plan_repeat\":true,\"hash_samples\":32768},\n \"timing\":{\"same_queries\":32768,\"legacy_ms\":"
<< sample.legacyMilliseconds << ",\"native_ms\":" << sample.nativeMilliseconds
<< ",\"native_over_legacy\":" << (sample.nativeMilliseconds / std::max(sample.legacyMilliseconds, 1e-9))
<< ",\"sign_mismatches\":" << sample.signMismatches << ",\"sign_mismatch_percent\":"
<< (100.0 * sample.signMismatches / 32768.0)
<< ",\"legacy_solid_samples\":" << sample.legacySolidSamples
<< ",\"native_solid_samples\":" << sample.nativeSolidSamples
<< ",\"legacy_only_solid_samples\":" << sample.legacyOnlySolidSamples
<< ",\"native_only_solid_samples\":" << sample.nativeOnlySolidSamples << "},\n \"mesh\":[";
constexpr std::array<const char*, 4> names{"cluster_legacy", "cluster_native", "detail_legacy", "detail_native"};
for (std::size_t i = 0; i < meshes.size(); ++i)
{
if (i) out << ',';
out << "{\"name\":\"" << names[i] << "\",\"grid_samples\":" << meshes[i].gridSamples
<< ",\"triangles\":" << meshes[i].triangles << ",\"bytes\":" << meshes[i].bytes << '}';
}
out << "],\n \"route_points_core_voxels\":[";
for (std::size_t i = 0; i < manifest.plan.route.size(); ++i)
{
if (i) out << ',';
const auto& point = manifest.plan.route[i];
out << '[' << point.positionSubvoxels[0] / static_cast<double>(Q) << ','
<< point.positionSubvoxels[1] / static_cast<double>(Q) << ','
<< point.positionSubvoxels[2] / static_cast<double>(Q) << ']';
}
out << "]\n}\n";
}
}
int main(int argc, char** argv)
{
#if defined(_WIN32)
SetPriorityClass(GetCurrentProcess(), BELOW_NORMAL_PRIORITY_CLASS);
SetProcessAffinityMask(GetCurrentProcess(), static_cast<DWORD_PTR>(0xFFFF));
#endif
try
{
if (argc != 3)
{ std::cerr << "usage: FloatingIslandsAudit <legacy-probe.json> <output-dir>\n"; return 2; }
const std::filesystem::path probePath = argv[1];
const std::filesystem::path outputDir = argv[2];
std::filesystem::create_directories(outputDir);
const auto standaloneRoot = probePath.parent_path().parent_path().parent_path()
.parent_path().parent_path();
const ExistingHashes oldHashes = VerifyExistingManifests(standaloneRoot);
FStandaloneOwnerWorld owner;
std::string error;
if (!StandaloneOwnerLoader::Load(probePath.string(), owner, error))
throw std::runtime_error("legacy probe load failed: " + error);
const OracleAnchor anchor = FindLegacyAnchor(owner);
if (anchor.supportScore < 9)
throw std::runtime_error("legacy scan found no broad FloatingIslands top in the frozen strate range");
const Point coreAnchorQ{anchor.surfaceQ[0] / 2,
anchor.surfaceQ[1] / 2, anchor.surfaceQ[2] / 2};
FloatingIslandRecipeV1 recipe;
recipe.seed = 0;
recipe.layoutOriginXSubvoxels = coreAnchorQ[0];
recipe.layoutOriginYSubvoxels = coreAnchorQ[1];
recipe.layoutCenterTopZSubvoxels = coreAnchorQ[2];
recipe.geometryVersion = 2;
recipe.layoutMinimumZSubvoxels = coreAnchorQ[2] - 80 * Q;
recipe.layoutMaximumZSubvoxels = coreAnchorQ[2] + 48 * Q;
recipe.primaryIslandCount = 3;
recipe.islandDensityQ16 = 32768;
recipe.spacingSubvoxels = 56 * Q;
recipe.minimumRadiusSubvoxels = 12 * Q;
recipe.maximumRadiusSubvoxels = 24 * Q;
recipe.thicknessRatioQ16 = 39322;
recipe.verticalJitterQ16 = 39322;
recipe.topFlattenQ16 = 39322;
recipe.taperEndMinimumQ16 = 29491;
recipe.taperEndMaximumQ16 = 45875;
recipe.blendRadiusSubvoxels = 3 * Q;
recipe.contourWarpSubvoxels = VoxQ(6.3);
recipe.roughnessSubvoxels = Q;
recipe.boundarySealSubvoxels = 2 * Q;
recipe.bridgeHalfWidthSubvoxels = VoxQ(2.5);
recipe.bridgeThicknessSubvoxels = 4 * Q;
const auto beginPlanning = Clock::now();
auto planned = PlanFloatingIslandCluster(recipe, error);
const auto endPlanning = Clock::now();
if (!planned) throw std::runtime_error("native island planner failed: " + error);
const std::string canonical = planned->ToJson();
for (int repeat = 0; repeat < 2; ++repeat)
{
std::string repeatError;
const auto repeated = PlanFloatingIslandCluster(recipe, repeatError);
if (!repeated || repeated->contentHash != planned->contentHash
|| repeated->plan.contentHash != planned->plan.contentHash
|| repeated->ToJson() != canonical)
throw std::runtime_error("repeated native plan hash or canonical JSON changed");
}
const auto parsed = FloatingIslandManifestV1::FromJson(canonical, error);
if (!parsed || parsed->ToJson() != canonical || !parsed->validate(error))
throw std::runtime_error("native manifest did not validate after round-trip: " + error);
FloatingIslandFieldV1 field(planned->recipe, planned->plan);
if (!field.isValid()) throw std::runtime_error("native field rejected the planned island graph");
const auto& middleIsland = planned->plan.islands.at(1);
const std::int64_t crustBottom = middleIsland.topZSubvoxels
- middleIsland.radiusSubvoxels * (planned->recipe.thicknessRatioQ16
+ planned->recipe.crustDepthBonusQ16) / 65536;
std::cout << "underside_center_density_q=";
for (int sample = 0; sample <= 8; ++sample)
{
if (sample) std::cout << ',';
const std::int64_t z = crustBottom - middleIsland.radiusSubvoxels * sample / 8;
std::cout << field.densitySubvoxels(middleIsland.centerSubvoxels[0],
middleIsland.centerSubvoxels[1], z);
}
std::cout << '\n';
const auto& ownerSlots = owner.Manager->GetLayout();
const auto islandSlot = std::find_if(ownerSlots.begin(), ownerSlots.end(),
[](const FStrateSlot& slot)
{ return slot.Definition != nullptr
&& slot.Definition->GeneratorType == ECaveGeneratorType::FloatingIslands; });
if (islandSlot == ownerSlots.end())
throw std::runtime_error("owner snapshot has no resolved FloatingIslands strate slot");
if (planned->recipe.seed != static_cast<std::uint32_t>(owner.Seed))
throw std::runtime_error("native island recipe seed does not match the owner season");
const OpenSkyAudit openSky = MeasureOpenSky(field);
const auto bounds = AuditFloatingIslandBounds(field, 512);
const auto route = AuditFloatingIslandRoute(field);
const auto raisedRoute = AuditFloatingIslandRoute(field, 8 * Q);
const auto thickness = AuditFloatingIslandThickness(planned->plan);
auto thinPlan = planned->plan;
for (auto& island : thinPlan.islands)
island.bottomZSubvoxels = island.topZSubvoxels
- island.radiusSubvoxels * planned->recipe.thicknessRatioQ16 / 65536;
const auto thinThickness = AuditFloatingIslandThickness(thinPlan);
const auto influence = field.influenceBounds();
const auto points = MakeSamples(influence, 32768, 0x4d33524f554e4431ull);
const auto w1 = HashWithWorkers(field, owner, points, 1, false);
const auto w8 = HashWithWorkers(field, owner, points, 8, false);
const auto w16 = HashWithWorkers(field, owner, points, 16, true);
const std::array<std::string, 3> hashes{w1.hash, w8.hash, w16.hash};
if (w1.hash != w8.hash || w1.hash != w16.hash)
throw std::runtime_error("native field sample hash differs between W1/W8/W16");
if (!bounds.passed) throw std::runtime_error("native island bounds audit or negative control failed");
if (!thickness.passed || thinThickness.passed
|| thinThickness.islandsBelowMinimum != thinThickness.islandsTested)
throw std::runtime_error("native island thickness audit or thin-pad negative control failed");
std::cout << "route_diagnostics pass=" << route.passed << " segments=" << route.segmentsTested
<< " centers=" << route.centerSamples << " capsule_samples=" << route.capsuleFieldSamples
<< " blocked=" << route.blockedCapsuleSamples << " support_samples=" << route.supportProbeSamples
<< " unsupported=" << route.unsupportedCenterSamples << " grade_failures=" << route.gradeFailures
<< " minimum_clearance_q=" << route.minimumClearanceSubvoxels
<< " first_blocked_segment=" << route.firstBlockedSegment
<< " first_unsupported_segment=" << route.firstUnsupportedSegment
<< " first_grade_segment=" << route.firstGradeFailureSegment
<< " unsupported_center_voxels=" << route.firstUnsupportedCenterSubvoxels[0] / static_cast<double>(Q)
<< ',' << route.firstUnsupportedCenterSubvoxels[1] / static_cast<double>(Q)
<< ',' << route.firstUnsupportedCenterSubvoxels[2] / static_cast<double>(Q) << '\n';
if (!route.passed)
{
const auto& routePoints = planned->plan.route;
if (route.firstBlockedSegment != ~std::uint64_t{0})
std::cout << "first_blocked_position_voxels="
<< route.firstBlockedPositionSubvoxels[0] / static_cast<double>(Q) << ','
<< route.firstBlockedPositionSubvoxels[1] / static_cast<double>(Q) << ','
<< route.firstBlockedPositionSubvoxels[2] / static_cast<double>(Q) << '\n';
const std::size_t debugBegin = route.firstUnsupportedSegment == ~std::uint64_t{0}
? 0 : static_cast<std::size_t>(route.firstUnsupportedSegment);
for (std::size_t i = debugBegin > 1 ? debugBegin - 1 : 0;
i < std::min(routePoints.size(), debugBegin + 3); ++i)
{
const auto& point = routePoints[i].positionSubvoxels;
std::cout << "route_point=" << i << ' '
<< point[0] / static_cast<double>(Q) << ','
<< point[1] / static_cast<double>(Q) << ','
<< point[2] / static_cast<double>(Q) << '\n';
}
const double maxGrade = static_cast<double>(planned->recipe.routeConstraints.maximumGradeQ16) / 65536.0;
for (std::size_t i = 0; i + 1 < routePoints.size(); ++i)
{
const auto& a = routePoints[i].positionSubvoxels;
const auto& b = routePoints[i + 1].positionSubvoxels;
const double horizontal = std::hypot(static_cast<double>(b[0] - a[0]),
static_cast<double>(b[1] - a[1]));
const double grade = horizontal > 0.0 ? std::abs(static_cast<double>(b[2] - a[2])) / horizontal : 1e9;
if (grade > maxGrade + 1e-7)
std::cout << "grade_segment=" << i << " ratio=" << grade << " limit=" << maxGrade
<< " from=" << a[0] / static_cast<double>(Q) << ',' << a[1] / static_cast<double>(Q)
<< ',' << a[2] / static_cast<double>(Q) << " to=" << b[0] / static_cast<double>(Q)
<< ',' << b[1] / static_cast<double>(Q) << ',' << b[2] / static_cast<double>(Q) << '\n';
}
for (std::size_t i = 0; i < planned->plan.islands.size(); ++i)
{
const auto& island = planned->plan.islands[i];
std::cout << "island=" << i << " center=" << island.centerSubvoxels[0] / static_cast<double>(Q)
<< ',' << island.centerSubvoxels[1] / static_cast<double>(Q) << ','
<< island.topZSubvoxels / static_cast<double>(Q) << " radius="
<< island.radiusSubvoxels / static_cast<double>(Q) << '\n';
}
const auto& constraints = planned->recipe.routeConstraints;
const auto& unsupported = route.firstUnsupportedCenterSubvoxels;
const double foot = unsupported[2] / static_cast<double>(Q)
- constraints.capsuleHeightSubvoxels / (2.0 * Q);
std::cout << "unsupported_route_probe=" << unsupported[0] / static_cast<double>(Q)
<< ',' << unsupported[1] / static_cast<double>(Q) << ','
<< unsupported[2] / static_cast<double>(Q) << " foot=" << foot << '\n';
const double probeRadius = constraints.supportProbeRadiusSubvoxels / static_cast<double>(Q);
const std::array<std::array<double, 2>, 5> supportPoints{{
{0.0,0.0},{probeRadius,0.0},{-probeRadius,0.0},{0.0,probeRadius},{0.0,-probeRadius}}};
for (std::size_t probeIndex = 0; probeIndex < supportPoints.size(); ++probeIndex)
{
double firstSolidDepth = -1.0;
for (double depth = (constraints.minimumClearanceSubvoxels + 0.5 * Q) / static_cast<double>(Q);
depth <= (constraints.minimumClearanceSubvoxels + constraints.supportSearchDepthSubvoxels)
/ static_cast<double>(Q) + 0.001; depth += 0.5)
{
const auto density = field.densitySubvoxels(
std::llround(unsupported[0] + supportPoints[probeIndex][0] * Q),
std::llround(unsupported[1] + supportPoints[probeIndex][1] * Q),
std::llround((foot - depth) * Q));
if (density < 0) { firstSolidDepth = depth; break; }
}
std::cout << "support_probe=" << probeIndex << " first_solid_depth_vox=" << firstSolidDepth << '\n';
std::cout << "support_profile=" << probeIndex << ':';
for (double depth = 0.5; depth <= 5.0; depth += 0.5)
{
const auto density = field.densitySubvoxels(
std::llround(unsupported[0] + supportPoints[probeIndex][0] * Q),
std::llround(unsupported[1] + supportPoints[probeIndex][1] * Q),
std::llround((foot - depth) * Q));
std::cout << ' ' << depth << '=' << density;
}
std::cout << '\n';
}
for (std::size_t i = 0; i < planned->plan.clusterEdges.size(); ++i)
{
const auto& edge = planned->plan.clusterEdges[i];
std::cout << "connector=" << i << " start=" << edge.startSubvoxels[0] / static_cast<double>(Q)
<< ',' << edge.startSubvoxels[1] / static_cast<double>(Q) << ','
<< edge.startSubvoxels[2] / static_cast<double>(Q) << " end="
<< edge.endSubvoxels[0] / static_cast<double>(Q) << ','
<< edge.endSubvoxels[1] / static_cast<double>(Q) << ','
<< edge.endSubvoxels[2] / static_cast<double>(Q) << '\n';
}
}
if (!route.passed) throw std::runtime_error("native route capsule sweep failed");
if (raisedRoute.passed || (raisedRoute.unsupportedCenterSamples == 0
&& raisedRoute.blockedCapsuleSamples == 0))
throw std::runtime_error("raised-route negative control did not detect unsupported traversal");
std::array<MeshResult, 4> meshes{};
const auto clusterBounds = field.influenceBounds();
if (!clusterBounds.finite) throw std::runtime_error("native cluster mesh bounds are not finite");
const Point clusterMin{clusterBounds.minimumSubvoxels[0] - 8 * Q,
clusterBounds.minimumSubvoxels[1] - 8 * Q, clusterBounds.minimumSubvoxels[2] - 8 * Q};
const Point clusterMax{clusterBounds.maximumSubvoxels[0] + 8 * Q,
clusterBounds.maximumSubvoxels[1] + 8 * Q, clusterBounds.maximumSubvoxels[2] + 8 * Q};
const Point detailMin{coreAnchorQ[0] - 64 * Q, coreAnchorQ[1] - 64 * Q, coreAnchorQ[2] - 80 * Q};
const Point detailMax{coreAnchorQ[0] + 64 * Q, coreAnchorQ[1] + 64 * Q, coreAnchorQ[2] + 16 * Q};
meshes[0] = ExtractMesh(outputDir / "cluster_legacy.vfmesh", clusterMin, clusterMax, 4 * Q,
[&](const Point& q) { return SampleLegacy(owner, q); });
meshes[1] = ExtractMesh(outputDir / "cluster_native.vfmesh", clusterMin, clusterMax, 4 * Q,
[&](const Point& q) { return SampleNative(field, q); });
meshes[2] = ExtractMesh(outputDir / "detail_legacy.vfmesh", detailMin, detailMax, 2 * Q,
[&](const Point& q) { return SampleLegacy(owner, q); });
meshes[3] = ExtractMesh(outputDir / "detail_native.vfmesh", detailMin, detailMax, 2 * Q,
[&](const Point& q) { return SampleNative(field, q); });
if (meshes[0].triangles == 0 || meshes[1].triangles == 0
|| meshes[2].triangles == 0 || meshes[3].triangles == 0)
throw std::runtime_error("matched legacy/native mesh extraction produced an empty field");
WriteJson(outputDir / "audit.json", *planned, bounds, route, raisedRoute,
w16, thickness, thinThickness, anchor, meshes, hashes, oldHashes, openSky);
WriteIslandImportManifest(standaloneRoot, *planned, *islandSlot, outputDir);
std::cout << std::setprecision(4)
<< "legacy_anchor_owner_voxels=" << anchor.surfaceQ[0] / static_cast<double>(Q) << ','
<< anchor.surfaceQ[1] / static_cast<double>(Q) << ','
<< anchor.surfaceQ[2] / static_cast<double>(Q)
<< " comparison_anchor_core_voxels=" << coreAnchorQ[0] / static_cast<double>(Q) << ','
<< coreAnchorQ[1] / static_cast<double>(Q) << ','
<< coreAnchorQ[2] / static_cast<double>(Q)
<< " plateau_samples=" << anchor.supportScore << '\n'
<< "recipe_hash=" << Hex64(planned->recipe.contentHash)
<< " plan_hash=" << Hex64(planned->plan.contentHash)
<< " manifest_hash=" << Hex64(planned->contentHash)
<< " prior_m1_hash=" << oldHashes.round1Manifest
<< " prior_surfaceworld_hash=" << oldHashes.surfaceWorldRound4Manifest
<< " islands=" << planned->plan.islands.size()
<< " connectors=" << planned->plan.clusterEdges.size()
<< " route_points=" << planned->plan.route.size()
<< " planning_ms=" << std::chrono::duration<double, std::milli>(endPlanning - beginPlanning).count() << '\n'
<< "bounds_pass=" << bounds.passed << " boxes=" << bounds.boxesTested
<< " point_samples=" << bounds.pointSamples << " unknown=" << bounds.unknownBounds
<< " missed=" << bounds.missedBounds << " void_air=" << bounds.voidBoxesProvedAir
<< " negative_control=" << bounds.negativeControlDetected << '\n'
<< "route_pass=" << route.passed << " segments=" << route.segmentsTested
<< " centers=" << route.centerSamples << " capsule_samples=" << route.capsuleFieldSamples
<< " blocked=" << route.blockedCapsuleSamples << " support_probes=" << route.supportProbeSamples
<< " unsupported=" << route.unsupportedCenterSamples << " grade_failures=" << route.gradeFailures
<< " clearance_q=" << route.minimumClearanceSubvoxels << '\n'
<< "raised_route_detected=" << (!raisedRoute.passed && raisedRoute.unsupportedCenterSamples > 0)
<< " unsupported=" << raisedRoute.unsupportedCenterSamples
<< " blocked=" << raisedRoute.blockedCapsuleSamples << '\n'
<< "thickness_pass=" << thickness.passed << " islands=" << thickness.islandsTested
<< " min_depth_diameter=" << thickness.minimumDepthToDiameterRatio
<< " threshold=" << thickness.requiredDepthToDiameterRatio
<< " thin_pad_detected=" << (!thinThickness.passed
&& thinThickness.islandsBelowMinimum == thinThickness.islandsTested)
<< " thin_ratio=" << thinThickness.minimumDepthToDiameterRatio << '\n'
<< "field_hashes W1=" << w1.hash << " W8=" << w8.hash << " W16=" << w16.hash
<< " legacy_ms=" << w16.legacyMilliseconds << " native_ms=" << w16.nativeMilliseconds
<< " mismatch_percent=" << (100.0 * w16.signMismatches / 32768.0)
<< " legacy_solid=" << w16.legacySolidSamples << " native_solid=" << w16.nativeSolidSamples
<< " legacy_only=" << w16.legacyOnlySolidSamples << " native_only=" << w16.nativeOnlySolidSamples << '\n'
<< "mesh_samples=" << meshes[0].gridSamples << ',' << meshes[1].gridSamples
<< ',' << meshes[2].gridSamples << ',' << meshes[3].gridSamples
<< " triangles=" << meshes[0].triangles << ',' << meshes[1].triangles
<< ',' << meshes[2].triangles << ',' << meshes[3].triangles << '\n'
<< "audit_json=" << (outputDir / "audit.json").string() << '\n';
return 0;
}
catch (const std::exception& exception)
{
std::cerr << "FLOATING_ISLAND_AUDIT_FAIL: " << exception.what() << '\n';
return 1;
}
}
@@ -0,0 +1,83 @@
# World assembler M3 round 3
Date: 2026-10-10
## Status
The island recipe, manifest import, BuildHost world proof, and matched offline captures are in place. The final profiling pass found a remaining LOD0 sprint budget miss, and a follow-up XY-column cache was then added to `FloatingIslandsInternal.h`. That last source edit has **not** been compiled or exercised: the command runner began failing to start with Windows status `0xC0000142` after a completed profile run. Therefore the verified BuildHost results below apply to the root-parameter-cache version immediately before the XY-column-cache edit, not to the current tree. Treat round 3 as **not fully verified / do not hand off the current binary yet** until that edit is either verified or reverted and rebuilt.
## Scale contract
The owner's legacy voxel size is **12.5 cm** (`Source/VoxelForge/Public/VoxelTypes.h`, `VOXEL_SIZE`). Core operates at **25 cm**, so owner-to-Core lengths multiply by **0.5** and Core-to-owner lengths multiply by **2**. Island radii are 24–48 owner voxels = 3–6 m = 12–24 Core voxels. Site spacing is 112 owner voxels = 14 m = 56 Core voxels. Standalone's old 25 cm metadata was not authoritative; the import validator and audit metadata now pin 12.5/25 cm and the 1:2 ratio. The radius comment is corrected to this contract.
## Shape review and measurements
Round 3's downscaled, matched offline captures show four distinct masses with sky visible between them; the three connectors remain traversable and read as narrow spans. The underside center is a shaded solid buttress/dimple, not a through-hole. The edge capture does not show the former sawtooth rim; the crust edge is smooth at the displayed scale. These are offline CPU renders, not captures from the owner's Unreal viewport.
At the sampled mid-height plane, the open-sky measure is **1,462 / 1,591 = 91.89%** of the cluster XY bounding box. Sampling is at 1 m spacing, Core Z `-964.039`. Island radii are 3–6 m; connector full width is 1.25 m, thickness 1 m, blend 0.75 m, and roughness 0.25 m. The plan has four islands, three connectors, and 28 route segments. The route audit checks 68,816 capsule samples and reports no blocked, unsupported, or over-grade samples; minimum clearance is 99 subvoxel samples.
The mass audit checked 515 bounds / 13,851 samples with no missed island bounds. The thin-pad negative control was caught on all four islands (measured ratio 0.2999 against required 0.70; passing minimum was 0.75). The raised-route negative control was also caught. The underside audit samples the center column at nine points; rerun the audit after resolving the unverified cache edit to retain that numeric output in `results/audit.json`.
## Import and season hashing
Import `Standalone/Research/WorldAssemblerM3/Round3/results/world_assembly_floating_islands.json` through the existing `UVoxelSettings` manifest JSON import (`SourceWorldAssemblyManifestJson` / **Import World Assembly Manifest JSON**). Then assign that settings asset to `AVoxelWorld` and enable **Voxel World → Core → Use VoxelForge Core** (`bUseVoxelForgeCore`). The recipe remains on the Core world-assembly route. Its assembly content hash enters the season hash only when Core is enabled; Core-off keeps the legacy season identity. Water remains fixed for the season and player edits remain unrestricted.
Verified artifact hashes:
- Plan: `61fd58f65c5fe157`
- Recipe: `ef1340d32b072ba3`
- Nested floating-island manifest: `54160b4d25d0279f`
- World assembly content: `94b563f1ce622def`
- W1/W8/W16 standalone determinism: `5764b702482740e8`
## BuildHost proof recorded before the final unverified edit
BuildHost runs used `Tools/BuildVoxelForgeCoreHost.ps1` and the test scripts with a 900 second timeout, BelowNormal priority, and at most four parallel build actions. No owner project/editor was opened or built. Measured process peaks stayed below 4 GB. The passing island run recorded:
- 2,553 standalone tile hashes matched; Core reported 512 LOD0 tiles, 448 LOD1 tiles, 432 LOD transitions, 573 local-coverage checks, and 3,438 neighbor-face checks.
- Aggregate hashes: density `e46d4280f73f03f3`, mesh `a7c92c6ce22ba08b3`, payload `040e800d58e1c2f1`, topology `da689102032f94da`.
- Coverage completed; collision was cooked and capsule contact passed on both an island top and a span.
- Height/anchor agreement passed for the island and span; content anchors reported 14 trees and no floaters. Corrected strate and atmosphere strate both reported 1; water was enabled at local `-49,376 cm` and unchanged.
- Blueprint edit passed: carve/fill on an island with legacy radius 6 (=75 cm) and strength 10; the 90 cm outside sample had zero density delta.
- Core-off passed with legacy density unchanged; the Core-only hash was omitted while Core was off.
- SurfaceWorld M1 regression test passed with the original worker hash `0x8cc18e2981c50c4e`; HybridV1 and HybridV2 M2 recipe fixtures passed.
Logs are in `results/m1_surfaceworld_buildhost.*`, `results/m2_hybrid_v1_buildhost.*`, `results/m2_hybrid_v2_buildhost.*`, and `results/m3_floating_islands_buildhost.*`. These pre-profile logs do not prove the final XY-column-cache edit.
## Streaming profile and remaining work
The final instrumented BuildHost commandlet completed and its internal validator printed PASS. The outer PowerShell wrapper then exited 1 because its console-title channel failed (`0xE9`); this is recorded as a wrapper failure despite the commandlet pass marker. The timing profile showed density/meshing dominates; classifier and column work were negligible.
The same measured per-tile p95 is compared with the available time at each movement speed: at 600 cm/s the deadlines are 1,333.333 ms for LOD0 and 2,666.667 ms for LOD1; at 6,000 cm/s they are 133.333 ms and 266.667 ms, respectively. Core and legacy timings from the instrumented run were:
| LOD | Tile kind | Core p95 | Legacy p95 | Walk deadline / result | Sprint deadline / result |
|---|---|---:|---:|---|---|
| 0 | Air | 0.017 ms | 38.842 ms | 1,333.333 ms / pass | 133.333 ms / pass |
| 0 | Island | 157.671 ms | 43.702 ms | 1,333.333 ms / pass | 133.333 ms / 24.338 ms late |
| 0 | Mixed/span | 153.082 ms | 42.146 ms | 1,333.333 ms / pass | 133.333 ms / 19.749 ms late |
| 1 | Air | 0.009 ms | 46.549 ms | 2,666.667 ms / pass | 266.667 ms / pass |
| 1 | Mixed/span | 151.685 ms | 42.701 ms | 2,666.667 ms / pass | 266.667 ms / pass |
LOD1 mixed was 151.685 ms against its 266.667 ms sprint deadline; LOD1 air was 0.009 ms. The root-parameter cache preserved hashes but did not clear the LOD0 sprint miss. The XY-column cache was added afterward to target the measured mesher/density hot path; it has not been compiled or measured. Resolve that before claiming the streaming goal complete.
## Run ledger and incidents
- SurfaceWorld M1, HybridV1 M2, HybridV2 M2, and the island BuildHost proof all passed on the verified source state described above.
- Earlier island BuildHost attempts, in order, failed as follows: (1) desired tiles were 2,227 instead of 2,553 because the route player was absent; (2) the GameMode spawned an origin pawn; (3) possession caused 2,557 desired tiles because dynamic collision support was active; (4) the support tile key did not match; (5) disabling the collision gate restored 2,553 tiles but exposed a hash mismatch at `(-2,0,-31)`; (6) `CreateLocalPlayer(true)` hung and was manually stopped after roughly 3–4 minutes; (7) the base UPlayer fixture lacked controller registration/root transform and failed preflight after 5:10; (8) explicit `AddController`, root setup, and `SetActorLocation` fixed the fixture and the island proof passed. The manual stop was not a crash.
- Earlier compile failures included an invalid `DuplicateObject` overload, private helper access, an unresolved `GetEffectiveWorldSeed` export, and integer narrowing. They were corrected; subsequent builds passed.
- One initial standalone build used the wrong `-Workers` switch and failed immediately; `-CompileWorkers 4` succeeded.
- M1 threshold experiments before restoring the original chunk mapping failed at LOD8 edge bounds: threshold 4.0 measured 52,075.827 > 51,200 at tile `(2,0,-1)`; 4.125 measured 53,960.427 > 52,800; 4.25 measured 54,806.919 > 54,400. Threshold 4.5 passed that edge check but left no full-span LOD0 candidate. Restoring SurfaceWorld's original 32-voxel chunk mapping, using the separate 16-Core-voxel island mapping, and restoring threshold 4.0 made M1 pass.
- The last commandlet itself passed, but the wrapper returned 1 on console error `0xE9`. Subsequent PowerShell and `cmd.exe` launches returned `0xC0000142`; the requested retry was made, then additional shell inspection launches also failed. No further build was attempted. No new `UECC-*` folder was reported by the latest BuildHost crash check; only historical folders dated 2026-09-17 and 2026-10-08 were present.
- No `0xC0000142` BuildHost retry was observed in the completed runs. Peak recorded BuildHost test process memory was about 3.98 GB.
## Owner hand-off
After the final cache edit is verified, import the manifest above into `UVoxelSettings`, assign the settings asset to the world, and turn on `bUseVoxelForgeCore`. To find the cluster, start at the actor-local route point `(-380, 631.8, -23,837) cm` and follow the route toward the middle island (roughly +X / -Y). The center island is near actor-local `(600, -306, -23,872) cm`; the span contact is near `(113, 161, -23,860) cm`.
For an underside view, use a free camera near `(600, -306, -24,750) cm`, looking upward toward `(600, -306, -24,300) cm`. For an overview, start near `(680, -5,000, -21,500) cm` and look toward `(678, -556, -24,100) cm`. These are actor-local suggestions; apply the actor transform in the level. The contact sheet and matched captures are under this Round3 `results/` directory and are downscaled offline renders; BuildHost validation uses null RHI.
Likely Unreal compile spots are `VoxelSettings.h/.cpp`, `VoxelContentManager.h/.cpp`, `VoxelWorld.cpp`, `VoxelForgeCoreAdapter.cpp`, and `VoxelForgeExploreCommandlet.cpp`; canonical Core changes are in `Standalone/Core/include/VoxelForgeCore/VoxelForgeCore.h`, `Standalone/Core/src/ShapeWorldInternal.h`, `FloatingIslandsInternal.h`, and `WorldAssemblerInternal.h`.
## Source and artifact inventory
Round 3 adds these research/support sources: `Standalone/Research/WorldAssemblerM3/Round3/FloatingIslandsAudit.cpp`, `BuildFloatingIslandsAudit.ps1`, and `RenderFloatingIslandRound3.py`. Existing source edits include `Standalone/Source/OwnerWorldLoader.h`, `Standalone/Core/src/FloatingIslandsInternal.h`, `Standalone/Core/src/ShapeWorldInternal.h`, and `Source/VoxelForgeEditor/Private/VoxelForgeExploreCommandlet.cpp`. There is no new Unreal runtime source file for the manifest path. BuildHost scripts and `.log`/capture/JSON outputs are evidence/support artifacts.
@@ -0,0 +1,306 @@
#!/usr/bin/env python3
"""Small CPU-only matched views of the legacy and native FloatingIslands fields."""
from __future__ import annotations
import ctypes
import json
import math
import struct
from pathlib import Path
from PIL import Image, ImageDraw
ROOT = Path(__file__).resolve().parent
RESULTS = ROOT / "results"
CAPTURES = RESULTS / "captures"
CAPTURES.mkdir(parents=True, exist_ok=True)
WIDTH, HEIGHT = 320, 226
BACKGROUND = (236, 240, 242)
LEGACY_COLOR = (133, 127, 105)
NATIVE_COLOR = (78, 135, 151)
ROUTE_COLOR = (223, 72, 45)
TILE_COLOR = (178, 60, 52)
LOD_COLOR = (211, 136, 45)
Q = 256.0
def lower_priority() -> None:
if hasattr(ctypes, "windll"):
ctypes.windll.kernel32.SetPriorityClass(ctypes.windll.kernel32.GetCurrentProcess(), 0x00004000)
def read_mesh(path: Path):
raw = path.read_bytes()
if len(raw) < 8 or raw[:4] != b"VFMI":
raise RuntimeError(f"invalid field mesh: {path}")
count = struct.unpack_from("<I", raw, 4)[0]
stride = struct.calcsize("<12f")
if len(raw) != 8 + count * stride:
raise RuntimeError(f"truncated field mesh: {path}")
triangles = [struct.unpack_from("<12f", raw, 8 + i * stride) for i in range(count)]
# Average the sampled field gradients at shared vertices so the review image does not turn
# marching-tetrahedra face normals into false sawteeth. Lissage des normales partagees pour
# separer l'aspect de l'ombrage de la forme reelle du champ.
shared = {}
for tri in triangles:
normal = tri[9:12]
for offset in (0, 3, 6):
key = tuple(round(value, 5) for value in tri[offset:offset + 3])
previous = shared.get(key, (0.0, 0.0, 0.0))
shared[key] = tuple(previous[axis] + normal[axis] for axis in range(3))
smooth_triangles = []
for tri in triangles:
vertex_normals = []
for offset in (0, 3, 6):
key = tuple(round(value, 5) for value in tri[offset:offset + 3])
vertex_normals.extend(normalize(shared[key]))
smooth_triangles.append(tuple(tri[:9]) + tuple(vertex_normals))
triangles = smooth_triangles
vertices = [tri[0:3] for tri in triangles]
vertices.extend(tri[3:6] for tri in triangles)
vertices.extend(tri[6:9] for tri in triangles)
return triangles, vertices
def normalize(vector):
size = math.sqrt(sum(value * value for value in vector))
return tuple(value / size for value in vector) if size > 1.0e-12 else (0.0, 0.0, 1.0)
def dot(a, b):
return sum(x * y for x, y in zip(a, b))
def cross(a, b):
return (a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0])
def project(points, target, view_dir, scale=None):
direction = normalize(view_dir)
forward = tuple(-value for value in direction)
reference_up = (0.0, 1.0, 0.0) if abs(forward[2]) > 0.98 else (0.0, 0.0, 1.0)
right = normalize(cross(forward, reference_up))
up = normalize(cross(right, forward))
camera_points = []
for point in points:
delta = tuple(point[i] - target[i] for i in range(3))
camera_points.append((dot(delta, right), dot(delta, up), dot(delta, forward)))
if scale is None:
span_x = max((p[0] for p in camera_points), default=1.0) - min((p[0] for p in camera_points), default=0.0)
span_y = max((p[1] for p in camera_points), default=1.0) - min((p[1] for p in camera_points), default=0.0)
scale = 0.86 * min((WIDTH - 30) / max(span_x, 1.0e-6), (HEIGHT - 30) / max(span_y, 1.0e-6))
pixels = [
(WIDTH * 0.5 + point[0] * scale, 31 + (HEIGHT - 31) * 0.5 - point[1] * scale, point[2])
for point in camera_points
]
return pixels, scale, right, up, forward
def common_scale(mesh_pair, target, view_dir):
vertices = mesh_pair[0][1] + mesh_pair[1][1]
_, scale, _, _, _ = project(vertices, target, view_dir)
return scale
def projected_line(a, b, target, basis, scale):
right, up, forward = basis
points = []
for point in (a, b):
delta = tuple(point[i] - target[i] for i in range(3))
points.append((WIDTH * 0.5 + dot(delta, right) * scale,
31 + (HEIGHT - 31) * 0.5 - dot(delta, up) * scale))
return points
def render(mesh, mesh_pair, method, target, view_dir, title, subtitle, *, route=None,
guide=None, camera_eye=None, framing_radius=None):
triangles, vertices = mesh
perspective = camera_eye is not None
if perspective:
forward = normalize(tuple(target[i] - camera_eye[i] for i in range(3)))
reference_up = (0.0, 1.0, 0.0) if abs(forward[2]) > 0.98 else (0.0, 0.0, 1.0)
right = normalize(cross(forward, reference_up))
up = normalize(cross(right, forward))
scale = WIDTH * 0.91
origin = camera_eye
else:
if framing_radius is None:
scale = common_scale(mesh_pair, target, view_dir)
else:
scale = 0.86 * min((WIDTH - 30) / (2.0 * framing_radius),
(HEIGHT - 30) / (2.0 * framing_radius))
_, _, right, up, forward = project((), target, view_dir, scale)
origin = target
def screen(point):
delta = tuple(point[i] - origin[i] for i in range(3))
cx, cy, depth = dot(delta, right), dot(delta, up), dot(delta, forward)
if perspective:
if depth <= 1.0:
return None
return (WIDTH * 0.5 + cx * scale / depth,
31 + (HEIGHT - 31) * 0.5 - cy * scale / depth, depth)
return (WIDTH * 0.5 + cx * scale,
31 + (HEIGHT - 31) * 0.5 - cy * scale, depth)
background = Image.new("RGB", (WIDTH, HEIGHT + 32), BACKGROUND)
draw = ImageDraw.Draw(background)
draw.rectangle((0, 0, WIDTH - 1, 31), fill=(34, 46, 54))
draw.text((8, 4), title, fill=(250, 252, 253))
draw.text((8, 17), subtitle, fill=(190, 207, 215))
pixels = background.load()
zbuffer = [float("inf")] * (WIDTH * (HEIGHT - 31))
camera_fill = forward if perspective else normalize(view_dir)
light = normalize((-0.25 + 1.2 * camera_fill[0],
-0.35 + 1.2 * camera_fill[1],
0.45 + 1.2 * camera_fill[2]))
base = LEGACY_COLOR if method == "legacy" else NATIVE_COLOR
for tri in triangles:
points = [screen(tri[offset:offset + 3]) for offset in (0, 3, 6)]
if any(point is None for point in points):
continue
x0 = max(0, int(math.floor(min(p[0] for p in points))))
x1 = min(WIDTH - 1, int(math.ceil(max(p[0] for p in points))))
y0 = max(31, int(math.floor(min(p[1] for p in points))))
y1 = min(HEIGHT - 1, int(math.ceil(max(p[1] for p in points))))
if x0 > x1 or y0 > y1:
continue
(ax, ay, az), (bx, by, bz), (cx, cy, cz) = points
denominator = (by - cy) * (ax - cx) + (cx - bx) * (ay - cy)
if abs(denominator) < 1.0e-10:
continue
normals = [normalize(tri[offset:offset + 3]) for offset in (9, 12, 15)]
for y in range(y0, y1 + 1):
row = (y - 31) * WIDTH
for x in range(x0, x1 + 1):
sx, sy = x + 0.5, y + 0.5
u = ((by - cy) * (sx - cx) + (cx - bx) * (sy - cy)) / denominator
v = ((cy - ay) * (sx - cx) + (ax - cx) * (sy - cy)) / denominator
w = 1.0 - u - v
if u < -1e-8 or v < -1e-8 or w < -1e-8:
continue
if perspective:
depth = 1.0 / (u / az + v / bz + w / cz)
else:
depth = u * az + v * bz + w * cz
normal = normalize(tuple(u * normals[0][axis] + v * normals[1][axis]
+ w * normals[2][axis] for axis in range(3)))
shade = 0.50 + 0.50 * max(0.0, dot(normal, light))
color = tuple(max(0, min(255, int(channel * shade))) for channel in base)
index = row + x
if depth < zbuffer[index]:
zbuffer[index] = depth
pixels[x, y] = color
basis = (right, up, forward)
if guide:
origin = guide["origin_voxels"]
top = guide["top_voxels"]
for x_delta, color, label in ((32.0, TILE_COLOR, "32v tile"), (64.0, LOD_COLOR, "64v LOD1")):
line = projected_line((origin[0] + x_delta, origin[1] - 190.0, top - 65.0),
(origin[0] + x_delta, origin[1] + 190.0, top + 14.0),
target, basis, scale)
draw.line(line, fill=color, width=2)
draw.text((max(2, min(WIDTH - 55, int(line[1][0]) + 2)),
max(33, min(HEIGHT - 11, int(line[1][1]) - 12))), label, fill=color)
if route:
points = [screen(point) for point in route]
points = [point[:2] for point in points if point is not None]
if len(points) >= 2:
draw.line(points, fill=(250, 248, 239), width=5, joint="curve")
draw.line(points, fill=ROUTE_COLOR, width=3, joint="curve")
for index in (0, len(points) - 1):
x, y = points[index]
draw.ellipse((x - 4, y - 4, x + 4, y + 4), fill=(250, 248, 239), outline=ROUTE_COLOR, width=2)
return background
def titled_pair(left, right, category):
pair = Image.new("RGB", (WIDTH * 2, HEIGHT + 32), (220, 226, 229))
pair.paste(left, (0, 0))
pair.paste(right, (WIDTH, 0))
draw = ImageDraw.Draw(pair)
draw.rectangle((0, 0, WIDTH * 2 - 1, HEIGHT + 31), outline=(72, 84, 91), width=1)
draw.text((8, HEIGHT + 14), f"{category} | same target, camera and scale", fill=(45, 55, 61))
return pair
def main():
lower_priority()
data = json.loads((RESULTS / "audit.json").read_text(encoding="utf-8"))
anchor = data["comparison_anchor_core_voxels"]
route = data["route_points_core_voxels"]
profiles = data["island_profiles"]
middle_island = profiles[1]
cluster = {
"legacy": read_mesh(RESULTS / "cluster_legacy.vfmesh"),
"native": read_mesh(RESULTS / "cluster_native.vfmesh"),
}
detail = {
"legacy": read_mesh(RESULTS / "detail_legacy.vfmesh"),
"native": read_mesh(RESULTS / "detail_native.vfmesh"),
}
a = anchor
scenes = (
("overview", "Cluster overview", cluster, (a[0], a[1], a[2] - 28.0), (8.0, -10.0, 7.0), None, None),
("underside", "Cluster underside and lobed roots", detail,
(middle_island["center_voxels"][0], middle_island["center_voxels"][1],
middle_island["bottom_voxels"] - 6.0), (0.12, -0.08, -1.0), None, None),
("edge_cliff", "Thick crust and bounded rock detail", detail,
(middle_island["center_voxels"][0], middle_island["center_voxels"][1],
middle_island["top_voxels"] - middle_island["radius_voxels"] * 0.65),
(1.0, -0.25, 0.18), None, None),
("route", "Supported route across the cluster", cluster,
(middle_island["center_voxels"][0], middle_island["center_voxels"][1],
middle_island["top_voxels"] - 18.0), (8.0, -10.0, 7.0), route, None),
)
pairs = []
for key, title, meshes, target, camera, path, grid in scenes:
framing_radius = 28.0 if key in ("underside", "edge_cliff") else None
left = render(meshes["legacy"], (meshes["legacy"], meshes["native"]), "legacy",
target, camera, title, "Legacy bridge | exact owner field", route=None,
guide=grid, framing_radius=framing_radius)
route_caption = "Core native | planner route" if path else "Core native | matched field view"
right = render(meshes["native"], (meshes["legacy"], meshes["native"]), "native",
target, camera, title, route_caption, route=path, guide=grid,
framing_radius=framing_radius)
pair = titled_pair(left, right, title)
out = CAPTURES / f"{key}_matched.jpg"
pair.save(out, quality=82, optimize=True)
pairs.append(pair)
print(f"capture={out.name} bytes={out.stat().st_size} size={pair.size[0]}x{pair.size[1]}")
eye_index = 5
eye_route = route[eye_index]
eye = (eye_route[0], eye_route[1], eye_route[2] + 3.68)
next_island = profiles[1]
look = (next_island["center_voxels"][0], next_island["center_voxels"][1],
next_island["top_voxels"] + 5.0)
perspective_pair = []
for method, meshes in (("legacy", cluster), ("native", cluster)):
perspective_pair.append(render(meshes[method], (meshes["legacy"], meshes["native"]), method,
look, (0.0, 0.0, -1.0), "Island-edge player view", "Eye at 1.8 m | route span to next island",
route=None, camera_eye=eye))
eye_pair = titled_pair(perspective_pair[0], perspective_pair[1], "Island-edge player view")
eye_path = CAPTURES / "player_eye_matched.jpg"
eye_pair.save(eye_path, quality=80, optimize=True)
pairs.insert(3, eye_pair)
print(f"capture={eye_path.name} bytes={eye_path.stat().st_size} size={eye_pair.size[0]}x{eye_pair.size[1]}")
sheet = Image.new("RGB", (WIDTH * 2, (HEIGHT + 32) * len(pairs)), (218, 225, 228))
for row, pair in enumerate(pairs):
sheet.paste(pair, (0, row * (HEIGHT + 32)))
sheet_path = CAPTURES / "contact_sheet.jpg"
sheet.save(sheet_path, quality=76, optimize=True)
oversized = [(path.name, path.stat().st_size) for path in sorted(CAPTURES.glob("*.jpg"))
if path.stat().st_size >= 300_000]
for path in sorted(CAPTURES.glob("*.jpg")):
print(f"capture_size={path.name} bytes={path.stat().st_size}")
if oversized:
raise RuntimeError(f"captures exceed the 300 KB limit: {oversized}")
print(f"contact_sheet={sheet_path.name} bytes={sheet_path.stat().st_size} views=5 matched_pairs=5")
if __name__ == "__main__":
main()
@@ -0,0 +1,30 @@
{
"recipe_hash":"ef1340d32b072ba3",
"plan_hash":"61fd58f65c5fe157",
"manifest_hash":"54160b4d25d0279f",
"unchanged_existing_hashes":{"m1_round1_manifest":"c87ae279b0e26f53","surfaceworld_round4_manifest":"8933693d9560ba9f"},
"geometry_version":2,
"owner_voxel_size_cm":12.5,
"core_voxel_size_cm":25,
"owner_to_core_length_scale":0.5,
"plan_islands":4,
"mid_height_open_sky":{"sampling_step_m":1.0,"z_core_voxels":-964.0390625,"bounds_xy_core_voxels":[-45.58203125,-107.33984375,99.73828125,62.82421875],"open_samples":1462,"total_samples":1591,"open_fraction":0.918918918919},
"plan_connectors":3,
"route_points":29,
"legacy_anchor_owner_voxels":[48,16,-1904.03515625],
"comparison_anchor_core_voxels":[24,8,-952.015625],
"legacy_anchor_plateau_samples":25,
"recipe_parameters":{"seed":0,"primary_island_count":3,"density_q16":32768,"spacing_voxels":56,"radius_voxels":[12,24],"thickness_ratio_q16":39322,"vertical_jitter_q16":39322,"top_flatten_q16":39322,"contour_warp_voxels":6.30078125,"crust_depth_bonus_q16":9830,"root_depth_ratio_q16":49152,"roughness_voxels":1,"blend_voxels":3,"bridge_half_width_voxels":2.5,"bridge_thickness_voxels":4},
"stable_island_ids":["e6e461e18b3a9c87","2bc1820baba047f6","adc259cbe2a395e9","7855fb022cc561c9"],
"stable_connector_ids":["eaa5dd310e846520","034023599b466c51","4962fa885545fb26"],
"island_profiles":[{"id":"e6e461e18b3a9c87","ordinal":0,"center_voxels":[-15.19921875,25.2734375,-960.5078125],"radius_voxels":14.08203125,"top_voxels":-957.69140625,"bottom_voxels":-978.81640625,"depth_to_diameter":0.750069348128},{"id":"2bc1820baba047f6","ordinal":1,"center_voxels":[24,-12.2265625,-954.8984375],"radius_voxels":14.42578125,"top_voxels":-952.015625,"bottom_voxels":-973.65625,"depth_to_diameter":0.75006769564},{"id":"adc259cbe2a395e9","ordinal":2,"center_voxels":[63.19921875,26.28515625,-955.57421875],"radius_voxels":20.23828125,"top_voxels":-951.52734375,"bottom_voxels":-981.88671875,"depth_to_diameter":0.750048253233},{"id":"7855fb022cc561c9","ordinal":3,"center_voxels":[-1.19921875,-68.2265625,-950.75390625],"radius_voxels":22.8125,"top_voxels":-946.19140625,"bottom_voxels":-980.41015625,"depth_to_diameter":0.75}],
"bounds":{"passed":true,"negative_control_detected":true,"boxes":515,"samples":13851,"unknown":72,"missed":0,"island_boxes":4,"connector_boxes":3,"void_boxes_proved_air":1},
"thickness":{"passed":true,"islands_tested":4,"islands_below_minimum":0,"minimum_depth_to_diameter_ratio":0.75,"required_depth_to_diameter_ratio":0.7,"minimum_island_id":"7855fb022cc561c9"},
"thin_pad_negative_control":{"detected":true,"failed_islands":4,"minimum_depth_to_diameter_ratio":0.299891686975},
"route":{"passed":true,"segments":28,"centers":253,"capsule_samples":68816,"blocked":0,"support_samples":1344,"unsupported":0,"grade_failures":0,"minimum_clearance_subvoxels":99},
"raised_route_negative_control":{"detected":true,"passed":false,"unsupported":253,"blocked":0},
"determinism":{"W1":"5764b702482740e8","W8":"5764b702482740e8","W16":"5764b702482740e8","plan_repeat":true,"hash_samples":32768},
"timing":{"same_queries":32768,"legacy_ms":64.3305,"native_ms":46.2981,"native_over_legacy":0.71969128174,"sign_mismatches":1473,"sign_mismatch_percent":4.49523925781,"legacy_solid_samples":100,"native_solid_samples":1399,"legacy_only_solid_samples":87,"native_only_solid_samples":1386},
"mesh":[{"name":"cluster_legacy","grid_samples":34686,"triangles":1512,"bytes":72584},{"name":"cluster_native","grid_samples":34686,"triangles":8312,"bytes":398984},{"name":"detail_legacy","grid_samples":207025,"triangles":4124,"bytes":197960},{"name":"detail_native","grid_samples":207025,"triangles":26122,"bytes":1253864}],
"route_points_core_voxels":[[-15.19921875,25.2734375,-953.48046875],[-12.3984375,22.59375,-953.57421875],[-9.59765625,19.91796875,-952.78515625],[-6.80078125,17.23828125,-952.28515625],[-4,14.55859375,-951.765625],[-1.19921875,11.87890625,-951.25],[1.6015625,9.203125,-950.66015625],[4.40234375,6.5234375,-950.12890625],[7.19921875,3.84375,-949.6015625],[10,1.16796875,-948.97265625],[12.80078125,-1.51171875,-948.3203125],[15.6015625,-4.19140625,-947.796875],[18.3984375,-6.87109375,-947.4375],[21.19921875,-9.546875,-947.9296875],[24,-12.2265625,-947.890625],[26.80078125,-9.4765625,-948.04296875],[29.6015625,-6.7265625,-947.046875],[32.3984375,-3.97265625,-947.21875],[35.19921875,-1.22265625,-947.36328125],[38,1.52734375,-947.37890625],[40.80078125,4.27734375,-947.3125],[43.6015625,7.03125,-947.15234375],[46.3984375,9.78125,-947.1953125],[49.19921875,12.53125,-947.16015625],[52,15.28125,-947.03125],[54.80078125,18.03125,-946.94921875],[57.59765625,20.78515625,-947.55078125],[60.3984375,23.53515625,-947.46875],[63.19921875,26.28515625,-947.34765625]]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

@@ -0,0 +1 @@
{"schema_version":1,"content_hash":"54160b4d25d0279f","recipe":{"schema_version":1,"units_per_voxel":256,"owner_voxel_size_microns":125000,"core_voxel_size_microns":250000,"owner_to_core_scale_numerator":1,"owner_to_core_scale_denominator":2,"seed":0,"origin_x_q":6144,"origin_y_q":2048,"center_top_z_q":-243716,"layout_min_z_q":-264196,"layout_max_z_q":-231428,"primary_island_count":3,"island_density_q16":32768,"spacing_q":14336,"minimum_radius_q":3072,"maximum_radius_q":6144,"thickness_ratio_q16":39322,"vertical_jitter_q16":39322,"top_flatten_q16":39322,"taper_end_min_q16":29491,"taper_end_max_q16":45875,"geometry_version":2,"crust_depth_bonus_q16":9830,"root_depth_ratio_q16":49152,"blend_radius_q":768,"contour_warp_q":1613,"roughness_q":256,"boundary_seal_q":512,"bridge_half_width_q":640,"bridge_thickness_q":1024,"route_constraints":{"version":1,"capsule_radius_q":348,"capsule_height_q":1802,"maximum_grade_q16":17560,"sweep_spacing_q":128,"support_probe_radius_q":230,"support_search_depth_q":512,"minimum_clearance_q":128,"minimum_support_probes":3},"content_hash":"ef1340d32b072ba3"},"plan":{"content_hash":"61fd58f65c5fe157","islands":[{"stable_id":"e6e461e18b3a9c87","ordinal":0,"center_q":[-3891,6470,-245890],"radius_q":3605,"top_half_q":721,"top_z_q":-245169,"bottom_z_q":-250577,"taper_end_q16":41663,"bounds_min_q":[-11669,-1308,-253137],"bounds_max_q":[3887,14248,-242609]},{"stable_id":"2bc1820baba047f6","ordinal":1,"center_q":[6144,-3130,-244454],"radius_q":3693,"top_half_q":738,"top_z_q":-243716,"bottom_z_q":-249256,"taper_end_q16":33506,"bounds_min_q":[-1722,-10996,-251816],"bounds_max_q":[14010,4736,-241156]},{"stable_id":"adc259cbe2a395e9","ordinal":2,"center_q":[16179,6729,-244627],"radius_q":5181,"top_half_q":1036,"top_z_q":-243591,"bottom_z_q":-251363,"taper_end_q16":39164,"bounds_min_q":[6825,-2625,-253923],"bounds_max_q":[25533,16083,-241031]},{"stable_id":"7855fb022cc561c9","ordinal":3,"center_q":[-307,-17466,-243393],"radius_q":5840,"top_half_q":1168,"top_z_q":-242225,"bottom_z_q":-250985,"taper_end_q16":33440,"bounds_min_q":[-10320,-27479,-253545],"bounds_max_q":[9706,-7453,-239665]}],"cluster_edges":[{"stable_id":"eaa5dd310e846520","from_island_id":"e6e461e18b3a9c87","to_island_id":"2bc1820baba047f6","start_q":[-2536,5174,-245089],"end_q":[4756,-1803,-243568],"half_width_q":640,"thickness_q":1024,"bounds_min_q":[-4200,-3467,-249185],"bounds_max_q":[6420,6838,-242544],"sharp_tag_ready":true},{"stable_id":"034023599b466c51","from_island_id":"2bc1820baba047f6","to_island_id":"adc259cbe2a395e9","start_q":[7514,-1784,-243592],"end_q":[14257,4841,-243505],"half_width_q":640,"thickness_q":1024,"bounds_min_q":[5850,-3448,-247688],"bounds_max_q":[15921,6505,-242481],"sharp_tag_ready":true},{"stable_id":"4962fa885545fb26","from_island_id":"2bc1820baba047f6","to_island_id":"7855fb022cc561c9","start_q":[5356,-4881,-243607],"end_q":[939,-14697,-242382],"half_width_q":640,"thickness_q":1024,"bounds_min_q":[-725,-16361,-247703],"bounds_max_q":[7020,-3217,-241358],"sharp_tag_ready":true}],"route":[{"feature_id":"2e805a1f1f778cbb","position_q":[-3891,6470,-244091],"radius_q":1024},{"feature_id":"5be3b2b1e01722ea","position_q":[-3174,5784,-244115],"radius_q":1024},{"feature_id":"ab4eda612c1f03b5","position_q":[-2457,5099,-243913],"radius_q":1024},{"feature_id":"ba2fd2b050d0dd8c","position_q":[-1741,4413,-243785],"radius_q":1024},{"feature_id":"fc5829ee129fdc4f","position_q":[-1024,3727,-243652],"radius_q":1024},{"feature_id":"1393bb00329a9d5e","position_q":[-307,3041,-243520],"radius_q":1024},{"feature_id":"1dabc9715c93e2c9","position_q":[410,2356,-243369],"radius_q":1024},{"feature_id":"0ea2008a85e73050","position_q":[1127,1670,-243233],"radius_q":1024},{"feature_id":"754f55a5f1465cf3","position_q":[1843,984,-243098],"radius_q":1024},{"feature_id":"1b6752776b4a7d22","position_q":[2560,299,-242937],"radius_q":1024},{"feature_id":"0ab3b704db76084d","position_q":[3277,-387,-242770],"radius_q":1024},{"feature_id":"bd6980911e0879c4","position_q":[3994,-1073,-242636],"radius_q":1024},{"feature_id":"ad164d7d0c049d87","position_q":[4710,-1759,-242544],"radius_q":1024},{"feature_id":"9661463acbada2d6","position_q":[5427,-2444,-242670],"radius_q":1024},{"feature_id":"280a96547fadb0a1","position_q":[6144,-3130,-242660],"radius_q":1024},{"feature_id":"531455b42fc13108","position_q":[6861,-2426,-242699],"radius_q":1024},{"feature_id":"55d04c20849d7fcb","position_q":[7578,-1722,-242444],"radius_q":1024},{"feature_id":"ac4ebe80860dbdfa","position_q":[8294,-1017,-242488],"radius_q":1024},{"feature_id":"ff942855bf8e3fc5","position_q":[9011,-313,-242525],"radius_q":1024},{"feature_id":"e6b8bba6c6acaf9c","position_q":[9728,391,-242529],"radius_q":1024},{"feature_id":"ae47379bbd4f7fdf","position_q":[10445,1095,-242512],"radius_q":1024},{"feature_id":"98779442384a30ee","position_q":[11162,1800,-242471],"radius_q":1024},{"feature_id":"f4c7757b2ee9fe19","position_q":[11878,2504,-242482],"radius_q":1024},{"feature_id":"3ea33fae0fLine truncated
@@ -0,0 +1,12 @@
attempt=1 status=passed elapsed_s=1.74 peak_private_MiB=45 exit=0
Round 3 supplemental run ledger (2026-10-10):
PASS: M1 SurfaceWorld BuildHost after restoring the original 32-voxel mapping and 4.0 edge threshold; original worker hash preserved.
PASS: M2 HybridV1 and HybridV2 BuildHost fixtures.
PASS: M3 floating-island BuildHost on the root-parameter-cache source state; see m3_floating_islands_buildhost.*. Peak observed process memory about 3.44 GB. Tile hashes, coverage/LOD, collision/capsule contact, content anchors, height/strate/atmosphere/water agreement, Blueprint carve/fill, W1/W8/W16, and Core-off legacy checks passed.
PASS: Instrumented M3 commandlet after the root-cache change printed PASS and pass-complete=1; wrapper exited 1 because console-title channel failed with 0xE9. Timings are in REPORT.md. This is recorded as a wrapper failure as well as an internal commandlet pass.
FAIL: Island fixture attempts in order: desired tiles 2227/2553 (route player absent); origin pawn from GameMode; 2557 desired tiles after possession (dynamic collision support); support tile-key mismatch; collision gate off restored 2553 but hash differed at (-2,0,-31); CreateLocalPlayer(true) hung and was manually stopped after ~3–4 minutes; base UPlayer fixture lacked controller registration/root transform and failed preflight after 5:10. Corrected explicit controller/root/location fixture passed.
FAIL: M1 edge-threshold experiments: 4.0 -> 52075.827 > 51200 at LOD8 tile (2,0,-1); 4.125 -> 53960.427 > 52800; 4.25 -> 54806.919 > 54400; 4.5 passed edge bounds but yielded no full-span LOD0 candidate. Restoring the correct split chunk mapping and baseline 4.0 threshold passed.
FAIL: Earlier compile errors were corrected: DuplicateObject overload, private helper access, unresolved GetEffectiveWorldSeed export, and uint32-to-int32 narrowing. Initial standalone invocation with -Workers failed; -CompileWorkers 4 succeeded.
RETRY/ENVIRONMENT: One requested retry followed a 0xC0000142 shell-start failure; additional PowerShell/cmd inspection launches also failed with 0xC0000142. No subsequent BuildHost attempt was made. No 0xC0000142 BuildHost retry occurred during the completed runs.
CRASH CHECK: No new UECC-* folder reported; only historical folders dated 2026-09-17 and 2026-10-08. The CreateLocalPlayer hang was manually stopped, not a crash. Latest BuildHost test peak was below 4 GB; all completed test/build steps stayed within 15 minutes.
CURRENT TREE CAVEAT: XY-column cache was edited after the passing/profiled BuildHost run. It remains uncompiled and unmeasured due shell startup failures; current tree is not verified until that edit is built/tested or reverted.
@@ -0,0 +1 @@
{"schema_version":1,"content_hash":"94b563f1ce622def","recipe":{"schema_version":1,"evaluator_version":4,"units_per_voxel":256,"seed":0,"biome_cell_size_q":204800,"biome_warp_q":64000,"biome_warp_wavelength_q":142222,"biome_border_blend_q":30720,"climate_relief_wavelength_q":853333,"climate_moisture_wavelength_q":640000,"climate_relief_contrast_q16":131072,"content_hash":"c37de78b759c0a4c","biomes":[{"id":4097,"base_height_q":-516096,"continent_amplitude_q":128000,"continent_wavelength_q":256000,"mountain_amplitude_q":0,"mountain_wavelength_q":128000,"detail_amplitude_q":512,"detail_wavelength_q":6400,"relief_min_q16":0,"relief_max_q16":19661,"moisture_min_q16":0,"moisture_max_q16":19661,"relief_strength_q16":6554,"relief_contrast_q16":104858,"relief_wavelength_q":2560000,"height_warp_strength_q":12288,"height_warp_wavelength_q":32000,"beach_width_q":3072,"cliff_strength_q16":0,"cliff_slope_threshold_q16":32768,"cliff_sharpness_q16":131072,"cliff_sample_distance_q":512,"cliff_max_displacement_q":0,"cap_enabled":true,"cap_height_q":-149094,"cap_warp_strength_q":0,"cap_warp_wavelength_q":25600,"cap_undulation_q":256000,"cap_wavelength_q":1280000,"cap_detail_amplitude_q":2560,"cap_detail_wavelength_q":25600,"cap_ridge_amplitude_q":0,"cap_ridge_wavelength_q":12800},{"id":4098,"base_height_q":-484639,"continent_amplitude_q":128000,"continent_wavelength_q":256000,"mountain_amplitude_q":128000,"mountain_wavelength_q":512000,"detail_amplitude_q":512,"detail_wavelength_q":25600,"relief_min_q16":52429,"relief_max_q16":65536,"moisture_min_q16":52429,"moisture_max_q16":65536,"relief_strength_q16":45875,"relief_contrast_q16":104858,"relief_wavelength_q":170667,"height_warp_strength_q":12288,"height_warp_wavelength_q":25600,"beach_width_q":3072,"cliff_strength_q16":65536,"cliff_slope_threshold_q16":19661,"cliff_sharpness_q16":327680,"cliff_sample_distance_q":5120,"cliff_max_displacement_q":2570240,"cap_enabled":true,"cap_height_q":-149094,"cap_warp_strength_q":0,"cap_warp_wavelength_q":25600,"cap_undulation_q":230400,"cap_wavelength_q":1280000,"cap_detail_amplitude_q":2560,"cap_detail_wavelength_q":25600,"cap_ridge_amplitude_q":0,"cap_ridge_wavelength_q":12800},{"id":4099,"base_height_q":-516096,"continent_amplitude_q":20480,"continent_wavelength_q":85333,"mountain_amplitude_q":0,"mountain_wavelength_q":128000,"detail_amplitude_q":512,"detail_wavelength_q":6400,"relief_min_q16":6554,"relief_max_q16":26214,"moisture_min_q16":32768,"moisture_max_q16":52429,"relief_strength_q16":0,"relief_contrast_q16":16384,"relief_wavelength_q":170752,"height_warp_strength_q":16640,"height_warp_wavelength_q":32000,"beach_width_q":3072,"cliff_strength_q16":0,"cliff_slope_threshold_q16":32768,"cliff_sharpness_q16":131072,"cliff_sample_distance_q":512,"cliff_max_displacement_q":0,"cap_enabled":true,"cap_height_q":-149094,"cap_warp_strength_q":0,"cap_warp_wavelength_q":25600,"cap_undulation_q":256000,"cap_wavelength_q":1280000,"cap_detail_amplitude_q":2560,"cap_detail_wavelength_q":25600,"cap_ridge_amplitude_q":0,"cap_ridge_wavelength_q":12800},{"id":4100,"base_height_q":-385024,"continent_amplitude_q":20480,"continent_wavelength_q":256000,"mountain_amplitude_q":20480,"mountain_wavelength_q":512000,"detail_amplitude_q":512,"detail_wavelength_q":25600,"relief_min_q16":64881,"relief_max_q16":65536,"moisture_min_q16":52429,"moisture_max_q16":65536,"relief_strength_q16":45875,"relief_contrast_q16":104858,"relief_wavelength_q":170667,"height_warp_strength_q":12288,"height_warp_wavelength_q":25600,"beach_width_q":3072,"cliff_strength_q16":0,"cliff_slope_threshold_q16":32768,"cliff_sharpness_q16":131072,"cliff_sample_distance_q":512,"cliff_max_displacement_q":0,"cap_enabled":true,"cap_height_q":-149094,"cap_warp_strength_q":0,"cap_warp_wavelength_q":25600,"cap_undulation_q":230400,"cap_wavelength_q":1280000,"cap_detail_amplitude_q":2560,"cap_detail_wavelength_q":25600,"cap_ridge_amplitude_q":0,"cap_ridge_wavelength_q":12800}]},"plan":{"schema_version":1,"content_hash":"89cd31291d2aefa4","strates":[]},"floating_islands":[{"strate_index":1,"top_chunk_z":-16,"bottom_chunk_z":-79,"manifest":{"schema_version":1,"content_hash":"54160b4d25d0279f","recipe":{"schema_version":1,"units_per_voxel":256,"owner_voxel_size_microns":125000,"core_voxel_size_microns":250000,"owner_to_core_scale_numerator":1,"owner_to_core_scale_denominator":2,"seed":0,"origin_x_q":6144,"origin_y_q":2048,"center_top_z_q":-243716,"layout_min_z_q":-264196,"layout_max_z_q":-231428,"primary_island_count":3,"island_density_q16":32768,"spacing_q":14336,"minimum_radius_q":3072,"maximum_radius_q":6144,"thickness_ratio_q16":39322,"vertical_jitter_q16":39322,"top_flatten_q16":39322,"taper_end_min_q16":29491,"taper_end_max_q16":45875,"geometry_version":2,"crust_depth_bonus_q16":9830,"root_depth_ratio_q16":49152,"blend_radius_q":768,"contour_warp_q":1613,"roughness_q":256,"boundary_seal_q":512,"bridge_half_width_q":640,"bridge_thickness_q":1024,"route_constraints":{"version":1,"capsule_radius_q":Line truncated