r.SceneCapture.OverrideOrthographicTilingValues
r.SceneCapture.OverrideOrthographicTilingValues
#Overview
name: r.SceneCapture.OverrideOrthographicTilingValues
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Override defined orthographic values from SceneCaptureComponent2D - Ignored in Perspective mode.
It is referenced in 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.SceneCapture.OverrideOrthographicTilingValues is to control whether to override the defined orthographic values from SceneCaptureComponent2D in Unreal Engine 5. This setting is specifically related to the rendering system, particularly for scene capture components.
This setting variable is primarily used in the Engine module, specifically within the SceneCaptureComponent implementation. It affects the behavior of USceneCaptureComponent2D, which is part of Unreal Engine’s rendering system for capturing scenes.
The value of this variable is set as a console variable (CVarSCOverrideOrthographicTilingValues) with a default value of false. It can be changed at runtime through the console or configuration files.
This variable interacts with several other variables and functions:
- CVarSCEnableOrthographicTiling
- CVarSCOrthographicNumXTiles
- CVarSCOrthographicNumYTiles
- bEnableOrthographicTiling (a member of USceneCaptureComponent2D)
- NumXTiles and NumYTiles (members of USceneCaptureComponent2D)
Developers must be aware that this variable only affects orthographic projections and is ignored in perspective mode. When enabled, it overrides the values set in the USceneCaptureComponent2D for orthographic tiling.
Best practices when using this variable include:
- Use it for debugging or performance optimization purposes.
- Be cautious when enabling it in production, as it may affect the visual output of scene captures.
- Ensure that the overridden values (controlled by CVarSCOrthographicNumXTiles and CVarSCOrthographicNumYTiles) are appropriate for your use case.
Regarding the associated variable CVarSCOverrideOrthographicTilingValues:
The purpose of CVarSCOverrideOrthographicTilingValues is to implement the r.SceneCapture.OverrideOrthographicTilingValues setting as a console variable. It’s used internally by the SceneCaptureComponent to determine whether to use the overridden values or the component’s default values.
This variable is used in the Engine module, specifically within the SceneCaptureComponent implementation. It’s referenced in methods like GetEnableOrthographicTiling, GetNumXTiles, and GetNumYTiles of USceneCaptureComponent2D.
The value of this variable is set when the console variable is created, with a default value of false. It can be changed at runtime through the console or configuration files.
Developers should be aware that this variable directly controls the behavior of orthographic tiling in scene captures. When true, it causes the component to use values from other console variables instead of its own properties.
Best practices for using this variable include:
- Use it in conjunction with the other related console variables (CVarSCEnableOrthographicTiling, CVarSCOrthographicNumXTiles, CVarSCOrthographicNumYTiles) for consistent behavior.
- Be mindful of its performance implications, especially when frequently toggling its value.
- Consider exposing it as a configurable option in your game’s settings if orthographic tiling control is a desired feature for end-users or level designers.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SceneCaptureComponent.cpp:46
Scope: file
Source code excerpt:
static TAutoConsoleVariable<bool> CVarSCOverrideOrthographicTilingValues(
TEXT("r.SceneCapture.OverrideOrthographicTilingValues"),
false,
TEXT("Override defined orthographic values from SceneCaptureComponent2D - Ignored in Perspective mode."),
ECVF_Scalability);
static TAutoConsoleVariable<bool> CVarSCEnableOrthographicTiling(
TEXT("r.SceneCapture.EnableOrthographicTiling"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarSCOverrideOrthographicTilingValues
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SceneCaptureComponent.cpp:45
Scope: file
Source code excerpt:
static FCriticalSection SceneCapturesToUpdateMapCS;
static TAutoConsoleVariable<bool> CVarSCOverrideOrthographicTilingValues(
TEXT("r.SceneCapture.OverrideOrthographicTilingValues"),
false,
TEXT("Override defined orthographic values from SceneCaptureComponent2D - Ignored in Perspective mode."),
ECVF_Scalability);
static TAutoConsoleVariable<bool> CVarSCEnableOrthographicTiling(
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SceneCaptureComponent.cpp:887
Scope (from outer to inner):
file
function bool USceneCaptureComponent2D::GetEnableOrthographicTiling
Source code excerpt:
bool USceneCaptureComponent2D::GetEnableOrthographicTiling() const
{
if (!CVarSCOverrideOrthographicTilingValues->GetBool())
{
return bEnableOrthographicTiling;
}
return CVarSCEnableOrthographicTiling->GetBool();
}
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SceneCaptureComponent.cpp:897
Scope (from outer to inner):
file
function int32 USceneCaptureComponent2D::GetNumXTiles
Source code excerpt:
int32 USceneCaptureComponent2D::GetNumXTiles() const
{
if (!CVarSCOverrideOrthographicTilingValues->GetBool())
{
return NumXTiles;
}
int32 NumXTilesLocal = CVarSCOrthographicNumXTiles->GetInt();
return FMath::Clamp(NumXTilesLocal, 1, 64);
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SceneCaptureComponent.cpp:908
Scope (from outer to inner):
file
function int32 USceneCaptureComponent2D::GetNumYTiles
Source code excerpt:
int32 USceneCaptureComponent2D::GetNumYTiles() const
{
if (!CVarSCOverrideOrthographicTilingValues->GetBool())
{
return NumYTiles;
}
int32 NumYTilesLocal = CVarSCOrthographicNumYTiles->GetInt();
return FMath::Clamp(NumYTilesLocal, 1, 64);