b.NumGeneratedInstancesLimitLOD1

b.NumGeneratedInstancesLimitLOD1

#Overview

name: b.NumGeneratedInstancesLimitLOD1

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 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of b.NumGeneratedInstancesLimitLOD1 is to limit the number of mutable instances with LOD (Level of Detail) 1 that can exist at a given time in the game.

This setting variable is primarily used by the Mutable plugin, which is part of Unreal Engine’s experimental features. Specifically, it’s utilized in the CustomizableObject module, which deals with runtime-modifiable 3D objects.

The value of this variable is set through a console variable (CVar) system. It’s defined as a TAutoConsoleVariable with an initial value of 0, meaning there’s no limit by default.

The associated variable CVarNumGeneratedInstancesLimitLOD1 directly interacts with b.NumGeneratedInstancesLimitLOD1. They share the same value and purpose. The CVarNumGeneratedInstancesLimitLOD1 is used to access the value of b.NumGeneratedInstancesLimitLOD1 in the code.

Developers must be aware that:

  1. This variable only affects LOD 1 instances.
  2. A value of 0 means no limit is applied.
  3. The limit is applied at runtime and can affect performance and memory usage.

Best practices when using this variable include:

  1. Use it judiciously to balance between performance and visual quality.
  2. Test thoroughly with different values to find the optimal limit for your specific use case.
  3. Consider the target hardware capabilities when setting this limit.

Regarding the associated variable CVarNumGeneratedInstancesLimitLOD1:

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Plugins/Experimental/Mutable/Config/DefaultMutable.ini:37, section: [ViewDistanceQuality@0]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Plugins/Experimental/Mutable/Source/CustomizableObject/Private/MuCO/CustomizableInstanceLODManagement.cpp:34

Scope: file

Source code excerpt:


static TAutoConsoleVariable<int32> CVarNumGeneratedInstancesLimitLOD1(
	TEXT("b.NumGeneratedInstancesLimitLOD1"),
	0,
	TEXT("If different than 0, limit the number of mutable instances with LOD 1 to have at a given time."),
	ECVF_Scalability);

static TAutoConsoleVariable<int32> CVarNumGeneratedInstancesLimitLOD2(
	TEXT("b.NumGeneratedInstancesLimitLOD2"),

#Associated Variable and Callsites

This variable is associated with another variable named CVarNumGeneratedInstancesLimitLOD1. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Plugins/Experimental/Mutable/Source/CustomizableObject/Private/MuCO/CustomizableInstanceLODManagement.cpp:33

Scope: file

Source code excerpt:

	ECVF_Scalability);

static TAutoConsoleVariable<int32> CVarNumGeneratedInstancesLimitLOD1(
	TEXT("b.NumGeneratedInstancesLimitLOD1"),
	0,
	TEXT("If different than 0, limit the number of mutable instances with LOD 1 to have at a given time."),
	ECVF_Scalability);

static TAutoConsoleVariable<int32> CVarNumGeneratedInstancesLimitLOD2(

#Loc: <Workspace>/Engine/Plugins/Experimental/Mutable/Source/CustomizableObject/Private/MuCO/CustomizableInstanceLODManagement.cpp:428

Scope (from outer to inner):

file
function     int32 UCustomizableInstanceLODManagement::GetNumGeneratedInstancesLimitLOD1

Source code excerpt:

int32 UCustomizableInstanceLODManagement::GetNumGeneratedInstancesLimitLOD1() const
{
	return CVarNumGeneratedInstancesLimitLOD1.GetValueOnGameThread();
}


int32 UCustomizableInstanceLODManagement::GetNumGeneratedInstancesLimitLOD2() const
{
	return CVarNumGeneratedInstancesLimitLOD2.GetValueOnGameThread();