r.Lumen.Visualize.CardGenerationSurfelScale

r.Lumen.Visualize.CardGenerationSurfelScale

#Overview

name: r.Lumen.Visualize.CardGenerationSurfelScale

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.CardGenerationSurfelScale is to control the scale of surfels during the visualization of Lumen card generation. This setting variable is part of Unreal Engine 5’s Lumen global illumination system, specifically for debugging and visualization purposes.

This setting variable is primarily used in the Lumen visualization subsystem within the Renderer module of Unreal Engine 5. It’s particularly relevant for developers working on or debugging 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 allows it to be modified at runtime through console commands or configuration files.

The associated variable GVisualizeLumenCardGenerationSurfelScale interacts directly with r.Lumen.Visualize.CardGenerationSurfelScale. They share the same value, with GVisualizeLumenCardGenerationSurfelScale being the actual float variable used in the code.

Developers must be aware that this variable is specifically for visualization purposes and should not be used to adjust the actual Lumen card generation process. It’s a tool for debugging and understanding the surfel generation in Lumen, not for affecting the final rendering output.

Best practices when using this variable include:

  1. Use it only for debugging and visualization purposes.
  2. Adjust the value to clearly see the surfels without obscuring other important visual information.
  3. Remember to reset it to its default value (1.0f) when not actively debugging to avoid confusion.

Regarding the associated variable GVisualizeLumenCardGenerationSurfelScale:

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

Scope: file

Source code excerpt:

float GVisualizeLumenCardGenerationSurfelScale = 1.0f;
FAutoConsoleVariableRef CVarVisualizeLumenSceneCardGenerationSurfelScale(
	TEXT("r.Lumen.Visualize.CardGenerationSurfelScale"),
	GVisualizeLumenCardGenerationSurfelScale,
	TEXT(""),
	ECVF_RenderThreadSafe
);

float GVisualizeLumenCardGenerationClusterScale = 1.0f;

#Associated Variable and Callsites

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

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

Scope: file

Source code excerpt:

);

float GVisualizeLumenCardGenerationSurfelScale = 1.0f;
FAutoConsoleVariableRef CVarVisualizeLumenSceneCardGenerationSurfelScale(
	TEXT("r.Lumen.Visualize.CardGenerationSurfelScale"),
	GVisualizeLumenCardGenerationSurfelScale,
	TEXT(""),
	ECVF_RenderThreadSafe
);

float GVisualizeLumenCardGenerationClusterScale = 1.0f;
FAutoConsoleVariableRef CVarVisualizeLumenSceneCardGenerationClusterScale(

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

Scope (from outer to inner):

file
function     void DrawSurfels

Source code excerpt:

			for (int32 SideIndex = 0; SideIndex < NumSides; ++SideIndex)
			{
				const FVector3f VertexPosition = DiskPosition + (AxisX * FMath::Cos(AngleDelta * (SideIndex)) + AxisY * FMath::Sin(AngleDelta * (SideIndex))) * SurfelRadius * GVisualizeLumenCardGenerationSurfelScale;

				MeshBuilder.AddVertex(VertexPosition, FVector2f(0, 0), FVector3f(1, 0, 0), FVector3f(0, 1, 0), FVector3f(0, 0, 1), FColor::White);
			}

			for (int32 SideIndex = 0; SideIndex < NumSides - 1; ++SideIndex)
			{