wip(assembler): M3 round 1 -- native FloatingIslands recipe in Core (standalone)

Bounds 517 boxes, 0 missed, negative control caught; capsule route 1044 centers, raised-route control
fails; W1/W8/W16 stable (field bf3ce7da876431e2); 39 ms native vs 64 ms legacy. My review: islands read
as thin flat pads with a radial pinch under them, not rock; next round fixes the look.

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 11:36:32 +02:00
1 parent 4661a445be
commit 53a1e69af7
16 files changed
+2971 -1

No files matched your search

+20
View File
@@ -144,6 +144,26 @@ at each swept center. Automatic changes must be composed first and pass this aud
accepted. Player carve/fill edits remain unrestricted. This validates analytic field collision and
support; it does not cook an Unreal physics mesh.
## Floating-island feature family v1 (standalone Core)
`FloatingIslandRecipeV1` and `FloatingIslandManifestV1` define a separate, reusable finite 3D feature
family. Coordinates, dimensions, and density values use signed 1/256-voxel units; negative density
is solid. The recipe carries its seed, fixed vertical layout, site density, island count and spacing,
radius range, top flattening, taper, bounded contour warp, roughness, blend, connector dimensions and
route constraints. `PlanFloatingIslandCluster` emits stable island and connector IDs, a connected
cluster graph, conservative influence AABBs, and a centerline route. At least the primary chain is
always planned; `islandDensityQ16` controls up to two optional side sites. Connectors carry a sharp-tag
ready bit for a later hybrid-mesher adapter.
`FloatingIslandFieldV1::densitySubvoxels` evaluates the canonical island and connector field.
`interval` returns unknown for boxes overlapping any influence AABB and a certified all-air range
outside them. AABBs include contour displacement, roughness, taper height and smoothing reach.
`AuditFloatingIslandBounds` checks sampled boxes and void beside connectors and includes a deliberately
shrunken island-bound negative control. `AuditFloatingIslandRoute` samples the player capsule and
support along the serialized route. The current field block is not yet composed into
`WorldAssemblyManifest` or the Unreal adapter; M3 round 1 proves the standalone Core representation.
The frozen owner evaluator is used as a visual and timing oracle, not as a hash target.
## Queries and tiles
`densityAt(position)` returns signed density; negative is solid and nonnegative is air. Server and
@@ -153,7 +153,8 @@ namespace VoxelForgeCore
enum class FieldChannel : std::uint32_t
{
rock = 1u << 0, height = 1u << 1, biome = 1u << 2, water = 1u << 3,
waterSurface = 1u << 4, route = 1u << 5, surfaceTags = 1u << 6
waterSurface = 1u << 4, route = 1u << 5, surfaceTags = 1u << 6,
island = 1u << 7
};
constexpr std::uint32_t ChannelBit(FieldChannel channel) noexcept
@@ -294,6 +295,163 @@ namespace VoxelForgeCore
std::string ToJson() const;
};
// Reusable finite 3D island features. The recipe owns fixed-scale shape ranges; the plan
// serializes the seeded anchors, connected cluster graph, route and sharp-ready connectors.
// Reutilisable dans toute recette : le plan porte les ancres, le graphe, la route et les plans nets.
struct FloatingIslandRecipeV1
{
std::uint32_t schemaVersion = 1;
std::uint32_t unitsPerVoxel = static_cast<std::uint32_t>(WorldAssemblySubvoxelsPerVoxel);
std::uint32_t seed = 0;
std::int64_t layoutOriginXSubvoxels = 0;
std::int64_t layoutOriginYSubvoxels = 0;
std::int64_t layoutCenterTopZSubvoxels = -128 * WorldAssemblySubvoxelsPerVoxel;
std::int64_t layoutMinimumZSubvoxels = -256 * WorldAssemblySubvoxelsPerVoxel;
std::int64_t layoutMaximumZSubvoxels = 0;
std::uint32_t primaryIslandCount = 5;
std::int64_t islandDensityQ16 = 1ll << 15;
std::int64_t spacingSubvoxels = 112 * WorldAssemblySubvoxelsPerVoxel;
std::int64_t minimumRadiusSubvoxels = 40 * WorldAssemblySubvoxelsPerVoxel;
std::int64_t maximumRadiusSubvoxels = 48 * WorldAssemblySubvoxelsPerVoxel;
std::int64_t thicknessRatioQ16 = 39322; // 0.60
std::int64_t verticalJitterQ16 = 26214; // 0.40
std::int64_t topFlattenQ16 = 51118; // 0.78
std::int64_t taperEndMinimumQ16 = 29491; // 0.45
std::int64_t taperEndMaximumQ16 = 45875; // 0.70
std::int64_t blendRadiusSubvoxels = 4 * WorldAssemblySubvoxelsPerVoxel;
std::int64_t contourWarpSubvoxels = 15 * WorldAssemblySubvoxelsPerVoxel;
std::int64_t roughnessSubvoxels = WorldAssemblySubvoxelsPerVoxel / 2;
std::int64_t boundarySealSubvoxels = 4 * WorldAssemblySubvoxelsPerVoxel;
std::int64_t bridgeHalfWidthSubvoxels = 4 * WorldAssemblySubvoxelsPerVoxel;
std::int64_t bridgeThicknessSubvoxels = 3 * WorldAssemblySubvoxelsPerVoxel;
WorldAssemblyRouteConstraintsV1 routeConstraints;
std::uint64_t contentHash = 0;
};
struct FloatingIslandAnchorV1
{
std::uint64_t stableId = 0;
std::uint32_t ordinal = 0;
std::array<std::int64_t, 3> centerSubvoxels{};
std::int64_t radiusSubvoxels = 0;
std::int64_t topHalfSubvoxels = 0;
std::int64_t topZSubvoxels = 0;
std::int64_t bottomZSubvoxels = 0;
std::int64_t taperEndQ16 = 0;
std::array<std::int64_t, 3> influenceMinimumSubvoxels{};
std::array<std::int64_t, 3> influenceMaximumSubvoxels{};
};
struct FloatingIslandConnectorV1
{
std::uint64_t stableId = 0;
std::uint64_t fromIslandId = 0;
std::uint64_t toIslandId = 0;
std::array<std::int64_t, 3> startSubvoxels{};
std::array<std::int64_t, 3> endSubvoxels{};
std::int64_t halfWidthSubvoxels = 0;
std::int64_t thicknessSubvoxels = 0;
std::array<std::int64_t, 3> influenceMinimumSubvoxels{};
std::array<std::int64_t, 3> influenceMaximumSubvoxels{};
bool sharpTagReady = true;
};
struct FloatingIslandPlanV1
{
std::vector<FloatingIslandAnchorV1> islands;
std::vector<FloatingIslandConnectorV1> clusterEdges;
std::vector<WorldAssemblyRoutePointV1> route;
std::uint64_t contentHash = 0;
};
struct VFCORE_API FloatingIslandManifestV1
{
FloatingIslandRecipeV1 recipe;
FloatingIslandPlanV1 plan;
std::uint64_t contentHash = 0;
static std::optional<FloatingIslandManifestV1> FromJson(
std::string_view json, std::string& error);
bool finalize(std::string& error);
bool validate(std::string& error) const;
std::string ToJson() const;
};
struct FloatingIslandBoundsAuditResult
{
std::uint64_t boxesTested = 0;
std::uint64_t pointSamples = 0;
std::uint64_t missedBounds = 0;
std::uint64_t unknownBounds = 0;
std::uint64_t islandBoundsTested = 0;
std::uint64_t connectorBoundsTested = 0;
std::uint64_t voidBoxesProvedAir = 0;
std::uint64_t voidPointSamples = 0;
bool negativeControlDetected = false;
bool passed = false;
};
struct FloatingIslandRouteAuditResult
{
std::uint64_t segmentsTested = 0;
std::uint64_t centerSamples = 0;
std::uint64_t capsuleFieldSamples = 0;
std::uint64_t blockedCapsuleSamples = 0;
std::uint64_t supportProbeSamples = 0;
std::uint64_t unsupportedCenterSamples = 0;
std::uint64_t gradeFailures = 0;
std::int64_t minimumClearanceSubvoxels = 0;
std::uint64_t firstBlockedSegment = ~std::uint64_t{0};
std::uint64_t firstUnsupportedSegment = ~std::uint64_t{0};
std::uint64_t firstGradeFailureSegment = ~std::uint64_t{0};
std::array<std::int64_t, 3> firstBlockedPositionSubvoxels{};
std::array<std::int64_t, 3> firstUnsupportedCenterSubvoxels{};
bool passed = false;
};
struct FloatingIslandInfluenceBounds
{
bool finite = false;
std::array<std::int64_t, 3> minimumSubvoxels{};
std::array<std::int64_t, 3> maximumSubvoxels{};
};
struct FieldInterval;
struct FieldDetailEnvelope;
struct FieldBlockContract;
class VFCORE_API FloatingIslandFieldV1
{
public:
FloatingIslandFieldV1(const FloatingIslandRecipeV1& recipe,
const FloatingIslandPlanV1& plan) noexcept;
bool isValid() const noexcept;
std::int64_t densitySubvoxels(std::int64_t xSubvoxels,
std::int64_t ySubvoxels, std::int64_t zSubvoxels) const noexcept;
FieldInterval interval(std::int64_t minimumXSubvoxels,
std::int64_t minimumYSubvoxels, std::int64_t minimumZSubvoxels,
std::int64_t maximumXSubvoxels, std::int64_t maximumYSubvoxels,
std::int64_t maximumZSubvoxels) const noexcept;
FloatingIslandInfluenceBounds influenceBounds() const noexcept;
FieldDetailEnvelope detailEnvelope() const noexcept;
FieldBlockContract contract() const noexcept;
const FloatingIslandRecipeV1* recipe() const noexcept { return recipe_; }
const FloatingIslandPlanV1* plan() const noexcept { return plan_; }
private:
const FloatingIslandRecipeV1* recipe_ = nullptr;
const FloatingIslandPlanV1* plan_ = nullptr;
};
// Planner output is ordinary reviewed data; clients can load it without re-running the planner.
VFCORE_API std::optional<FloatingIslandManifestV1> PlanFloatingIslandCluster(
const FloatingIslandRecipeV1& recipe, std::string& error);
VFCORE_API FloatingIslandBoundsAuditResult AuditFloatingIslandBounds(
const FloatingIslandFieldV1& field, std::uint32_t boxCount = 256,
std::uint64_t seed = 0x49534c414e444231ull);
VFCORE_API FloatingIslandRouteAuditResult AuditFloatingIslandRoute(
const FloatingIslandFieldV1& field, std::int64_t routeOffsetSubvoxels = 0);
struct HeightfieldPointSample
{
std::int64_t groundHeightSubvoxels = 0;
File diff suppressed because it is too large. Load diff
+1
View File
@@ -2,6 +2,7 @@
#include "StandaloneSnapshotAdapter.h"
#include "VoxelForgeCore/VoxelForgeCore.h"
#include "WorldAssemblerInternal.h"
#include "FloatingIslandsInternal.h"
#include <shared_mutex>
#include <mutex>