p.ChaosCloth.DebugDrawAnimDrive
p.ChaosCloth.DebugDrawAnimDrive
#Overview
name: p.ChaosCloth.DebugDrawAnimDrive
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether to debug draw the Chaos Cloth anim drive
It is referenced in 6
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of p.ChaosCloth.DebugDrawAnimDrive is to enable debug drawing of the Chaos Cloth animation drive. This setting is used for visualization and debugging purposes in the Chaos Cloth simulation system.
-
The Chaos Cloth simulation system, which is part of Unreal Engine’s physics simulation capabilities, relies on this setting variable. It is specifically used in the ChaosCloth plugin and the ChaosClothAsset module.
-
The value of this variable is set as a console variable (CVar) in the Unreal Engine. It is initialized as false by default, meaning the debug drawing is off unless explicitly enabled.
-
This variable interacts with other debug drawing variables for the Chaos Cloth system, such as DebugDrawBackstopDistances, DebugDrawMaxDistances, and others. They are all part of a set of debug visualization options for different aspects of the cloth simulation.
-
Developers must be aware that this is a debugging tool and should be used only when necessary, as it may impact performance when enabled. It’s marked with ECVF_Cheat, indicating it’s intended for development and debugging purposes, not for use in shipping builds.
-
Best practices when using this variable include:
- Enable it only when debugging cloth animation issues.
- Use it in conjunction with other debug drawing options to get a comprehensive view of the cloth simulation.
- Remember to disable it when not needed to avoid performance impacts.
Regarding the associated variable DebugDrawAnimDrive:
This is the actual function that performs the debug drawing when p.ChaosCloth.DebugDrawAnimDrive is enabled. It’s a method of the FClothingSimulation class in the Chaos namespace.
The function is called in the Simulate method of FClothingSimulation when the console variable is set to true. It doesn’t take any parameters by default but can accept a FPrimitiveDrawInterface pointer for custom drawing interfaces.
Developers should note that this function is part of the internal workings of the Chaos Cloth system and should not be called directly in most cases. Instead, they should use the console variable to control the debug visualization.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/ChaosCloth/Source/ChaosCloth/Private/ChaosCloth/ChaosClothingSimulation.cpp:79
Scope (from outer to inner):
file
namespace ClothingSimulationCVar
Source code excerpt:
TAutoConsoleVariable<bool> DebugDrawBackstopDistances (TEXT("p.ChaosCloth.DebugDrawBackstopDistances" ), false, TEXT("Whether to debug draw the Chaos Cloth backstop distances"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawMaxDistances (TEXT("p.ChaosCloth.DebugDrawMaxDistances" ), false, TEXT("Whether to debug draw the Chaos Cloth max distances"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawAnimDrive (TEXT("p.ChaosCloth.DebugDrawAnimDrive" ), false, TEXT("Whether to debug draw the Chaos Cloth anim drive"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawEdgeConstraint (TEXT("p.ChaosCloth.DebugDrawEdgeConstraint" ), false, TEXT("Whether to debug draw the Chaos Cloth edge constraint"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawBendingConstraint (TEXT("p.ChaosCloth.DebugDrawBendingConstraint" ), false, TEXT("Whether to debug draw the Chaos Cloth bending constraint"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawLongRangeConstraint (TEXT("p.ChaosCloth.DebugDrawLongRangeConstraint" ), false, TEXT("Whether to debug draw the Chaos Cloth long range constraint (aka tether constraint)"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawWindForces (TEXT("p.ChaosCloth.DebugDrawWindForces" ), false, TEXT("Whether to debug draw the Chaos Cloth wind forces"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawSelfCollision (TEXT("p.ChaosCloth.DebugDrawSelfCollision" ), false, TEXT("Whether to debug draw the Chaos Cloth self collision information"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawSelfIntersection (TEXT("p.ChaosCloth.DebugDrawSelfIntersection" ), false, TEXT("Whether to debug draw the Chaos Cloth self intersection information"), ECVF_Cheat);
#Loc: <Workspace>/Engine/Plugins/ChaosClothAsset/Source/ChaosClothAssetEngine/Private/ChaosClothAsset/ClothSimulationProxy.cpp:304
Scope (from outer to inner):
file
namespace UE::Chaos::ClothAsset
function void FClothSimulationProxy::Tick
Source code excerpt:
static const TConsoleVariableData<bool>* const DebugDrawBackstopDistancesCVar = IConsoleManager::Get().FindTConsoleVariableDataBool(TEXT("p.ChaosCloth.DebugDrawBackstopDistances"));
static const TConsoleVariableData<bool>* const DebugDrawMaxDistancesCVar = IConsoleManager::Get().FindTConsoleVariableDataBool(TEXT("p.ChaosCloth.DebugDrawMaxDistances"));
static const TConsoleVariableData<bool>* const DebugDrawAnimDriveCVar = IConsoleManager::Get().FindTConsoleVariableDataBool(TEXT("p.ChaosCloth.DebugDrawAnimDrive"));
static const TConsoleVariableData<bool>* const DebugDrawEdgeConstraintCVar = IConsoleManager::Get().FindTConsoleVariableDataBool(TEXT("p.ChaosCloth.DebugDrawEdgeConstraint"));
static const TConsoleVariableData<bool>* const DebugDrawBendingConstraintCVar = IConsoleManager::Get().FindTConsoleVariableDataBool(TEXT("p.ChaosCloth.DebugDrawBendingConstraint"));
static const TConsoleVariableData<bool>* const DebugDrawLongRangeConstraintCVar = IConsoleManager::Get().FindTConsoleVariableDataBool(TEXT("p.ChaosCloth.DebugDrawLongRangeConstraint"));
static const TConsoleVariableData<bool>* const DebugDrawWindForcesCVar = IConsoleManager::Get().FindTConsoleVariableDataBool(TEXT("p.ChaosCloth.DebugDrawWindForces"));
static const TConsoleVariableData<bool>* const DebugDrawSelfCollisionCVar = IConsoleManager::Get().FindTConsoleVariableDataBool(TEXT("p.ChaosCloth.DebugDrawSelfCollision"));
static const TConsoleVariableData<bool>* const DebugDrawSelfIntersectionCVar = IConsoleManager::Get().FindTConsoleVariableDataBool(TEXT("p.ChaosCloth.DebugDrawSelfIntersection"));
#Associated Variable and Callsites
This variable is associated with another variable named DebugDrawAnimDrive
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/ChaosCloth/Source/ChaosCloth/Private/ChaosCloth/ChaosClothingSimulation.cpp:79
Scope (from outer to inner):
file
namespace ClothingSimulationCVar
Source code excerpt:
TAutoConsoleVariable<bool> DebugDrawBackstopDistances (TEXT("p.ChaosCloth.DebugDrawBackstopDistances" ), false, TEXT("Whether to debug draw the Chaos Cloth backstop distances"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawMaxDistances (TEXT("p.ChaosCloth.DebugDrawMaxDistances" ), false, TEXT("Whether to debug draw the Chaos Cloth max distances"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawAnimDrive (TEXT("p.ChaosCloth.DebugDrawAnimDrive" ), false, TEXT("Whether to debug draw the Chaos Cloth anim drive"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawEdgeConstraint (TEXT("p.ChaosCloth.DebugDrawEdgeConstraint" ), false, TEXT("Whether to debug draw the Chaos Cloth edge constraint"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawBendingConstraint (TEXT("p.ChaosCloth.DebugDrawBendingConstraint" ), false, TEXT("Whether to debug draw the Chaos Cloth bending constraint"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawLongRangeConstraint (TEXT("p.ChaosCloth.DebugDrawLongRangeConstraint" ), false, TEXT("Whether to debug draw the Chaos Cloth long range constraint (aka tether constraint)"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawWindForces (TEXT("p.ChaosCloth.DebugDrawWindForces" ), false, TEXT("Whether to debug draw the Chaos Cloth wind forces"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawSelfCollision (TEXT("p.ChaosCloth.DebugDrawSelfCollision" ), false, TEXT("Whether to debug draw the Chaos Cloth self collision information"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawSelfIntersection (TEXT("p.ChaosCloth.DebugDrawSelfIntersection" ), false, TEXT("Whether to debug draw the Chaos Cloth self intersection information"), ECVF_Cheat);
#Loc: <Workspace>/Engine/Plugins/ChaosCloth/Source/ChaosCloth/Private/ChaosCloth/ChaosClothingSimulation.cpp:588
Scope (from outer to inner):
file
function void FClothingSimulation::Simulate
Source code excerpt:
if (ClothingSimulationCVar::DebugDrawBackstopDistances .GetValueOnAnyThread()) { DebugDrawBackstopDistances (); }
if (ClothingSimulationCVar::DebugDrawMaxDistances .GetValueOnAnyThread()) { DebugDrawMaxDistances (); }
if (ClothingSimulationCVar::DebugDrawAnimDrive .GetValueOnAnyThread()) { DebugDrawAnimDrive (); }
if (ClothingSimulationCVar::DebugDrawEdgeConstraint .GetValueOnAnyThread()) { DebugDrawEdgeConstraint (); }
if (ClothingSimulationCVar::DebugDrawBendingConstraint .GetValueOnAnyThread()) { DebugDrawBendingConstraint (); }
if (ClothingSimulationCVar::DebugDrawLongRangeConstraint .GetValueOnAnyThread()) { DebugDrawLongRangeConstraint (); }
if (ClothingSimulationCVar::DebugDrawWindForces .GetValueOnAnyThread()) { DebugDrawWindAndPressureForces(); }
if (ClothingSimulationCVar::DebugDrawSelfCollision .GetValueOnAnyThread()) { DebugDrawSelfCollision (); }
if (ClothingSimulationCVar::DebugDrawSelfIntersection .GetValueOnAnyThread()) { DebugDrawSelfIntersection (); }
#Loc: <Workspace>/Engine/Plugins/ChaosCloth/Source/ChaosCloth/Public/ChaosCloth/ChaosClothingSimulation.h:103
Scope (from outer to inner):
file
namespace Chaos
class class FClothingSimulation : public FClothingSimulationCommon
function void DebugDrawAnimDrive
Source code excerpt:
void DebugDrawBackstopDistances(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawBackstopDistances(PDI); }
void DebugDrawMaxDistances(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawMaxDistances(PDI); }
void DebugDrawAnimDrive(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawAnimDrive(PDI); }
void DebugDrawEdgeConstraint(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawEdgeConstraint(PDI); }
void DebugDrawBendingConstraint(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawBendingConstraint(PDI); }
void DebugDrawLongRangeConstraint(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawLongRangeConstraint(PDI); }
void DebugDrawWindAndPressureForces(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawWindAndPressureForces(PDI); }
UE_DEPRECATED(5.1, "DebugDrawWindForces has been renamed DebugDrawWindAndPressureForces.")
void DebugDrawWindForces(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawWindAndPressureForces(PDI); }
#Loc: <Workspace>/Engine/Plugins/ChaosCloth/Source/ChaosClothEditor/Private/ChaosClothEditor/ChaosSimulationEditorExtender.cpp:75
Scope (from outer to inner):
file
namespace Chaos
Source code excerpt:
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawMaxDistances , TEXT("p.ChaosClothEditor.DebugDrawMaxDistances" ), LOCTEXT("ChaosVisName_MaxDistance" , "Max Distances" ), LOCTEXT("ChaosVisName_MaxDistance_ToolTip" , "Draws the current max distances for the sim particles as a line along its normal"), /*bDisablesSimulation =*/true),
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawMaxDistanceValues , TEXT("p.ChaosClothEditor.DebugDrawMaxDistanceValues" ), LOCTEXT("ChaosVisName_MaxDistanceValue" , "Max Distances As Numbers" ), LOCTEXT("ChaosVisName_MaxDistanceValue_ToolTip" , "Draws the current max distances as numbers")),
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawAnimDrive , TEXT("p.ChaosClothEditor.DebugDrawAnimDrive" ), LOCTEXT("ChaosVisName_AnimDrive" , "Anim Drive" ), LOCTEXT("ChaosVisName_AnimDrive_Tooltip" , "Draws the current skinned reference mesh for the simulation which anim drive will attempt to reach if enabled")),
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawEdgeConstraint , TEXT("p.ChaosClothEditor.DebugDrawEdgeConstraint" ), LOCTEXT("ChaosVisName_EdgeConstraint" , "Edge Constraint" ), LOCTEXT("ChaosVisName_EdgeConstraint_Tooltip" , "Draws the edge spring constraints")),
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawBendingConstraint , TEXT("p.ChaosClothEditor.DebugDrawBendingConstraint" ), LOCTEXT("ChaosVisName_BendingConstraint" , "Bending Constraint" ), LOCTEXT("ChaosVisName_BendingConstraint_Tooltip" , "Draws the bending spring constraints")),
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawLongRangeConstraint , TEXT("p.ChaosClothEditor.DebugDrawLongRangeConstraint" ), LOCTEXT("ChaosVisName_LongRangeConstraint" , "Long Range Constraint" ), LOCTEXT("ChaosVisName_LongRangeConstraint_Tooltip" , "Draws the long range attachment constraint distances")),
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawWindAndPressureForces, TEXT("p.ChaosClothEditor.DebugDrawWindAndPressureForces"), LOCTEXT("ChaosVisName_WindAndPressureForces", "Wind Aerodynamic And Pressure Forces"), LOCTEXT("ChaosVisName_WindAndPressure_Tooltip", "Draws the Wind drag and lift and pressure forces")),
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawLocalSpace , TEXT("p.ChaosClothEditor.DebugDrawLocalSpace" ), LOCTEXT("ChaosVisName_LocalSpace" , "Local Space Reference Bone" ), LOCTEXT("ChaosVisName_LocalSpace_Tooltip" , "Draws the local space reference bone")),
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawSelfCollision , TEXT("p.ChaosClothEditor.DebugDrawSelfCollision" ), LOCTEXT("ChaosVisName_SelfCollision" , "Self Collision" ), LOCTEXT("ChaosVisName_SelfCollision_Tooltip" , "Draws the self collision thickness/debugging information")),