Detailed explanation of "Streaming Usage" options for level streaming volumes

When using level streaming volumes, can anyone explain the exact differences between the 5 “Streaming Usage” options, namely:

  1. SVB Loading
  2. SVB Loading and Visibility
  3. SVB Visibility Blocking on Load
  4. SVB Blocking on Load
  5. SVB Loading Not Visible

(As far as I can see, no detailed explanation is given in the UE4 documentation.)

In some places, I would like to use level streaming for managing visibility only, i.e. the relevant assets will already be loaded in memory but I wish to hide distant objects until the player gets close to them for performance reasons. Is setting the level’s streaming method to “Always Loaded” and selecting “SVB Visibility Blocking on Load” as the streaming usage a good way of achieving this?

Also, what is the difference between usage 1 (SVB Loading) and usage 5 (SVB Loading Not Visible), as neither seems to make the newly streamed level visible?

Thanks!

After a little digging through the engine source code, I think a partial explanation is provided at lines 398 onwards of UnrealEngine/Engine/Source/Runtime/Engine/Private/LevelTick.cpp:

FVisibleLevelStreamingSettings( EStreamingVolumeUsage Usage )
	{
		switch( Usage )
		{
		case SVB_Loading:
			bShouldBeVisible		= false;
			bShouldBlockOnLoad		= false;
			bShouldChangeVisibility	= false;
			break;
		case SVB_LoadingNotVisible:
			bShouldBeVisible		= false;
			bShouldBlockOnLoad		= false;
			bShouldChangeVisibility	= true;
			break;
		case SVB_LoadingAndVisibility:
			bShouldBeVisible		= true;
			bShouldBlockOnLoad		= false;
			bShouldChangeVisibility	= true;
			break;
		case SVB_VisibilityBlockingOnLoad:
			bShouldBeVisible		= true;
			bShouldBlockOnLoad		= true;
			bShouldChangeVisibility	= true;
			break;
		case SVB_BlockingOnLoad:
			bShouldBeVisible		= false;
			bShouldBlockOnLoad		= true;
			bShouldChangeVisibility	= false;
			break;
		default:
			UE_LOG(LogLevel, Fatal,TEXT("Unsupported usage %i"),(int32)Usage);
		}
	}

A little lower down in the source code (line 476 et seq.), some comments describe the effect of the 3 boolean variables “bShouldBeVisible”, “bShouldBlockOnLoad” and “bShouldChangeVisibility”:

    /** Whether level should be visible.						*/
	bool bShouldBeVisible;

	/** Whether level should block on load.						*/
	bool bShouldBlockOnLoad;

	/** Whether existing visibility settings should be changed. */
	bool bShouldChangeVisibility;

However, I have not yet answered my second question, i.e. whether level streaming volumes are a good way of managing visibility only (i.e. on the assumption that all assets are pre-loaded into memory at the level start).

1 Like

Wondering if you’ve answered the second question yet.

any answer for the second question ?

Hi,

We were investigating this and thought that the “SVB Visibility Blocking on Load” would change only visibility however it changed the loaded state too so we ended up doing the visibility streaming manually.

We loaded sublevels with level streaming volumes or initially loading them (without making them visible) and on the level we used trigger boxes to dynamically change visibility of the sublevels. (UE 4.19)

Functions:

  • Get Streaming Level
  • Is Level Loaded (Target is Level Streaming)
  • Is Level Visible (Target is Level Streaming)

Setting the IsLevelVisible variable on/off.

I hope this helps.