GIProbe

Real-time global illumination (GI) probe.

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. Note: Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh. Note: Due to a renderer limitation, emissive ShaderMaterials cannot emit light when used in a GIProbe. Only emissive SpatialMaterials can emit light in a GIProbe.

@GodotBaseClass
struct GIProbe {}

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

Constants
enum Constants
Subdiv
enum Subdiv

Functions

bake
void bake(Node from_node, bool create_visual_debug)

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
void debugBake()

Calls bake with create_visual_debug enabled.

getBias
double getBias()
getDynamicRange
long getDynamicRange()
getEnergy
double getEnergy()
getExtents
Vector3 getExtents()
getNormalBias
double getNormalBias()
getProbeData
Ref!GIProbeData getProbeData()
getPropagation
double getPropagation()
getSubdiv
GIProbe.Subdiv getSubdiv()
isCompressed
bool isCompressed()
isInterior
bool isInterior()
opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(GIProbe other)
opEquals
bool opEquals(typeof(null) n)
setBias
void setBias(double max)
setCompress
void setCompress(bool enable)
setDynamicRange
void setDynamicRange(long max)
setEnergy
void setEnergy(double max)
setExtents
void setExtents(Vector3 extents)
setInterior
void setInterior(bool enable)
setNormalBias
void setNormalBias(double max)
setProbeData
void setProbeData(GIProbeData data)
setPropagation
void setPropagation(double max)
setSubdiv
void setSubdiv(long subdiv)
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

bias
double bias [@property getter]
double bias [@property setter]

Offsets 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
bool compress [@property getter]
bool compress [@property setter]

If true, the data for this GIProbe will be compressed. Compression saves space, but results in far worse visual quality.

data
GIProbeData data [@property getter]
GIProbeData data [@property setter]

The GIProbeData resource that holds the data for this GIProbe.

dynamicRange
long dynamicRange [@property getter]
long dynamicRange [@property setter]

The maximum brightness that the GIProbe will recognize. Brightness will be scaled within this range.

energy
double energy [@property getter]
double energy [@property setter]

Energy multiplier. Makes the lighting contribution from the GIProbe brighter.

extents
Vector3 extents [@property getter]
Vector3 extents [@property setter]

The 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
bool interior [@property getter]
bool interior [@property setter]

If true, ignores the sky contribution when calculating lighting.

normalBias
double normalBias [@property getter]
double normalBias [@property setter]

Offsets the lookup into the GIProbe based on the object's normal direction. Can be used to reduce some self-shadowing artifacts.

propagation
double propagation [@property getter]
double propagation [@property setter]

How much light propagates through the probe internally. A higher value allows light to spread further.

subdiv
GIProbe.Subdiv subdiv [@property getter]
long subdiv [@property setter]

Number 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.

Static functions

_new
GIProbe _new()

Construct a new instance of GIProbe. Note: use memnew!GIProbe instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta