r.Lumen.TranslucencyVolume.MaxRayIntensity
r.Lumen.TranslucencyVolume.MaxRayIntensity
#Overview
name: r.Lumen.TranslucencyVolume.MaxRayIntensity
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Lumen.TranslucencyVolume.MaxRayIntensity is to control the maximum intensity of rays in the Lumen translucency volume lighting system. This setting is part of Unreal Engine 5’s Lumen global illumination system, specifically focusing on the rendering of translucent objects.
This setting variable is primarily used in the Lumen subsystem of Unreal Engine’s rendering module. Based on the callsites, it’s clear that this variable is utilized in the LumenTranslucencyVolumeLighting.cpp file, which is part of the Renderer’s private implementation.
The value of this variable is set through the Unreal Engine’s console variable system. It’s initialized with a default value of 20.0f and can be modified at runtime using the console command system.
The associated variable GTranslucencyVolumeMaxRayIntensity directly interacts with r.Lumen.TranslucencyVolume.MaxRayIntensity. They share the same value, with GTranslucencyVolumeMaxRayIntensity being the C++ variable used in the engine’s code to access this setting.
Developers should be aware that this variable affects the intensity clamping of light rays in the translucency volume. Setting this value too low might result in underlit translucent objects, while setting it too high could lead to oversaturation or performance issues.
Best practices when using this variable include:
- Adjusting it carefully to balance between visual quality and performance.
- Testing its impact on various translucent materials in different lighting conditions.
- Considering its interaction with other Lumen settings for optimal results.
Regarding the associated variable GTranslucencyVolumeMaxRayIntensity:
- Its purpose is to provide direct access to the max ray intensity value within the C++ code.
- It’s used in the ComputeLumenTranslucencyGIVolume function of the FDeferredShadingSceneRenderer class.
- Its value is set by the console variable system and can be modified at runtime.
- It directly affects the MaxRayIntensity parameter in the TraceSetupParameters structure.
- Developers should be aware that modifying this variable directly in code would be overridden by the console variable system unless proper precautions are taken.
- Best practices include using this variable for read-only purposes in most cases and relying on the console variable for value changes.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenTranslucencyVolumeLighting.cpp:140
Scope: file
Source code excerpt:
float GTranslucencyVolumeMaxRayIntensity = 20.0f;
FAutoConsoleVariableRef CVarTranslucencyVolumeMaxRayIntensity(
TEXT("r.Lumen.TranslucencyVolume.MaxRayIntensity"),
GTranslucencyVolumeMaxRayIntensity,
TEXT("."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
int32 GLumenTranslucencyVolumeRadianceCache = 1;
#Associated Variable and Callsites
This variable is associated with another variable named GTranslucencyVolumeMaxRayIntensity
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenTranslucencyVolumeLighting.cpp:138
Scope: file
Source code excerpt:
);
float GTranslucencyVolumeMaxRayIntensity = 20.0f;
FAutoConsoleVariableRef CVarTranslucencyVolumeMaxRayIntensity(
TEXT("r.Lumen.TranslucencyVolume.MaxRayIntensity"),
GTranslucencyVolumeMaxRayIntensity,
TEXT("."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
int32 GLumenTranslucencyVolumeRadianceCache = 1;
FAutoConsoleVariableRef CVarLumenTranslucencyVolumeRadianceCache(
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenTranslucencyVolumeLighting.cpp:773
Scope (from outer to inner):
file
function void FDeferredShadingSceneRenderer::ComputeLumenTranslucencyGIVolume
Source code excerpt:
TraceSetupParameters.MaxTraceDistance = Lumen::GetMaxTraceDistance(View);
TraceSetupParameters.VoxelTraceStartDistanceScale = GTranslucencyVolumeVoxelTraceStartDistanceScale;
TraceSetupParameters.MaxRayIntensity = GTranslucencyVolumeMaxRayIntensity;
}
const FIntVector OctahedralAtlasSize(
TranslucencyGridSize.X * GTranslucencyVolumeTracingOctahedronResolution,
TranslucencyGridSize.Y * GTranslucencyVolumeTracingOctahedronResolution,
TranslucencyGridSize.Z);