r.BufferVisualizationDumpFrames
r.BufferVisualizationDumpFrames
#Overview
name: r.BufferVisualizationDumpFrames
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
When screenshots or movies dumps are requested, also save out dumps of the current buffer visualization materials\n0:off (default)\n1:on
It is referenced in 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.BufferVisualizationDumpFrames is to control the dumping of buffer visualization materials when screenshots or movie dumps are requested. This setting variable is primarily used for debugging and visualization purposes in the rendering system of Unreal Engine 5.
The Unreal Engine subsystems that rely on this setting variable are primarily the rendering system and the screenshot/movie capture system. It is referenced in various modules including the Engine, MovieSceneCapture, and Renderer.
The value of this variable is set through the console variable system. It is defined as a TAutoConsoleVariable in BufferVisualizationData.cpp, which means it can be changed at runtime through console commands or configuration files.
This variable interacts with other variables and systems, such as:
- GIsHighResScreenshot
- FScreenshotRequest
- GIsDumpingMovie
- r.BufferVisualizationDumpFramesAsHDR
- r.SaveEXR.CompressionQuality
Developers must be aware that enabling this variable can have performance implications, as it triggers additional processing and file I/O operations when screenshots or movie dumps are requested. It should primarily be used for debugging and visualization purposes, not in production builds.
Best practices when using this variable include:
- Only enable it when necessary for debugging or capturing specific buffer visualization data.
- Be mindful of the performance impact, especially when capturing high-resolution screenshots or long movie sequences.
- Ensure sufficient storage space is available, as buffer visualization dumps can generate large amounts of data.
- Coordinate its use with other related variables (like r.BufferVisualizationDumpFramesAsHDR) for comprehensive visualization capture.
- Remember to disable it after use to avoid unnecessary processing and file generation in subsequent runs.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/BufferVisualizationData.cpp:19
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarBufferVisualizationDumpFrames(
TEXT("r.BufferVisualizationDumpFrames"),
0,
TEXT("When screenshots or movies dumps are requested, also save out dumps of the current buffer visualization materials\n")
TEXT("0:off (default)\n")
TEXT("1:on"),
ECVF_RenderThreadSafe);
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/UnrealClient.cpp:1678
Scope (from outer to inner):
file
function void FViewport::Draw
Source code excerpt:
{
// See what screenshot related features are required
static const auto CVarDumpFrames = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.BufferVisualizationDumpFrames"));
GIsHighResScreenshot = GIsHighResScreenshot || bTakeHighResScreenShot;
bool bAnyScreenshotsRequired = FScreenshotRequest::IsScreenshotRequested() || GIsHighResScreenshot || GIsDumpingMovie;
bool bBufferVisualizationDumpingRequired = bAnyScreenshotsRequired && CVarDumpFrames && CVarDumpFrames->GetValueOnGameThread();
// if this is a game viewport, and game rendering is disabled, then we don't want to actually draw anything
if ( World && World->IsGameWorld() && !bIsGameRenderingEnabled)
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/FinalPostProcessSettings.h:201
Scope (from outer to inner):
file
class class FFinalPostProcessSettings : public FPostProcessSettings
Source code excerpt:
/**
* A map of buffer visualization material names to visualization pipes onto which each intermediate render target will be pushed, if set.
* Will always be used if set, regardless of r.BufferVisualizationDumpFrames
*/
TMap<FName, TSharedPtr<FImagePixelPipe, ESPMode::ThreadSafe>> BufferVisualizationPipes;
// Maintains a container with IBlendableInterface objects and their data
FBlendableManager BlendableManager;
};
#Loc: <Workspace>/Engine/Source/Runtime/MovieSceneCapture/Private/CompositionGraphCaptureProtocol.cpp:30
Scope (from outer to inner):
file
function FFrameCaptureViewExtension
Source code excerpt:
, bDisableScreenPercentage(bInDisableScreenPercentage)
{
CVarDumpFrames = IConsoleManager::Get().FindConsoleVariable(TEXT("r.BufferVisualizationDumpFrames"));
CVarDumpFramesAsHDR = IConsoleManager::Get().FindConsoleVariable(TEXT("r.BufferVisualizationDumpFramesAsHDR"));
CVarHDRCompressionQuality = IConsoleManager::Get().FindConsoleVariable(TEXT("r.SaveEXR.CompressionQuality"));
RestoreDumpHDR = CVarDumpFramesAsHDR->GetInt();
RestoreHDRCompressionQuality = CVarHDRCompressionQuality->GetInt();
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessVisualizeBuffer.cpp:132
Scope (from outer to inner):
file
function bool IsVisualizeGBufferDumpToFileEnabled
Source code excerpt:
bool IsVisualizeGBufferDumpToFileEnabled(const FViewInfo& View)
{
static const auto CVarDumpFrames = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.BufferVisualizationDumpFrames"));
const bool bDumpHighResolutionScreenshot = GIsHighResScreenshot && GetHighResScreenshotConfig().bDumpBufferVisualizationTargets;
const bool bFrameDumpAllowed = CVarDumpFrames->GetValueOnRenderThread() != 0 || bDumpHighResolutionScreenshot;
const bool bFrameDumpRequested = View.FinalPostProcessSettings.bBufferVisualizationDumpRequired;