p.gc.ReportNoLevelsetCluster
p.gc.ReportNoLevelsetCluster
#Overview
name: p.gc.ReportNoLevelsetCluster
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Report any cluster objects without levelsets
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of p.gc.ReportNoLevelsetCluster is to control the reporting of cluster objects without levelsets in the Geometry Collection system of Unreal Engine 5’s Chaos physics engine.
This setting variable is primarily used in the Chaos physics engine, specifically within the Geometry Collection physics proxy. It is part of the Experimental Chaos module in Unreal Engine 5.
The value of this variable is set through a console variable (CVar) named “p.gc.ReportNoLevelsetCluster”. It is initialized to 0 by default, which means reporting is turned off.
The associated variable ReportNoLevelsetCluster directly interacts with p.gc.ReportNoLevelsetCluster. They share the same value, and ReportNoLevelsetCluster is used in the actual code logic.
Developers should be aware that when this variable is set to a non-zero value, it will trigger warning logs for any cluster objects that don’t have levelsets. This can be useful for debugging and ensuring that all cluster objects have the expected levelset data.
Best practices when using this variable include:
- Use it during development and testing phases to catch potential issues with cluster object levelsets.
- Be cautious about enabling it in production builds, as it may generate a large number of log messages and impact performance.
- Consider using it in conjunction with other debugging tools to investigate issues related to Geometry Collection clusters.
Regarding the associated variable ReportNoLevelsetCluster:
The purpose of ReportNoLevelsetCluster is to act as the actual flag used in the code logic to determine whether to report cluster objects without levelsets.
It is used within the Chaos physics engine, specifically in the FGeometryCollectionPhysicsProxy::BuildClusters_Internal function.
The value of this variable is set by the console variable p.gc.ReportNoLevelsetCluster.
This variable directly interacts with the console variable p.gc.ReportNoLevelsetCluster, sharing its value.
Developers should be aware that this variable controls the actual reporting behavior in the code. When it’s non-zero, warning logs will be generated for cluster objects without levelsets.
Best practices for using this variable include:
- Avoid modifying it directly in code; instead, use the console variable to control its value.
- Be mindful of its performance impact when enabled, especially in performance-critical sections of code.
- Use it in conjunction with other debugging techniques when investigating issues related to Geometry Collection clusters and levelsets.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/PhysicsProxy/GeometryCollectionPhysicsProxy.cpp:1769
Scope: file
Source code excerpt:
int32 ReportNoLevelsetCluster = 0;
FAutoConsoleVariableRef CVarReportNoLevelsetCluster(TEXT("p.gc.ReportNoLevelsetCluster"), ReportNoLevelsetCluster, TEXT("Report any cluster objects without levelsets"));
int32 GlobalMaxSimulatedLevel = 100;
FAutoConsoleVariableRef CVarGlobalMaxSimulatedLevel(TEXT("p.gc.GlobalMaxSimulatedLevel"), GlobalMaxSimulatedLevel, TEXT("Allow to set the Global Maximum Simulated Level for Geoemtry Collection. The min between the MaxSimulatedLevel and the GlobalMaxSimulatedLevel will be used. "));
DECLARE_CYCLE_STAT(TEXT("FGeometryCollectionPhysicsProxy::BuildClusters"), STAT_BuildClusters, STATGROUP_Chaos);
#Associated Variable and Callsites
This variable is associated with another variable named ReportNoLevelsetCluster
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/PhysicsProxy/GeometryCollectionPhysicsProxy.cpp:1768
Scope: file
Source code excerpt:
int32 ReportNoLevelsetCluster = 0;
FAutoConsoleVariableRef CVarReportNoLevelsetCluster(TEXT("p.gc.ReportNoLevelsetCluster"), ReportNoLevelsetCluster, TEXT("Report any cluster objects without levelsets"));
int32 GlobalMaxSimulatedLevel = 100;
FAutoConsoleVariableRef CVarGlobalMaxSimulatedLevel(TEXT("p.gc.GlobalMaxSimulatedLevel"), GlobalMaxSimulatedLevel, TEXT("Allow to set the Global Maximum Simulated Level for Geoemtry Collection. The min between the MaxSimulatedLevel and the GlobalMaxSimulatedLevel will be used. "));
DECLARE_CYCLE_STAT(TEXT("FGeometryCollectionPhysicsProxy::BuildClusters"), STAT_BuildClusters, STATGROUP_Chaos);
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/PhysicsProxy/GeometryCollectionPhysicsProxy.cpp:2066
Scope (from outer to inner):
file
function Chaos::FPBDRigidClusteredParticleHandle* FGeometryCollectionPhysicsProxy::BuildClusters_Internal
Source code excerpt:
);
if (ReportNoLevelsetCluster && Parent->GetGeometry())
{
//ensureMsgf(false, TEXT("Union object generated for cluster"));
UE_LOG(LogChaos, Warning, TEXT("Union object generated for cluster:%s"), *Parameters.Name);
}
if (Parent->InvM() == 0.0)