GPUSkinCacheVisualizationExcludedColor

GPUSkinCacheVisualizationExcludedColor

#Overview

name: GPUSkinCacheVisualizationExcludedColor

The value of this variable can be defined or overridden in .ini config files. 1 .ini config file referencing this setting variable.

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of GPUSkinCacheVisualizationExcludedColor is to define the visualization color for skeletal meshes that are not using the GPU skin cache in Unreal Engine 5. This variable is part of the engine’s debugging and visualization system, specifically for the GPU skin cache feature.

This setting variable is primarily used in the Engine module, particularly within the GPU skin cache subsystem. It’s referenced in the UEngine class and the GPUSkinCache implementation.

The value of this variable is set through the UPROPERTY(globalconfig) macro in the UEngine class, which means it can be configured globally in the engine’s configuration files.

GPUSkinCacheVisualizationExcludedColor interacts with other related variables such as GPUSkinCacheVisualizationIncludedColor and GPUSkinCacheVisualizationRecomputeTangentsColor. These variables work together to provide a color-coded visualization of the GPU skin cache usage across different skeletal meshes in the scene.

Developers should be aware that this variable is used for debugging and visualization purposes only. It doesn’t affect the actual performance or functionality of the GPU skin cache. The color defined by this variable will be used to highlight skeletal meshes that are not utilizing the GPU skin cache in the visualization mode.

Best practices when using this variable include:

  1. Choose a distinct color that clearly differentiates excluded meshes from included ones in the visualization.
  2. Ensure the chosen color provides good contrast against the scene background for easy identification.
  3. Use this visualization in conjunction with performance profiling tools to identify potential optimization opportunities for skeletal mesh rendering.
  4. Remember to disable the visualization in production builds to avoid any potential performance overhead.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:263, section: [/Script/Engine.Engine]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/Engine/Engine.h:1220

Scope (from outer to inner):

file
class        class UEngine : public UObject , public FExec

Source code excerpt:

	/** The visualization color when sk mesh not using skin cache. */
	UPROPERTY(globalconfig)
	FLinearColor GPUSkinCacheVisualizationExcludedColor;

	/** The visualization color when sk mesh using skin cache. */
	UPROPERTY(globalconfig)
	FLinearColor GPUSkinCacheVisualizationIncludedColor;

	/** The visualization color when sk mesh using recompute tangents. */

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/GPUSkinCache.cpp:2460

Scope (from outer to inner):

file
function     FColor FGPUSkinCache::GetVisualizationDebugColor

Source code excerpt:

			return Entry ? 
				   (bRecomputeTangent ? GEngine->GPUSkinCacheVisualizationRecomputeTangentsColor.QuantizeRound() : GEngine->GPUSkinCacheVisualizationIncludedColor.QuantizeRound()) : 
				   GEngine->GPUSkinCacheVisualizationExcludedColor.QuantizeRound();
		}
		else if (ModeType == FGPUSkinCacheVisualizationData::FModeType::Memory)
		{
			uint64 MemoryInBytes = (Entry && Entry->PositionAllocation) ? Entry->PositionAllocation->GetNumBytes() : 0;
#if RHI_RAYTRACING
			if (RayTracingEntry && RayTracingEntry != Entry)

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/GPUSkinCache.cpp:2512

Scope (from outer to inner):

file
function     void FGPUSkinCache::DrawVisualizationInfoText

Source code excerpt:

			DrawText(TEXT("Skin Cache Visualization - Overview"), FColor::White);
			DrawText(TEXT("Non SK mesh"), FColor::White);
			DrawText(TEXT("SK Skin Cache Excluded"), GEngine->GPUSkinCacheVisualizationExcludedColor.QuantizeRound());
			DrawText(TEXT("SK Skin Cache Included"), GEngine->GPUSkinCacheVisualizationIncludedColor.QuantizeRound());
			DrawText(TEXT("SK Recompute Tangent ON"), GEngine->GPUSkinCacheVisualizationRecomputeTangentsColor.QuantizeRound());
		}
		else if (ModeType == FGPUSkinCacheVisualizationData::FModeType::Memory)
		{
			float UsedMemoryInMB = UsedMemoryInBytes / MBSize;