ShowFlag.VisualizeVolumetricCloudConservativeDensity
ShowFlag.VisualizeVolumetricCloudConservativeDensity
#Overview
name: ShowFlag.VisualizeVolumetricCloudConservativeDensity
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Allows to override a specific showflag (works in editor and game, \
It is referenced in 8
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ShowFlag.VisualizeVolumetricCloudConservativeDensity is to enable visualization of the conservative density of volumetric clouds in Unreal Engine 5. This setting is primarily used for debugging and development purposes within the rendering system, specifically for volumetric cloud rendering.
This setting variable is primarily relied upon by the Renderer module of Unreal Engine 5. It is used in conjunction with the volumetric cloud rendering system to provide visual feedback on the cloud’s density calculations.
The value of this variable is set through the engine’s show flags system, which allows developers to toggle various visualization and debug options. It is typically set to 0 (disabled) by default in shipping builds, as indicated by the SHOWFLAG_FIXED_IN_SHIPPING(0, ...)
macro.
This variable interacts closely with another show flag, VisualizeVolumetricCloudEmptySpaceSkipping
. They are often used together to provide different visualization options for volumetric cloud rendering.
Developers should be aware that this visualization flag is primarily intended for use in the editor and development builds. It’s not meant to be enabled in shipping builds, as it’s a debug visualization tool.
Best practices when using this variable include:
- Only enable it when specifically debugging volumetric cloud rendering issues.
- Use it in conjunction with
VisualizeVolumetricCloudEmptySpaceSkipping
to get a comprehensive view of the cloud rendering system. - Remember to disable it before final builds or performance testing, as it may impact rendering performance.
Regarding the associated variable VisualizeVolumetricCloudConservativeDensity
:
This is actually the same variable as ShowFlag.VisualizeVolumetricCloudConservativeDensity. It’s used in various parts of the engine code to check if the visualization should be enabled. It serves the same purpose and is used in the same way as described above. The difference in naming (with or without the “ShowFlag” prefix) is likely due to how it’s accessed in different parts of the codebase.
When using this variable, developers should be aware that it can affect other rendering processes. For example, it’s used to determine if certain post-processing effects should be applied, and it can influence how the engine decides to render volumetric clouds. It’s important to consider these side effects when enabling this visualization for debugging purposes.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:415
Scope: file
Source code excerpt:
/** Visualize volumetric cloud conservative density. */
SHOWFLAG_FIXED_IN_SHIPPING(0, VisualizeVolumetricCloudConservativeDensity, SFG_Visualize, NSLOCTEXT("UnrealEd", "VisualizeVolumetricCloudConservativeDensitySF", "Volumetric Cloud Conservative Density"))
/** Visualize volumetric cloud density for empty space skipping. */
SHOWFLAG_FIXED_IN_SHIPPING(0, VisualizeVolumetricCloudEmptySpaceSkipping, SFG_Visualize, NSLOCTEXT("UnrealEd", "VisualizeVolumetricCloudEmptySpaceSkippingSF", "Volumetric Cloud Empty Space Skipping Density"))
SHOWFLAG_FIXED_IN_SHIPPING(1, VirtualShadowMapPersistentData, SFG_Developer, NSLOCTEXT("UnrealEd", "VirtualShadowMapPersistentData", "Virtual Shadow Map Persistent Data"))
#Associated Variable and Callsites
This variable is associated with another variable named VisualizeVolumetricCloudConservativeDensity
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Media/MediaIOFramework/Source/MediaIOCore/Private/MediaCaptureSceneViewExtension.h:51
Scope (from outer to inner):
file
class class FMediaCaptureSceneViewExtension : public FSceneViewExtensionBase
function virtual void SetupView
Source code excerpt:
!InView.Family->EngineShowFlags.VisualizeDistanceFieldAO &&
!InView.Family->EngineShowFlags.VisualizeShadingModels &&
!InView.Family->EngineShowFlags.VisualizeVolumetricCloudConservativeDensity &&
!InView.Family->EngineShowFlags.VisualizeVolumetricCloudEmptySpaceSkipping &&
!InView.Family->EngineShowFlags.ShaderComplexity;
}
else
{
bPostProcessingEnabled = InView.Family->EngineShowFlags.PostProcessing && !InView.Family->EngineShowFlags.ShaderComplexity && IsMobileHDR();
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:415
Scope: file
Source code excerpt:
/** Visualize volumetric cloud conservative density. */
SHOWFLAG_FIXED_IN_SHIPPING(0, VisualizeVolumetricCloudConservativeDensity, SFG_Visualize, NSLOCTEXT("UnrealEd", "VisualizeVolumetricCloudConservativeDensitySF", "Volumetric Cloud Conservative Density"))
/** Visualize volumetric cloud density for empty space skipping. */
SHOWFLAG_FIXED_IN_SHIPPING(0, VisualizeVolumetricCloudEmptySpaceSkipping, SFG_Visualize, NSLOCTEXT("UnrealEd", "VisualizeVolumetricCloudEmptySpaceSkippingSF", "Volumetric Cloud Empty Space Skipping Density"))
SHOWFLAG_FIXED_IN_SHIPPING(1, VirtualShadowMapPersistentData, SFG_Developer, NSLOCTEXT("UnrealEd", "VirtualShadowMapPersistentData", "Virtual Shadow Map Persistent Data"))
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/DeferredShadingRenderer.cpp:2178
Scope (from outer to inner):
file
function void FDeferredShadingSceneRenderer::Render
Source code excerpt:
const bool bShouldRenderVolumetricCloudBase = ShouldRenderVolumetricCloud(Scene, ViewFamily.EngineShowFlags);
const bool bShouldRenderVolumetricCloud = bShouldRenderVolumetricCloudBase && (!ViewFamily.EngineShowFlags.VisualizeVolumetricCloudConservativeDensity && !ViewFamily.EngineShowFlags.VisualizeVolumetricCloudEmptySpaceSkipping);
const bool bShouldVisualizeVolumetricCloud = bShouldRenderVolumetricCloudBase && (!!ViewFamily.EngineShowFlags.VisualizeVolumetricCloudConservativeDensity || !!ViewFamily.EngineShowFlags.VisualizeVolumetricCloudEmptySpaceSkipping);
bool bAsyncComputeVolumetricCloud = IsVolumetricRenderTargetEnabled() && IsVolumetricRenderTargetAsyncCompute();
bool bVolumetricRenderTargetRequired = bShouldRenderVolumetricCloud && !bHasRayTracedOverlay;
FRDGTextureRef ViewFamilyTexture = TryCreateViewFamilyTexture(GraphBuilder, ViewFamily);
if (RendererOutput == ERendererOutput::DepthPrepassOnly)
{
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessEyeAdaptation.cpp:345
Scope (from outer to inner):
file
function bool IsAutoExposureDebugMode
Source code excerpt:
EngineShowFlags.RayTracingDebug ||
EngineShowFlags.VisualizeDistanceFieldAO ||
EngineShowFlags.VisualizeVolumetricCloudConservativeDensity ||
EngineShowFlags.VisualizeVolumetricCloudEmptySpaceSkipping ||
EngineShowFlags.CollisionVisibility ||
EngineShowFlags.CollisionPawn ||
!EngineShowFlags.PostProcessing;
}
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.cpp:184
Scope (from outer to inner):
file
function bool IsPostProcessingEnabled
Source code excerpt:
!View.Family->EngineShowFlags.VisualizeDistanceFieldAO &&
!View.Family->EngineShowFlags.VisualizeShadingModels &&
!View.Family->EngineShowFlags.VisualizeVolumetricCloudConservativeDensity &&
!View.Family->EngineShowFlags.VisualizeVolumetricCloudEmptySpaceSkipping &&
!View.Family->EngineShowFlags.ShaderComplexity;
}
else
{
return View.Family->EngineShowFlags.PostProcessing && !View.Family->EngineShowFlags.ShaderComplexity && IsMobileHDR();
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VolumetricCloudRendering.cpp:278
Scope (from outer to inner):
file
function bool ShouldViewVisualizeVolumetricCloudConservativeDensity
Source code excerpt:
bool ShouldViewVisualizeVolumetricCloudConservativeDensity(const FViewInfo& ViewInfo, const FEngineShowFlags& EngineShowFlags)
{
return (!!EngineShowFlags.VisualizeVolumetricCloudConservativeDensity || !!EngineShowFlags.VisualizeVolumetricCloudEmptySpaceSkipping)
&& !ViewInfo.bIsReflectionCapture
&& !ViewInfo.bIsSceneCapture
&& GIsEditor;
}
bool VolumetricCloudWantsToSampleLocalLights(const FScene* Scene, const FEngineShowFlags& EngineShowFlags)
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VolumetricCloudRendering.cpp:618
Scope (from outer to inner):
file
function uint32 GetVolumetricCloudDebugViewMode
Source code excerpt:
uint32 GetVolumetricCloudDebugViewMode(const FEngineShowFlags& ShowFlags)
{
if (ShowFlags.VisualizeVolumetricCloudConservativeDensity)
{
return 1;
}
if (ShowFlags.VisualizeVolumetricCloudEmptySpaceSkipping)
{
return 2;