p.Chaos.PBDCollisionSolver.JacobiRotationTolerance

p.Chaos.PBDCollisionSolver.JacobiRotationTolerance

#Overview

name: p.Chaos.PBDCollisionSolver.JacobiRotationTolerance

This variable is created as a Console Variable (cvar).

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of p.Chaos.PBDCollisionSolver.JacobiRotationTolerance is to set a tolerance level for rotation corrections in the Position-Based Dynamics (PBD) collision solver within the Chaos physics system of Unreal Engine 5.

This setting variable is primarily used by the Chaos physics subsystem, specifically within the PBD collision solver module. Based on the callsites, it’s part of the Experimental Chaos module in the Unreal Engine runtime.

The value of this variable is set to 1.e-8f by default, as seen in the source code. It’s defined as a console variable, which means it can be adjusted at runtime through console commands or configuration files.

The associated variable Chaos_PBDCollisionSolver_JacobiRotationTolerance directly interacts with p.Chaos.PBDCollisionSolver.JacobiRotationTolerance. They share the same value, with the console variable (p.Chaos.PBDCollisionSolver.JacobiRotationTolerance) controlling the value of the C++ variable (Chaos_PBDCollisionSolver_JacobiRotationTolerance).

Developers must be aware that this variable affects the precision of rotation calculations in collision solving. Setting it too high might result in visible inaccuracies in object rotations during collisions, while setting it too low might impact performance due to unnecessary precision.

Best practices when using this variable include:

  1. Only adjust it if you’re experiencing specific issues with rotation precision in collisions.
  2. Test thoroughly after any changes, as it can affect both visual accuracy and performance.
  3. Consider the trade-off between precision and performance when adjusting this value.

Regarding the associated variable Chaos_PBDCollisionSolver_JacobiRotationTolerance:

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/Collision/PBDCollisionContainerSolver.cpp:48

Scope (from outer to inner):

file
namespace    Chaos
namespace    CVars

Source code excerpt:

		// @todo(chaos): to be tuned
		FRealSingle Chaos_PBDCollisionSolver_JacobiRotationTolerance = 1.e-8f;
		FAutoConsoleVariableRef CVarChaosPBDCollisionSolverJacobiRotationTolerance(TEXT("p.Chaos.PBDCollisionSolver.JacobiRotationTolerance"), Chaos_PBDCollisionSolver_JacobiRotationTolerance, TEXT(""));

		// Whether to enable the new initial overlap depentration system
		bool bChaos_Collision_EnableInitialDepenetration = true;
		FAutoConsoleVariableRef CVarChaosCollisionEnableInitialDepentration(TEXT("p.Chaos.PBDCollisionSolver.EnableInitialDepenetration"), bChaos_Collision_EnableInitialDepenetration, TEXT(""));

		// The maximum number of constraints we will attempt to solve (-1 for unlimited)

#Associated Variable and Callsites

This variable is associated with another variable named Chaos_PBDCollisionSolver_JacobiRotationTolerance. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/Collision/PBDCollisionContainerSolver.cpp:47

Scope (from outer to inner):

file
namespace    Chaos
namespace    CVars

Source code excerpt:

		// Jacobi rotation tolerance. Rotation corrections below this are zeroed.
		// @todo(chaos): to be tuned
		FRealSingle Chaos_PBDCollisionSolver_JacobiRotationTolerance = 1.e-8f;
		FAutoConsoleVariableRef CVarChaosPBDCollisionSolverJacobiRotationTolerance(TEXT("p.Chaos.PBDCollisionSolver.JacobiRotationTolerance"), Chaos_PBDCollisionSolver_JacobiRotationTolerance, TEXT(""));

		// Whether to enable the new initial overlap depentration system
		bool bChaos_Collision_EnableInitialDepenetration = true;
		FAutoConsoleVariableRef CVarChaosCollisionEnableInitialDepentration(TEXT("p.Chaos.PBDCollisionSolver.EnableInitialDepenetration"), bChaos_Collision_EnableInitialDepenetration, TEXT(""));

		// The maximum number of constraints we will attempt to solve (-1 for unlimited)

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/Collision/PBDCollisionSolverJacobi.h:23

Scope (from outer to inner):

file
namespace    Chaos
namespace    CVars

Source code excerpt:

		extern float Chaos_PBDCollisionSolver_JacobiStiffness;
		extern float Chaos_PBDCollisionSolver_JacobiPositionTolerance;
		extern float Chaos_PBDCollisionSolver_JacobiRotationTolerance;
	}

	namespace Private
	{
		class FSolverVec3SOA
		{