IndirectLightVolumeclass

Dynamic Diffuse Global Illumination volume that provides indirect lighting using a 3D probe grid. Probes store irradiance and distance data in volume textures that can be sampled by shaders.

object→Component→IndirectLightVolume
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.IndirectLightVolume : Sandbox.Component

Constructors1

Showing 1 constructors

Methods6

Showing 6 methods

public static System.Threading.Tasks.Task BakeAll()PUBLICSTATIC

Returns:Task—

public System.Threading.Tasks.Task BakeProbes(System.Threading.CancellationToken ct = null)PUBLIC

Starts the probe baking process to capture lighting into the volume textures.

ParameterTypeDescription
ct = nullCancellationToken—
Returns:Task—

public void BakeProbesUnavailableMessage()PUBLIC

Explains why baking is unavailable until the scene has been saved.

Returns:void—

public void ClearProbeRelocation()PUBLIC

Clears all probe relocation offsets.

Returns:void—

public void ComputeProbeRelocation()PUBLIC

Computes probe relocation offsets for all probes in the volume. Uses iterative refinement with mesh tracing. All computations are relative to probe spacing for resolution-independent behavior.

Returns:void—

public void ExtendToSceneBounds()PUBLIC

Automatically sizes the volume to encompass all scene geometry.

Returns:void—

Properties17

Showing 17 properties

public int Sandbox.IndirectLightVolume.BakeVersion { get; set; }PUBLICGETSET

Encoding of the saved probe data. Missing versions use legacy visibility; version 1 stores normalized mean distance and standard deviation.

Returns:int—

public float Sandbox.IndirectLightVolume.BlendDistance { get; set; }PUBLICGETSET

Distance in world units over which the volume fades outward from its bounds. Remaining influence passes to overlapping volumes in the existing volume order.

Returns:float—

public BBox Sandbox.IndirectLightVolume.Bounds { get; set; }PUBLICGETSET

Local-space bounding box that defines the volume coverage area.

Returns:BBox—

public virtual int Sandbox.IndirectLightVolume.ComponentVersion { get; set; }PUBLICVIRTUALGETSET

Versions serialized probe settings while preserving existing scenes.

Returns:int—

public Sandbox.Texture Sandbox.IndirectLightVolume.IrradianceTexture { get; set; }PUBLICGETSET

Volume texture storing probe irradiance data (color).

Returns:Texture—

public float Sandbox.IndirectLightVolume.NormalBias { get; set; }PUBLICGETSET

World-space bias along surface normals to prevent self-occlusion artifacts.

Returns:float—

public int Sandbox.IndirectLightVolume.ProbeDensity { get; set; }PUBLICGETSET

Number of probe intervals per 1024 local units. Higher values increase probe resolution.

Returns:int—

public Sandbox.Texture Sandbox.IndirectLightVolume.RelocationTexture { get; set; }PUBLICGETSET

Volume texture storing probe relocation offsets (XYZ = offset, W = active).

Returns:Texture—

public Sandbox.TagSet Sandbox.IndirectLightVolume.RenderExcludeTags { get; set; }PUBLICGETSET

Objects with any of these tags will be excluded when baking probes for this volume.

Returns:TagSet—

public float Sandbox.IndirectLightVolume.RuntimeContrast { get; set; }PUBLICGETSET

Adjusts sampled indirect lighting around 0.18 in linear light. One is unchanged. Applies immediately without rebaking and is excluded from probe captures.

Returns:float—

public float Sandbox.IndirectLightVolume.RuntimeIntensity { get; set; }PUBLICGETSET

Multiplies sampled indirect lighting without changing the baked textures.

Returns:float—

public float Sandbox.IndirectLightVolume.RuntimeSaturation { get; set; }PUBLICGETSET

Adjusts the color of sampled indirect lighting. Zero is grayscale; one is unchanged. Applies immediately without rebaking and is excluded from probe captures.

Returns:float—

public Color Sandbox.IndirectLightVolume.RuntimeTint { get; set; }PUBLICGETSET

Multiplies sampled indirect lighting by an RGB tint. Alpha is ignored.

Returns:Color—

public float Sandbox.IndirectLightVolume.ViewBias { get; set; }PUBLICGETSET

World-space bias toward the viewing position to reduce self-occlusion at corners in new bakes.

Returns:float—

On this page

Constructorspublic IndirectLightVolume()Methodspublic static System.Threading.Tasks.Task BakeAll()public System.Threading.Tasks.Task BakeProbes(System.Threading.CancellationToken ct = null)public System.Void BakeProbesUnavailableMessage()public System.Void ClearProbeRelocation()public System.Void ComputeProbeRelocation()public System.Void ExtendToSceneBounds()Propertiespublic System.Int32 Sandbox.IndirectLightVolume.BakeVersion { get; set; }public System.Single Sandbox.IndirectLightVolume.BlendDistance { get; set; }public BBox Sandbox.IndirectLightVolume.Bounds { get; set; }public virtual System.Int32 Sandbox.IndirectLightVolume.ComponentVersion { get; set; }public Sandbox.Texture Sandbox.IndirectLightVolume.DistanceTexture { get; set; }public Sandbox.IndirectLightVolume.InsideGeometryBehavior Sandbox.IndirectLightVolume.InsideGeometry { get; set; }public Sandbox.Texture Sandbox.IndirectLightVolume.IrradianceTexture { get; set; }public System.Single Sandbox.IndirectLightVolume.NormalBias { get; set; }public Vector3Int Sandbox.IndirectLightVolume.ProbeCounts { get; set; }public System.Int32 Sandbox.IndirectLightVolume.ProbeDensity { get; set; }public Sandbox.Texture Sandbox.IndirectLightVolume.RelocationTexture { get; set; }public Sandbox.TagSet Sandbox.IndirectLightVolume.RenderExcludeTags { get; set; }public System.Single Sandbox.IndirectLightVolume.RuntimeContrast { get; set; }public System.Single Sandbox.IndirectLightVolume.RuntimeIntensity { get; set; }public System.Single Sandbox.IndirectLightVolume.RuntimeSaturation { get; set; }public Color Sandbox.IndirectLightVolume.RuntimeTint { get; set; }public System.Single Sandbox.IndirectLightVolume.ViewBias { get; set; }Metadata