bUseRadiositySolverForSkylightMultibounce

bUseRadiositySolverForSkylightMultibounce

#Overview

name: bUseRadiositySolverForSkylightMultibounce

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 bUseRadiositySolverForSkylightMultibounce is to control the use of the radiosity solver for skylight multi-bounce calculations in Unreal Engine’s lighting system.

This setting variable is primarily used by the Lightmass subsystem, which is responsible for global illumination calculations in Unreal Engine. It is specifically related to the importance tracing and radiosity solving components of the lighting system.

The value of this variable is set through the Lightmass configuration file (GLightmassIni). It is read from the “DevOptions.ImportanceTracing” section of the configuration file using the GConfig system.

This variable interacts with other importance tracing and radiosity-related settings, such as bCacheFinalGatherHitPointsForRadiosity and bUseRadiositySolverForLightMultibounce. It is part of the FImportanceTracingSettings structure in the Lightmass namespace.

Developers should be aware that enabling this option may significantly impact performance and memory usage during lighting calculations. It affects how skylight multi-bounce illumination is computed, potentially providing more accurate results at the cost of increased computation time.

Best practices when using this variable include:

  1. Only enable it when high-quality skylight multi-bounce illumination is required.
  2. Consider the performance implications, especially for larger scenes.
  3. Use in conjunction with other radiosity and importance tracing settings for optimal results.
  4. Test the impact on lighting quality and build times before enabling in production environments.
  5. Be prepared for increased memory usage, especially when used with bCacheFinalGatherHitPointsForRadiosity.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseLightmass.ini:161, section: [DevOptions.ImportanceTracing]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.cpp:2340

Scope (from outer to inner):

file
function     void FLightmassExporter::WriteSceneSettings

Source code excerpt:

		Scene.ImportanceTracingSettings.AdaptiveFirstBouncePhotonConeAngle = FMath::Clamp(AdaptiveFirstBouncePhotonConeAngle, 0.0f, 90.0f) * (float)PI / 180.0f;

		VERIFYLIGHTMASSINI(GConfig->GetBool(TEXT("DevOptions.ImportanceTracing"), TEXT("bUseRadiositySolverForSkylightMultibounce"), Scene.ImportanceTracingSettings.bUseRadiositySolverForSkylightMultibounce, GLightmassIni));
		VERIFYLIGHTMASSINI(GConfig->GetBool(TEXT("DevOptions.ImportanceTracing"), TEXT("bCacheFinalGatherHitPointsForRadiosity"), Scene.ImportanceTracingSettings.bCacheFinalGatherHitPointsForRadiosity, GLightmassIni));
		VERIFYLIGHTMASSINI(GConfig->GetBool(TEXT("DevOptions.ImportanceTracing"), TEXT("bUseRadiositySolverForLightMultibounce"), Scene.ImportanceTracingSettings.bUseRadiositySolverForLightMultibounce, GLightmassIni));
	}
	{
		VERIFYLIGHTMASSINI(GConfig->GetBool(TEXT("DevOptions.PhotonMapping"), TEXT("bUsePhotonMapping"), bConfigBool, GLightmassIni));
		Scene.PhotonMappingSettings.bUsePhotonMapping = bConfigBool;

#Loc: <Workspace>/Engine/Source/Programs/UnrealLightmass/Private/Lighting/LightingSystem.cpp:616

Scope (from outer to inner):

file
namespace    Lightmass
function     void FStaticLightingSystem::MultithreadProcess

Source code excerpt:

	}

	if (ImportanceTracingSettings.bUseRadiositySolverForSkylightMultibounce)
	{
		SetupRadiosity();
		RunRadiosityIterations();
	}

	FinalizeSurfaceCache();

#Loc: <Workspace>/Engine/Source/Programs/UnrealLightmass/Public/SceneExport.h:540

Scope (from outer to inner):

file
namespace    Lightmass
class        class FImportanceTracingSettings

Source code excerpt:

	 * These light sources are not represented by photons so they need to be handled separately to have multiple bounces.
	 */
	bool bUseRadiositySolverForSkylightMultibounce;

	/** 
	 * Whether to cache final gather hit points for the radiosity algorithm, which reduces radiosity iteration time significantly but uses a lot of memory.
	 * Memory use is proportional to the lightmap texels in the scene and number of final gather rays.
	 */
	bool bCacheFinalGatherHitPointsForRadiosity;