r.ProxyLODRemeshOnly

r.ProxyLODRemeshOnly

#Overview

name: r.ProxyLODRemeshOnly

This variable is created as a Console Variable (cvar).

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:

  1. When enabled (set to 1), the system will only perform remeshing without any simplification or material generation.
  2. When disabled (set to 0), the system will perform both mesh simplification and material generation.

Best practices when using this variable include:

  1. Use it for debugging or specific optimization scenarios where you want to isolate the remeshing process.
  2. Be cautious when enabling it in production, as it can result in high-poly geometry without proper simplification or materials.
  3. Consider the performance implications, especially for complex scenes or when dealing with numerous models.

Regarding the associated variable CVarProxyLODRemeshOnly:

#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;