r.SaveEXR.CompressionQuality
r.SaveEXR.CompressionQuality
#Overview
name: r.SaveEXR.CompressionQuality
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Defines how we save HDR screenshots in the EXR format.\n 0: no compression\n 1: default compression which can be slow (default)
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.SaveEXR.CompressionQuality
is to control the compression quality when saving HDR screenshots in the EXR format.
This setting variable is primarily used in the rendering system, specifically for high-resolution screenshot capture and HDR image saving functionality. It is utilized by the Engine module and the MovieSceneCapture module.
The value of this variable is set through a console command. It is defined as a TAutoConsoleVariable with a default value of 1, which represents default compression. The variable can be set to 0 for no compression or 1 for default compression.
The associated variable CVarSaveEXRCompressionQuality
interacts directly with r.SaveEXR.CompressionQuality
. They share the same value and purpose.
Developers must be aware that:
- This variable affects the quality and file size of HDR screenshots saved in EXR format.
- Using no compression (0) will result in larger file sizes but faster saving times.
- Using default compression (1) may be slower but will produce smaller file sizes.
Best practices when using this variable include:
- Consider the trade-off between file size and saving time when choosing the compression quality.
- Use no compression (0) when rapid screenshot capture is required or when file size is not a concern.
- Use default compression (1) when storage space is limited or when slightly longer saving times are acceptable.
Regarding the associated variable CVarSaveEXRCompressionQuality
:
- It serves the same purpose as
r.SaveEXR.CompressionQuality
. - It is used directly in the HighResScreenshot functionality to determine the compression quality for HDR screenshots.
- The value of this variable is checked in the
FHighResScreenshotConfig::PopulateImageTaskParams
function to set the appropriate compression quality for the image task. - Developers should be aware that changing
CVarSaveEXRCompressionQuality
will have the same effect as changingr.SaveEXR.CompressionQuality
.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/HighResScreenshot.cpp:9
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarSaveEXRCompressionQuality(
TEXT("r.SaveEXR.CompressionQuality"),
1,
TEXT("Defines how we save HDR screenshots in the EXR format.\n")
TEXT(" 0: no compression\n")
TEXT(" 1: default compression which can be slow (default)"),
ECVF_RenderThreadSafe);
#Loc: <Workspace>/Engine/Source/Runtime/MovieSceneCapture/Private/CompositionGraphCaptureProtocol.cpp:32
Scope (from outer to inner):
file
function FFrameCaptureViewExtension
Source code excerpt:
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();
Disable();
}
#Associated Variable and Callsites
This variable is associated with another variable named CVarSaveEXRCompressionQuality
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/HighResScreenshot.cpp:8
Scope: file
Source code excerpt:
#include "ImageWriteQueue.h"
static TAutoConsoleVariable<int32> CVarSaveEXRCompressionQuality(
TEXT("r.SaveEXR.CompressionQuality"),
1,
TEXT("Defines how we save HDR screenshots in the EXR format.\n")
TEXT(" 0: no compression\n")
TEXT(" 1: default compression which can be slow (default)"),
ECVF_RenderThreadSafe);
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/HighResScreenshot.cpp:89
Scope (from outer to inner):
file
function void FHighResScreenshotConfig::PopulateImageTaskParams
Source code excerpt:
InOutTask.CompressionQuality = (int32)EImageCompressionQuality::Default;
if (bLocalCaptureHDR && CVarSaveEXRCompressionQuality.GetValueOnAnyThread() == 0)
{
InOutTask.CompressionQuality = (int32)EImageCompressionQuality::Uncompressed;
}
}
void FHighResScreenshotConfig::ChangeViewport(TWeakPtr<FSceneViewport> InViewport)