GeometryCache.Streamer.BlockTillFinishStreaming

GeometryCache.Streamer.BlockTillFinishStreaming

#Overview

name: GeometryCache.Streamer.BlockTillFinishStreaming

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

It is referenced in 5 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of GeometryCache.Streamer.BlockTillFinishStreaming is to control the behavior of the Geometry Cache streamer in Unreal Engine 5. Specifically, it determines whether the streamer should block execution until it has finished streaming all requested frames.

This setting variable is primarily used by the Geometry Cache system, which is part of Unreal Engine’s runtime geometry animation capabilities. It is also utilized by the Movie Render Pipeline module for high-quality offline rendering.

The value of this variable is set through a console variable (CVar) system. It’s initialized as a static boolean variable and linked to the console variable system using FAutoConsoleVariableRef.

This variable interacts closely with another setting, “GeometryCache.Streamer.ShowNotification”, which controls whether notifications about the streaming process should be displayed.

Developers should be aware that:

  1. This setting is particularly important in rendering scenarios where frame accuracy is crucial.
  2. Enabling this setting (setting it to 1) can impact performance as it forces the engine to wait for all geometry cache data to be streamed before proceeding.
  3. It’s often used in conjunction with disabling other performance-preserving systems for high-quality rendering.

Best practices when using this variable include:

  1. Enable it (set to 1) when doing offline rendering or in scenarios where perfect frame reproduction is necessary.
  2. Consider the performance implications in real-time scenarios.
  3. When enabled, also consider disabling the ShowNotification setting to prevent unnecessary UI elements during rendering.
  4. In editor and development builds, be cautious about always having this enabled as it might slow down iteration times.

This variable is particularly useful in the Movie Render Pipeline, where it’s automatically set to ensure high-quality, frame-accurate renders.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Plugins/Runtime/GeometryCache/Source/GeometryCacheStreamer/Private/GeometryCacheStreamer.cpp:24

Scope: file

Source code excerpt:

static bool GGeoCacheStreamerBlockTillFinishStreaming = false;
static FAutoConsoleVariableRef CVarBlockTillFinishStreaming(
	TEXT("GeometryCache.Streamer.BlockTillFinishStreaming"),
	GGeoCacheStreamerBlockTillFinishStreaming,
	TEXT("Force the GeometryCache streamer to block until it has finished streaming all the requested frames"));

class FGeometryCacheStreamer : public IGeometryCacheStreamer
{
public:

#Loc: <Workspace>/Engine/Plugins/MovieScene/MovieRenderPipeline/Source/MovieRenderPipelineCore/Private/Graph/Nodes/MovieGraphGlobalGameOverrides.cpp:72

Scope (from outer to inner):

file
function     void UMovieGraphGlobalGameOverridesNode::BuildNewProcessCommandLineArgsImpl

Source code excerpt:

#if WITH_EDITOR
	{
		InOutDeviceProfileCvars.Add(TEXT("GeometryCache.Streamer.BlockTillFinishStreaming=1"));
		InOutDeviceProfileCvars.Add(TEXT("GeometryCache.Streamer.ShowNotification=0"));
	}
#endif

	InOutDeviceProfileCvars.Add(FString::Printf(TEXT("a.URO.Enable=%d"), 0));
	InOutDeviceProfileCvars.Add(FString::Printf(TEXT("r.SkyLight.RealTimeReflectionCapture.TimeSlice=%d"), 0));

#Loc: <Workspace>/Engine/Plugins/MovieScene/MovieRenderPipeline/Source/MovieRenderPipelineCore/Private/Graph/Nodes/MovieGraphGlobalGameOverrides.cpp:142

Scope (from outer to inner):

file
function     void UMovieGraphGlobalGameOverridesNode::ApplySettings

Source code excerpt:

#if WITH_EDITOR
		// To make sure the GeometryCache streamer doesn't skip frames and doesn't pop up notification during rendering
		MOVIEPIPELINE_STORE_AND_OVERRIDE_CVAR_INT_IF_EXIST(PreviousGeoCacheStreamerBlockTillFinish, TEXT("GeometryCache.Streamer.BlockTillFinishStreaming"), 1, bOverrideValues);
		MOVIEPIPELINE_STORE_AND_OVERRIDE_CVAR_INT_IF_EXIST(PreviousGeoCacheStreamerShowNotification, TEXT("GeometryCache.Streamer.ShowNotification"), 0, bOverrideValues);
#endif

		// Disable systems that try to preserve performance in runtime games.
		MOVIEPIPELINE_STORE_AND_OVERRIDE_CVAR_INT(PreviousAnimationUROEnabled, TEXT("a.URO.Enable"), 0, bOverrideValues);

#Loc: <Workspace>/Engine/Plugins/MovieScene/MovieRenderPipeline/Source/MovieRenderPipelineCore/Private/MoviePipelineGameOverrideSetting.cpp:105

Scope (from outer to inner):

file
function     void UMoviePipelineGameOverrideSetting::ApplyCVarSettings

Source code excerpt:

#if WITH_EDITOR
	// To make sure the GeometryCache streamer doesn't skip frames and doesn't pop up notification during rendering
	MOVIEPIPELINE_STORE_AND_OVERRIDE_CVAR_INT_IF_EXIST(PreviousGeoCacheStreamerBlockTillFinish, TEXT("GeometryCache.Streamer.BlockTillFinishStreaming"), 1, bOverrideValues);
	MOVIEPIPELINE_STORE_AND_OVERRIDE_CVAR_INT_IF_EXIST(PreviousGeoCacheStreamerShowNotification, TEXT("GeometryCache.Streamer.ShowNotification"), 0, bOverrideValues);
#endif

	{
		// Disable systems that try to preserve performance in runtime games.
		MOVIEPIPELINE_STORE_AND_OVERRIDE_CVAR_INT(PreviousAnimationUROEnabled, TEXT("a.URO.Enable"), 0, bOverrideValues);

#Loc: <Workspace>/Engine/Plugins/MovieScene/MovieRenderPipeline/Source/MovieRenderPipelineCore/Private/MoviePipelineGameOverrideSetting.cpp:227

Scope (from outer to inner):

file
function     void UMoviePipelineGameOverrideSetting::BuildNewProcessCommandLineArgsImpl

Source code excerpt:

#if WITH_EDITOR
	{
		InOutDeviceProfileCvars.Add(TEXT("GeometryCache.Streamer.BlockTillFinishStreaming=1"));
		InOutDeviceProfileCvars.Add(TEXT("GeometryCache.Streamer.ShowNotification=0"));
	}
#endif

	{
		InOutDeviceProfileCvars.Add(FString::Printf(TEXT("a.URO.Enable=%d"), 0));