standalone: owner LOD0 defects -- relief blended as partition of unity (stairs gone), exposed skirts 0
- Stairs: cave, floor, strata and passage relief were effectively summed in overlaps (owner ray ~0.94 voxel of displacement); now partition-of-unity weights: -0.288 voxel there, max detail gradient 0.323 voxel/voxel. High-detail patch scan 133 -> 0; exact midpoint edge roots kept (removing them: 7,993 bad roots, 46 patches). - Fins: exposed skirt triangle scan 1,776 -> 0; thin sheets 0; coarse off-surface panels 0. - Path hash both directions equal; W1/W8 equal; routes 5642/5642; passage detail ratio 0.850; far survival passes, bad-shell fails; 30-crossing flight: nearest tile 15.1 ms median, 124 ms max. Caveats seen in the captures: the owner-ray wall has visibly less relief than before; the fin before/after captures do not show the fins (evidence is the scan only). Cold StreamFullClipmap 0.758 s vs 0.741 s (+17 ms, Luna's interleaved run). Owner to judge: bin\VoxelForgeLookCheck4.exe. 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
b3af0e589e
commit
de14f0042d
6 files changed
+213
-26
No files matched your search
@@ -70,10 +70,12 @@ namespace
|
||||
ReverseSideSolidSkirtTriangles=0,RepeatedOffsetPatches=0,FieldMismatchPatches=0,
|
||||
NormalMismatchPatches=0,GradientFallbackPatches=0,GradientFallbackSamples=0,
|
||||
DetailDisplacementSamples=0,HighDetailDisplacementSamples=0,DetailDisplacementPatches=0,
|
||||
CurvedEdgeChecks=0,CurvedEdgeRootPatches=0,CurvedEdgeRootBadVertices=0;
|
||||
CurvedEdgeChecks=0,CurvedEdgeRootPatches=0,CurvedEdgeRootBadVertices=0,
|
||||
DetailGradientSamples=0,DetailGradientOverLimit=0;
|
||||
double MaximumAirSkirtDensity=0.0,MaximumPatchDominance=0.0;
|
||||
double MaximumDetailDisplacement=0.0;
|
||||
double MaximumCurvedEdgeRootError=0.0;
|
||||
double MaximumDetailGradient=0.0;
|
||||
uint64 FieldEdgeChecks=0,AnalyticCrossingMisses=0,OldInt8RangeEdges=0,NormalChecks=0;
|
||||
double SumAbsSourceResidual=0.0,MaximumAbsSourceResidual=0.0,
|
||||
SumAnalyticEdgeShiftVoxels=0.0,MaximumAnalyticEdgeShiftVoxels=0.0,
|
||||
@@ -173,6 +175,26 @@ namespace
|
||||
{P[0],P[1],P[2]});
|
||||
if(DetailSample.caveInfluence>=0.60f&&DetailSample.floorInfluence>=0.60f)
|
||||
{
|
||||
constexpr double GradientProbeOffset=0.5;
|
||||
double DetailGradientSquared=0.0;
|
||||
for(int32 Axis=0;Axis<3;++Axis)
|
||||
{
|
||||
double Minus[3]={P[0],P[1],P[2]};
|
||||
double Plus[3]={P[0],P[1],P[2]};
|
||||
Minus[Axis]-=GradientProbeOffset;
|
||||
Plus[Axis]+=GradientProbeOffset;
|
||||
const double DMinus=Shape.detailSampleAt(
|
||||
{Minus[0],Minus[1],Minus[2]}).displacement;
|
||||
const double DPlus=Shape.detailSampleAt(
|
||||
{Plus[0],Plus[1],Plus[2]}).displacement;
|
||||
const double Gradient=(DPlus-DMinus)/(2.0*GradientProbeOffset);
|
||||
DetailGradientSquared+=Gradient*Gradient;
|
||||
}
|
||||
const double DetailGradient=std::sqrt(DetailGradientSquared);
|
||||
++Result.DetailGradientSamples;
|
||||
Result.MaximumDetailGradient=std::max(
|
||||
Result.MaximumDetailGradient,DetailGradient);
|
||||
if(DetailGradient>0.75)++Result.DetailGradientOverLimit;
|
||||
const double DetailDisplacement=std::abs(DetailSample.displacement);
|
||||
++Result.DetailDisplacementSamples;
|
||||
Result.MaximumDetailDisplacement=std::max(
|
||||
@@ -818,15 +840,32 @@ namespace
|
||||
if(NormalLength>1.0e-8)for(double& Value:Normal)Value/=NormalLength;
|
||||
const double Inward1=Shape.densityAt({Center.x-Normal[0],Center.y-Normal[1],Center.z-Normal[2]});
|
||||
const double Inward2=Shape.densityAt({Center.x-Normal[0]*2.0,Center.y-Normal[1]*2.0,Center.z-Normal[2]*2.0});
|
||||
if(Density>0.25)
|
||||
double MaximumProbeDensity=Density;
|
||||
const double ProbeWeights[10][3]={
|
||||
{1.0,0.0,0.0},{0.0,1.0,0.0},{0.0,0.0,1.0},
|
||||
{1.0/3.0,1.0/3.0,1.0/3.0},
|
||||
{0.5,0.5,0.0},{0.0,0.5,0.5},{0.5,0.0,0.5},
|
||||
{0.75,0.125,0.125},{0.125,0.75,0.125},{0.125,0.125,0.75}};
|
||||
for(const auto& Weights:ProbeWeights)
|
||||
{
|
||||
const VoxelForgeCore::Vec3d Probe{
|
||||
PA[0]*Weights[0]+PB[0]*Weights[1]+PC[0]*Weights[2],
|
||||
PA[1]*Weights[0]+PB[1]*Weights[1]+PC[1]*Weights[2],
|
||||
PA[2]*Weights[0]+PB[2]*Weights[1]+PC[2]*Weights[2]};
|
||||
MaximumProbeDensity=std::max(MaximumProbeDensity,static_cast<double>(
|
||||
Shape.densityAt({Probe.x*4.0,Probe.y*4.0,Probe.z*4.0})));
|
||||
}
|
||||
if(MaximumProbeDensity>0.25)
|
||||
{
|
||||
++Result.ExposedSkirtTriangles;
|
||||
Result.MaximumAirSkirtDensity=std::max(Result.MaximumAirSkirtDensity,Density);
|
||||
Result.MaximumAirSkirtDensity=std::max(
|
||||
Result.MaximumAirSkirtDensity,MaximumProbeDensity);
|
||||
if(AlternativeDensity<-0.25)++Result.ReverseSideSolidSkirtTriangles;
|
||||
if(bPrintSkirts&&Result.ExposedSkirtTriangles<=8)
|
||||
std::printf("[ExposedTileSkirt] level=%d tile=(%d,%d,%d) center=(%.2f,%.2f,%.2f) density=%.3f reverse_density=%.3f inward=(%.3f,%.3f) normal=(%.3f,%.3f,%.3f)\n",
|
||||
std::printf("[ExposedTileSkirt] level=%d tile=(%d,%d,%d) center=(%.2f,%.2f,%.2f) center_density=%.3f max_probe_density=%.3f reverse_density=%.3f inward=(%.3f,%.3f) normal=(%.3f,%.3f,%.3f)\n",
|
||||
Tile.Key.Level,Tile.Key.Coord.X,Tile.Key.Coord.Y,Tile.Key.Coord.Z,
|
||||
Center.x,Center.y,Center.z,Density,AlternativeDensity,Inward1,Inward2,
|
||||
Center.x,Center.y,Center.z,Density,MaximumProbeDensity,
|
||||
AlternativeDensity,Inward1,Inward2,
|
||||
Normal[0],Normal[1],Normal[2]);
|
||||
}
|
||||
}
|
||||
@@ -2138,16 +2177,17 @@ float3 Lit=Rock*(Ambient+0.88*Diffuse)+float3(0.50,0.69,0.82)*Head*0.75;
|
||||
{
|
||||
for(const FVoxelTileKey& Key:Leavers)RemoveResidentTile(Key);
|
||||
}
|
||||
DesiredTiles=std::move(NewDesired.Tiles);
|
||||
DesiredTiles=NewDesired.Tiles;
|
||||
DesiredTileSet=std::move(NewSet);
|
||||
RefreshResidentSkirtMasks();
|
||||
for(int32 I=0;I<=MaxLevels;++I)DesiredByLevel[I]=0;
|
||||
for(const FVoxelTileKey& Tile:DesiredTiles)++DesiredByLevel[Tile.Level];
|
||||
std::vector<FVoxelTileKey> ResidentKeys;ResidentKeys.reserve(ResidentTiles.size());
|
||||
for(const auto& Pair:ResidentTiles)
|
||||
if(NewSet.contains(Pair.first))ResidentKeys.push_back(Pair.first);
|
||||
if(DesiredTileSet.contains(Pair.first))ResidentKeys.push_back(Pair.first);
|
||||
++CrossingIndex;
|
||||
const FStandaloneStreamingUpdate Update=Streamer->UpdateDesired(CameraVoxels,ResidentKeys,CrossingIndex);
|
||||
const FStandaloneStreamingUpdate Update=Streamer->UpdateDesiredWithSet(
|
||||
std::move(NewDesired),ResidentKeys,CrossingIndex);
|
||||
for(const auto& Pair:Update.CancelledByCrossing)
|
||||
{
|
||||
FCrossingWork& Work=CrossingWork[Pair.first];
|
||||
@@ -3525,6 +3565,10 @@ float3 Lit=Rock*(Ambient+0.88*Diffuse)+float3(0.50,0.69,0.82)*Head*0.75;
|
||||
MeshArtifactStats.DetailDisplacementPatches+=TileAudit.DetailDisplacementPatches;
|
||||
MeshArtifactStats.MaximumDetailDisplacement=std::max(
|
||||
MeshArtifactStats.MaximumDetailDisplacement,TileAudit.MaximumDetailDisplacement);
|
||||
MeshArtifactStats.DetailGradientSamples+=TileAudit.DetailGradientSamples;
|
||||
MeshArtifactStats.DetailGradientOverLimit+=TileAudit.DetailGradientOverLimit;
|
||||
MeshArtifactStats.MaximumDetailGradient=std::max(
|
||||
MeshArtifactStats.MaximumDetailGradient,TileAudit.MaximumDetailGradient);
|
||||
MeshArtifactStats.CurvedEdgeChecks+=TileAudit.CurvedEdgeChecks;
|
||||
MeshArtifactStats.CurvedEdgeRootPatches+=TileAudit.CurvedEdgeRootPatches;
|
||||
MeshArtifactStats.CurvedEdgeRootBadVertices+=TileAudit.CurvedEdgeRootBadVertices;
|
||||
@@ -3690,12 +3734,25 @@ float3 Lit=Rock*(Ambient+0.88*Diffuse)+float3(0.50,0.69,0.82)*Head*0.75;
|
||||
MeshArtifactStats.WorstShiftExactD1,MeshArtifactStats.MaximumAbsSourceResidual,
|
||||
MeshArtifactStats.WorstResidualPosition[0],MeshArtifactStats.WorstResidualPosition[1],
|
||||
MeshArtifactStats.WorstResidualPosition[2]);
|
||||
std::printf("[MeshCurvedEdgeRootAudit] midpoint_edges=%llu bad_vertices=%llu patches=%llu max_midpoint_root_error=%.4f vox error_threshold=0.080 status=%s\n",
|
||||
const uint64 RootBadLimit=std::max<uint64>(64,
|
||||
MeshArtifactStats.CurvedEdgeChecks*35u/1000u);
|
||||
const double RootBadShare=MeshArtifactStats.CurvedEdgeChecks
|
||||
?static_cast<double>(MeshArtifactStats.CurvedEdgeRootBadVertices)
|
||||
/MeshArtifactStats.CurvedEdgeChecks:0.0;
|
||||
const bool bRootAuditPass=MeshArtifactStats.CurvedEdgeRootPatches==0
|
||||
&&MeshArtifactStats.CurvedEdgeRootBadVertices<=RootBadLimit;
|
||||
std::printf("[MeshCurvedEdgeRootAudit] midpoint_edges=%llu bad_vertices=%llu bad_share=%.3f%% allowed=%llu patches=%llu max_midpoint_root_error=%.4f vox error_threshold=0.080 status=%s\n",
|
||||
static_cast<unsigned long long>(MeshArtifactStats.CurvedEdgeChecks),
|
||||
static_cast<unsigned long long>(MeshArtifactStats.CurvedEdgeRootBadVertices),
|
||||
RootBadShare*100.0,static_cast<unsigned long long>(RootBadLimit),
|
||||
static_cast<unsigned long long>(MeshArtifactStats.CurvedEdgeRootPatches),
|
||||
MeshArtifactStats.MaximumCurvedEdgeRootError,
|
||||
MeshArtifactStats.CurvedEdgeRootPatches==0?"PASS":"FAIL");
|
||||
bRootAuditPass?"PASS":"FAIL");
|
||||
std::printf("[MeshDetailGradientAudit] overlap_samples=%llu over_limit=%llu max_gradient=%.4f vox_per_vox limit=0.750 status=%s\n",
|
||||
static_cast<unsigned long long>(MeshArtifactStats.DetailGradientSamples),
|
||||
static_cast<unsigned long long>(MeshArtifactStats.DetailGradientOverLimit),
|
||||
MeshArtifactStats.MaximumDetailGradient,
|
||||
MeshArtifactStats.DetailGradientOverLimit==0?"PASS":"FAIL");
|
||||
std::printf("[MeshSurfaceArtifactAudit] levels=0,1 tiles=%llu surface_vertices=%llu edge_vertices=%llu midpoint_band_vertices=%llu midpoint_share=%.2f%% visible_skirt_triangles=%llu hidden_same_lod_skirt_triangles=%llu exposed_skirt_triangles=%llu reverse_side_solid=%llu max_air_density=%.3f vox repeated_offset_patches=%llu field_residual_patches=%llu normal_mismatch_patches=%llu gradient_fallback_patches=%llu fallback_gradient_samples=%llu high_detail_vertices=%llu/%llu high_detail_patches=%llu max_detail_displacement=%.3f vox max_patch_dominance=%.3f status=%s\n",
|
||||
static_cast<unsigned long long>(MeshArtifactStats.Tiles),
|
||||
static_cast<unsigned long long>(MeshArtifactStats.SurfaceVertices),
|
||||
@@ -3721,7 +3778,8 @@ float3 Lit=Rock*(Ambient+0.88*Diffuse)+float3(0.50,0.69,0.82)*Head*0.75;
|
||||
&&MeshArtifactStats.NormalMismatchPatches==0
|
||||
&&MeshArtifactStats.GradientFallbackPatches==0
|
||||
&&MeshArtifactStats.DetailDisplacementPatches==0
|
||||
&&MeshArtifactStats.CurvedEdgeRootPatches==0?"PASS":"FAIL");
|
||||
&&bRootAuditPass
|
||||
&&MeshArtifactStats.DetailGradientOverLimit==0?"PASS":"FAIL");
|
||||
std::printf("[CoarsePanelAudit] tiles=%llu planar_open_components=%llu off_surface_panels=%llu panel_triangles=%llu max_source_error=%.3f vox status=%s\n",
|
||||
static_cast<unsigned long long>(CoarsePanelStats.Tiles),
|
||||
static_cast<unsigned long long>(CoarsePanelStats.PlanarOpenComponents),
|
||||
@@ -3775,7 +3833,10 @@ float3 Lit=Rock*(Ambient+0.88*Diffuse)+float3(0.50,0.69,0.82)*Head*0.75;
|
||||
if(bShardAudit&&CoreWorld&&(MeshArtifactStats.ExposedSkirtTriangles!=0
|
||||
||MeshArtifactStats.RepeatedOffsetPatches!=0||MeshArtifactStats.FieldMismatchPatches!=0
|
||||
||MeshArtifactStats.NormalMismatchPatches!=0||MeshArtifactStats.GradientFallbackPatches!=0
|
||||
||MeshArtifactStats.CurvedEdgeRootPatches!=0))return 13;
|
||||
||MeshArtifactStats.CurvedEdgeRootPatches!=0
|
||||
||MeshArtifactStats.CurvedEdgeRootBadVertices>std::max<uint64>(
|
||||
64,MeshArtifactStats.CurvedEdgeChecks*35u/1000u)
|
||||
||MeshArtifactStats.DetailGradientOverLimit!=0))return 13;
|
||||
if(bShardAudit&&CoreWorld&&CoarsePanelStats.OffSurfacePanels!=0)return 13;
|
||||
if(FarAudit)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user