p.ChaosRigidsEvolutionApplyAllowEarlyOut
p.ChaosRigidsEvolutionApplyAllowEarlyOut
#Overview
name: p.ChaosRigidsEvolutionApplyAllowEarlyOut
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Allow Chaos Rigids Evolution apply iterations to early out when resolved.[def:1]
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of p.ChaosRigidsEvolutionApplyAllowEarlyOut is to control the early-out behavior of the Chaos Rigids Evolution apply iterations in Unreal Engine 5’s physics system. This setting variable is part of the Chaos physics engine, which is an experimental physics system in Unreal Engine 5.
- The Chaos physics subsystem, specifically the PBDRigidsEvolution module, relies on this setting variable.
- The value of this variable is set through a console variable (CVar) system, allowing it to be modified at runtime. It is initialized with a default value of 1 (enabled).
- This variable interacts with ChaosRigidsEvolutionApplyAllowEarlyOutCVar, which is the actual integer variable that stores the value. The p.ChaosRigidsEvolutionApplyAllowEarlyOut is the console command to modify this value.
- Developers must be aware that this variable affects the performance and accuracy trade-off in the physics simulation. When enabled (set to 1), it allows the physics solver to stop iterations early if it determines that the solution has converged.
- Best practices for using this variable include:
- Leaving it enabled (1) for better performance in most scenarios.
- Disabling it (0) if more accurate physics simulations are required, at the cost of performance.
- Experimenting with this setting in different scenarios to find the best balance between performance and accuracy for your specific game requirements.
Regarding the associated variable ChaosRigidsEvolutionApplyAllowEarlyOutCVar:
- The purpose of ChaosRigidsEvolutionApplyAllowEarlyOutCVar is to store the actual integer value that controls the early-out behavior.
- It is used directly in the Chaos physics code to determine whether to allow early-out or not.
- The value is set through the console variable system and can be modified at runtime.
- This variable is declared as an external integer in the header file, allowing it to be accessed from different parts of the Chaos physics code.
- Developers should be aware that modifying this variable directly in code is not recommended. Instead, they should use the console command p.ChaosRigidsEvolutionApplyAllowEarlyOut to change its value.
- Best practices include using this variable in conditional statements within the physics solver to control the early-out behavior of the iteration loops.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/PBDRigidsEvolution.cpp:11
Scope: file
Source code excerpt:
int32 ChaosRigidsEvolutionApplyAllowEarlyOutCVar = 1;
FAutoConsoleVariableRef CVarChaosRigidsEvolutionApplyAllowEarlyOut(TEXT("p.ChaosRigidsEvolutionApplyAllowEarlyOut"), ChaosRigidsEvolutionApplyAllowEarlyOutCVar, TEXT("Allow Chaos Rigids Evolution apply iterations to early out when resolved.[def:1]"));
int32 ChaosRigidsEvolutionApplyPushoutAllowEarlyOutCVar = 1;
FAutoConsoleVariableRef CVarChaosRigidsEvolutionApplyPushoutAllowEarlyOut(TEXT("p.ChaosRigidsEvolutionApplyPushoutAllowEarlyOut"), ChaosRigidsEvolutionApplyPushoutAllowEarlyOutCVar, TEXT("Allow Chaos Rigids Evolution apply-pushout iterations to early out when resolved.[def:1]"));
int32 ChaosNumPushOutIterationsOverride = -1;
FAutoConsoleVariableRef CVarChaosNumPushOutIterationsOverride(TEXT("p.ChaosNumPushOutIterationsOverride"), ChaosNumPushOutIterationsOverride, TEXT("Override for num push out iterations if >= 0 [def:-1]"));
#Associated Variable and Callsites
This variable is associated with another variable named ChaosRigidsEvolutionApplyAllowEarlyOutCVar
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/PBDRigidsEvolution.cpp:10
Scope: file
Source code excerpt:
CSV_DECLARE_CATEGORY_EXTERN(ChaosPhysicsTimers);
int32 ChaosRigidsEvolutionApplyAllowEarlyOutCVar = 1;
FAutoConsoleVariableRef CVarChaosRigidsEvolutionApplyAllowEarlyOut(TEXT("p.ChaosRigidsEvolutionApplyAllowEarlyOut"), ChaosRigidsEvolutionApplyAllowEarlyOutCVar, TEXT("Allow Chaos Rigids Evolution apply iterations to early out when resolved.[def:1]"));
int32 ChaosRigidsEvolutionApplyPushoutAllowEarlyOutCVar = 1;
FAutoConsoleVariableRef CVarChaosRigidsEvolutionApplyPushoutAllowEarlyOut(TEXT("p.ChaosRigidsEvolutionApplyPushoutAllowEarlyOut"), ChaosRigidsEvolutionApplyPushoutAllowEarlyOutCVar, TEXT("Allow Chaos Rigids Evolution apply-pushout iterations to early out when resolved.[def:1]"));
int32 ChaosNumPushOutIterationsOverride = -1;
FAutoConsoleVariableRef CVarChaosNumPushOutIterationsOverride(TEXT("p.ChaosNumPushOutIterationsOverride"), ChaosNumPushOutIterationsOverride, TEXT("Override for num push out iterations if >= 0 [def:-1]"));
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/PBDRigidsEvolution.h:24
Scope: file
Source code excerpt:
#define CHAOS_EVOLUTION_COLLISION_TESTMODE (!UE_BUILD_TEST && !UE_BUILD_SHIPPING)
extern int32 ChaosRigidsEvolutionApplyAllowEarlyOutCVar;
extern int32 ChaosRigidsEvolutionApplyPushoutAllowEarlyOutCVar;
extern int32 ChaosNumPushOutIterationsOverride;
extern int32 ChaosNumContactIterationsOverride;
namespace Chaos
{