r.ProxyLODMaxDilationSteps
r.ProxyLODMaxDilationSteps
#Overview
name: r.ProxyLODMaxDilationSteps
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Limit the numer of dilation steps used in gap filling for performance reasons\nThis may affect gap filling quality as bigger dilations steps will be used with a smaller max \n0: will disable gap filling\n7: default\n
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.ProxyLODMaxDilationSteps is to control the number of dilation steps used in gap filling for Proxy LOD (Level of Detail) mesh generation in Unreal Engine 5.
This setting variable is primarily used by the ProxyLODPlugin, which is part of the Unreal Engine’s editor plugins for mesh optimization and LOD generation.
The value of this variable is set through a console variable (CVarProxyLODMaxDilationSteps) with a default value of 7. It can be changed at runtime through the console or configuration files.
The associated variable CVarProxyLODMaxDilationSteps directly interacts with r.ProxyLODMaxDilationSteps, as they share the same value and purpose.
Developers should be aware that:
- This variable affects the performance and quality of gap filling in Proxy LOD generation.
- Setting it to 0 will disable gap filling entirely.
- Lower values may improve performance but potentially reduce the quality of gap filling.
- Higher values may improve gap filling quality but at the cost of performance.
Best practices when using this variable include:
- Experimenting with different values to find the optimal balance between performance and gap filling quality for your specific use case.
- Consider disabling gap filling (by setting it to 0) if it’s not necessary for your project to improve performance.
- Be cautious when increasing the value beyond the default of 7, as it may significantly impact performance without substantial quality improvements.
Regarding the associated variable CVarProxyLODMaxDilationSteps:
- It is an internal console variable used to implement the r.ProxyLODMaxDilationSteps setting.
- It is accessed in the FVoxelizeMeshMerging::CaptureCVars function, suggesting that it’s used during the mesh voxelization and merging process.
- Developers typically don’t need to interact with this variable directly, as changes to r.ProxyLODMaxDilationSteps will automatically affect CVarProxyLODMaxDilationSteps.
When working with Proxy LOD generation, developers should consider this variable alongside other related settings to achieve the desired balance between performance and mesh quality.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Editor/ProxyLODPlugin/Source/ProxyLOD/Private/ProxyLODPlugin.cpp:112
Scope: file
Source code excerpt:
// Limit the number of dilation steps used in gap filling.
static TAutoConsoleVariable<int32> CVarProxyLODMaxDilationSteps(
TEXT("r.ProxyLODMaxDilationSteps"),
7,
TEXT("Limit the numer of dilation steps used in gap filling for performance reasons\n")
TEXT("This may affect gap filling quality as bigger dilations steps will be used with a smaller max \n")
TEXT("0: will disable gap filling\n")
TEXT("7: default\n"),
ECVF_Default);
#Associated Variable and Callsites
This variable is associated with another variable named CVarProxyLODMaxDilationSteps
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Editor/ProxyLODPlugin/Source/ProxyLOD/Private/ProxyLODPlugin.cpp:111
Scope: file
Source code excerpt:
// Limit the number of dilation steps used in gap filling.
static TAutoConsoleVariable<int32> CVarProxyLODMaxDilationSteps(
TEXT("r.ProxyLODMaxDilationSteps"),
7,
TEXT("Limit the numer of dilation steps used in gap filling for performance reasons\n")
TEXT("This may affect gap filling quality as bigger dilations steps will be used with a smaller max \n")
TEXT("0: will disable gap filling\n")
TEXT("7: default\n"),
#Loc: <Workspace>/Engine/Plugins/Editor/ProxyLODPlugin/Source/ProxyLOD/Private/ProxyLODPlugin.cpp:415
Scope (from outer to inner):
file
function void FVoxelizeMeshMerging::CaptureCVars
Source code excerpt:
{
int32 RayOrder = CVarProxyLODTransfer.GetValueOnGameThread();
int32 DilationSteps = CVarProxyLODMaxDilationSteps.GetValueOnGameThread();
bool bAddChartColorVerts = (CVarProxyLODChartColorVerts.GetValueOnGameThread() == 1);
bool bUseTrueTangentSpace = (CVarProxyLODUseTangentSpace.GetValueOnGameThread() == 1);
bool bVoxelizeAndRemeshOnly = (CVarProxyLODRemeshOnly.GetValueOnGameThread() == 1);
bool bSingleThreadedSimplify = (CVarProxyLODSingleThreadSimplify.GetValueOnAnyThread() == 1);
bool bWallCorreciton = (CVarProxyLODCorrectCollapsedWalls.GetValueOnGameThread() == 1);