BoostPlayerTextures

BoostPlayerTextures

#Overview

name: BoostPlayerTextures

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 BoostPlayerTextures is to enhance the priority of textures associated with the player character in the texture streaming system. This setting is part of Unreal Engine’s texture streaming management, which is responsible for efficiently loading and unloading textures based on their importance and visibility in the game world.

The BoostPlayerTextures variable is primarily used in the Engine module, specifically within the texture streaming subsystem. It’s referenced in the FRenderAssetStreamingManager class, which is responsible for managing the streaming of render assets, including textures.

The value of this variable is set in two ways:

  1. It’s initialized with a default value of 3.0f in the FRenderAssetStreamingManager constructor.
  2. It can be overridden by a value specified in the engine configuration file (GEngineIni) under the [TextureStreaming] section with the key “BoostPlayerTextures”.

There don’t appear to be any other variables directly interacting with BoostPlayerTextures based on the provided code snippets. However, it’s part of a larger system of texture streaming settings and likely influences the prioritization of player-related textures in conjunction with other streaming parameters.

Developers should be aware that:

  1. This variable affects the priority of player-related textures in the streaming system.
  2. A higher value will give more importance to player textures, potentially keeping them in memory longer or loading them sooner.
  3. Modifying this value can impact memory usage and streaming behavior, especially in scenes where the player character is prominent.

Best practices when using this variable include:

  1. Carefully consider the balance between prioritizing player textures and overall texture streaming performance.
  2. Test thoroughly with different values to find the optimal setting for your specific game.
  3. Be mindful of memory constraints, especially on platforms with limited resources.
  4. Consider exposing this setting as a configurable option for players with different hardware capabilities.
  5. Monitor texture streaming performance and adjust this value if issues arise with player texture quality or overall streaming behavior.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:1820, section: [TextureStreaming]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/StreamingManagerTexture.cpp:117

Scope (from outer to inner):

file
function     FRenderAssetStreamingManager::FRenderAssetStreamingManager

Source code excerpt:

,	NumRenderAssetProcessingStages(5)
,	bUseDynamicStreaming( false )
,	BoostPlayerTextures( 3.0f )
,	MemoryMargin(0)
,	EffectiveStreamingPoolSize(0)
,	MemoryOverBudget(0)
,	MaxEverRequired(0)
,	bPauseRenderAssetStreaming(false)
,	LastWorldUpdateTime(GIsEditor ? -FLT_MAX : 0) // In editor, visibility is not taken into consideration.

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/StreamingManagerTexture.cpp:137

Scope (from outer to inner):

file
function     FRenderAssetStreamingManager::FRenderAssetStreamingManager

Source code excerpt:

	GConfig->GetInt(TEXT("TextureStreaming"), TEXT("PoolSize"), PoolSizeIniSetting, GEngineIni);
	GConfig->GetBool(TEXT("TextureStreaming"), TEXT("UseDynamicStreaming"), bUseDynamicStreaming, GEngineIni);
	GConfig->GetFloat( TEXT("TextureStreaming"), TEXT("BoostPlayerTextures"), BoostPlayerTextures, GEngineIni );
	GConfig->GetBool(TEXT("TextureStreaming"), TEXT("NeverStreamOutRenderAssets"), GNeverStreamOutRenderAssets, GEngineIni);

	// -NeverStreamOutRenderAssets
	if (FParse::Param(FCommandLine::Get(), TEXT("NeverStreamOutRenderAssets")))
	{
		GNeverStreamOutRenderAssets = true;

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/StreamingManagerTexture.h:392

Scope: file

Source code excerpt:

	bool					bUseDynamicStreaming;

	float					BoostPlayerTextures;

	/** Amount of memory to leave free in the render asset pool. */
	int64					MemoryMargin;

	/** The actual memory pool size available to stream textures/meshes, excludes non-streaming texture/mesh, temp memory (for streaming mips), memory margin (allocator overhead). */
	int64					EffectiveStreamingPoolSize;