Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
GIProbe¶
Inherits: VisualInstance < CullInstance < Spatial < Node < Object
Sonda de iluminación global (GI) en tiempo real.
Descripción¶
GIProbe
s 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. GIProbe
s 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 GIProbe
s 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/voxel_cone_tracing/high_quality.
Procedural generation: GIProbe
can be baked in an exported project, which makes it suitable for procedurally generated or user-built levels as long as all the geometry is generated in advance.
Performance: GIProbe
is relatively demanding on the GPU and is not suited to low-end hardware such as integrated graphics (consider BakedLightmap instead). To provide a fallback for low-end hardware, consider adding an option to disable GIProbe
in your project's options menus. A GIProbe
node can be disabled by hiding it.
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. To further prevent light leaks, you can also strategically place temporary MeshInstance nodes with GeometryInstance.use_in_baked_light enabled. These temporary nodes can then be hidden after baking the GIProbe
node.
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
.
Tutoriales¶
GI probes
Propiedades¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Métodos¶
void |
bake ( Node from_node=null, bool create_visual_debug=false ) |
void |
debug_bake ( ) |
Enumeraciones¶
enum Subdiv:
SUBDIV_64 = 0 --- Utilice las 64 subdivisiones. Este es el ajuste de menor calidad, pero el más rápido. Úsalo si puedes, pero sobre todo úsalo en el hardware de gama baja.
SUBDIV_128 = 1 --- Utiliza 128 subdivisiones. Este es el ajuste de calidad predeterminado.
SUBDIV_256 = 2 --- Utilice 256 subdivisiones.
SUBDIV_512 = 3 --- Use 512 subdivisions. This is the highest quality setting, but the slowest. On lower-end hardware, this could cause the GPU to stall.
SUBDIV_MAX = 4 --- Representa el tamaño del enum Subdiv.
Descripciones de Propiedades¶
float bias
Default |
|
Setter |
set_bias(value) |
Getter |
get_bias() |
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 normal_bias 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.
bool compress
Default |
|
Setter |
set_compress(value) |
Getter |
is_compressed() |
Deprecated. This property has been deprecated due to known bugs and no longer has any effect when enabled.
GIProbeData data
Setter |
set_probe_data(value) |
Getter |
get_probe_data() |
El recurso GIProbeData que contiene los datos para este GIProbe
.
int dynamic_range
Default |
|
Setter |
set_dynamic_range(value) |
Getter |
get_dynamic_range() |
The maximum brightness that the GIProbe
will recognize. Brightness will be scaled within this range.
float energy
Default |
|
Setter |
set_energy(value) |
Getter |
get_energy() |
Energy multiplier. Makes the lighting contribution from the GIProbe
brighter.
Vector3 extents
Default |
|
Setter |
set_extents(value) |
Getter |
get_extents() |
El tamaño del área cubierta por la GIProbe
. Si haces las extensiones más grandes sin aumentar las subdivisiones con subdiv, el tamaño de cada celda aumentará y resultará en una menor iluminación detallada.
bool interior
Default |
|
Setter |
set_interior(value) |
Getter |
is_interior() |
If true
, ignores the sky contribution when calculating lighting.
float normal_bias
Default |
|
Setter |
set_normal_bias(value) |
Getter |
get_normal_bias() |
Offsets the lookup into the GIProbe
based on the object's normal direction. Can be used to reduce some self-shadowing artifacts.
float propagation
Default |
|
Setter |
set_propagation(value) |
Getter |
get_propagation() |
How much light propagates through the probe internally. A higher value allows light to spread further.
Subdiv subdiv
Default |
|
Setter |
set_subdiv(value) |
Getter |
get_subdiv() |
Número de veces para subdividir la red en la que opera el GIProbe
. Un número mayor resulta en un detalle más fino y por lo tanto en una mayor calidad visual, mientras que un número menor resulta en un mejor rendimiento.
Descripciones de Métodos¶
Bakes the effect from all GeometryInstances marked with GeometryInstance.use_in_baked_light and Lights marked with either Light.BAKE_INDIRECT or 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.
Note: bake works from the editor and in exported projects. This makes it suitable for procedurally generated or user-built levels. Baking a GIProbe
generally takes from 5 to 20 seconds in most scenes. Reducing subdiv can speed up baking.
void debug_bake ( )
Llama a bake con create_visual_debug
activado.