FastEffortLevel
FastEffortLevel
#Overview
name: FastEffortLevel
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 8
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of FastEffortLevel is to control the level of effort applied during fast texture encoding in Unreal Engine 5. This setting is part of the texture encoding system and affects the balance between encoding speed and quality for textures.
FastEffortLevel is primarily used in the texture encoding subsystem of Unreal Engine 5. It is referenced in the TextureEditor module and the Engine module, specifically in texture-related operations and settings.
The value of this variable is set in the UTextureEncodingProjectSettings class, which is derived from UDeveloperSettings. This suggests that it can be configured through project settings in the Unreal Engine editor.
FastEffortLevel interacts with several other variables related to texture encoding, such as:
- FinalEffortLevel: Used for comparison to determine if encoding settings differ between fast and final modes.
- bFastUsesRDO: Determines if Rate-Distortion Optimization (RDO) is used in fast encoding mode.
- FastRDOLambda: Controls the RDO lambda value for fast encoding.
- FastUniversalTiling: Specifies the tiling method for fast encoding.
Developers should be aware that:
- FastEffortLevel affects the trade-off between encoding speed and quality.
- Changes to this setting may require a project restart to take effect.
- It’s part of a larger set of texture encoding settings that work together to determine the final encoding behavior.
Best practices when using this variable include:
- Consider the project’s specific needs for texture quality vs. encoding speed when setting this value.
- Ensure consistency between fast and final encoding settings if identical output is desired across different build types.
- Test the impact of different FastEffortLevel settings on both encoding time and final texture quality to find the optimal balance for your project.
- Be mindful of how this setting interacts with other texture encoding options, especially when RDO is enabled.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:3460, section: [/Script/Engine.TextureEncodingProjectSettings]
- INI Section:
/Script/Engine.TextureEncodingProjectSettings
- Raw value:
Normal
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/TextureEditor/Private/Models/TextureEditorViewportClient.cpp:388
Scope (from outer to inner):
file
function void FTextureEditorViewportClient::Draw
Source code excerpt:
FResolvedTextureEncodingSettings const& EncodeSettings = FResolvedTextureEncodingSettings::Get();
bool bEncodingDiffers = (EncodeSettings.Project.bFastUsesRDO != EncodeSettings.Project.bFinalUsesRDO ||
EncodeSettings.Project.FastEffortLevel != EncodeSettings.Project.FinalEffortLevel ||
EncodeSettings.Project.FastRDOLambda != EncodeSettings.Project.FinalRDOLambda ||
EncodeSettings.Project.FastUniversalTiling != EncodeSettings.Project.FinalUniversalTiling);
if (PlatformDataPtr[0]->ResultMetadata.bWasEditorCustomEncoding)
{
const FText LeadInText = NSLOCTEXT("TextureEditor", "ViewingCustom", "Viewing custom encoding");
#Loc: <Workspace>/Engine/Source/Editor/TextureEditor/Private/Models/TextureEditorViewportClient.cpp:454
Scope (from outer to inner):
file
function void FTextureEditorViewportClient::Draw
Source code excerpt:
}
}
if (EncodeSettings.Project.FastEffortLevel != EncodeSettings.Project.FinalEffortLevel)
{
if (bNeedComma)
{
DrawComma();
}
const FText EffortText = NSLOCTEXT("TextureEditor", "EffortDifference", "Encode Effort");
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/TextureDerivedData.cpp:601
Scope (from outer to inner):
file
function static void GetEncodeSpeedOptions
Source code excerpt:
{
OutOptions->bUsesRDO = EncodeSettings.Project.bFastUsesRDO;
OutOptions->Effort = EncodeSettings.Project.FastEffortLevel;
OutOptions->Tiling = EncodeSettings.Project.FastUniversalTiling;
OutOptions->RDOLambda = EncodeSettings.Project.FastRDOLambda;
}
}
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/TextureEncodingSettings.cpp:18
Scope (from outer to inner):
file
function UTextureEncodingProjectSettings::UTextureEncodingProjectSettings
Source code excerpt:
bFastUsesRDO(false),
FastRDOLambda(30), /* OodleTex_RDOLagrangeLambda_Default */
FastEffortLevel(ETextureEncodeEffort::Normal),
FastUniversalTiling(ETextureUniversalTiling::Disabled),
CookUsesSpeed(ETextureEncodeSpeed::Final),
EditorUsesSpeed(ETextureEncodeSpeed::FinalIfAvailable)
{
}
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/TextureEncodingSettings.cpp:82
Scope (from outer to inner):
file
function static void ConstructResolvedSettings
Source code excerpt:
OutResolvedSettings->Project.FinalEffortLevel = ProjectSettings->FinalEffortLevel;
OutResolvedSettings->Project.FinalUniversalTiling = ProjectSettings->FinalUniversalTiling;
OutResolvedSettings->Project.FastEffortLevel = ProjectSettings->FastEffortLevel;
OutResolvedSettings->Project.FastUniversalTiling = ProjectSettings->FastUniversalTiling;
OutResolvedSettings->Project.CookUsesSpeed = ProjectSettings->CookUsesSpeed;
OutResolvedSettings->Project.EditorUsesSpeed = ProjectSettings->EditorUsesSpeed;
// Determine what encode speed to use
{
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/TextureEncodingSettings.cpp:168
Scope (from outer to inner):
file
function static void ConstructResolvedSettings
Source code excerpt:
UE_LOG(LogTextureEncodingSettings, Display, TEXT("Oodle Texture Encode Speed settings: Fast: RDO %s Lambda=%d, Effort=%s Final: RDO %s Lambda=%d, Effort=%s"), \
*FastRDOString, OutResolvedSettings->Project.bFastUsesRDO ? OutResolvedSettings->Project.FastRDOLambda : 0, *(EncodeEffortEnum->GetNameStringByValue((int64)OutResolvedSettings->Project.FastEffortLevel)), \
*FinalRDOString, OutResolvedSettings->Project.bFinalUsesRDO ? OutResolvedSettings->Project.FinalRDOLambda : 0, *(EncodeEffortEnum->GetNameStringByValue((int64)OutResolvedSettings->Project.FinalEffortLevel)));
}
UE_LOG(LogTextureEncodingSettings, Display, TEXT("Shared linear texture encoding: %s"), OutResolvedSettings->Project.bSharedLinearTextureEncoding ? TEXT("Enabled") : TEXT("Disabled"));
}
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/TextureEncodingSettingsPrivate.h:104
Scope (from outer to inner):
file
class class UTextureEncodingProjectSettings : public UDeveloperSettings
Source code excerpt:
// Specifies how much time to take trying for better encode results.
UPROPERTY(config, EditAnywhere, Category = EncodeSpeedSettings, meta = (ConfigRestartRequired = true))
ETextureEncodeEffort FastEffortLevel;
// Specifies how to assume textures are laid out on disc. This only applies to Oodle with RDO
// enabled. 256 KB is a good middle ground. Enabling this will decrease the on-disc
// sizes of textures for platforms with exposed texture tiling (i.e. consoles), but will slightly increase
// sizes of textures for platforms with opaque tiling (i.e. desktop).
UPROPERTY(config, EditAnywhere, Category = EncodeSpeedSettings, meta = (ConfigRestartRequired = true))
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/TextureEncodingSettings.h:65
Scope: file
Source code excerpt:
ETextureEncodeEffort FinalEffortLevel;
ETextureUniversalTiling FinalUniversalTiling;
ETextureEncodeEffort FastEffortLevel;
ETextureUniversalTiling FastUniversalTiling;
ETextureEncodeSpeed CookUsesSpeed;
ETextureEncodeSpeed EditorUsesSpeed;
} Project;
// The resolved EncodeSpeed to use for this instance, taking in to account overrides.