r.Lumen.Visualize.CardPlacementPrimitives

r.Lumen.Visualize.CardPlacementPrimitives

#Overview

name: r.Lumen.Visualize.CardPlacementPrimitives

This variable is created as a Console Variable (cvar).

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of r.Lumen.Visualize.CardPlacementPrimitives is to control the visualization of primitive bounding boxes in the Lumen global illumination system of Unreal Engine 5. This setting is part of the rendering system, specifically the Lumen visualization tools.

This setting variable is primarily used in the Renderer module of Unreal Engine, specifically within the Lumen subsystem. It’s utilized in the LumenVisualize.cpp file, which suggests it’s part of the debugging and visualization tools for the Lumen global illumination system.

The value of this variable is set through the Unreal Engine console variable system. It’s defined as an FAutoConsoleVariableRef, which means it can be changed at runtime through console commands or configuration files.

This variable interacts directly with its associated variable GVisualizeLumenCardPlacementPrimitives. They share the same value and are used interchangeably in the code.

Developers must be aware that this is a visualization tool, primarily used for debugging and development purposes. It should not be enabled in shipping builds as it may impact performance.

Best practices when using this variable include:

  1. Use it only during development and debugging phases.
  2. Be aware that enabling this visualization may impact performance, especially in complex scenes.
  3. Use it in conjunction with other Lumen visualization tools for a comprehensive understanding of the Lumen system’s behavior.

Regarding the associated variable GVisualizeLumenCardPlacementPrimitives:

The purpose of GVisualizeLumenCardPlacementPrimitives is the same as r.Lumen.Visualize.CardPlacementPrimitives - to control the visualization of primitive bounding boxes in the Lumen system.

It’s used in the same Renderer module and Lumen subsystem. The value is set through the console variable system, just like r.Lumen.Visualize.CardPlacementPrimitives.

This variable is directly checked in the VisualizeCardPlacement function to determine whether to draw the bounds of primitives that make up the current card.

Developers should be aware that this is an internal variable used to implement the functionality controlled by the console variable. It’s not typically manipulated directly but rather through the console variable system.

Best practices for this variable are similar to those for r.Lumen.Visualize.CardPlacementPrimitives, as they serve the same purpose and are directly linked.

#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:207

Scope: file

Source code excerpt:

int32 GVisualizeLumenCardPlacementPrimitives = 0;
FAutoConsoleVariableRef CVarVisualizeLumenSceneCardPlacementPrimitives(
	TEXT("r.Lumen.Visualize.CardPlacementPrimitives"),
	GVisualizeLumenCardPlacementPrimitives,
	TEXT("Whether to visualize primitive bounding boxes.\n"),
	ECVF_RenderThreadSafe
);

int32 GVisualizeLumenRayTracingGroups = 0;

#Associated Variable and Callsites

This variable is associated with another variable named GVisualizeLumenCardPlacementPrimitives. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenVisualize.cpp:205

Scope: file

Source code excerpt:

);

int32 GVisualizeLumenCardPlacementPrimitives = 0;
FAutoConsoleVariableRef CVarVisualizeLumenSceneCardPlacementPrimitives(
	TEXT("r.Lumen.Visualize.CardPlacementPrimitives"),
	GVisualizeLumenCardPlacementPrimitives,
	TEXT("Whether to visualize primitive bounding boxes.\n"),
	ECVF_RenderThreadSafe
);

int32 GVisualizeLumenRayTracingGroups = 0;
FAutoConsoleVariableRef CVarVisualizeLumenRayTracingGroups(

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenVisualize.cpp:1203

Scope (from outer to inner):

file
function     void VisualizeCardPlacement

Source code excerpt:


					// Visualize bounds of primitives which make current card
					if (GVisualizeLumenCardPlacementPrimitives != 0 && PrimitiveGroup.HasMergedInstances())
					{
						DrawPrimitiveBounds(PrimitiveGroup, CardColor, ViewPDI);
					}

					// Draw card "projection face"
					{