Struct GIProbe

Real-time global illumination (GI) probe.

struct GIProbe ;

GIProbes are used to provide high-quality real-time indirect light to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. GIProbes need to be baked before using, however, once baked, dynamic objects will receive light from them. Further, lights can be fully dynamic or baked. Having GIProbes in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the ProjectSettings using ProjectSettings.rendering/quality/voxelConeTracing/highQuality.

Properties

NameTypeDescription
bias[get, set] doubleOffsets the lookup of the light contribution from the GIProbe. This can be used to avoid self-shadowing, but may introduce light leaking at higher values. This and normalBias should be played around with to minimize self-shadowing and light leaking. Note: bias should usually be above 1.0 as that is the size of the voxels.
compress[get, set] boolIf true, the data for this GIProbe will be compressed. Compression saves space, but results in far worse visual quality.
data[get, set] GIProbeDataThe GIProbeData resource that holds the data for this GIProbe.
dynamicRange[get, set] longThe maximum brightness that the GIProbe will recognize. Brightness will be scaled within this range.
energy[get, set] doubleEnergy multiplier. Makes the lighting contribution from the GIProbe brighter.
extents[get, set] Vector3The size of the area covered by the GIProbe. If you make the extents larger without increasing the subdivisions with subdiv, the size of each cell will increase and result in lower detailed lighting.
interior[get, set] boolIf true, ignores the sky contribution when calculating lighting.
normalBias[get, set] doubleOffsets the lookup into the GIProbe based on the object's normal direction. Can be used to reduce some self-shadowing artifacts.
propagation[get, set] doubleHow much light propagates through the probe internally. A higher value allows light to spread further.
subdiv[get, set] GIProbe.SubdivNumber of times to subdivide the grid that the GIProbe operates on. A higher number results in finer detail and thus higher visual quality, while lower numbers result in better performance.

Methods

NameDescription
bake Bakes the effect from all GeometryInstances marked with GeometryInstance.useInBakedLight and Lights marked with either constant Light.BAKE_INDIRECT or constant Light.BAKE_ALL. If create_visual_debug is true, after baking the light, this will generate a MultiMesh that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the GIProbe's data and debug any issues that may be occurring.
debugBake Calls bake with create_visual_debug enabled.
getBias
getDynamicRange
getEnergy
getExtents
getNormalBias
getProbeData
getPropagation
getSubdiv
isCompressed
isInterior
setBias
setCompress
setDynamicRange
setEnergy
setExtents
setInterior
setNormalBias
setProbeData
setPropagation
setSubdiv

Enums

NameDescription
Constants
Subdiv