r.ProxyLODRemeshOnly
r.ProxyLODRemeshOnly
#Overview
name: r.ProxyLODRemeshOnly
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Only remesh. No simplification or materials. Default off.\n0: Disabled - will simplify and generate materials \n1: Enabled - will not simplfy or generate materials.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.ProxyLODRemeshOnly is to control the behavior of the Proxy LOD (Level of Detail) system in Unreal Engine 5, specifically for mesh simplification and material generation.
This setting variable is primarily used in the ProxyLODPlugin, which is part of the editor’s toolset for optimizing 3D models. It’s particularly relevant for the mesh merging and simplification processes.
The value of this variable is set through the console variable system in Unreal Engine. It’s initialized with a default value of 0, meaning the feature is disabled by default.
The associated variable CVarProxyLODRemeshOnly interacts directly with r.ProxyLODRemeshOnly. They share the same value and purpose.
Developers must be aware that:
- When enabled (set to 1), the system will only perform remeshing without any simplification or material generation.
- When disabled (set to 0), the system will perform both mesh simplification and material generation.
Best practices when using this variable include:
- Use it for debugging or specific optimization scenarios where you want to isolate the remeshing process.
- Be cautious when enabling it in production, as it can result in high-poly geometry without proper simplification or materials.
- Consider the performance implications, especially for complex scenes or when dealing with numerous models.
Regarding the associated variable CVarProxyLODRemeshOnly:
- It’s defined as a TAutoConsoleVariable
, which means it’s an integer console variable that can be changed at runtime. - It’s used in the FVoxelizeMeshMerging::CaptureCVars function to determine whether to perform only remeshing or full simplification and material generation.
- When working with the Proxy LOD system, developers should check the value of this variable to understand how the mesh processing will behave.
- It’s important to note that enabling this option (setting it to 1) will result in very high poly red geometry, which might not be suitable for all use cases.
#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:45
Scope: file
Source code excerpt:
// Will result in very high poly red geometry.
static TAutoConsoleVariable<int32> CVarProxyLODRemeshOnly(
TEXT("r.ProxyLODRemeshOnly"),
0,
TEXT("Only remesh. No simplification or materials. Default off.\n")
TEXT("0: Disabled - will simplify and generate materials \n")
TEXT("1: Enabled - will not simplfy or generate materials."),
ECVF_Default);
#Associated Variable and Callsites
This variable is associated with another variable named CVarProxyLODRemeshOnly
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Editor/ProxyLODPlugin/Source/ProxyLOD/Private/ProxyLODPlugin.cpp:44
Scope: file
Source code excerpt:
// Disable any mesh simplification and UV-generation.
// Will result in very high poly red geometry.
static TAutoConsoleVariable<int32> CVarProxyLODRemeshOnly(
TEXT("r.ProxyLODRemeshOnly"),
0,
TEXT("Only remesh. No simplification or materials. Default off.\n")
TEXT("0: Disabled - will simplify and generate materials \n")
TEXT("1: Enabled - will not simplfy or generate materials."),
ECVF_Default);
#Loc: <Workspace>/Engine/Plugins/Editor/ProxyLODPlugin/Source/ProxyLOD/Private/ProxyLODPlugin.cpp:418
Scope (from outer to inner):
file
function void FVoxelizeMeshMerging::CaptureCVars
Source code excerpt:
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);
// set values - note, this class is a global (singleton) instance.
this->RayHitOrder = RayOrder;
this->bChartColorVerts = bAddChartColorVerts;