Cloud

Cloud

#Overview

name: Cloud

The value of this variable can be defined or overridden in .ini config files. 11 .ini config files referencing this setting variable.

It is referenced in 4 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of Cloud is to control the rendering of volumetric clouds in Unreal Engine 5’s rendering system. This setting variable is primarily used in the rendering subsystem, specifically for volumetric cloud rendering.

Based on the callsites provided, the Cloud variable is utilized in the following Unreal Engine subsystems and modules:

  1. HTTPChunkInstaller plugin
  2. Engine’s ShowFlags system
  3. BuildPatchServices module
  4. Renderer module

The value of this variable is typically set through the engine’s configuration system, as seen in the HTTPChunkInstaller plugin where it’s read from the GEngineIni file.

The Cloud variable interacts with other variables and systems, such as:

  1. EngineShowFlags.Atmosphere
  2. Scene’s VolumetricCloudRenderSceneInfo
  3. Material system (specifically materials with the Volume domain)

Developers should be aware of the following when using this variable:

  1. It’s part of the ShowFlags system, which means it can be toggled on/off in the editor and at runtime.
  2. It’s fixed in shipping builds, meaning its value cannot be changed in released games.
  3. It affects the rendering of volumetric clouds, which can have a significant impact on performance and visual quality.

Best practices when using this variable include:

  1. Ensure that the Cloud ShowFlag is enabled when you want to render volumetric clouds.
  2. Use it in conjunction with the Atmosphere ShowFlag for a complete sky rendering solution.
  3. Be mindful of its performance impact, especially on lower-end hardware.
  4. When creating materials for volumetric clouds, ensure they use the Volume domain for proper rendering.
  5. Consider the interaction between this setting and other cloud-related settings in your project configuration.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:2480, section: [StorageServers]

Location: <Workspace>/Engine/Config/BaseEngine.ini:2524, section: [DerivedDataBackendGraph]

Location: <Workspace>/Engine/Config/BaseEngine.ini:2539, section: [InstalledDerivedDataBackendGraph]

Location: <Workspace>/Engine/Config/BaseEngine.ini:2551, section: [NoZenLocalFallback]

Location: <Workspace>/Engine/Config/BaseEngine.ini:2560, section: [InstalledNoZenLocalFallback]

Location: <Workspace>/Engine/Config/BaseEngine.ini:2578, section: [ZenDDC]

Location: <Workspace>/Engine/Config/BaseEngine.ini:2632, section: [CreatePak]

Location: <Workspace>/Engine/Config/BaseEngine.ini:2644, section: [CreateInstalledProjectPak]

Location: <Workspace>/Engine/Config/BaseEngine.ini:2657, section: [CreateInstalledEnginePak]

Location: <Workspace>/Engine/Config/BaseEngine.ini:2668, section: [CreateInstalledEnterprisePak]

Location: <Workspace>/Engine/Config/BaseEngine.ini:2680, section: [CreateProjectCache]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Plugins/Runtime/HTTPChunkInstaller/Source/Private/HTTPChunkInstaller.cpp:1624

Scope (from outer to inner):

file
function     void FHTTPChunkInstall::InitialiseSystem

Source code excerpt:

#if !UE_BUILD_SHIPPING
		bDebugNoInstalledRequired = !bGetConfigDir;
#endif
	}
	CloudDirectory = TEXT("");
	CloudDir = FPaths::Combine(*FPaths::ProjectContentDir(), TEXT("Cloud"));
	StageDir = FPaths::Combine(*FPaths::ProjectSavedDir(), TEXT("Chunks"), TEXT("Staged"));
	InstallDir = FPaths::Combine(*FPaths::ProjectSavedDir(), TEXT("Chunks"), TEXT("Installed")); // By default this should match ContentDir
	BackupDir = FPaths::Combine(*FPaths::ProjectSavedDir(), TEXT("Chunks"), TEXT("Backup"));
	CacheDir = FPaths::Combine(*FPaths::ProjectSavedDir(), TEXT("Chunks"), TEXT("Cache"));
	HoldingDir = FPaths::Combine(*FPaths::ProjectSavedDir(), TEXT("Chunks"), TEXT("Hold"));
	ContentDir = FPaths::Combine(*FPaths::ProjectSavedDir(), TEXT("Chunks"), TEXT("Installed")); // By default this should match InstallDir

	FString TmpString1;
	FString TmpString2;
	if (GConfig->GetString(TEXT("HTTPChunkInstall"), TEXT("CloudDirectory"), TmpString1, GEngineIni))
	{

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:296

Scope: file

Source code excerpt:

/** Render the PostProcess Material */
SHOWFLAG_FIXED_IN_SHIPPING(1, PostProcessMaterial, SFG_PostProcess, NSLOCTEXT("UnrealEd", "PostProcessMaterialSF", "Post Process Material"))
/** Render Sky and Atmospheric lighting, for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(Atmosphere, SFG_Normal, NSLOCTEXT("UnrealEd", "AtmosphereSF", "Atmosphere"))
/** Render Cloud */
SHOWFLAG_FIXED_IN_SHIPPING(1, Cloud, SFG_Normal, NSLOCTEXT("UnrealEd", "CloudSF", "Cloud"))
/** Render safe frames bars*/
SHOWFLAG_FIXED_IN_SHIPPING(0, CameraAspectRatioBars, SFG_Advanced, NSLOCTEXT("UnrealEd", "CameraAspectRatioBarsSF", "Camera Aspect Ratio Bars"))
/** Render safe frames */
SHOWFLAG_FIXED_IN_SHIPPING(1, CameraSafeFrames, SFG_Advanced, NSLOCTEXT("UnrealEd", "CameraSafeFramesSF", "Camera Safe Frames"))
/** Render TextRenderComponents (3D text), for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(TextRender, SFG_Advanced, NSLOCTEXT("UnrealEd", "TextRenderSF", "Render (3D) Text"))
/** Any rendering/buffer clearing  (good for benchmarking and for pausing rendering while the app is not in focus to save cycles). */
SHOWFLAG_ALWAYS_ACCESSIBLE(Rendering, SFG_Hidden, NSLOCTEXT("UnrealEd", "RenderingSF", "Any Rendering")) // do not make it FIXED_IN_SHIPPING, used by Oculus plugin.
/** Show the current mask being used by the highres screenshot capture */
SHOWFLAG_FIXED_IN_SHIPPING(0, HighResScreenshotMask, SFG_Transient, NSLOCTEXT("UnrealEd", "HighResScreenshotMaskSF", "High Res Screenshot Mask"))
/** Distortion of output for HMD devices, SHOWFLAG_ALWAYS_ACCESSIBLE for now because USceneCaptureComponent needs that */

#Loc: <Workspace>/Engine/Source/Runtime/Online/BuildPatchServices/Private/BuildPatchInstaller.cpp:415

Scope (from outer to inner):

file
namespace    BuildPatchServices

Source code excerpt:

	};

	enum class EMemoryStore : int32
	{
		Install = 0,
		Cloud
	};

	/* FBuildPatchInstaller implementation
	*****************************************************************************/
	FBuildPatchInstaller::FBuildPatchInstaller(FBuildInstallerConfiguration InConfiguration, TMultiMap<FString, FBuildPatchAppManifestRef> InInstallationInfo, const FString& InLocalMachineConfigFile, TSharedPtr<IAnalyticsProvider> InAnalytics, FBuildPatchInstallerDelegate InStartDelegate, FBuildPatchInstallerDelegate InCompleteDelegate)
		: SessionId(FGuid::NewGuid())
		, Thread(nullptr)
		, StartDelegate(InStartDelegate)
		, CompleteDelegate(InCompleteDelegate)
		, Configuration(MoveTemp(InConfiguration))
		, DataStagingDir(Configuration.StagingDirectory / TEXT("PatchData"))

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VolumetricCloudRendering.cpp:247

Scope (from outer to inner):

file
function     bool ShouldRenderVolumetricCloud

Source code excerpt:

	return !CVarVolumetricCloudDisableCompute.GetValueOnRenderThread() && RHIIsTypedUAVLoadSupported(PF_R16F) && CVarVolumetricCloudEmptySpaceSkipping.GetValueOnRenderThread() > 0;
}

bool ShouldRenderVolumetricCloud(const FScene* Scene, const FEngineShowFlags& EngineShowFlags)
{
	if (Scene && Scene->HasVolumetricCloud() && EngineShowFlags.Atmosphere && EngineShowFlags.Cloud)
	{
		const FVolumetricCloudRenderSceneInfo* VolumetricCloud = Scene->GetVolumetricCloudSceneInfo();
		check(VolumetricCloud);

		bool bCloudMaterialValid = false;
		if (VolumetricCloud->GetVolumetricCloudSceneProxy().GetCloudVolumeMaterial())
		{
			FMaterialRenderProxy* CloudVolumeMaterialProxy = VolumetricCloud->GetVolumetricCloudSceneProxy().GetCloudVolumeMaterial()->GetRenderProxy();
			const FMaterialRenderProxy* FallbackMaterialRenderProxyPtr = nullptr;
			const FMaterial& MaterialTest = CloudVolumeMaterialProxy->GetMaterialWithFallback(Scene->GetFeatureLevel(), FallbackMaterialRenderProxyPtr);
			bCloudMaterialValid = MaterialTest.GetMaterialDomain() == MD_Volume;