wip(assembler): round L37 -- FI mouth carve-fade fix, no raised bridge (style 0); research R1
The passage mouth fade multiplied the signed carve distance by zero, which turned native rock into an open surface (the reason earlier rounds stamped walk pads at mouths); it now blends between the uncarved field and the full signed carve. The FI style-0 route followed a lifted grade envelope over the crater (the "bridge"); it now runs on the rim and follows the native surface. New built-shape and crease audits with thresholds frozen before the fix (L36 and box controls fail). 24/24 passage rows, 30/30 determinism, 16/16 invariants, 18/18 interface/ring. Unreal: one recipe setter (uncompiled). Research R1 (read-only, web): ranked proposals for natural walkable mouths, floor-limited carve first. 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
8be1c4d9ef
commit
3e443bf81c
33 files changed
+2767
-86
No files matched your search
@@ -203,6 +203,7 @@ namespace floating_island_detail
|
||||
HashWord(hash, static_cast<std::uint64_t>(recipe.boundarySealSubvoxels), 8);
|
||||
HashWord(hash, static_cast<std::uint64_t>(recipe.bridgeHalfWidthSubvoxels), 8);
|
||||
HashWord(hash, static_cast<std::uint64_t>(recipe.bridgeThicknessSubvoxels), 8);
|
||||
if(recipe.terrainFollowingRoute)HashWord(hash,1,1);
|
||||
HashWord(hash, HashRouteConstraints(recipe.routeConstraints), 8);
|
||||
return hash;
|
||||
}
|
||||
@@ -805,9 +806,39 @@ namespace floating_island_detail
|
||||
const double t = std::clamp(along / length, 0.0, 1.0);
|
||||
if (alongFraction) *alongFraction = t;
|
||||
const double deck = az + (static_cast<double>(edge.endSubvoxels[2]) - az) * t;
|
||||
const std::uint64_t westernEdgeId = StableId(recipe.seed, 0x200000000ull,
|
||||
0x425249444745ull);
|
||||
const bool westernSupportConnector=edge.stableId==westernEdgeId;
|
||||
if(recipe.geometryVersion>=2&&WorldAssemblyEvaluatorVersion>=183
|
||||
&&westernSupportConnector)
|
||||
{
|
||||
const double phase=static_cast<double>(Roll(recipe.seed,edge.stableId,0x5749445448ull)
|
||||
&0xffffffffull)*(2.0*Pi/4294967296.0);
|
||||
const double localHalfWidth=std::max(
|
||||
static_cast<double>(recipe.routeConstraints.capsuleRadiusSubvoxels+Q),
|
||||
static_cast<double>(edge.halfWidthSubvoxels)
|
||||
+0.48*static_cast<double>(Q)*std::sin(6.0*Pi*t+phase));
|
||||
const double localThickness=static_cast<double>(edge.thicknessSubvoxels);
|
||||
const double rounding=std::min({1.5*static_cast<double>(Q),
|
||||
localHalfWidth*0.6,localThickness*0.45});
|
||||
const double roundedX=side-(localHalfWidth-rounding);
|
||||
const double roundedY=std::abs(along-0.5*length)-(0.5*length-rounding);
|
||||
const double roundedZ=std::abs(z-(deck-0.5*localThickness))
|
||||
-(0.5*localThickness-rounding);
|
||||
const double roundedOutside=std::sqrt(
|
||||
std::pow(std::max(roundedX,0.0),2)
|
||||
+std::pow(std::max(roundedY,0.0),2)
|
||||
+std::pow(std::max(roundedZ,0.0),2));
|
||||
const double roundedInside=std::min(std::max(roundedX,
|
||||
std::max(roundedY,roundedZ)),0.0);
|
||||
if(topSurface)*topSurface=z-deck>=std::max(horizontal,
|
||||
deck-localThickness-z);
|
||||
return roundedOutside+roundedInside-rounding;
|
||||
}
|
||||
const double arch = recipe.geometryVersion >= 2
|
||||
? 2.0 * static_cast<double>(edge.thicknessSubvoxels) * (4.0 * t * (1.0 - t))
|
||||
: 0.0;
|
||||
&& WorldAssemblyEvaluatorVersion < 172
|
||||
? 2.0 * static_cast<double>(edge.thicknessSubvoxels) * (4.0 * t * (1.0 - t))
|
||||
: 0.0;
|
||||
const double upper = z - deck;
|
||||
const double lower = deck - static_cast<double>(edge.thicknessSubvoxels) - arch - z;
|
||||
if (topSurface) *topSurface = upper >= std::max(horizontal, lower);
|
||||
@@ -1174,8 +1205,8 @@ namespace floating_island_detail
|
||||
// Land each connector well inside the broad top so the full capsule footprint remains
|
||||
// supported across the bridge-to-island transition, including bounded surface roughness.
|
||||
// Les connecteurs recouvrent le plateau pour soutenir toute la capsule au raccord.
|
||||
// Keep the narrow span exposed to open sky; a smaller fraction buries most of it in the island tops.
|
||||
// Garder la passerelle etroite visible dans le vide ; une fraction plus faible l'enfouit dans les plateaux.
|
||||
// Keep the capsule footprint supported while seating L37 connectors just below the native island tops.
|
||||
// Garder l'appui de la capsule tout en enfouissant les connecteurs L37 juste sous les plateaux.
|
||||
const double landingFraction = recipe.geometryVersion >= 2 ? 0.52 : 0.62;
|
||||
const double fromReach = static_cast<double>(from.radiusSubvoxels) * landingFraction;
|
||||
const double toReach = static_cast<double>(to.radiusSubvoxels) * landingFraction;
|
||||
@@ -1183,7 +1214,19 @@ namespace floating_island_detail
|
||||
const double sy = from.centerSubvoxels[1] + uy * fromReach;
|
||||
const double ex = to.centerSubvoxels[0] - ux * toReach;
|
||||
const double ey = to.centerSubvoxels[1] - uy * toReach;
|
||||
const double routeDeckLift = recipe.geometryVersion >= 2 ? 1.0 * Q : 0.0;
|
||||
const bool craterMouthConnector=WorldAssemblyEvaluatorVersion>=174
|
||||
&&(from.ordinal==recipe.anchorIslandOrdinal
|
||||
||to.ordinal==recipe.anchorIslandOrdinal);
|
||||
const bool westernSupportConnector=WorldAssemblyEvaluatorVersion>=178
|
||||
&&((from.ordinal==0&&to.ordinal==1)||(from.ordinal==1&&to.ordinal==0));
|
||||
const double routeDeckLift=recipe.geometryVersion>=2
|
||||
?(WorldAssemblyEvaluatorVersion>=178
|
||||
?(westernSupportConnector
|
||||
?(WorldAssemblyEvaluatorVersion>=181?-1.0
|
||||
:(WorldAssemblyEvaluatorVersion>=180?-1.25
|
||||
:(WorldAssemblyEvaluatorVersion>=179?-1.5:-1.0))):-2.0)
|
||||
:(craterMouthConnector?-2.0
|
||||
:(WorldAssemblyEvaluatorVersion>=172?-1.0:1.0)))*Q:0.0;
|
||||
const double sz = IslandTopSurface(recipe, from, sx, sy) + routeDeckLift;
|
||||
const double ez = IslandTopSurface(recipe, to, ex, ey) + routeDeckLift;
|
||||
edge.startSubvoxels = {RoundQ(sx), RoundQ(sy), RoundQ(sz)};
|
||||
@@ -1336,6 +1379,7 @@ std::optional<FloatingIslandManifestV1> FloatingIslandManifestV1::FromJson(
|
||||
manifest.recipe.anchorMouthOffsetSubvoxels))
|
||||
{error="floating-island geometry version 7 is missing a passage-rooted anchor field";return std::nullopt;}
|
||||
}
|
||||
manifest.recipe.terrainFollowingRoute=recipeValue.Get("terrain_following_route").Boolean(false);
|
||||
if (!floating_island_detail::ReadU32(root.Get("schema_version"), schema)
|
||||
|| !floating_island_detail::ReadHash(root.Get("content_hash"), manifestHash)
|
||||
|| !floating_island_detail::ReadU32(recipeValue.Get("schema_version"), manifest.recipe.schemaVersion)
|
||||
@@ -1495,6 +1539,7 @@ std::string FloatingIslandManifestV1::ToJson() const
|
||||
<< ",\"anchor_island_minimum_radius_q\":" << recipe.anchorIslandMinimumRadiusSubvoxels
|
||||
<< ",\"anchor_root_bottom_z_q\":" << recipe.anchorRootBottomZSubvoxels
|
||||
<< ",\"anchor_mouth_offset_q\":" << recipe.anchorMouthOffsetSubvoxels;
|
||||
if(recipe.terrainFollowingRoute)out << ",\"terrain_following_route\":true";
|
||||
out << ",\"blend_radius_q\":" << recipe.blendRadiusSubvoxels
|
||||
<< ",\"contour_warp_q\":" << recipe.contourWarpSubvoxels
|
||||
<< ",\"roughness_q\":" << recipe.roughnessSubvoxels
|
||||
@@ -1746,6 +1791,26 @@ std::optional<FloatingIslandManifestV1> PlanFloatingIslandCluster(
|
||||
const std::int64_t y = floating_island_detail::RoundQ(
|
||||
static_cast<double>(a.centerSubvoxels[1]) + dy * t);
|
||||
std::int64_t routeX=x,routeY=y;
|
||||
if(WorldAssemblyEvaluatorVersion>=192&&recipe.terrainFollowingRoute
|
||||
&&recipe.geometryVersion>=5
|
||||
&&segment+2==count&&pieces>1)
|
||||
{
|
||||
const auto& anchor=islands[recipe.anchorIslandOrdinal];
|
||||
const std::uint32_t side=static_cast<std::uint32_t>(
|
||||
floating_island_detail::UnitQ16(recipe.seed,anchor.stableId,
|
||||
0x414e43484f524d50ull)&1u);
|
||||
const double length=std::hypot(dx,dy);
|
||||
const double bend=10.0*floating_island_detail::Q
|
||||
*std::pow(std::sin(floating_island_detail::Pi*t),2.0);
|
||||
const double sign=side?-1.0:1.0;
|
||||
if(length>0.0)
|
||||
{
|
||||
routeX=floating_island_detail::RoundQ(
|
||||
static_cast<double>(routeX)+sign*(-dy/length)*bend);
|
||||
routeY=floating_island_detail::RoundQ(
|
||||
static_cast<double>(routeY)+sign*(dx/length)*bend);
|
||||
}
|
||||
}
|
||||
if(recipe.geometryVersion>=5&&segment+2==count&&piece==pieces)
|
||||
{
|
||||
const auto& anchor=islands[recipe.anchorIslandOrdinal];
|
||||
@@ -1762,8 +1827,11 @@ std::optional<FloatingIslandManifestV1> PlanFloatingIslandCluster(
|
||||
routeX=floating_island_detail::RoundQ(mouthX);
|
||||
routeY=floating_island_detail::RoundQ(mouthY);
|
||||
}
|
||||
const auto surface = floating_island_detail::FindCapsuleFootingTopZ(
|
||||
recipe, manifest.plan, routeX, routeY);
|
||||
const auto surface = WorldAssemblyEvaluatorVersion>=199
|
||||
&&recipe.terrainFollowingRoute
|
||||
?floating_island_detail::FindSurfaceZ(recipe,manifest.plan,routeX,routeY)
|
||||
:floating_island_detail::FindCapsuleFootingTopZ(
|
||||
recipe,manifest.plan,routeX,routeY);
|
||||
if (!surface)
|
||||
{ error = "island planner could not find a full capsule-width support surface along its connector chain"; return std::nullopt; }
|
||||
WorldAssemblyRoutePointV1 point;
|
||||
|
||||
Reference in new issue
Block a user