r.Lumen.Visualize.CardPlacement
r.Lumen.Visualize.CardPlacement
#Overview
name: r.Lumen.Visualize.CardPlacement
This variable is created as a Console Variable (cvar).
- type:
Var
- help: ``
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Lumen.Visualize.CardPlacement is to enable visualization of card placement in the Lumen global illumination system within Unreal Engine 5. This setting is part of the rendering system, specifically the Lumen subsystem, which is responsible for real-time global illumination.
This setting variable is primarily used in the Renderer module of Unreal Engine 5, particularly within the Lumen visualization system. It’s referenced in the LumenVisualize.cpp file, which suggests it’s used for debugging and visualization purposes.
The value of this variable is set through the console variable system in Unreal Engine. It’s declared as an FAutoConsoleVariableRef, which means it can be modified at runtime through console commands or configuration files.
The associated variable GVisualizeLumenCardPlacement directly interacts with r.Lumen.Visualize.CardPlacement. They share the same value, with GVisualizeLumenCardPlacement being the actual integer variable used in the code to control the visualization.
Developers should be aware that this is a visualization tool, primarily used for debugging and understanding the Lumen system’s card placement. It’s not intended for use in final, shipped versions of games. The visualization is only active when the value is non-zero.
Best practices when using this variable include:
- Use it during development and debugging phases, not in production builds.
- Combine it with other Lumen visualization tools for a comprehensive understanding of the system.
- Be aware that enabling visualizations may impact performance, so use it judiciously.
Regarding the associated variable GVisualizeLumenCardPlacement:
- Its purpose is to serve as the actual flag controlling the card placement visualization in the code.
- It’s used within the Lumen subsystem of the Renderer module.
- Its value is set by the r.Lumen.Visualize.CardPlacement console variable.
- It interacts directly with the console variable system and the Lumen visualization code.
- Developers should be aware that this is an internal variable and should not be modified directly in code. Instead, they should use the console variable to control it.
- Best practice is to treat this as a read-only variable in code and rely on the console variable system for modifications.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenVisualize.cpp:179
Scope: file
Source code excerpt:
int32 GVisualizeLumenCardPlacement = 0;
FAutoConsoleVariableRef CVarVisualizeLumenSceneCardPlacement(
TEXT("r.Lumen.Visualize.CardPlacement"),
GVisualizeLumenCardPlacement,
TEXT(""),
ECVF_RenderThreadSafe
);
float GVisualizeLumenCardPlacementDistance = 5000.0f;
#Associated Variable and Callsites
This variable is associated with another variable named GVisualizeLumenCardPlacement
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenVisualize.cpp:177
Scope: file
Source code excerpt:
);
int32 GVisualizeLumenCardPlacement = 0;
FAutoConsoleVariableRef CVarVisualizeLumenSceneCardPlacement(
TEXT("r.Lumen.Visualize.CardPlacement"),
GVisualizeLumenCardPlacement,
TEXT(""),
ECVF_RenderThreadSafe
);
float GVisualizeLumenCardPlacementDistance = 5000.0f;
FAutoConsoleVariableRef CVarVisualizeLumenSceneCardPlacementDistance(
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenVisualize.cpp:1135
Scope (from outer to inner):
file
function void VisualizeCardPlacement
Source code excerpt:
void VisualizeCardPlacement(FSceneRenderingBulkObjectAllocator& Allocator, const FViewInfo& View, const FLumenSceneData& LumenSceneData, FViewElementPDI& ViewPDI)
{
if (GVisualizeLumenCardPlacement == 0)
{
return;
}
FConvexVolume ViewFrustum;
GetViewFrustumBounds(ViewFrustum, View.ViewMatrices.GetViewProjectionMatrix(), true);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenVisualize.cpp:1336
Scope (from outer to inner):
file
function void FDeferredShadingSceneRenderer::LumenScenePDIVisualization
Source code excerpt:
if (bAnyLumenEnabled)
{
if (GVisualizeLumenCardPlacement != 0
|| GVisualizeLumenRayTracingGroups != 0
|| GVisualizeLumenCardGenerationCluster != 0
|| GVisualizeLumenCardGenerationSurfels != 0)
{
FViewElementPDI ViewPDI(&Views[0], nullptr, &Views[0].DynamicPrimitiveCollector);
VisualizeRayTracingGroups(Views[0], LumenSceneData, ViewPDI);