r.Streaming.PoolSizeForMeshes
r.Streaming.PoolSizeForMeshes
#Overview
name: r.Streaming.PoolSizeForMeshes
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
< 0: Mesh and texture share the same pool, otherwise the size of pool dedicated to meshes.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Streaming.PoolSizeForMeshes is to control the size of the memory pool dedicated to streaming meshes in Unreal Engine 5. This setting variable is part of the engine’s streaming system, which manages the loading and unloading of assets (in this case, meshes) to optimize memory usage and performance.
This setting variable is primarily used by the Unreal Engine’s streaming subsystem, specifically within the texture and mesh streaming components. Based on the callsites, it’s clear that this variable is utilized in the Engine module, particularly in the streaming-related code.
The value of this variable is set through the console variable system (CVarStreamingPoolSizeForMeshes). It can be modified at runtime or set in configuration files.
The associated variable CVarStreamingPoolSizeForMeshes directly interacts with r.Streaming.PoolSizeForMeshes, as they share the same value. This variable is used to retrieve the current value of the setting in the engine’s code.
Developers must be aware of the following when using this variable:
- A value less than 0 means that meshes and textures will share the same streaming pool.
- A value of 0 or greater specifies the size of the pool dedicated to meshes in bytes.
- This setting can affect performance and memory usage, especially on platforms with limited resources.
Best practices when using this variable include:
- Carefully consider the balance between mesh and texture streaming pool sizes based on your game’s asset composition.
- Monitor performance and memory usage when adjusting this value to find the optimal setting for your specific use case.
- Be aware that this setting may need to be adjusted differently for various platforms or hardware configurations.
- Use in conjunction with other streaming-related settings for optimal results.
Regarding the associated variable CVarStreamingPoolSizeForMeshes:
This is an internal console variable used to access and modify the r.Streaming.PoolSizeForMeshes setting. It’s implemented as a TAutoConsoleVariable
#Setting Variables
#References In INI files
Location: <Workspace>/Projects/Lyra/Config/DefaultDeviceProfiles.ini:66, section: [Mobile DeviceProfile]
- INI Section:
Mobile DeviceProfile
- Raw value:
25
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:113
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarStreamingPoolSizeForMeshes(
TEXT("r.Streaming.PoolSizeForMeshes"),
-1,
TEXT("< 0: Mesh and texture share the same pool, otherwise the size of pool dedicated to meshes."),
ECVF_Scalability | ECVF_ExcludeFromPreview);
TAutoConsoleVariable<int32> CVarStreamingMaxTempMemoryAllowed(
TEXT("r.Streaming.MaxTempMemoryAllowed"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarStreamingPoolSizeForMeshes
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:112
Scope: file
Source code excerpt:
ECVF_Scalability | ECVF_ExcludeFromPreview);
static TAutoConsoleVariable<int32> CVarStreamingPoolSizeForMeshes(
TEXT("r.Streaming.PoolSizeForMeshes"),
-1,
TEXT("< 0: Mesh and texture share the same pool, otherwise the size of pool dedicated to meshes."),
ECVF_Scalability | ECVF_ExcludeFromPreview);
TAutoConsoleVariable<int32> CVarStreamingMaxTempMemoryAllowed(
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:312
Scope (from outer to inner):
file
function void FRenderAssetStreamingSettings::Update
Source code excerpt:
GlobalMipBias = !GIsEditor ? FMath::FloorToInt(FMath::Max<float>(0.f, CVarStreamingMipBias.GetValueOnAnyThread())) : 0;
PoolSize = CVarStreamingPoolSize.GetValueOnAnyThread();
MeshPoolSize = CVarStreamingPoolSizeForMeshes.GetValueOnAnyThread();
bUsePerTextureBias = CVarStreamingUsePerTextureBias.GetValueOnAnyThread() != 0;
bUseNewMetrics = CVarStreamingUseNewMetrics.GetValueOnAnyThread() != 0;
bLimitPoolSizeToVRAM = !GIsEditor && CVarStreamingLimitPoolSizeToVRAM.GetValueOnAnyThread() != 0;
bFullyLoadUsedTextures = CVarStreamingFullyLoadUsedTextures.GetValueOnAnyThread() != 0;
bFullyLoadMeshes = CVarStreamingFullyLoadMeshes.GetValueOnAnyThread() != 0;
bUseAllMips = CVarStreamingUseAllMips.GetValueOnAnyThread() != 0;