proto: liminal looks - pool rooms, backrooms grid, staircase to nowhere, terraced hills (L161)
Stamp vocabulary v7 (opt-in fillBox, carveBox, fillSteps; carveArch reused); flat-field liminal stamp fixtures; capsule walk audit with doorway-width gate (1.2 m control fails as expected). Clang/GCC W1/W8/W12 identical; owner canonical hashes unchanged; fast tier 273/273. Terraced wide view not yet legible. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
This commit is contained in:
1 parent
4290672d1c
commit
ff52c9b576
17 files changed
+861
-12
No files matched your search
@@ -105,6 +105,7 @@ namespace
|
||||
std::filesystem::path WorldAssemblyManifestOutputPath;
|
||||
std::filesystem::path ResolvedLayoutOutputPath;
|
||||
std::filesystem::path CoreSnapshotInputPath;
|
||||
std::filesystem::path LiminalStampWalkAuditPath;
|
||||
bool ResolvedLayoutOnly=false;
|
||||
bool AuditResolvedLayoutBoundaries=false;
|
||||
bool AuditResolvedLayoutPassages=false;
|
||||
@@ -1449,6 +1450,7 @@ namespace
|
||||
" --transition-mode=hard|gradient|interleaved --transition-width-chunks=N (fixture override)\n"
|
||||
" --audit-resolved-layout-passages (capsule, support, route-binding and blocked-control audit)\n"
|
||||
" --audit-liminal-road-walk (capsule, support, width and grade audit for the liminal road)\n"
|
||||
" --audit-liminal-stamp-walk=FILE (capsule, support and doorway-width audit for a stamp fixture)\n"
|
||||
" --audit-heightfield-profile (brute-force the profiled field intervals and route)\n"
|
||||
" --audit-motif-intervals (brute-force motif bounds, BVH and shape-free guards)\n"
|
||||
" --audit-landmark-reachability (capsule, support, grade and buried-L43 control)\n"
|
||||
@@ -1497,6 +1499,9 @@ namespace
|
||||
else if(arg=="--audit-resolved-layout-boundaries")options.AuditResolvedLayoutBoundaries=true;
|
||||
else if(arg=="--audit-resolved-layout-passages")options.AuditResolvedLayoutPassages=true;
|
||||
else if(arg=="--audit-liminal-road-walk")options.AuditLiminalRoadWalk=true;
|
||||
else if(arg.starts_with("--audit-liminal-stamp-walk="))
|
||||
options.LiminalStampWalkAuditPath=std::filesystem::path(std::string(
|
||||
arg.substr(std::string_view("--audit-liminal-stamp-walk=").size())));
|
||||
else if(arg=="--native-owner-fi")options.NativeOwnerFloatingIslandsRecipe=true;
|
||||
else if(arg=="--density-dispatch-report")
|
||||
{options.DensityDispatchReport=true;options.StreamHash=true;options.StreamHashTiles=true;}
|
||||
@@ -2035,10 +2040,14 @@ int main(int argc,char** argv)
|
||||
ownerJsonRoot.Get("liminal_road_override").Data);
|
||||
const bool hasLiminalPillarGrid=!std::holds_alternative<std::nullptr_t>(
|
||||
ownerJsonRoot.Get("liminal_pillar_grid_override").Data);
|
||||
const bool hasLiminalStampFixture=!std::holds_alternative<std::nullptr_t>(
|
||||
ownerJsonRoot.Get("liminal_stamp_fixture_override").Data);
|
||||
if((hasMotifFamily&&hasLiminalRoad)||(hasMotifFamily&&hasLiminalPillarGrid)
|
||||
||(hasLiminalRoad&&hasLiminalPillarGrid))
|
||||
||(hasLiminalRoad&&hasLiminalPillarGrid)
|
||||
||(hasLiminalStampFixture&&(hasMotifFamily||hasLiminalRoad||hasLiminalPillarGrid)))
|
||||
{std::fprintf(stderr,"liminal content overrides must be used in separate fixtures\n");return 2;}
|
||||
if(hasCoreLiminalField&&(hasMotifFamily||hasLiminalRoad||hasLiminalPillarGrid))
|
||||
if(hasCoreLiminalField&&(hasMotifFamily||hasLiminalRoad||hasLiminalPillarGrid
|
||||
||hasLiminalStampFixture))
|
||||
{std::fprintf(stderr,"Core.Liminal.Field owns its variant geometry and cannot be combined with prototype content overrides\n");return 2;}
|
||||
if(hasMotifFamily)
|
||||
{
|
||||
@@ -2138,6 +2147,27 @@ int main(int argc,char** argv)
|
||||
"placement=regular_grid route_keepout=PASS band_clearance=PASS status=PASS\n",
|
||||
resolvedLayout.stampVocabularyVersion,resolvedLayout.stamps.size());
|
||||
}
|
||||
if(hasLiminalStampFixture)
|
||||
{
|
||||
std::vector<VoxelForgeCore::ResolvedLayoutStampRequestV1> requests;
|
||||
if(!StandaloneWorldAssemblyPrototype::BuildLiminalStampFixtureRequests(ownerJsonRoot,
|
||||
*ownerWorld,worldAssembly,resolvedLayout,requests,error)
|
||||
||!VoxelForgeCore::ResolveResolvedLayoutStampsV1(
|
||||
resolvedLayout,seed,requests,error))
|
||||
{std::fprintf(stderr,"Liminal stamp fixture resolution failed: %s\n",error.c_str());return 2;}
|
||||
const std::size_t boxFills=static_cast<std::size_t>(std::count_if(
|
||||
resolvedLayout.stamps.begin(),resolvedLayout.stamps.end(),[](const auto& stamp)
|
||||
{return stamp.kind==VoxelForgeCore::ResolvedSdfStampKindV1::fillBox;}));
|
||||
const std::size_t boxCarves=static_cast<std::size_t>(std::count_if(
|
||||
resolvedLayout.stamps.begin(),resolvedLayout.stamps.end(),[](const auto& stamp)
|
||||
{return stamp.kind==VoxelForgeCore::ResolvedSdfStampKindV1::carveBox;}));
|
||||
const std::size_t stairs=static_cast<std::size_t>(std::count_if(
|
||||
resolvedLayout.stamps.begin(),resolvedLayout.stamps.end(),[](const auto& stamp)
|
||||
{return stamp.kind==VoxelForgeCore::ResolvedSdfStampKindV1::fillSteps;}));
|
||||
std::printf("[LiminalStampFixtureResolved] vocabulary=%u records=%zu box_fills=%zu box_carves=%zu steps=%zu placement=bounded_flat_field status=PASS\n",
|
||||
resolvedLayout.stampVocabularyVersion,resolvedLayout.stamps.size(),
|
||||
boxFills,boxCarves,stairs);
|
||||
}
|
||||
if(options.LandmarkChamberDemo)
|
||||
{
|
||||
std::vector<VoxelForgeCore::ResolvedLayoutStampRequestV1> requests;
|
||||
@@ -2639,5 +2669,6 @@ int main(int argc,char** argv)
|
||||
options.MovingCameraSpeedMetersPerSecond,options.MovingCameraDurationSeconds,
|
||||
options.MovingCameraDwellSeconds,options.ColdWorkerTimeline,
|
||||
options.AuditPassageSourceClamp,options.AuditPassageCarveReach,
|
||||
options.AuditPassageTileSeams,options.AuditLiminalRoadWalk);
|
||||
options.AuditPassageTileSeams,options.AuditLiminalRoadWalk,
|
||||
options.LiminalStampWalkAuditPath);
|
||||
}
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <limits>
|
||||
#include <numeric>
|
||||
#include <queue>
|
||||
#include <sstream>
|
||||
#include <string_view>
|
||||
#include <thread>
|
||||
#include <tuple>
|
||||
@@ -2385,7 +2386,8 @@ namespace StandaloneStreamBenchmark
|
||||
double MovingCameraDurationSeconds=12.0,double MovingCameraDwellSeconds=5.0,
|
||||
bool bColdWorkerTimeline=false,bool bAuditPassageSourceClamp=false,
|
||||
bool bAuditPassageCarveReach=false,bool bAuditPassageTileSeams=false,
|
||||
bool bAuditLiminalRoadWalk=false)
|
||||
bool bAuditLiminalRoadWalk=false,
|
||||
const std::filesystem::path& LiminalStampWalkAuditPath={})
|
||||
{
|
||||
using Clock=std::chrono::steady_clock;
|
||||
const std::clock_t ColdCpuOrigin=std::clock();
|
||||
@@ -2555,7 +2557,8 @@ namespace StandaloneStreamBenchmark
|
||||
||bAuditOreVeinYield||bAuditLandmarkReachability||bAuditStrateTransitions
|
||||
||bAuditResolvedLayoutPassages||bAuditResolvedLayoutBoundaries
|
||||
||bAuditTileShapeReadiness||bAuditBasePageEquivalence||bAuditRouteParity
|
||||
||bAuditPassageSourceClamp||bAuditPassageCarveReach||bAuditLiminalRoadWalk;
|
||||
||bAuditPassageSourceClamp||bAuditPassageCarveReach||bAuditLiminalRoadWalk
|
||||
||!LiminalStampWalkAuditPath.empty();
|
||||
const bool bDeferFarWorld=bIncludeFarWorld&&!bMovingCameraTrace&&!bFarWorldAudit;
|
||||
VoxelForgeCore::ShapeBuildRequest ShapeRequest;
|
||||
ShapeRequest.minVoxel={FineMin.X,FineMin.Y,FineMin.Z};
|
||||
@@ -2821,7 +2824,8 @@ namespace StandaloneStreamBenchmark
|
||||
Streamer.Stop();
|
||||
return passed?0:11;
|
||||
}
|
||||
if(bAuditResolvedLayoutPassages||bAuditLiminalRoadWalk)
|
||||
if(bAuditResolvedLayoutPassages||bAuditLiminalRoadWalk
|
||||
||!LiminalStampWalkAuditPath.empty())
|
||||
{
|
||||
if(ResolvedLayout==nullptr||!CoreSnapshot.resolvedLayout())
|
||||
{Streamer.Stop();std::fprintf(stderr,"[ResolvedWalkAudit] missing resolved-layout snapshot\n");return 2;}
|
||||
@@ -3230,6 +3234,82 @@ namespace StandaloneStreamBenchmark
|
||||
}
|
||||
return passed;
|
||||
};
|
||||
if(!LiminalStampWalkAuditPath.empty())
|
||||
{
|
||||
struct FDoorwayWidthGate
|
||||
{
|
||||
std::string prefix;
|
||||
std::uint32_t widthAxis=0;
|
||||
double minimumWidthMetres=0.0;
|
||||
};
|
||||
std::ifstream auditFile(LiminalStampWalkAuditPath);
|
||||
std::vector<std::array<double,3>> walkPath;
|
||||
std::vector<FDoorwayWidthGate> doorwayGates;
|
||||
bool inputValid=static_cast<bool>(auditFile);
|
||||
std::string line;
|
||||
while(inputValid&&std::getline(auditFile,line))
|
||||
{
|
||||
if(line.empty()||line[0]=='#')continue;
|
||||
std::istringstream fields(line);
|
||||
char record=0;fields>>record;
|
||||
if(record=='P')
|
||||
{
|
||||
std::array<double,3> point{};
|
||||
fields>>point[0]>>point[1]>>point[2];
|
||||
inputValid=inputValid&&static_cast<bool>(fields)
|
||||
&&std::isfinite(point[0])&&std::isfinite(point[1])
|
||||
&&std::isfinite(point[2]);
|
||||
if(inputValid)
|
||||
walkPath.push_back({point[0]/coreMetres,
|
||||
point[1]/coreMetres,point[2]/coreMetres});
|
||||
}
|
||||
else if(record=='D')
|
||||
{
|
||||
FDoorwayWidthGate gate;
|
||||
fields>>gate.prefix>>gate.widthAxis>>gate.minimumWidthMetres;
|
||||
inputValid=inputValid&&static_cast<bool>(fields)
|
||||
&&!gate.prefix.empty()&&gate.widthAxis<2
|
||||
&&std::isfinite(gate.minimumWidthMetres)
|
||||
&&gate.minimumWidthMetres>=1.5;
|
||||
if(inputValid)doorwayGates.push_back(std::move(gate));
|
||||
}
|
||||
else inputValid=false;
|
||||
}
|
||||
std::uint64_t doorwayCount=0;
|
||||
double narrowestDoorway=std::numeric_limits<double>::infinity();
|
||||
bool doorwayWidthsPass=inputValid;
|
||||
for(const auto& gate:doorwayGates)
|
||||
{
|
||||
std::uint64_t found=0;
|
||||
for(const auto& stamp:ResolvedLayout->stamps)
|
||||
{
|
||||
if(!stamp.stableId.starts_with(gate.prefix))continue;
|
||||
++found;++doorwayCount;
|
||||
const double width=2.0*stamp.halfExtentsMicrometres[gate.widthAxis]/1.0e6;
|
||||
narrowestDoorway=std::min(narrowestDoorway,width);
|
||||
if(width+1.0e-9<gate.minimumWidthMetres)doorwayWidthsPass=false;
|
||||
}
|
||||
doorwayWidthsPass=doorwayWidthsPass&&found>0;
|
||||
}
|
||||
if(doorwayCount==0)narrowestDoorway=0.0;
|
||||
const FWalkAudit walkAudit=inputValid&&walkPath.size()>=2
|
||||
?auditPlayerPath(Shape,walkPath,0.125,0.125,1.125,3,0.45):FWalkAudit{};
|
||||
const bool passed=inputValid&&doorwayWidthsPass&&walkAudit.passed;
|
||||
std::printf("[LiminalStampWalkAudit] path_points=%zu stations=%llu capsule_samples=%llu "
|
||||
"blocked=%llu support_samples=%llu unsupported=%llu grade_failures=%llu "
|
||||
"doorways=%llu narrowest_doorway_m=%.3f minimum_doorway_m=1.500 "
|
||||
"status=%s\n",walkPath.size(),
|
||||
static_cast<unsigned long long>(walkAudit.centers),
|
||||
static_cast<unsigned long long>(walkAudit.capsuleSamples),
|
||||
static_cast<unsigned long long>(walkAudit.blocked),
|
||||
static_cast<unsigned long long>(walkAudit.supportSamples),
|
||||
static_cast<unsigned long long>(walkAudit.unsupported),
|
||||
static_cast<unsigned long long>(walkAudit.gradeFailures),
|
||||
static_cast<unsigned long long>(doorwayCount),narrowestDoorway,
|
||||
passed?"PASS":"FAIL");
|
||||
Streamer.Stop();
|
||||
return passed?0:14;
|
||||
}
|
||||
if(bAuditLiminalRoadWalk&&!bAuditResolvedLayoutPassages)
|
||||
{
|
||||
const bool passed=auditLiminalRoadWalk(true);
|
||||
|
||||
@@ -822,6 +822,109 @@ namespace StandaloneWorldAssemblyPrototype
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool BuildLiminalStampFixtureRequests(const VFJson::Value& root,
|
||||
const FStandaloneOwnerWorld& owner,
|
||||
const VoxelForgeCore::WorldAssemblyManifest& assembly,
|
||||
const VoxelForgeCore::ResolvedLayoutSnapshotV3& layout,
|
||||
std::vector<VoxelForgeCore::ResolvedLayoutStampRequestV1>& requests,
|
||||
std::string& error)
|
||||
{
|
||||
using namespace VoxelForgeCore;
|
||||
requests.clear();
|
||||
const VFJson::Value& fixture=root.Get("liminal_stamp_fixture_override");
|
||||
if(!fixture.IsObject()||!fixture.Get("version").IsNumber()
|
||||
||fixture.Get("version").Integer()!=1||!fixture.Get("stamps").IsArray())
|
||||
{error="liminal_stamp_fixture_override must be a version-1 object with a stamps array";return false;}
|
||||
if(assembly.recipe.surfaceProfile.version!=1
|
||||
||assembly.recipe.surfaceProfile.kind!=WorldAssemblySurfaceProfileKindV1::flatField
|
||||
||owner.CoreVoxelSizeMicrons==0)
|
||||
{error="liminal stamp fixtures require a valid flatField SurfaceWorld recipe";return false;}
|
||||
const VFJson::Value& strateValue=fixture.Get("strate_index");
|
||||
if(!strateValue.IsNumber())
|
||||
{error="liminal stamp fixture must select a resolved SurfaceWorld strate";return false;}
|
||||
const auto strateIndex=static_cast<std::int32_t>(strateValue.Integer());
|
||||
const auto strate=std::find_if(layout.strates.begin(),layout.strates.end(),
|
||||
[strateIndex](const auto& value){return value.strateIndex==strateIndex
|
||||
&&value.generatorKind=="SurfaceWorld";});
|
||||
if(strate==layout.strates.end())
|
||||
{error="liminal stamp fixture strate is not a resolved SurfaceWorld strate";return false;}
|
||||
const auto toMicrometres=[](double value)
|
||||
{return static_cast<std::int64_t>(std::llround(value*1000000.0));};
|
||||
const std::int64_t floorMicrometres=static_cast<std::int64_t>(std::llround(
|
||||
static_cast<double>(assembly.recipe.surfaceProfile.h0Subvoxels)
|
||||
*owner.CoreVoxelSizeMicrons/WorldAssemblySubvoxelsPerVoxel));
|
||||
const auto readOptionalMetres=[&](const VFJson::Value& object,const char* key,
|
||||
double fallback,double& result)
|
||||
{
|
||||
const VFJson::Value& value=object.Get(key);
|
||||
if(std::holds_alternative<std::nullptr_t>(value.Data))
|
||||
{result=fallback;return true;}
|
||||
if(!value.IsNumber()||!std::isfinite(value.Number()))return false;
|
||||
result=value.Number();return true;
|
||||
};
|
||||
for(const auto& entry:fixture.Get("stamps").AsArray())
|
||||
{
|
||||
if(!entry.IsObject())
|
||||
{error="liminal stamp fixture contains a malformed stamp record";return false;}
|
||||
const auto* id=std::get_if<std::string>(&entry.Get("stable_id").Data);
|
||||
const auto* kind=std::get_if<std::string>(&entry.Get("kind").Data);
|
||||
const VFJson::Value& anchor=entry.Get("anchor_xy_m");
|
||||
const VFJson::Value& extents=entry.Get("half_extents_m");
|
||||
double zOffset=0.0,rounding=0.0,smooth=0.0;
|
||||
if(!id||id->empty()||!kind||anchor.AsArray().size()!=2
|
||||
||extents.AsArray().size()!=3
|
||||
||!readOptionalMetres(entry,"z_offset_m",0.0,zOffset)
|
||||
||!readOptionalMetres(entry,"rounding_radius_m",0.0,rounding)
|
||||
||!readOptionalMetres(entry,"smooth_width_m",0.0,smooth))
|
||||
{error="liminal stamp fixture record requires an identity, kind, anchor, extents and finite metre values";return false;}
|
||||
for(const auto& value:anchor.AsArray())
|
||||
if(!value.IsNumber()||!std::isfinite(value.Number()))
|
||||
{error="liminal stamp anchor_xy_m must contain finite metre values";return false;}
|
||||
for(const auto& value:extents.AsArray())
|
||||
if(!value.IsNumber()||!std::isfinite(value.Number())||value.Number()<=0.0)
|
||||
{error="liminal stamp half_extents_m must contain positive finite metre values";return false;}
|
||||
if(std::abs(anchor.AsArray()[0].Number())>5000.0
|
||||
||std::abs(anchor.AsArray()[1].Number())>5000.0
|
||||
||std::abs(zOffset)>1000.0||rounding<0.0||smooth<0.0)
|
||||
{error="liminal stamp fixture values exceed their bounded ranges";return false;}
|
||||
ResolvedLayoutStampRequestV1 request;
|
||||
request.stableId=*id;request.strateIndex=strateIndex;
|
||||
request.anchorPositionMicrometres={
|
||||
toMicrometres(anchor.AsArray()[0].Number()),
|
||||
toMicrometres(anchor.AsArray()[1].Number()),
|
||||
floorMicrometres+toMicrometres(zOffset)};
|
||||
request.halfExtentsMicrometres={toMicrometres(extents.AsArray()[0].Number()),
|
||||
toMicrometres(extents.AsArray()[1].Number()),
|
||||
toMicrometres(extents.AsArray()[2].Number())};
|
||||
request.roundingRadiusMicrometres=toMicrometres(rounding);
|
||||
request.smoothWidthMicrometres=toMicrometres(smooth);
|
||||
const VFJson::Value& yaw=entry.Get("yaw_quarter_turns");
|
||||
if(!std::holds_alternative<std::nullptr_t>(yaw.Data))
|
||||
{
|
||||
if(!yaw.IsNumber()||yaw.Integer()<0||yaw.Integer()>3)
|
||||
{error="liminal stamp yaw_quarter_turns must be an integer from zero through three";return false;}
|
||||
request.yawQuarterTurns=static_cast<std::uint8_t>(yaw.Integer());
|
||||
}
|
||||
if(*kind=="fillBox")request.kind=ResolvedSdfStampKindV1::fillBox;
|
||||
else if(*kind=="carveBox")request.kind=ResolvedSdfStampKindV1::carveBox;
|
||||
else if(*kind=="carveArch")request.kind=ResolvedSdfStampKindV1::carveArch;
|
||||
else if(*kind=="fillSteps")
|
||||
{
|
||||
request.kind=ResolvedSdfStampKindV1::fillSteps;
|
||||
const VFJson::Value& count=entry.Get("step_count");
|
||||
if(!count.IsNumber()||count.Integer()<2||count.Integer()>128)
|
||||
{error="fillSteps requires step_count from two through 128";return false;}
|
||||
request.stepCount=static_cast<std::uint16_t>(count.Integer());
|
||||
}
|
||||
else
|
||||
{error="liminal stamp kind must be fillBox, carveBox, carveArch or fillSteps";return false;}
|
||||
requests.push_back(std::move(request));
|
||||
}
|
||||
if(requests.empty())
|
||||
{error="liminal stamp fixture must resolve at least one stamp";return false;}
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool BuildCoreLiminalFieldRequests(
|
||||
const VoxelForgeCore::WorldAssemblyManifest& assembly,
|
||||
const FStandaloneOwnerWorld& owner,
|
||||
|
||||
Reference in new issue
Block a user