r.LumenScene.Radiosity.HemisphereProbeResolution
r.LumenScene.Radiosity.HemisphereProbeResolution
#Overview
name: r.LumenScene.Radiosity.HemisphereProbeResolution
The value of this variable can be defined or overridden in .ini config files. 3
.ini config files referencing this setting variable.
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Number of traces along one dimension of the hemisphere probe layout.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.LumenScene.Radiosity.HemisphereProbeResolution is to control the resolution of hemisphere probes used in Lumen’s radiosity calculations for global illumination in Unreal Engine 5’s rendering system.
This setting variable is primarily used by the Lumen rendering subsystem, specifically in the radiosity component of Lumen’s global illumination solution. It’s part of the Renderer module of Unreal Engine 5.
The value of this variable is set through the console variable system, as indicated by the FAutoConsoleVariableRef declaration. It can be modified at runtime or set in configuration files.
The associated variable GLumenRadiosityHemisphereProbeResolution directly interacts with this setting. They share the same value, with GLumenRadiosityHemisphereProbeResolution being the C++ variable that’s used in the actual rendering code.
Developers should be aware that this variable affects the quality and performance of Lumen’s radiosity calculations. A higher value will result in more accurate lighting but at the cost of increased performance overhead.
Best practices for using this variable include:
- Adjusting it based on the project’s performance requirements and visual quality needs.
- Testing different values to find the optimal balance between quality and performance for your specific scene.
- Considering scaling this value based on different quality settings in your game.
Regarding the associated variable GLumenRadiosityHemisphereProbeResolution:
The purpose of GLumenRadiosityHemisphereProbeResolution is to store and provide access to the hemisphere probe resolution value within the C++ code of the Lumen radiosity system.
This variable is used directly in the Lumen radiosity calculations, specifically in the GetHemisphereProbeResolution function within the LumenRadiosity namespace.
The value of this variable is set by the console variable system, linked to the r.LumenScene.Radiosity.HemisphereProbeResolution setting.
It interacts with the LumenSceneLightingQuality post-processing setting, as seen in the GetHemisphereProbeResolution function where the final value is calculated based on both GLumenRadiosityHemisphereProbeResolution and LumenSceneLightingQuality.
Developers should be aware that modifying GLumenRadiosityHemisphereProbeResolution directly in code is not recommended, as it’s meant to be controlled via the console variable system.
Best practices for using this variable include:
- Accessing it through the appropriate Lumen API functions rather than directly.
- Being aware of its impact on performance and adjusting related systems accordingly.
- Considering its interaction with other Lumen settings when optimizing rendering performance and quality.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseScalability.ini:275, section: [GlobalIlluminationQuality@2]
- INI Section:
GlobalIlluminationQuality@2
- Raw value:
3
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:298, section: [GlobalIlluminationQuality@3]
- INI Section:
GlobalIlluminationQuality@3
- Raw value:
4
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:322, section: [GlobalIlluminationQuality@Cine]
- INI Section:
GlobalIlluminationQuality@Cine
- Raw value:
4
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenRadiosity.cpp:33
Scope: file
Source code excerpt:
int32 GLumenRadiosityHemisphereProbeResolution = 4;
FAutoConsoleVariableRef CVarLumenRadiosityHemisphereProbeResolution(
TEXT("r.LumenScene.Radiosity.HemisphereProbeResolution"),
GLumenRadiosityHemisphereProbeResolution,
TEXT("Number of traces along one dimension of the hemisphere probe layout."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
int32 GLumenRadiositySpatialFilterProbes = 1;
#Associated Variable and Callsites
This variable is associated with another variable named GLumenRadiosityHemisphereProbeResolution
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenRadiosity.cpp:31
Scope: file
Source code excerpt:
);
int32 GLumenRadiosityHemisphereProbeResolution = 4;
FAutoConsoleVariableRef CVarLumenRadiosityHemisphereProbeResolution(
TEXT("r.LumenScene.Radiosity.HemisphereProbeResolution"),
GLumenRadiosityHemisphereProbeResolution,
TEXT("Number of traces along one dimension of the hemisphere probe layout."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
int32 GLumenRadiositySpatialFilterProbes = 1;
FAutoConsoleVariableRef CVarLumenRadiositySpatialFilterProbes(
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenRadiosity.cpp:200
Scope (from outer to inner):
file
namespace LumenRadiosity
function int32 GetHemisphereProbeResolution
Source code excerpt:
{
const float LumenSceneLightingQuality = FMath::Clamp<float>(View.FinalPostProcessSettings.LumenSceneLightingQuality, .5f, 4.0f);
return FMath::Clamp<int32>(GLumenRadiosityHemisphereProbeResolution * FMath::Sqrt(LumenSceneLightingQuality), 1, 16);
}
bool UseTemporalAccumulation()
{
return GLumenRadiosityTemporalAccumulation != 0
&& UE::PixelFormat::HasCapabilities(Lumen::GetIndirectLightingAtlasFormat(), EPixelFormatCapabilities::TypedUAVLoad)