a.URO.Draw
a.URO.Draw
#Overview
name: a.URO.Draw
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
True to draw color coded boxes for anim rate.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of a.URO.Draw is to enable or disable the visualization of animation rate optimization through color-coded boxes. This setting variable is part of Unreal Engine’s animation system, specifically related to the Update Rate Optimization (URO) feature.
This setting variable is primarily used in the SkinnedMeshComponent subsystem of Unreal Engine’s runtime. It’s defined and used within the Engine module, specifically in the SkinnedMeshComponent.cpp file.
The value of this variable is set through a console command. It’s defined as a TAutoConsoleVariable with an initial value of 0 (disabled). Users can change this value at runtime using the console command “a.URO.Draw”.
The variable interacts closely with CVarDrawAnimRateOptimization, which is essentially an alias for a.URO.Draw. They share the same value and purpose.
Developers should be aware that this is a debugging feature. When enabled (set to a value greater than 0), it will cause the engine to draw color-coded boxes around skinned mesh components to visualize their animation update rates. This can be useful for performance optimization but may impact rendering performance if left enabled in a shipping build.
Best practices for using this variable include:
- Use it during development and testing phases to visualize and optimize animation performance.
- Disable it (set to 0) in shipping builds to avoid unnecessary rendering overhead.
- Combine it with other animation debugging tools for a comprehensive view of animation system performance.
Regarding the associated variable CVarDrawAnimRateOptimization:
The purpose of CVarDrawAnimRateOptimization is identical to a.URO.Draw. It’s used to control the visualization of animation rate optimization.
This variable is used in the same subsystem (SkinnedMeshComponent) and module (Engine) as a.URO.Draw.
Its value is set through the same console command as a.URO.Draw (“a.URO.Draw”).
CVarDrawAnimRateOptimization directly interacts with a.URO.Draw, as they share the same value and are used interchangeably in the code.
Developers should be aware that this is an alias for a.URO.Draw, and changing one will affect the other.
The best practices for using CVarDrawAnimRateOptimization are the same as those for a.URO.Draw, as they are essentially the same variable.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SkinnedMeshComponent.cpp:59
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarDrawAnimRateOptimization(
TEXT("a.URO.Draw"),
0,
TEXT("True to draw color coded boxes for anim rate."));
static TAutoConsoleVariable<int32> CVarEnableMorphTargets(TEXT("r.EnableMorphTargets"), 1, TEXT("Enable Morph Targets"));
static TAutoConsoleVariable<int32> CVarAnimVisualizeLODs(
#Associated Variable and Callsites
This variable is associated with another variable named CVarDrawAnimRateOptimization
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SkinnedMeshComponent.cpp:58
Scope: file
Source code excerpt:
TEXT("True to anim rate optimization."));
static TAutoConsoleVariable<int32> CVarDrawAnimRateOptimization(
TEXT("a.URO.Draw"),
0,
TEXT("True to draw color coded boxes for anim rate."));
static TAutoConsoleVariable<int32> CVarEnableMorphTargets(TEXT("r.EnableMorphTargets"), 1, TEXT("Enable Morph Targets"));
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SkinnedMeshComponent.cpp:1376
Scope (from outer to inner):
file
function void USkinnedMeshComponent::TickUpdateRate
Source code excerpt:
#if ENABLE_DRAW_DEBUG
if ((CVarDrawAnimRateOptimization.GetValueOnGameThread() > 0) || bDisplayDebugUpdateRateOptimizations)
{
FColor DrawColor = AnimUpdateRateParams->GetUpdateRateDebugColor();
DrawDebugBox(GetWorld(), Bounds.Origin, Bounds.BoxExtent, FQuat::Identity, DrawColor, false);
FString DebugString = FString::Printf(TEXT("%s UpdateRate(%d) EvaluationRate(%d) ShouldInterpolateSkippedFrames(%d) ShouldSkipUpdate(%d) Interp Alpha (%f) AdditionalTime(%f)"),
*GetNameSafe(GetSkinnedAsset()), AnimUpdateRateParams->UpdateRate, AnimUpdateRateParams->EvaluationRate,