wip(assembler): M1 round 6 -- owner walk fixes: 25 cm geometry scale, one height datum, carve/fill sign, faster relief meshing

Owner saw content floating above native terrain, spiky triangles, reversed carve/fill and late relief.
Causes: shared mesher placed Core tiles on a 12.5 cm grid; content/atmosphere asked strate ranges in
12.5 cm voxels; Core edits add density where the legacy diff subtracts. Horizon LOD8 bridge edge
5.657 -> 2.265 cells. Relief mesh p95 60.8 -> 42.0 ms (LOD0). New BuildHost checks for scale, height,
blueprint carve/fill and per-kind streaming lag.

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-09 20:39:24 +02:00
1 parent f67b519e75
commit 61633cb492
18 files changed
+1708 -142

No files matched your search

+27 -11
View File
@@ -2403,6 +2403,7 @@ void AVoxelWorld::BeginPlay()
Generator->InitializeSettings(Settings);
Mesher->SetGenerator(Generator);
Mesher->SetGeometryVoxelSizeCm(GetActiveVoxelSizeCm());
Mesher->SetShutdownFlag(&bShuttingDown);
Mesher->bGenerateSkirts = Settings->bGenerateSkirts;
Mesher->SkirtCells = Settings->SkirtCells;
@@ -12476,10 +12477,21 @@ int32 AVoxelWorld::GetStrateAtPosition(FVector WorldPosition) const
// GetStrateIndex veut des cm ACTEUR-LOCAUX (il convertit cm -> voxels lui-meme).
// GetStrateIndex wants actor-LOCAL cm (it does the cm -> voxel conversion itself).
const float LocalZCm = WorldToLocalCm(WorldPosition).Z;
const float StrateManagerZCm = bUseVoxelForgeCore
return StrateManager->GetStrateIndex(ToStrateManagerLocalZ(LocalZCm));
}
float AVoxelWorld::ToStrateManagerLocalZ(float LocalZCm) const
{
return bUseVoxelForgeCore
? (LocalZCm / GetActiveVoxelSizeCm()) * VOXEL_SIZE
: LocalZCm;
return StrateManager->GetStrateIndex(StrateManagerZCm);
}
float AVoxelWorld::FromStrateManagerLocalZ(float ManagerLocalZCm) const
{
return bUseVoxelForgeCore
? (ManagerLocalZCm / VOXEL_SIZE) * GetActiveVoxelSizeCm()
: ManagerLocalZCm;
}
FVoxelBiomeQuery AVoxelWorld::GetBiomeAtWorldLocation(FVector WorldLocation) const
@@ -12610,8 +12622,9 @@ void AVoxelWorld::CarveAtPosition(FVector Position, float Radius, float Strength
{
FVoxelModification Mod;
Mod.Center = WorldToLocalVoxel(Position); // world cm → voxel space
Mod.Radius = Radius * GetLegacyVoxelToActiveVoxelScale();
Mod.Strength = -FMath::Abs(Strength); // force negative for carving
const float VoxelScale = GetLegacyVoxelToActiveVoxelScale();
Mod.Radius = Radius * VoxelScale;
Mod.Strength = -FMath::Abs(Strength) * VoxelScale; // force negative for carving / Force le signe negatif pour creuser.
ApplyModification(Mod);
}
@@ -12619,8 +12632,9 @@ void AVoxelWorld::FillAtPosition(FVector Position, float Radius, float Strength)
{
FVoxelModification Mod;
Mod.Center = WorldToLocalVoxel(Position);
Mod.Radius = Radius * GetLegacyVoxelToActiveVoxelScale();
Mod.Strength = FMath::Abs(Strength); // force positive for filling
const float VoxelScale = GetLegacyVoxelToActiveVoxelScale();
Mod.Radius = Radius * VoxelScale;
Mod.Strength = FMath::Abs(Strength) * VoxelScale; // force positive for filling / Force le signe positif pour remplir.
ApplyModification(Mod);
}
@@ -12811,7 +12825,9 @@ void AVoxelWorld::ApplyCoreModification(const FVoxelModification& Modification)
Brush.halfExtent = {Modification.BoxExtent.X, Modification.BoxExtent.Y, Modification.BoxExtent.Z};
Brush.radius = FMath::Max(0.0f, Modification.Radius);
Brush.falloff = FMath::Max(0.0f, Modification.Falloff);
Brush.strength = Modification.Strength;
// Legacy subtracts the modification offset; Core's densityOffset operation adds it.
// Le legacy soustrait le decalage; l'operation densityOffset de Core l'ajoute.
Brush.strength = -Modification.Strength;
switch (Modification.Shape)
{
case EVoxelBrushShape::Box:
@@ -12971,7 +12987,7 @@ void AVoxelWorld::CarveBox(FVector Position, FVector ExtentVoxels, float Strengt
Mod.BoxExtent = ExtentVoxels * VoxelScale;
Mod.Falloff *= VoxelScale;
Mod.Radius = ExtentVoxels.GetMax() * VoxelScale; // budget proxy
Mod.Strength = -FMath::Abs(Strength); // carve
Mod.Strength = -FMath::Abs(Strength) * VoxelScale; // carve / creuser
ApplyModification(Mod);
}
@@ -12984,7 +13000,7 @@ void AVoxelWorld::FillBox(FVector Position, FVector ExtentVoxels, float Strength
Mod.BoxExtent = ExtentVoxels * VoxelScale;
Mod.Falloff *= VoxelScale;
Mod.Radius = ExtentVoxels.GetMax() * VoxelScale;
Mod.Strength = FMath::Abs(Strength); // fill
Mod.Strength = FMath::Abs(Strength) * VoxelScale; // fill / remplir
ApplyModification(Mod);
}
@@ -12997,7 +13013,7 @@ void AVoxelWorld::CarveCapsule(FVector WorldA, FVector WorldB, float RadiusVoxel
const float VoxelScale = GetLegacyVoxelToActiveVoxelScale();
Mod.Radius = RadiusVoxels * VoxelScale;
Mod.Falloff *= VoxelScale;
Mod.Strength = -FMath::Abs(Strength);
Mod.Strength = -FMath::Abs(Strength) * VoxelScale;
ApplyModification(Mod);
}
@@ -13010,7 +13026,7 @@ void AVoxelWorld::FillCapsule(FVector WorldA, FVector WorldB, float RadiusVoxels
const float VoxelScale = GetLegacyVoxelToActiveVoxelScale();
Mod.Radius = RadiusVoxels * VoxelScale;
Mod.Falloff *= VoxelScale;
Mod.Strength = FMath::Abs(Strength);
Mod.Strength = FMath::Abs(Strength) * VoxelScale;
ApplyModification(Mod);
}