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...
ReflectionProbe
Hérite de : VisualInstance3D < Node3D < Node < Object
Capture son environnement pour créer des réflexions rapides et précises depuis un point donné.
Description
Captures its surroundings as a cubemap, and stores versions of it with increasing levels of blur to simulate different material roughnesses.
The ReflectionProbe is used to create high-quality reflections at a low performance cost (when update_mode is UPDATE_ONCE). ReflectionProbes can be blended together and with the rest of the scene smoothly. ReflectionProbes can also be combined with VoxelGI, SDFGI (Environment.sdfgi_enabled) and screen-space reflections (Environment.ssr_enabled) to get more accurate reflections in specific areas. ReflectionProbes render all objects within their cull_mask, so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them as-is.
Note: Unlike VoxelGI and SDFGI, ReflectionProbes only source their environment from a WorldEnvironment node. If you specify an Environment resource within a Camera3D node, it will be ignored by the ReflectionProbe. This can lead to incorrect lighting within the ReflectionProbe.
Note: When using the Mobile rendering method, only 8 reflection probes can be displayed on each mesh resource, while the Compatibility rendering method only supports up to 2 reflection probes on each mesh. Attempting to display more than 8 reflection probes on a single mesh resource using the Mobile renderer will result in reflection probes flickering in and out as the camera moves, while the Compatibility renderer will not render any additional probes if more than 2 reflection probes are being used.
Note: When using the Mobile rendering method, reflection probes will only correctly affect meshes whose visibility AABB intersects with the reflection probe's AABB. If using a shader to deform the mesh in a way that makes it go outside its AABB, GeometryInstance3D.extra_cull_margin must be increased on the mesh. Otherwise, the reflection probe may not be visible on the mesh.
Tutoriels
Propriétés
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Énumérations
enum UpdateMode: 🔗
UpdateMode UPDATE_ONCE = 0
Mettre à jour la sonde une fois lors de la prochaine trame (recommandé pour la plupart des objets). La radiance map correspondante sera générée sur les six trames suivantes. Cela prend plus de temps pour mettre à jour que UPDATE_ALWAYS, mais a un coût sur les performances inférieur et peut entraîner des réflexions de qualité supérieure. La ReflectionProbe est mise à jour lorsque sa transformation change, mais pas lorsque la géométrie voisine change. Vous pouvez forcer une ReflectionProbe à jour en déplaçant la ReflectionProbe légèrement dans n'importe quelle direction.
UpdateMode UPDATE_ALWAYS = 1
Met à jour la sonde à chaque trame. Cela fournit de meilleurs résultats pour les objets dynamiques en mouvement rapide (comme les voitures). Cependant, cela a un coût sur les performances important. En raison du coût, il est recommandé d'utiliser seulement une ReflectionProbe avec UPDATE_ALWAYS au maximum par scène. Pour tous les autres cas d'utilisation, utilisez UPDATE_ONCE.
enum AmbientMode: 🔗
AmbientMode AMBIENT_DISABLED = 0
Do not apply any ambient lighting inside the ReflectionProbe's box defined by its size.
AmbientMode AMBIENT_ENVIRONMENT = 1
Apply automatically-sourced environment lighting inside the ReflectionProbe's box defined by its size.
AmbientMode AMBIENT_COLOR = 2
Apply custom ambient lighting inside the ReflectionProbe's box defined by its size. See ambient_color and ambient_color_energy.
Descriptions des propriétés
Color ambient_color = Color(0, 0, 0, 1) 🔗
La couleur ambiante personnalisée à utiliser dans la boîte de la ReflectionProbe définie par sa taille size. Seulement effectif si ambient_mode vaut AMBIENT_COLOR.
float ambient_color_energy = 1.0 🔗
L'énergie de la couleur ambiante personnalisée à utiliser dans la boîte de la ReflectionProbe définie par sa taille size. Seulement effective si ambient_mode vaut AMBIENT_COLOR.
AmbientMode ambient_mode = 1 🔗
void set_ambient_mode(value: AmbientMode)
AmbientMode get_ambient_mode()
La couleur ambiante personnalisée à utiliser dans la boîte de la ReflectionProbe définie par sa taille size. La couleur ambiante se mélangera en douceur avec d'autres ReflectionProbes et le reste de la scène (à l'extérieur de la boîte de la ReflectionProbe définie par sa taille size).
Définit la distance en mètres sur laquelle une sonde se mélange avec la scène.
Si true, active la projection sur boîte. Cela rend les réflexions plus correctes dans les salles en forme de rectangle en décalant le centre de réflexion en fonction de l'emplacement de la caméra.
Note : Pour mieux s'adapter aux pièces en forme de rectangle qui ne sont pas alignées sur la grille, vous pouvez tourner le nœud ReflectionProbe.
Sets the cull mask which determines what objects are drawn by this probe. Every VisualInstance3D with a layer included in this cull mask will be rendered by the probe. It is best to only include large objects which are likely to take up a lot of space in the reflection in order to save on rendering cost.
This can also be used to prevent an object from reflecting upon itself (for instance, a ReflectionProbe centered on a vehicle).
If true, computes shadows in the reflection probe. This makes the reflection probe slower to render; you may want to disable this if using the UPDATE_ALWAYS update_mode.
Définit l'intensité de la réflexion. L'intensité modifie l'importance de l'effet de réflexion.
If true, reflections will ignore sky contribution.
The maximum distance away from the ReflectionProbe an object can be before it is culled. Decrease this to improve performance, especially when using the UPDATE_ALWAYS update_mode.
Note: The maximum reflection distance is always at least equal to the probe's extents. This means that decreasing max_distance will not always cull objects from reflections, especially if the reflection probe's box defined by its size is already large.
float mesh_lod_threshold = 1.0 🔗
The automatic LOD bias to use for meshes rendered within the ReflectionProbe (this is analog to Viewport.mesh_lod_threshold). Higher values will use less detailed versions of meshes that have LOD variations generated. If set to 0.0, automatic LOD is disabled. Increase mesh_lod_threshold to improve performance at the cost of geometry detail, especially when using the UPDATE_ALWAYS update_mode.
Note: mesh_lod_threshold does not affect GeometryInstance3D visibility ranges (also known as "manual" LOD or hierarchical LOD).
Vector3 origin_offset = Vector3(0, 0, 0) 🔗
Sets the origin offset to be used when this ReflectionProbe is in box_projection mode. This can be set to a non-zero value to ensure a reflection fits a rectangle-shaped room, while reducing the number of objects that "get in the way" of the reflection.
int reflection_mask = 1048575 🔗
Sets the reflection mask which determines what objects have reflections applied from this probe. Every VisualInstance3D with a layer included in this reflection mask will have reflections applied from this probe. See also cull_mask, which can be used to exclude objects from appearing in the reflection while still making them affected by the ReflectionProbe.
Vector3 size = Vector3(20, 20, 20) 🔗
The size of the reflection probe. The larger the size, the more space covered by the probe, which will lower the perceived resolution. It is best to keep the size only as large as you need it.
Note: To better fit areas that are not aligned to the grid, you can rotate the ReflectionProbe node.
UpdateMode update_mode = 0 🔗
void set_update_mode(value: UpdateMode)
UpdateMode get_update_mode()
Définit la fréquence de mise à jour de la ReflectionProbe. Peut être UPDATE_ONCE ou UPDATE_ALWAYS.