ShowFlag.ActorColoration

ShowFlag.ActorColoration

#Overview

name: ShowFlag.ActorColoration

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

It is referenced in 11 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of ShowFlag.ActorColoration is to enable rendering of objects with colors based on what the actors’ coloring handlers provide. This setting is primarily used for debugging and visualization purposes in the Unreal Engine’s rendering system.

Regarding the associated variable ActorColoration:

The purpose of ActorColoration is the same as ShowFlag.ActorColoration. It is used within the engine’s code to check if the actor coloration feature is enabled.

Both variables work together to provide a powerful visualization tool for developers, allowing them to quickly identify and debug actor-related issues in the scene.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:283

Scope: file

Source code excerpt:

SHOWFLAG_ALWAYS_ACCESSIBLE(Game, SFG_Hidden, NSLOCTEXT("UnrealEd", "GameSF", "Game"))
/** Render objects with colors based on what the actors coloring handlers provides */
SHOWFLAG_FIXED_IN_SHIPPING(0, ActorColoration, SFG_Transient, NSLOCTEXT("UnrealEd", "ActorColorationSF", "Actor Coloration"))
/** Draws BSP brushes (in game or editor textured triangles usually with lightmaps), for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(BSP, SFG_Normal, NSLOCTEXT("UnrealEd", "BSPSF", "BSP"))
/** Collision drawing */
SHOWFLAG_FIXED_IN_SHIPPING(0, Collision, SFG_Normal, NSLOCTEXT("UnrealEd", "CollisionWireFrame", "Collision"))
/** Collision blocking visibility against complex **/
SHOWFLAG_FIXED_IN_SHIPPING(0, CollisionVisibility, SFG_Hidden, NSLOCTEXT("UnrealEd", "CollisionVisibility", "Visibility"))

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Plugins/Runtime/GeometryCache/Source/GeometryCache/Private/GeometryCacheSceneProxy.cpp:409

Scope (from outer to inner):

file
function     void FGeometryCacheSceneProxy::GetDynamicMeshElements

Source code excerpt:

	{
		const FEngineShowFlags& EngineShowFlags = ViewFamily.EngineShowFlags;
		const bool bActorColorationEnabled = EngineShowFlags.ActorColoration;

		const FLinearColor WireColor = bOverrideWireframeColor ? WireframeOverrideColor : GetWireframeColor();
		const FLinearColor ViewWireframeColor(bActorColorationEnabled ? GetPrimitiveColor() : WireColor);

		WireframeMaterialInstance = new FColoredMaterialRenderProxy(
			GEngine->WireframeMaterial ? GEngine->WireframeMaterial->GetRenderProxy() : nullptr,

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/BillboardComponent.cpp:178

Scope (from outer to inner):

file
class        class FSpriteSceneProxy final : public FPrimitiveSceneProxy
function     virtual void GetDynamicMeshElements

Source code excerpt:

					ColorToUse.A = 1.0f;

					const FLinearColor& SpriteColor = View->Family->EngineShowFlags.ActorColoration ? PrimitiveColorToUse : ColorToUse;

					Collector.GetPDI(ViewIndex)->DrawSprite(
						Origin,
						ViewedSizeX,
						ViewedSizeY,
						TextureResource,

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/BrushComponent.cpp:220

Scope (from outer to inner):

file
class        class FBrushSceneProxy final : public FPrimitiveSceneProxy
function     virtual void GetDynamicMeshElements

Source code excerpt:

						DrawColor = BrushColor;
					}
					else if(View->Family->EngineShowFlags.ActorColoration)
					{
						DrawColor = ActorColor;
					}


					// SOLID

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/PrimitiveDrawingUtils.cpp:1541

Scope (from outer to inner):

file
function     bool IsRichView

Source code excerpt:

		ViewFamily.EngineShowFlags.LightInfluences ||
		ViewFamily.EngineShowFlags.Wireframe ||
		ViewFamily.EngineShowFlags.ActorColoration ||
		ViewFamily.EngineShowFlags.LODColoration ||
		ViewFamily.EngineShowFlags.HLODColoration ||
		ViewFamily.EngineShowFlags.MassProperties )
	{
		return true;
	}

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/PrimitiveDrawingUtils.cpp:1577

Scope (from outer to inner):

file
function     void ApplyViewModeOverrides

Source code excerpt:

		// with the level color if level coloration is enabled.
		FLinearColor BaseColor( PrimitiveSceneProxy->GetWireframeColor() );
		if (EngineShowFlags.ActorColoration)
		{
			BaseColor = PrimitiveSceneProxy->GetPrimitiveColor();
		}

		if (bMaterialModifiesMeshPosition)
		{

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/PrimitiveDrawingUtils.cpp:1660

Scope (from outer to inner):

file
function     void ApplyViewModeOverrides

Source code excerpt:

	else
	{	
		if (EngineShowFlags.ActorColoration)
		{
			const FLinearColor SelectionColor = GetSelectionColor(PrimitiveSceneProxy->GetPrimitiveColor(), bSelected, PrimitiveSceneProxy->IsHovered());
			FMaterialRenderProxy* LevelColorationMaterialInstance = nullptr;

			if (bMaterialModifiesMeshPosition)
			{

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/StaticMeshRender.cpp:1480

Scope (from outer to inner):

file
function     void FStaticMeshSceneProxy::GetDynamicMeshElements

Source code excerpt:

		// how we should draw the collision for this mesh.
		const bool bIsWireframeView = EngineShowFlags.Wireframe;
		const bool bActorColorationEnabled = EngineShowFlags.ActorColoration;
		const ERHIFeatureLevel::Type FeatureLevel = ViewFamily.GetFeatureLevel();

		for (int32 ViewIndex = 0; ViewIndex < Views.Num(); ViewIndex++)
		{
			const FSceneView* View = Views[ViewIndex];

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:283

Scope: file

Source code excerpt:

SHOWFLAG_ALWAYS_ACCESSIBLE(Game, SFG_Hidden, NSLOCTEXT("UnrealEd", "GameSF", "Game"))
/** Render objects with colors based on what the actors coloring handlers provides */
SHOWFLAG_FIXED_IN_SHIPPING(0, ActorColoration, SFG_Transient, NSLOCTEXT("UnrealEd", "ActorColorationSF", "Actor Coloration"))
/** Draws BSP brushes (in game or editor textured triangles usually with lightmaps), for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(BSP, SFG_Normal, NSLOCTEXT("UnrealEd", "BSPSF", "BSP"))
/** Collision drawing */
SHOWFLAG_FIXED_IN_SHIPPING(0, Collision, SFG_Normal, NSLOCTEXT("UnrealEd", "CollisionWireFrame", "Collision"))
/** Collision blocking visibility against complex **/
SHOWFLAG_FIXED_IN_SHIPPING(0, CollisionVisibility, SFG_Hidden, NSLOCTEXT("UnrealEd", "CollisionVisibility", "Visibility"))

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/BasePassRendering.cpp:1352

Scope (from outer to inner):

file
function     void FDeferredShadingSceneRenderer::RenderBasePassInternal

Source code excerpt:

		NaniteDebugViewMode = Nanite::EDebugViewMode::LightmapDensity;
	}
	else if (ViewFamily.EngineShowFlags.ActorColoration)
	{
		NaniteDebugViewMode = Nanite::EDebugViewMode::PrimitiveColor;
	}
	else if (ViewFamily.UseDebugViewPS())
	{
	    switch (ViewFamily.GetDebugViewShaderMode())

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessEyeAdaptation.cpp:1203

Scope (from outer to inner):

file
function     void FViewInfo::UpdatePreExposure

Source code excerpt:

		&& !ViewFamily.EngineShowFlags.LODColoration
		&& !ViewFamily.EngineShowFlags.HLODColoration
		&& !ViewFamily.EngineShowFlags.ActorColoration
		&& ((!ViewFamily.EngineShowFlags.VisualizeBuffer) || CurrentBufferVisualizationMode != NAME_None) // disable pre-exposure for the buffer visualization modes
		&& !ViewFamily.EngineShowFlags.RayTracingDebug;

	// Compute the PreExposure to use.
	bool bUpdateLastExposure = false;
	PreExposure = 1.f;