standalone: speed round closed -- full-payload whole view 2.16 s @8 workers; UV/colour/groups cost 0.62 s
Takeover after the PC reset. Verified at 1 and 8 workers: density, geometry, full payload and topology hashes equal for all nine outputs; routes 5642/5642; crater transaction 17 ms; player neighbourhood mesh-ready 23 ms after streaming starts. - The plugin's materials consume UV, the packed biome/slope/blend colours and the ceiling/ground sections, so the viewer-only skips stay off by default (diagnostic only: 1.53 s without them). - UVs staged as FVector2f (matches the game stream; -20 MB, no speed change). Far-bin reserve 24x. - LOD6 is the long pole: 32.7 M density samples, 1.83 M vertices, ~1.1 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MmSoF64BbRFmk9C3p1VsBJ
This commit is contained in:
1 parent
ee5b05b357
commit
6ec4a8f856
10 files changed
+417
-166
No files matched your search
@@ -159,8 +159,8 @@ FVoxelMeshData UVoxelMarchingCubesMesher::GenerateMesh(FIntVector OriginVoxels,
|
||||
// mémoïsé par colonne quantifiée au pas de la grille → ≤ (colonnes touchées) appels ;
|
||||
// ~zéro sur une tuile de sol pur, borné par lattice² sur une tuile de cap.
|
||||
static thread_local TArray<uint8> VertexClasses; // 0 = sol, 1 = sky-cap
|
||||
static thread_local TMap<FIntVector, FVector2f> SurfColMemo; // (Xq,Yq,chunkZ) → (TerrainZ, CeilSurf) ; X=FLT_MAX ⇒ pas SurfaceWorld
|
||||
if (!bStandaloneCompactPayload)
|
||||
static thread_local TMap<FIntVector, FVector2f> SurfColMemo; // (Xq,Yq,chunkZ) → (TerrainZ, CeilSurf)
|
||||
if (!bStandaloneSkipMaterialGroups)
|
||||
{
|
||||
VertexClasses.Reset();
|
||||
SurfColMemo.Reset();
|
||||
@@ -194,10 +194,10 @@ FVoxelMeshData UVoxelMarchingCubesMesher::GenerateMesh(FIntVector OriginVoxels,
|
||||
}
|
||||
MeshData.Normals.Add(Normal);
|
||||
|
||||
if (!bStandaloneCompactPayload)
|
||||
if (!bStandaloneSkipUvAndColors)
|
||||
{
|
||||
// UVs planaires — le triplanar mapping se fait dans le matériau.
|
||||
MeshData.UVs.Add(FVector2D(WorldPos.X / VOXEL_SIZE, WorldPos.Y / VOXEL_SIZE));
|
||||
MeshData.UVs.Add(FVector2f(WorldPos.X / VOXEL_SIZE, WorldPos.Y / VOXEL_SIZE));
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
// VERTEX COLOUR — masks for biome palette, slope and border blend.
|
||||
@@ -211,7 +211,7 @@ FVoxelMeshData UVoxelMarchingCubesMesher::GenerateMesh(FIntVector OriginVoxels,
|
||||
MeshData.Colors.Add(FColor(R, G, Bc, A));
|
||||
}
|
||||
|
||||
if (!bStandaloneCompactPayload)
|
||||
if (!bStandaloneSkipMaterialGroups)
|
||||
{
|
||||
// F17 — classify down-facing vertices for material-only ceiling grouping.
|
||||
uint8 SurfClass = 0;
|
||||
@@ -1241,7 +1241,7 @@ FVoxelMeshData UVoxelMarchingCubesMesher::GenerateMesh(FIntVector OriginVoxels,
|
||||
const int32 Idx2 = GetOrCreateVertex(EdgeVertices[E2], EdgeNormals[E2]);
|
||||
|
||||
TArray<int32>* Dst = &GroundTris;
|
||||
if (!bStandaloneCompactPayload)
|
||||
if (!bStandaloneSkipMaterialGroups)
|
||||
{
|
||||
// F17 — majority vote (at least two ceiling vertices => ceiling triangle).
|
||||
const int32 CapVotes = (int32)VertexClasses[Idx0]
|
||||
@@ -1314,9 +1314,9 @@ FVoxelMeshData UVoxelMarchingCubesMesher::GenerateMesh(FIntVector OriginVoxels,
|
||||
const int32 Idx = MeshData.Vertices.Num();
|
||||
MeshData.Vertices.Add(Pos);
|
||||
MeshData.Normals.Add(Nrm);
|
||||
if (!bStandaloneCompactPayload)
|
||||
if (!bStandaloneSkipUvAndColors)
|
||||
{
|
||||
MeshData.UVs.Add(FVector2D(Pos.X / VOXEL_SIZE, Pos.Y / VOXEL_SIZE));
|
||||
MeshData.UVs.Add(FVector2f(Pos.X / VOXEL_SIZE, Pos.Y / VOXEL_SIZE));
|
||||
MeshData.Colors.Add(Col); // parallel with the other vertex arrays
|
||||
}
|
||||
return Idx;
|
||||
@@ -1342,8 +1342,8 @@ FVoxelMeshData UVoxelMarchingCubesMesher::GenerateMesh(FIntVector OriginVoxels,
|
||||
|
||||
const FVector NA = MeshData.Normals[iA];
|
||||
const FVector NB = MeshData.Normals[iB];
|
||||
const FColor CA = bStandaloneCompactPayload ? FColor::White : MeshData.Colors[iA];
|
||||
const FColor CB = bStandaloneCompactPayload ? FColor::White : MeshData.Colors[iB];
|
||||
const FColor CA = bStandaloneSkipUvAndColors ? FColor::White : MeshData.Colors[iA];
|
||||
const FColor CB = bStandaloneSkipUvAndColors ? FColor::White : MeshData.Colors[iB];
|
||||
const int32 iA2 = AddSkirtVert(PA - NA * SkirtDepth, NA, CA);
|
||||
const int32 iB2 = AddSkirtVert(PB - NB * SkirtDepth, NB, CB);
|
||||
|
||||
|
||||
Reference in new issue
Block a user