bUseRadiositySolverForLightMultibounce
bUseRadiositySolverForLightMultibounce
#Overview
name: bUseRadiositySolverForLightMultibounce
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 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bUseRadiositySolverForLightMultibounce is to control the lighting calculation method for multi-bounce light interactions in Unreal Engine’s lightmass system. Specifically, it determines whether to use a radiosity solver for calculating light bounces from direct light sources.
This setting variable is primarily used within the Lightmass subsystem, which is responsible for global illumination calculations in Unreal Engine. It’s part of the static lighting system and affects how indirect lighting is computed.
The value of this variable is set in the Lightmass configuration file (GLightmassIni). It’s read from the “DevOptions.ImportanceTracing” section of this config file.
This variable interacts with other lighting-related settings, particularly those in the ImportanceTracingSettings struct. It works in conjunction with other variables like bUseRadiositySolverForSkylightMultibounce and bCacheFinalGatherHitPointsForRadiosity to fine-tune the global illumination calculation process.
Developers must be aware that enabling this option may impact performance and build times for lightmass calculations. It can potentially provide more accurate results for indirect lighting from direct light sources, but at the cost of increased computation time.
Best practices when using this variable include:
- Only enable it if you need higher quality indirect lighting and can afford longer build times.
- Test the impact on your specific scenes, as the benefits may vary depending on scene complexity and lighting setup.
- Use in combination with other lightmass settings to achieve the desired balance between quality and performance.
- Consider using it selectively for final builds rather than during iterative development to save time.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseLightmass.ini:163, section: [DevOptions.ImportanceTracing]
- INI Section:
DevOptions.ImportanceTracing
- Raw value:
False
- Is Array:
False
#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:2342
Scope (from outer to inner):
file
function void FLightmassExporter::WriteSceneSettings
Source code excerpt:
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;
VERIFYLIGHTMASSINI(GConfig->GetBool(TEXT("DevOptions.PhotonMapping"), TEXT("bUseFinalGathering"), bConfigBool, GLightmassIni));
Scene.PhotonMappingSettings.bUseFinalGathering = bConfigBool;
#Loc: <Workspace>/Engine/Source/Programs/UnrealLightmass/Private/Lighting/Radiosity.cpp:415
Scope (from outer to inner):
file
namespace Lightmass
function void FStaticLightingSystem::RadiositySetupTextureMapping
Source code excerpt:
}
if (ImportanceTracingSettings.bUseRadiositySolverForLightMultibounce)
{
FGatheredLightSample DirectLighting;
float Unused2;
TArray<FVector3f, TInlineAllocator<1>> VertexOffsets;
VertexOffsets.Add(FVector3f(0, 0, 0));
#Loc: <Workspace>/Engine/Source/Programs/UnrealLightmass/Private/Lighting/Radiosity.cpp:618
Scope (from outer to inner):
file
namespace Lightmass
function void FStaticLightingSystem::RadiosityIterationTextureMapping
Source code excerpt:
{
FFinalGatherSample UniformSampledIncomingRadiance;
//@todo - find and pass in photons from the appropriate bounce number to improve bUseRadiositySolverForLightMultibounce quality
TArray<FVector4f> ImportancePhotonDirections;
FLightingCacheGatherInfo GatherInfo;
// Gather previous iteration results (double buffer)
EHemisphereGatherClassification GatherClassification = SourceRadiosityBufferIndex == 0 ? GLM_GatherRadiosityBuffer0 : GLM_GatherRadiosityBuffer1;
#Loc: <Workspace>/Engine/Source/Programs/UnrealLightmass/Private/Lighting/TextureMapping.cpp:650
Scope (from outer to inner):
file
namespace Lightmass
function void FStaticLightingSystem::FinalizeSurfaceCacheTextureMapping
Source code excerpt:
if ((GeneralSettings.ViewSingleBounceNumber < 0 || GeneralSettings.ViewSingleBounceNumber >= 2)
&& !ImportanceTracingSettings.bUseRadiositySolverForLightMultibounce
&& PhotonMappingSettings.bUseIrradiancePhotons)
{
const FIrradiancePhoton* NearestPhoton = TextureMapping->CachedIrradiancePhotons[SurfaceCacheIndex];
if (NearestPhoton)
{
#Loc: <Workspace>/Engine/Source/Programs/UnrealLightmass/Public/SceneExport.h:552
Scope (from outer to inner):
file
namespace Lightmass
class class FImportanceTracingSettings
Source code excerpt:
* Has lower quality than photons in difficult indoor scenarios but useful as a reference.
*/
bool bUseRadiositySolverForLightMultibounce;
};
/** Settings controlling photon mapping behavior. */
class FPhotonMappingSettings
{
public: