ReflectionProbe

Inherits: VisualInstance < Spatial < Node < Object

Captures its surroundings to create reflections.

Description

Capture its surroundings as a dual paraboloid image, 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 the cost of performance. It can be combined with GIProbes and Screen Space Reflections to achieve high quality reflections. 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.

Note: By default Godot will only render 16 reflection probes. If you need more, increase the number of atlas subdivisions. This setting can be found in ProjectSettings.rendering/quality/reflections/atlas_subdiv.

Tutorials

Properties

boolbox_projectionfalse
intcull_mask1048575
boolenable_shadowsfalse
Vector3extentsVector3( 1, 1, 1 )
floatintensity1.0
Colorinterior_ambient_colorColor( 0, 0, 0, 1 )
floatinterior_ambient_contrib0.0
floatinterior_ambient_energy1.0
boolinterior_enablefalse
floatmax_distance0.0
Vector3origin_offsetVector3( 0, 0, 0 )
UpdateModeupdate_mode0

Enumerations

enum UpdateMode:

  • UPDATE_ONCE = 0 —- Update the probe once on the next frame.
  • UPDATE_ALWAYS = 1 —- Update the probe every frame. This is needed when you want to capture dynamic objects. However, it results in an increased render time. Use UPDATE_ONCE whenever possible.

Property Descriptions

  • bool box_projection
Defaultfalse
Setterset_enable_box_projection(value)
Getteris_box_projection_enabled()

If true, enables box projection. This makes reflections look more correct in rectangle-shaped rooms by offsetting the reflection center depending on the camera’s location.


Default1048575
Setterset_cull_mask(value)
Getterget_cull_mask()

Sets the cull mask which determines what objects are drawn by this probe. Every VisualInstance 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.


  • bool enable_shadows
Defaultfalse
Setterset_enable_shadows(value)
Getterare_shadows_enabled()

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.


DefaultVector3( 1, 1, 1 )
Setterset_extents(value)
Getterget_extents()

The size of the reflection probe. The larger the extents the more space covered by the probe which will lower the perceived resolution. It is best to keep the extents only as large as you need them.


Default1.0
Setterset_intensity(value)
Getterget_intensity()

Defines the reflection intensity. Intensity modulates the strength of the reflection.


  • Color interior_ambient_color
DefaultColor( 0, 0, 0, 1 )
Setterset_interior_ambient(value)
Getterget_interior_ambient()

Sets the ambient light color to be used when this probe is set to interior_enable.


  • float interior_ambient_contrib
Default0.0
Setterset_interior_ambient_probe_contribution(value)
Getterget_interior_ambient_probe_contribution()

Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to interior_enable. Useful so that ambient light matches the color of the room.


  • float interior_ambient_energy
Default1.0
Setterset_interior_ambient_energy(value)
Getterget_interior_ambient_energy()

Sets the energy multiplier for this reflection probe’s ambient light contribution when set to interior_enable.


  • bool interior_enable
Defaultfalse
Setterset_as_interior(value)
Getteris_set_as_interior()

If true, reflections will ignore sky contribution. Ambient lighting is then controlled by the interior_ambient_* properties.


Default0.0
Setterset_max_distance(value)
Getterget_max_distance()

Sets the max distance away from the probe an object can be before it is culled.


DefaultVector3( 0, 0, 0 )
Setterset_origin_offset(value)
Getterget_origin_offset()

Sets the origin offset to be used when this reflection probe is in box project mode.


Default0
Setterset_update_mode(value)
Getterget_update_mode()

Sets how frequently the probe is updated. Can be UPDATE_ONCE or UPDATE_ALWAYS.