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:
Fr0zkaandClaude Opus 5.5 committed 2026-11-02 10:11:37 +01:00
1 parent 4290672d1c
commit ff52c9b576
17 files changed
+861 -12

No files matched your search

@@ -968,6 +968,7 @@ namespace VoxelForgeCore
inline constexpr std::uint32_t ResolvedLayoutStampVocabularyVersionV4 = 4;
inline constexpr std::uint32_t ResolvedLayoutStampVocabularyVersionV5 = 5;
inline constexpr std::uint32_t ResolvedLayoutStampVocabularyVersionV6 = 6;
inline constexpr std::uint32_t ResolvedLayoutStampVocabularyVersionV7 = 7;
inline constexpr std::uint32_t ResolvedLayoutCavernGraphVocabularyVersionV1 = 1;
inline constexpr std::uint32_t ResolvedLayoutOreVeinVocabularyVersionV1 = 1;
enum class ResolvedLayoutValidationModeV3 : std::uint8_t { compatibility, strict };
@@ -982,7 +983,10 @@ namespace VoxelForgeCore
fillDais = 4,
fillMonolith = 5,
fillPlatform = 6,
fillSweptDeckSegment = 7
fillSweptDeckSegment = 7,
fillBox = 8,
carveBox = 9,
fillSteps = 10
};
struct ResolvedLayoutStampRequestV1
@@ -1005,6 +1009,9 @@ namespace VoxelForgeCore
std::int64_t irregularityWavelengthMicrometres = 0;
std::int64_t roundingRadiusMicrometres = 0;
std::int64_t minimumSpacingMicrometres = 0;
// Vocabulary 7: fillSteps divides the X and Z extents into this many
// identical treads and risers. Other stamp kinds keep this at zero.
std::uint16_t stepCount = 0;
// 0 = free placement, 1 = seated on the authored flat profile floor.
std::uint8_t attachmentPolicy = 0;
std::int64_t floorMicrometres = 0;
@@ -1027,6 +1034,7 @@ namespace VoxelForgeCore
std::int64_t irregularityWavelengthMicrometres = 0;
std::int64_t roundingRadiusMicrometres = 0;
std::int64_t minimumSpacingMicrometres = 0;
std::uint16_t stepCount = 0;
std::uint8_t attachmentPolicy = 0;
std::int64_t floorMicrometres = 0;
std::uint64_t irregularitySeed = 0;
+29 -4
View File
@@ -176,7 +176,7 @@ namespace
{
const auto value=static_cast<std::uint8_t>(kind);
return value>=static_cast<std::uint8_t>(ResolvedSdfStampKindV1::carveEllipsoid)
&&value<=static_cast<std::uint8_t>(ResolvedSdfStampKindV1::fillSweptDeckSegment);
&&value<=static_cast<std::uint8_t>(ResolvedSdfStampKindV1::fillSteps);
}
bool LayoutStampIsMotif(ResolvedSdfStampKindV1 kind)
{return kind==ResolvedSdfStampKindV1::fillMonolith
@@ -711,6 +711,8 @@ namespace
<<",\"minimum_spacing_um\":"<<stamp.minimumSpacingMicrometres
<<",\"attachment_policy\":"<<static_cast<unsigned>(stamp.attachmentPolicy)
<<",\"floor_um\":"<<stamp.floorMicrometres;
if(stamp.kind==ResolvedSdfStampKindV1::fillSteps)
out<<",\"step_count\":"<<stamp.stepCount;
out<<'}';
}
out<<']';
@@ -1279,8 +1281,9 @@ bool ResolvedLayoutSnapshotV3::validate(ResolvedLayoutValidationModeV3 mode,
&&stampVocabularyVersion!=ResolvedLayoutStampVocabularyVersionV3
&&stampVocabularyVersion!=ResolvedLayoutStampVocabularyVersionV4
&&stampVocabularyVersion!=ResolvedLayoutStampVocabularyVersionV5
&&stampVocabularyVersion!=ResolvedLayoutStampVocabularyVersionV6)
add("stamp_vocabulary_version","resolved stamps require supported vocabulary version 1 through 6");
&&stampVocabularyVersion!=ResolvedLayoutStampVocabularyVersionV6
&&stampVocabularyVersion!=ResolvedLayoutStampVocabularyVersionV7)
add("stamp_vocabulary_version","resolved stamps require supported vocabulary version 1 through 7");
std::vector<std::string> stampIds;
for(const auto& stamp:stamps)
{
@@ -1292,8 +1295,18 @@ bool ResolvedLayoutSnapshotV3::validate(ResolvedLayoutValidationModeV3 mode,
if(!LayoutStampKindValid(stamp.kind)||stamp.yawQuarterTurns>3
||(stamp.kind==ResolvedSdfStampKindV1::fillSweptDeckSegment
&&stampVocabularyVersion<ResolvedLayoutStampVocabularyVersionV4)
||((stamp.kind==ResolvedSdfStampKindV1::fillBox
||stamp.kind==ResolvedSdfStampKindV1::carveBox
||stamp.kind==ResolvedSdfStampKindV1::fillSteps)
&&stampVocabularyVersion<ResolvedLayoutStampVocabularyVersionV7)
||(motif&&stampVocabularyVersion<ResolvedLayoutStampVocabularyVersionV3))
add("stamp_kind","stamp has an unsupported kind or orientation");
if((stamp.kind==ResolvedSdfStampKindV1::fillSteps
&&(stampVocabularyVersion<ResolvedLayoutStampVocabularyVersionV7
||stamp.stepCount<2||stamp.stepCount>128
||stamp.roundingRadiusMicrometres!=0))
||(stamp.kind!=ResolvedSdfStampKindV1::fillSteps&&stamp.stepCount!=0))
add("stamp_steps",stamp.stableId+" has an invalid step count or rounding mode");
bool validExtents=true;
for(const auto extent:stamp.halfExtentsMicrometres)
validExtents=validExtents&&extent>=500000&&extent<=100000000;
@@ -1777,6 +1790,7 @@ std::optional<ResolvedLayoutSnapshotV3> ResolvedLayoutSnapshotV3::FromJson(
stamp.floorMicrometres=LayoutInt(v,"floor_um");
stamp.irregularitySeed=static_cast<std::uint64_t>(LayoutInt(v,"irregularity_seed"));
stamp.yawQuarterTurns=static_cast<std::uint8_t>(LayoutInt(v,"yaw_quarter_turns"));
stamp.stepCount=static_cast<std::uint16_t>(LayoutInt(v,"step_count"));
s.stamps.push_back(std::move(stamp));
}
for(const auto& v:root.Get("cavern_rooms").AsArray())
@@ -1901,7 +1915,13 @@ bool ResolveResolvedLayoutStampsV1(ResolvedLayoutSnapshotV3& layout,std::int32_t
});
const bool hasSweptDeck=std::any_of(ordered.begin(),ordered.end(),[](const auto& request)
{return request.kind==ResolvedSdfStampKindV1::fillSweptDeckSegment;});
candidate.stampVocabularyVersion=hasContinuousSweptDeck
const bool hasVocabulary7Stamp=std::any_of(ordered.begin(),ordered.end(),[](const auto& request)
{return request.kind==ResolvedSdfStampKindV1::fillBox
||request.kind==ResolvedSdfStampKindV1::carveBox
||request.kind==ResolvedSdfStampKindV1::fillSteps;});
candidate.stampVocabularyVersion=hasVocabulary7Stamp
?ResolvedLayoutStampVocabularyVersionV7
:hasContinuousSweptDeck
?(hasNonMonotoneSweptDeck?ResolvedLayoutStampVocabularyVersionV6
:ResolvedLayoutStampVocabularyVersionV5)
:hasSweptDeck?ResolvedLayoutStampVocabularyVersionV4
@@ -1914,6 +1934,10 @@ bool ResolveResolvedLayoutStampsV1(ResolvedLayoutSnapshotV3& layout,std::int32_t
&&ordered[requestIndex-1].stableId==request.stableId))
{error="stamp requests require non-empty unique stable IDs";return false;}
if(!LayoutStampKindValid(request.kind)||request.yawQuarterTurns>3
||(request.kind==ResolvedSdfStampKindV1::fillSteps
?(request.stepCount<2||request.stepCount>128
||request.roundingRadiusMicrometres!=0)
:request.stepCount!=0)
||request.placementRadiusMicrometres<0
||request.placementRadiusMicrometres>100000000
||(request.kind==ResolvedSdfStampKindV1::fillSweptDeckSegment
@@ -1998,6 +2022,7 @@ bool ResolveResolvedLayoutStampsV1(ResolvedLayoutSnapshotV3& layout,std::int32_t
stamp.smoothWidthMicrometres=request.smoothWidthMicrometres;
stamp.irregularityAmplitudeMicrometres=request.irregularityAmplitudeMicrometres;
stamp.irregularityWavelengthMicrometres=request.irregularityWavelengthMicrometres;
stamp.stepCount=request.stepCount;
stamp.irregularitySeed=baseSeed;stamp.yawQuarterTurns=request.yawQuarterTurns;
std::array<std::int64_t,3> offset{};
if(request.placementRadiusMicrometres>0)
+26 -1
View File
@@ -7157,6 +7157,23 @@ private:
const float top=std::max(StampEllipsoidSdf(x,y,z,halfSize),-z);
return SmoothMinDistance(lower,top,round*2.0f);
}
static float StampStepsSdf(float x,float y,float z,
const std::array<float,3>& halfSize,std::uint16_t stepCount)
{
if(stepCount<2||stepCount>128)return std::numeric_limits<float>::infinity();
const float treadWidth=(2.0f*halfSize[0])/stepCount;
const float riserHeight=(2.0f*halfSize[2])/stepCount;
float distance=std::numeric_limits<float>::infinity();
for(std::uint16_t step=0;step<stepCount;++step)
{
const float stepHeight=(step+1)*riserHeight;
const float centerX=-halfSize[0]+(step+0.5f)*treadWidth;
const float centerZ=-halfSize[2]+stepHeight*0.5f;
const std::array<float,3> extent={treadWidth*0.5f,halfSize[1],stepHeight*0.5f};
distance=std::min(distance,StampRoundedBoxSdf(x-centerX,y,z-centerZ,extent,0.0f));
}
return distance;
}
static float StampContinuousSweptDeckSdf(const FStampRuntime& stamp,
float x,float y,float z)
{
@@ -7295,6 +7312,13 @@ private:
case VoxelForgeCore::ResolvedSdfStampKindV1::fillPlatform:
distance=StampRoundedBoxSdf(localX,localY,localZ,
stamp.halfExtentsVoxels,stamp.roundingRadiusVoxels);break;
case VoxelForgeCore::ResolvedSdfStampKindV1::fillBox:
case VoxelForgeCore::ResolvedSdfStampKindV1::carveBox:
distance=StampRoundedBoxSdf(localX,localY,localZ,
stamp.halfExtentsVoxels,stamp.roundingRadiusVoxels);break;
case VoxelForgeCore::ResolvedSdfStampKindV1::fillSteps:
distance=StampStepsSdf(localX,localY,localZ,stamp.halfExtentsVoxels,
stamp.record->stepCount);break;
case VoxelForgeCore::ResolvedSdfStampKindV1::fillDais:
if(ResolvedLayout&&ResolvedLayout->stampVocabularyVersion
>=VoxelForgeCore::ResolvedLayoutStampVocabularyVersionV2)
@@ -7471,7 +7495,8 @@ private:
||worldMicrometres[axis]>record.boundsMaximumMicrometres[axis])return;
const float distance=StampSdf(runtime,X,Y,Z);
if(record.kind==VoxelForgeCore::ResolvedSdfStampKindV1::carveEllipsoid
||record.kind==VoxelForgeCore::ResolvedSdfStampKindV1::carveArch)
||record.kind==VoxelForgeCore::ResolvedSdfStampKindV1::carveArch
||record.kind==VoxelForgeCore::ResolvedSdfStampKindV1::carveBox)
composed=SmoothMaxDistance(composed,-distance,runtime.smoothWidthVoxels);
else
composed=SmoothMinDistance(composed,distance,runtime.smoothWidthVoxels);