a.URO.Enable
a.URO.Enable
#Overview
name: a.URO.Enable
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
True to anim rate optimization.
It is referenced in 7
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of a.URO.Enable
is to control the Animation Update Rate Optimization (URO) feature in Unreal Engine’s animation system. This setting is used to enable or disable the optimization of animation update rates, which can help improve performance in certain scenarios.
Unreal Engine subsystems that rely on this setting variable include:
- The animation system, specifically within the SkinnedMeshComponent
- The MovieRenderPipeline plugin
The value of this variable is set in two ways:
- As a console variable with a default value of 1 (enabled)
- Explicitly set to 0 (disabled) in certain scenarios, such as during movie rendering
The associated variable CVarEnableAnimRateOptimization
interacts directly with a.URO.Enable
. They share the same value and are used interchangeably in the code.
Developers should be aware of the following when using this variable:
- Enabling URO (value set to 1) can improve performance in runtime games by optimizing animation update rates.
- Disabling URO (value set to 0) ensures consistent animation behavior, which is crucial for tasks like movie rendering where frame-perfect accuracy is required.
- The variable is automatically disabled in certain pipeline processes, such as the MovieRenderPipeline, to ensure consistent results.
Best practices when using this variable include:
- Leave it enabled (default value of 1) for most runtime game scenarios to benefit from performance optimizations.
- Disable it (set to 0) when working on tasks that require frame-perfect animation accuracy, such as cinematic rendering or debugging animation issues.
- Be aware that some Unreal Engine processes may override this setting automatically, so always check its current value when investigating animation-related issues.
Regarding the associated variable CVarEnableAnimRateOptimization
:
- It serves the same purpose as
a.URO.Enable
and is used interchangeably in the code. - It is defined as a console variable in the SkinnedMeshComponent.cpp file.
- The
ShouldUseUpdateRateOptimizations()
function in the USkinnedMeshComponent class uses this variable to determine if update rate optimizations should be applied. - When working with animation systems or investigating performance issues related to animations, developers should consider both
a.URO.Enable
andCVarEnableAnimRateOptimization
as they represent the same setting.
#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:54
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarEnableAnimRateOptimization(
TEXT("a.URO.Enable"),
1,
TEXT("True to anim rate optimization."));
static TAutoConsoleVariable<int32> CVarDrawAnimRateOptimization(
TEXT("a.URO.Draw"),
0,
#Loc: <Workspace>/Engine/Plugins/MovieScene/MovieRenderPipeline/Source/MovieRenderPipelineCore/Private/Graph/Nodes/MovieGraphGlobalGameOverrides.cpp:77
Scope (from outer to inner):
file
function void UMovieGraphGlobalGameOverridesNode::BuildNewProcessCommandLineArgsImpl
Source code excerpt:
#endif
InOutDeviceProfileCvars.Add(FString::Printf(TEXT("a.URO.Enable=%d"), 0));
InOutDeviceProfileCvars.Add(FString::Printf(TEXT("r.SkyLight.RealTimeReflectionCapture.TimeSlice=%d"), 0));
InOutDeviceProfileCvars.Add(FString::Printf(TEXT("r.VolumetricRenderTarget=%d"), 1));
InOutDeviceProfileCvars.Add(FString::Printf(TEXT("r.VolumetricRenderTarget.Mode=%d"), 3));
InOutDeviceProfileCvars.Add(FString::Printf(TEXT("wp.Runtime.BlockOnSlowStreaming=%d"), 0));
InOutDeviceProfileCvars.Add(FString::Printf(TEXT("p.Chaos.ImmPhys.MinStepTime=%d"), 0));
InOutDeviceProfileCvars.Add(FString::Printf(TEXT("r.SkipRedundantTransformUpdate=%d"), 0));
#Loc: <Workspace>/Engine/Plugins/MovieScene/MovieRenderPipeline/Source/MovieRenderPipelineCore/Private/Graph/Nodes/MovieGraphGlobalGameOverrides.cpp:147
Scope (from outer to inner):
file
function void UMovieGraphGlobalGameOverridesNode::ApplySettings
Source code excerpt:
// Disable systems that try to preserve performance in runtime games.
MOVIEPIPELINE_STORE_AND_OVERRIDE_CVAR_INT(PreviousAnimationUROEnabled, TEXT("a.URO.Enable"), 0, bOverrideValues);
// To make sure that the skylight is always valid and consistent across capture sessions, we enforce a full capture each frame, accepting a small GPU cost.
MOVIEPIPELINE_STORE_AND_OVERRIDE_CVAR_INT(PreviousSkyLightRealTimeReflectionCaptureTimeSlice, TEXT("r.SkyLight.RealTimeReflectionCapture.TimeSlice"), 0, bOverrideValues);
// Cloud are rendered using high quality volumetric render target mode 3: per pixel tracing and composition on screen, while supporting cloud on translucent.
MOVIEPIPELINE_STORE_AND_OVERRIDE_CVAR_INT(PreviousVolumetricRenderTarget, TEXT("r.VolumetricRenderTarget"), 1, bOverrideValues);
#Loc: <Workspace>/Engine/Plugins/MovieScene/MovieRenderPipeline/Source/MovieRenderPipelineCore/Private/MoviePipelineGameOverrideSetting.cpp:111
Scope (from outer to inner):
file
function void UMoviePipelineGameOverrideSetting::ApplyCVarSettings
Source code excerpt:
{
// Disable systems that try to preserve performance in runtime games.
MOVIEPIPELINE_STORE_AND_OVERRIDE_CVAR_INT(PreviousAnimationUROEnabled, TEXT("a.URO.Enable"), 0, bOverrideValues);
}
MOVIEPIPELINE_STORE_AND_OVERRIDE_CVAR_INT(PreviousNeverMuteNonRealtimeAudio, TEXT("au.NeverMuteNonRealtimeAudioDevices"), 1, bOverrideValues);
// To make sure that the skylight is always valid and consistent accross capture sessions, we enforce a full capture each frame, accepting a small GPU cost.
MOVIEPIPELINE_STORE_AND_OVERRIDE_CVAR_INT(PreviousSkyLightRealTimeReflectionCaptureTimeSlice, TEXT("r.SkyLight.RealTimeReflectionCapture.TimeSlice"), 0, bOverrideValues);
#Loc: <Workspace>/Engine/Plugins/MovieScene/MovieRenderPipeline/Source/MovieRenderPipelineCore/Private/MoviePipelineGameOverrideSetting.cpp:233
Scope (from outer to inner):
file
function void UMoviePipelineGameOverrideSetting::BuildNewProcessCommandLineArgsImpl
Source code excerpt:
{
InOutDeviceProfileCvars.Add(FString::Printf(TEXT("a.URO.Enable=%d"), 0));
}
InOutDeviceProfileCvars.Add(FString::Printf(TEXT("au.NeverMuteNonRealtimeAudioDevices=%d"), 1));
InOutDeviceProfileCvars.Add(FString::Printf(TEXT("r.SkyLight.RealTimeReflectionCapture.TimeSlice=%d"), 0));
InOutDeviceProfileCvars.Add(FString::Printf(TEXT("r.VolumetricRenderTarget=%d"), 1));
InOutDeviceProfileCvars.Add(FString::Printf(TEXT("r.VolumetricRenderTarget.Mode=%d"), 3));
#Associated Variable and Callsites
This variable is associated with another variable named CVarEnableAnimRateOptimization
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SkinnedMeshComponent.cpp:53
Scope: file
Source code excerpt:
);
static TAutoConsoleVariable<int32> CVarEnableAnimRateOptimization(
TEXT("a.URO.Enable"),
1,
TEXT("True to anim rate optimization."));
static TAutoConsoleVariable<int32> CVarDrawAnimRateOptimization(
TEXT("a.URO.Draw"),
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SkinnedMeshComponent.cpp:1356
Scope (from outer to inner):
file
function bool USkinnedMeshComponent::ShouldUseUpdateRateOptimizations
Source code excerpt:
bool USkinnedMeshComponent::ShouldUseUpdateRateOptimizations() const
{
return bEnableUpdateRateOptimizations && CVarEnableAnimRateOptimization.GetValueOnAnyThread() > 0;
}
void USkinnedMeshComponent::TickPose(float DeltaTime, bool bNeedsValidRootMotion)
{
OnTickPose.Broadcast(this, DeltaTime, bNeedsValidRootMotion);
TickUpdateRate(DeltaTime, bNeedsValidRootMotion);