standalone: speed round 2 -- far biome colour grid (payload -365 ms), whole view 1.90 s @8w full payload
- Per-vertex biome lookup was the payload cost (~365 ms); far tiles now take the biome palette from a per-tile grid. Same channels (palette, slope, border blend, UV) and ceiling/ground sections. - Opt-in --max-clip-level=8: 6,498 -> 2,226 tiles, stream 0.876 -> 0.428 s, 1.451 s process wall. Kept opt-in: six fixed views cannot prove every distant thin stratum survives. - W1/W8 hashes equal across 11 outputs; routes 5642/5642; five captures pixel-identical, passage 382 px differ (max delta 16). - Rejected with measurements: LOD6 empty-block proof (-21% samples, no wall gain), far supertiles (no complete groups exist). Remaining long pole: shape compile 0.854 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
6ec4a8f856
commit
a3cb26b5c8
5 files changed
+212
-18
No files matched your search
@@ -392,6 +392,7 @@ namespace
|
||||
int32 Seed=0;
|
||||
int32 WorkerCount=8;
|
||||
int32 ClipRadius=3;
|
||||
int32 MaxClipLevelOverride=-1;
|
||||
int32 Width=1280,Height=800;
|
||||
float Yaw=0.0f,Pitch=0.0f,MoveSpeed=8.0f;
|
||||
V3 Position{};
|
||||
@@ -645,6 +646,13 @@ float3 Lit=Rock*(Ambient+0.88*Diffuse)+float3(0.50,0.69,0.82)*Head*0.75;
|
||||
}
|
||||
if(!PrepareStandaloneDensityWorld(*World,Seed,bRoundTunnels,
|
||||
bRoundTunnelEnhanced,Error))return false;
|
||||
if(MaxClipLevelOverride>=0)
|
||||
{
|
||||
World->MaxClipLevel=MaxClipLevelOverride;
|
||||
World->Settings->MaxClipLevel=MaxClipLevelOverride;
|
||||
std::printf("Standalone max clip level override applied after world reload: max_level=%d.\n",
|
||||
MaxClipLevelOverride);
|
||||
}
|
||||
if(bShapeWorld&&!BuildShapeWorldForCamera(Error))return false;
|
||||
LoadMeshCache();
|
||||
return true;
|
||||
@@ -1705,6 +1713,7 @@ float3 Lit=Rock*(Ambient+0.88*Diffuse)+float3(0.50,0.69,0.82)*Head*0.75;
|
||||
int32 WorkerCount,int32 MaxLevel,bool bRoundTunnels,
|
||||
bool bEnhancedWalls,const FStandaloneMeshCache* Cache,
|
||||
bool bHashDensity,bool bSkipUvAndColors,bool bSkipMaterialGroups,
|
||||
bool bSkipUV,bool bSkipColors,
|
||||
bool bShardAudit,float CameraYaw,float CameraPitch,
|
||||
const std::string& BakeCachePath,
|
||||
const FStandaloneMeshCacheMetadata& CacheMetadata)
|
||||
@@ -1749,15 +1758,17 @@ float3 Lit=Rock*(Ambient+0.88*Diffuse)+float3(0.50,0.69,0.82)*Head*0.75;
|
||||
const auto Start=std::chrono::steady_clock::now();
|
||||
FStandaloneStreamingGenerator Streamer(World,WorkerCount,
|
||||
bHashDensity||!BakeCachePath.empty(),Cache,MaxLevel,
|
||||
bSkipUvAndColors,bSkipMaterialGroups);
|
||||
bSkipUvAndColors,bSkipMaterialGroups,bSkipUV,bSkipColors);
|
||||
const FStandaloneStreamingUpdate Update=Streamer.Start(CameraPositionVoxels);
|
||||
const double LOD0Width=static_cast<double>(2*World.ClipRadius+2)
|
||||
*CHUNK_SIZE*VOXEL_SIZE/100.0;
|
||||
std::printf("[StreamBenchmarkConfig] clip_radius=%d lod0_cube=%.0fm voxel=25cm fullres_levels=%d max_level_filter=%d workers=%d full_detail_tiles=%d desired_tiles=%d variant=%s uv_colors=%s material_groups=%s hash=%s\n",
|
||||
std::printf("[StreamBenchmarkConfig] clip_radius=%d lod0_cube=%.0fm voxel=25cm fullres_levels=%d max_level_filter=%d workers=%d full_detail_tiles=%d desired_tiles=%d variant=%s uv=%s colors=%s material_groups=%s hash=%s\n",
|
||||
World.ClipRadius,LOD0Width,World.FullResClipLevels,MaxLevel<0?World.MaxClipLevel:MaxLevel,
|
||||
Streamer.GetWorkerCount(),FullDetailExpected,Update.DesiredTiles,
|
||||
bRoundTunnels?(bEnhancedWalls?"round-detailed":"round-legacy"):"base",
|
||||
bSkipUvAndColors?"skipped":"full",bSkipMaterialGroups?"skipped":"full",
|
||||
(bSkipUvAndColors||bSkipUV)?"skipped":"full",
|
||||
(bSkipUvAndColors||bSkipColors)?"skipped":"full",
|
||||
bSkipMaterialGroups?"skipped":"full",
|
||||
(bHashDensity||!BakeCachePath.empty())?"on":"off");
|
||||
std::fflush(stdout);
|
||||
int32 Finished=0,FullDetailFinished=0;
|
||||
@@ -2033,11 +2044,14 @@ int main(int Argc,char** Argv)
|
||||
{if(!JoinedCommandLine.empty())JoinedCommandLine.push_back(' ');JoinedCommandLine+=Argv[I];}
|
||||
FCommandLine::Set(JoinedCommandLine);
|
||||
int32 BenchmarkLevel=-1,BenchmarkCount=64,StreamBenchmarkMaxLevel=-1;
|
||||
int32 MaxClipLevelOverride=-1;
|
||||
int32 ShapeCompareLevel=-1,ShapeCompareTileLimit=0;
|
||||
bool bStreamBenchmark=false;
|
||||
bool bShardAudit=false;
|
||||
bool bStreamHash=false;
|
||||
bool bSkipUvAndColors=false;
|
||||
bool bSkipUV=false;
|
||||
bool bSkipColors=false;
|
||||
bool bSkipMaterialGroups=false;
|
||||
bool bEditBenchmark=false;
|
||||
bool bRoundWallCompare=false;
|
||||
@@ -2073,6 +2087,8 @@ int main(int Argc,char** Argv)
|
||||
{bEditBenchmark=true;bStreamBenchmark=true;App.bShapeWorld=true;}
|
||||
else if(Arg=="--stream-hash")bStreamHash=true;
|
||||
else if(Arg=="--skip-uv-colors")bSkipUvAndColors=true;
|
||||
else if(Arg=="--skip-uv")bSkipUV=true;
|
||||
else if(Arg=="--skip-colors")bSkipColors=true;
|
||||
else if(Arg=="--skip-material-groups")bSkipMaterialGroups=true;
|
||||
else if(Arg=="--shard-audit")bShardAudit=true;
|
||||
else if(Arg=="--compare-round-walls")
|
||||
@@ -2084,6 +2100,9 @@ int main(int Argc,char** Argv)
|
||||
{BakeMeshCachePath=std::string(Arg.substr(18));App.bForceGenerate=true;}
|
||||
else if(Arg.starts_with("--stream-max-level="))
|
||||
StreamBenchmarkMaxLevel=std::atoi(std::string(Arg.substr(19)).c_str());
|
||||
else if(Arg.starts_with("--max-clip-level="))
|
||||
MaxClipLevelOverride=std::clamp(
|
||||
std::atoi(std::string(Arg.substr(17)).c_str()),0,8);
|
||||
else if(Arg=="--test-one-chunk-crossing")App.bTestOneChunkCrossing=true;
|
||||
else if(Arg=="--capture-after-clipmap")App.bCaptureAfterClipmap=true;
|
||||
else if(Arg=="--quit-after-clipmap")App.bQuitAfterClipmap=true;
|
||||
@@ -2125,11 +2144,20 @@ int main(int Argc,char** Argv)
|
||||
static_cast<float>(App.World->ViewerStartVoxels.Y*0.25),static_cast<float>(App.World->ViewerStartVoxels.Z*0.25)};
|
||||
if(App.bHasCameraOverride){App.Position=App.CameraPositionOverride;App.Yaw=App.CameraYawOverride;App.Pitch=App.CameraPitchOverride;}
|
||||
const int32 ExportClipRadius=App.World->ClipRadius;
|
||||
const int32 ExportMaxClipLevel=App.World->MaxClipLevel;
|
||||
App.World->ClipRadius=App.ClipRadius;
|
||||
App.World->Settings->ClipRadius=App.ClipRadius;
|
||||
if(App.bRoundTunnels&&!PrepareStandaloneDensityWorld(*App.World,App.Seed,
|
||||
App.bRoundTunnels,App.bRoundTunnelEnhanced,Error))
|
||||
{std::fprintf(stderr,"Standalone world setup failed: %s\n",Error.c_str());return 2;}
|
||||
if(MaxClipLevelOverride>=0)
|
||||
{
|
||||
App.MaxClipLevelOverride=MaxClipLevelOverride;
|
||||
App.World->MaxClipLevel=MaxClipLevelOverride;
|
||||
App.World->Settings->MaxClipLevel=MaxClipLevelOverride;
|
||||
std::printf("Standalone max clip level override: exported=%d -> max_level=%d.\n",
|
||||
ExportMaxClipLevel,MaxClipLevelOverride);
|
||||
}
|
||||
const bool bNeedFarShapeWorld=bStreamBenchmark
|
||||
?(StreamBenchmarkMaxLevel<0||StreamBenchmarkMaxLevel>=App.World->FullResClipLevels)
|
||||
:(App.bShapeCompare?ShapeCompareLevel>=App.World->FullResClipLevels
|
||||
@@ -2162,7 +2190,7 @@ int main(int Argc,char** Argv)
|
||||
FVector(App.Position.X*4.0,App.Position.Y*4.0,App.Position.Z*4.0),
|
||||
App.WorkerCount,StreamBenchmarkMaxLevel,App.bRoundTunnels,
|
||||
App.bRoundTunnelEnhanced,(!App.bShapeWorld&&App.MeshCache.IsLoaded())?&App.MeshCache:nullptr,
|
||||
bStreamHash,bSkipUvAndColors,bSkipMaterialGroups,bShardAudit,
|
||||
bStreamHash,bSkipUvAndColors,bSkipMaterialGroups,bSkipUV,bSkipColors,bShardAudit,
|
||||
App.Yaw,App.Pitch,BakeMeshCachePath,App.MakeMeshCacheMetadata());
|
||||
}
|
||||
if(BenchmarkLevel>=0)
|
||||
|
||||
Reference in new issue
Block a user