wip(step2e): parameterised chamber-graph model -- compiles, traversal test PASS; benchmark not run

Stopped by low memory (another app held 12.5 GB; processes failed with 0xC0000142).
Editor-only, default off: a seeded connected room graph (varied chambers on a spanning network,
optional loops, shafts, rock features, ledges, basin floors), eight parameter profiles, the
step-2d brick driver and detail bands, a new test VoxelForge.ParameterizedGeneration.TraversalSeeds
(PASS in step2e_functional_01, which also proves the tree compiles). Existing live tests untouched.
Not yet run: the eight-profile ring benchmark, variety metrics, slices, detail/artefact/determinism
checks.

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-09-30 11:45:45 +02:00
1 parent 78641da0bb
commit f8a46ecf8d
9 files changed
+1585 -51

No files matched your search

@@ -157,7 +157,8 @@ namespace VoxelForgeRegionEval
float DetailScale,
TArray<float>& OutDensities,
FTiming& OutTiming,
bool bEnableBrickSkips)
bool bEnableBrickSkips,
bool bParameterized)
{
OutTiming = FTiming();
OutDensities.Reset();
@@ -250,6 +251,7 @@ namespace VoxelForgeRegionEval
const bool bHaveCpuStart = GetCurrentThreadCpuSeconds(CpuStart);
TArray<float> BrickDetail;
VoxelForgeRedefinedDensityField::FBrickEvaluationContext BrickContext;
VoxelForgeRedefinedDensityField::FParameterizedBrickContext ParameterizedBrickContext;
for (;;)
{
const int32 BatchBegin = NextBrickIndex.fetch_add(
@@ -268,10 +270,13 @@ namespace VoxelForgeRegionEval
VoxelForgeRedefinedDensityField::EBrickFallbackReason::UnsupportedState;
++WorkerMacroChecks[WorkerIndex];
const double ClassifyStart = FPlatformTime::Seconds();
const bool bCanSkip = bEnableBrickSkips
&& VoxelForgeRedefinedDensityField::TryClassifyBrick(
const bool bCanSkip = bEnableBrickSkips && (bParameterized
? VoxelForgeRedefinedDensityField::TryClassifyParameterizedBrick(
Generator, Brick.Origin, Brick.Size, bUniformAir, DetailScale,
&bEvaluatedMacroCentre, &FallbackReason);
&bEvaluatedMacroCentre, &FallbackReason)
: VoxelForgeRedefinedDensityField::TryClassifyBrick(
Generator, Brick.Origin, Brick.Size, bUniformAir, DetailScale,
&bEvaluatedMacroCentre, &FallbackReason));
WorkerClassify[WorkerIndex] += FPlatformTime::Seconds() - ClassifyStart;
WorkerMacroCentreEvaluations[WorkerIndex] += bEvaluatedMacroCentre ? 1u : 0u;
if (bEnableBrickSkips && !bCanSkip)
@@ -304,7 +309,12 @@ namespace VoxelForgeRegionEval
const double EvaluationStart = FPlatformTime::Seconds();
VoxelForgeRedefinedDensityField::BuildDetailBrick(
Generator, Brick.Origin, Brick.Size, DetailScale, BrickDetail,
&BrickContext);
bParameterized ? nullptr : &BrickContext);
if (bParameterized)
{
VoxelForgeRedefinedDensityField::BuildParameterizedBrickContext(
Generator, Brick.Origin, Brick.Size, ParameterizedBrickContext);
}
for (int32 Z = 0; Z < Brick.Size.Z; ++Z)
for (int32 Y = 0; Y < Brick.Size.Y; ++Y)
for (int32 X = 0; X < Brick.Size.X; ++X)
@@ -315,11 +325,16 @@ namespace VoxelForgeRegionEval
const int64 LatticeIndex = LinearIndex(
Brick.Lattice.X + X, Brick.Lattice.Y + Y,
Brick.Lattice.Z + Z, Dimension);
OutDensities[static_cast<int32>(LatticeIndex)] =
VoxelForgeRedefinedDensityField::EvaluateWithDetailValue(
const float DetailValue = BrickDetail[
(Z * Brick.Size.Y + Y) * Brick.Size.X + X];
OutDensities[static_cast<int32>(LatticeIndex)] = bParameterized
? VoxelForgeRedefinedDensityField::EvaluateParameterizedWithDetailValue(
Generator, static_cast<float>(WorldX), static_cast<float>(WorldY),
static_cast<float>(WorldZ),
BrickDetail[(Z * Brick.Size.Y + Y) * Brick.Size.X + X],
static_cast<float>(WorldZ), DetailValue, nullptr, DetailScale,
&ParameterizedBrickContext)
: VoxelForgeRedefinedDensityField::EvaluateWithDetailValue(
Generator, static_cast<float>(WorldX), static_cast<float>(WorldY),
static_cast<float>(WorldZ), DetailValue,
nullptr, DetailScale, &BrickContext);
++WorkerEvaluated[WorkerIndex];
}