p.ChaosCloth.DebugDrawAmimNormals
p.ChaosCloth.DebugDrawAmimNormals
#Overview
name: p.ChaosCloth.DebugDrawAmimNormals
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether to debug draw the animated/kinematic Cloth normals
It is referenced in 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of p.ChaosCloth.DebugDrawAmimNormals is to enable debug drawing of the animated/kinematic Cloth normals in the Chaos Cloth simulation system.
-
This setting variable is part of the Chaos Cloth simulation system, which is a plugin for Unreal Engine 5 that provides cloth simulation functionality.
-
The Chaos Cloth plugin relies on this variable for debugging purposes, specifically in the ChaosClothingSimulation module.
-
The value of this variable is set as a console variable (CVar) with default value ‘false’. It can be changed at runtime through the console or programmatically.
-
This variable interacts with other debug drawing variables in the Chaos Cloth system, such as DebugDrawPhysMeshWired, DebugDrawPointNormals, etc. They are all part of a set of debugging tools for the cloth simulation.
-
Developers should be aware that this is a debugging tool and should only be enabled when necessary, as it may impact performance.
-
Best practices for using this variable include:
- Only enable it when actively debugging cloth animation issues.
- Disable it in production builds to avoid performance overhead.
- Use it in conjunction with other debug drawing options for a comprehensive view of the cloth simulation.
Regarding the associated variable DebugDrawAnimNormals:
-
The purpose of DebugDrawAnimNormals is the same as p.ChaosCloth.DebugDrawAmimNormals. It appears to be an internal variable that directly controls the debug drawing functionality.
-
It is used within the FClothingSimulation class to trigger the actual debug drawing of animated normals.
-
The value of this variable is set based on the console variable p.ChaosCloth.DebugDrawAmimNormals.
-
It interacts with other debug drawing functions in the FClothingSimulation class.
-
Developers should be aware that this is the actual function called to perform the debug drawing, triggered by the console variable.
-
Best practices for using this variable include:
- Do not modify this variable directly; instead, use the console variable to control its behavior.
- When extending the cloth simulation system, follow the same pattern for adding new debug drawing functionalities.
#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:70
Scope (from outer to inner):
file
namespace ClothingSimulationCVar
Source code excerpt:
TAutoConsoleVariable<bool> DebugDrawPhysMeshWired (TEXT("p.ChaosCloth.DebugDrawPhysMeshWired" ), false, TEXT("Whether to debug draw the Chaos Cloth wireframe meshes"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawAnimMeshWired (TEXT("p.ChaosCloth.DebugDrawAnimMeshWired" ), false, TEXT("Whether to debug draw the animated/kinematic Cloth wireframe meshes"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawAnimNormals (TEXT("p.ChaosCloth.DebugDrawAmimNormals" ), false, TEXT("Whether to debug draw the animated/kinematic Cloth normals"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawPointNormals (TEXT("p.ChaosCloth.DebugDrawPointNormals" ), false, TEXT("Whether to debug draw the Chaos Cloth point normals"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawPointVelocities (TEXT("p.ChaosCloth.DebugDrawPointVelocities" ), false, TEXT("Whether to debug draw the Chaos Cloth point velocities"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawFaceNormals (TEXT("p.ChaosCloth.DebugDrawFaceNormals" ), false, TEXT("Whether to debug draw the Chaos Cloth face normals"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawInversedFaceNormals (TEXT("p.ChaosCloth.DebugDrawInversedFaceNormals" ), false, TEXT("Whether to debug draw the Chaos Cloth inversed face normals"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawCollision (TEXT("p.ChaosCloth.DebugDrawCollision" ), false, TEXT("Whether to debug draw the Chaos Cloth collisions"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawBackstops (TEXT("p.ChaosCloth.DebugDrawBackstops" ), false, TEXT("Whether to debug draw the Chaos Cloth backstops"), ECVF_Cheat);
#Associated Variable and Callsites
This variable is associated with another variable named DebugDrawAnimNormals
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/ChaosCloth/Source/ChaosCloth/Private/ChaosCloth/ChaosClothingSimulation.cpp:70
Scope (from outer to inner):
file
namespace ClothingSimulationCVar
Source code excerpt:
TAutoConsoleVariable<bool> DebugDrawPhysMeshWired (TEXT("p.ChaosCloth.DebugDrawPhysMeshWired" ), false, TEXT("Whether to debug draw the Chaos Cloth wireframe meshes"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawAnimMeshWired (TEXT("p.ChaosCloth.DebugDrawAnimMeshWired" ), false, TEXT("Whether to debug draw the animated/kinematic Cloth wireframe meshes"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawAnimNormals (TEXT("p.ChaosCloth.DebugDrawAmimNormals" ), false, TEXT("Whether to debug draw the animated/kinematic Cloth normals"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawPointNormals (TEXT("p.ChaosCloth.DebugDrawPointNormals" ), false, TEXT("Whether to debug draw the Chaos Cloth point normals"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawPointVelocities (TEXT("p.ChaosCloth.DebugDrawPointVelocities" ), false, TEXT("Whether to debug draw the Chaos Cloth point velocities"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawFaceNormals (TEXT("p.ChaosCloth.DebugDrawFaceNormals" ), false, TEXT("Whether to debug draw the Chaos Cloth face normals"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawInversedFaceNormals (TEXT("p.ChaosCloth.DebugDrawInversedFaceNormals" ), false, TEXT("Whether to debug draw the Chaos Cloth inversed face normals"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawCollision (TEXT("p.ChaosCloth.DebugDrawCollision" ), false, TEXT("Whether to debug draw the Chaos Cloth collisions"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawBackstops (TEXT("p.ChaosCloth.DebugDrawBackstops" ), false, TEXT("Whether to debug draw the Chaos Cloth backstops"), ECVF_Cheat);
#Loc: <Workspace>/Engine/Plugins/ChaosCloth/Source/ChaosCloth/Private/ChaosCloth/ChaosClothingSimulation.cpp:582
Scope (from outer to inner):
file
function void FClothingSimulation::Simulate
Source code excerpt:
if (ClothingSimulationCVar::DebugDrawAnimMeshWired .GetValueOnAnyThread()) { DebugDrawAnimMeshWired (); }
if (ClothingSimulationCVar::DebugDrawPointVelocities .GetValueOnAnyThread()) { DebugDrawPointVelocities (); }
if (ClothingSimulationCVar::DebugDrawAnimNormals .GetValueOnAnyThread()) { DebugDrawAnimNormals (); }
if (ClothingSimulationCVar::DebugDrawPointNormals .GetValueOnAnyThread()) { DebugDrawPointNormals (); }
if (ClothingSimulationCVar::DebugDrawCollision .GetValueOnAnyThread()) { DebugDrawCollision (); }
if (ClothingSimulationCVar::DebugDrawBackstops .GetValueOnAnyThread()) { DebugDrawBackstops (); }
if (ClothingSimulationCVar::DebugDrawBackstopDistances .GetValueOnAnyThread()) { DebugDrawBackstopDistances (); }
if (ClothingSimulationCVar::DebugDrawMaxDistances .GetValueOnAnyThread()) { DebugDrawMaxDistances (); }
if (ClothingSimulationCVar::DebugDrawAnimDrive .GetValueOnAnyThread()) { DebugDrawAnimDrive (); }
#Loc: <Workspace>/Engine/Plugins/ChaosCloth/Source/ChaosCloth/Public/ChaosCloth/ChaosClothingSimulation.h:96
Scope (from outer to inner):
file
namespace Chaos
class class FClothingSimulation : public FClothingSimulationCommon
function void DebugDrawAnimNormals
Source code excerpt:
void DebugDrawPhysMeshWired(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawPhysMeshWired(PDI); }
void DebugDrawAnimMeshWired(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawAnimMeshWired(PDI); }
void DebugDrawAnimNormals(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawAnimNormals(PDI); }
void DebugDrawPointNormals(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawPointNormals(PDI); }
void DebugDrawPointVelocities(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawPointVelocities(PDI); }
void DebugDrawCollision(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawCollision(PDI); }
void DebugDrawBackstops(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawBackstops(PDI); }
void DebugDrawBackstopDistances(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawBackstopDistances(PDI); }
void DebugDrawMaxDistances(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawMaxDistances(PDI); }
#Loc: <Workspace>/Engine/Plugins/ChaosCloth/Source/ChaosClothEditor/Private/ChaosClothEditor/ChaosSimulationEditorExtender.cpp:69
Scope (from outer to inner):
file
namespace Chaos
Source code excerpt:
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawPointNormals , TEXT("p.ChaosClothEditor.DebugDrawPointNormals" ), LOCTEXT("ChaosVisName_PointNormals" , "Physical Mesh Normals" ), LOCTEXT("ChaosVisName_PointNormals_ToolTip" , "Draws the current point normals for the simulation mesh")),
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawPointVelocities , TEXT("p.ChaosClothEditor.DebugDrawPointVelocities" ), LOCTEXT("ChaosVisName_PointVelocities" , "Point Velocities" ), LOCTEXT("ChaosVisName_PointVelocities_ToolTip" , "Draws the current point velocities for the simulation mesh")),
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawAnimNormals , TEXT("p.ChaosClothEditor.DebugDrawAnimNormals" ), LOCTEXT("ChaosVisName_AnimNormals" , "Animated Mesh Normals" ), LOCTEXT("ChaosVisName_AnimNormals_ToolTip" , "Draws the current point normals for the animated mesh")),
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawCollision , TEXT("p.ChaosClothEditor.DebugDrawCollision" ), LOCTEXT("ChaosVisName_Collision" , "Collisions" ), LOCTEXT("ChaosVisName_Collision_ToolTip" , "Draws the collision bodies the simulation is currently using")),
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawBackstops , TEXT("p.ChaosClothEditor.DebugDrawBackstops" ), LOCTEXT("ChaosVisName_Backstop" , "Backstops" ), LOCTEXT("ChaosVisName_Backstop_ToolTip" , "Draws the backstop radius and position for each simulation particle")),
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawBackstopDistances , TEXT("p.ChaosClothEditor.DebugDrawBackstopDistances" ), LOCTEXT("ChaosVisName_BackstopDistance" , "Backstop Distances" ), LOCTEXT("ChaosVisName_BackstopDistance_ToolTip" , "Draws the backstop distance offset for each simulation particle"), /*bDisablesSimulation =*/true),
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")),