r.Lumen.Visualize.CardInterpolateInfluenceRadius

r.Lumen.Visualize.CardInterpolateInfluenceRadius

#Overview

name: r.Lumen.Visualize.CardInterpolateInfluenceRadius

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.CardInterpolateInfluenceRadius is to control the visualization of the card interpolation influence radius in Lumen, Unreal Engine 5’s global illumination system.

This setting variable is primarily used in the Lumen visualization system, which is part of the rendering module in Unreal Engine 5. Based on the callsites, it’s specifically used in the LumenVisualize.cpp file, which suggests it’s part of the debugging and visualization tools for the Lumen system.

The value of this variable is set through the console variable system in Unreal Engine. It’s initialized with a default value of 10.0f and can be modified at runtime using console commands.

The variable interacts directly with its associated variable GVisualizeLumenSceneCardInterpolateInfluenceRadius. They share the same value, with the console variable acting as an interface to modify the global variable.

Developers should be aware that this variable is specifically for visualization purposes and doesn’t affect the actual Lumen lighting calculations. It’s a tool for debugging and inspecting the Lumen system’s behavior.

Best practices when using this variable include:

  1. Use it in conjunction with other Lumen visualization tools for a comprehensive understanding of the system.
  2. Adjust the value to better visualize the card interpolation influence at different scales.
  3. Remember that changes to this variable are render thread safe, meaning they can be made in real-time without causing threading issues.

Regarding the associated variable GVisualizeLumenSceneCardInterpolateInfluenceRadius:

The purpose of GVisualizeLumenSceneCardInterpolateInfluenceRadius is to store the actual value used in the visualization process. It’s a global float variable that directly affects the visualization parameters of the Lumen system.

This variable is used in the SetupVisualizeParameters function, where it’s assigned to VisualizeParameters.CardInterpolateInfluenceRadius. This suggests it’s a key parameter in setting up the visualization of Lumen’s card interpolation system.

The value of this variable is set by the console variable r.Lumen.Visualize.CardInterpolateInfluenceRadius, allowing for dynamic adjustments during runtime.

Developers should be aware that modifying this variable will directly affect the visualization output of the Lumen system. It’s important to use it in conjunction with other visualization parameters for a comprehensive understanding of the Lumen card interpolation process.

Best practices for using this variable include:

  1. Use it in combination with other Lumen visualization parameters for a holistic view of the system.
  2. Adjust its value to focus on different aspects of the card interpolation process during debugging.
  3. Be mindful of its impact on visualization performance, especially with extreme values.

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

Scope: file

Source code excerpt:

float GVisualizeLumenSceneCardInterpolateInfluenceRadius = 10.0f;
FAutoConsoleVariableRef CVarCardInterpolateInfluenceRadius(
	TEXT("r.Lumen.Visualize.CardInterpolateInfluenceRadius"),
	GVisualizeLumenSceneCardInterpolateInfluenceRadius,
	TEXT(""),
	ECVF_RenderThreadSafe
	);

static TAutoConsoleVariable<int> CVarVisualizeUseShaderPrintForTraces(

#Associated Variable and Callsites

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

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

Scope: file

Source code excerpt:

);

float GVisualizeLumenSceneCardInterpolateInfluenceRadius = 10.0f;
FAutoConsoleVariableRef CVarCardInterpolateInfluenceRadius(
	TEXT("r.Lumen.Visualize.CardInterpolateInfluenceRadius"),
	GVisualizeLumenSceneCardInterpolateInfluenceRadius,
	TEXT(""),
	ECVF_RenderThreadSafe
	);

static TAutoConsoleVariable<int> CVarVisualizeUseShaderPrintForTraces(
	TEXT("r.Lumen.Visualize.UseShaderPrintForTraces"),

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

Scope (from outer to inner):

file
function     void SetupVisualizeParameters

Source code excerpt:

		VisualizeParameters.MinTraceDistance = FMath::Clamp(GVisualizeLumenSceneMinTraceDistance, .01f, 1000.0f);
		VisualizeParameters.MaxTraceDistance = FMath::Clamp(MaxTraceDistance, .01f, Lumen::MaxTraceDistance);
		VisualizeParameters.CardInterpolateInfluenceRadius = GVisualizeLumenSceneCardInterpolateInfluenceRadius;
		VisualizeParameters.MaxMeshSDFTraceDistanceForVoxelTracing = FMath::Clamp(MaxMeshSDFTraceDistance, VisualizeParameters.MinTraceDistance, VisualizeParameters.MaxTraceDistance);
		VisualizeParameters.MaxMeshSDFTraceDistance = FMath::Clamp(MaxMeshSDFTraceDistance, VisualizeParameters.MinTraceDistance, VisualizeParameters.MaxTraceDistance);
		VisualizeParameters.HeightfieldMaxTracingSteps = Lumen::GetHeightfieldMaxTracingSteps();
	}
}