Component:ReflectionProbe: Difference between revisions

From Resonite Wiki
Automated: update SyncDelegates
add info and clean up
Line 3: Line 3:
|Name=Reflection Probe
|Name=Reflection Probe
}}
}}
A reflection probe component is used to make points in space that makes reflective surfaces within a box around the point show a different reflection map than the skybox. This is useful for controlling the lighting and look of a scene.
The '''ReflectionProbe''' component is used to make points in space that makes reflective surfaces within a box around the point show a different reflection map than the skybox. This is useful for controlling the lighting and look of a scene.


== Fields ==
== Fields ==
Line 14: Line 14:
|BoxProjection|Bool| project the reflection map in a box shape from the reflection probe rather than a sphere.
|BoxProjection|Bool| project the reflection map in a box shape from the reflection probe rather than a sphere.
|BakedCubemap|{{RootFieldType|AssetRef`1|[[Type:Cubemap|Cubemap]]}}|TypeAdv6=true| The cube map to replace the refection maps of reflective objects with in the influence area of this reflection probe
|BakedCubemap|{{RootFieldType|AssetRef`1|[[Type:Cubemap|Cubemap]]}}|TypeAdv6=true| The cube map to replace the refection maps of reflective objects with in the influence area of this reflection probe
|ChangesSources|{{RootFieldType|SyncList`1|[[Type:RelayRef`1|RelayRef`1]]<[[Type:IChangeable|IChangeable]]>}}|TypeAdv7=true|
|ChangesSources|{{RootFieldType|SyncList`1|[[Type:RelayRef`1|RelayRef`1]]<[[Type:IChangeable|IChangeable]]>}}|TypeAdv7=true| A list of elements that will prompt this reflection probe to render a new map whenever they change.
|TimeSlicing|'''[[#TimeSlicingMode|ReflectionProbe.TimeSlicingMode]]'''|TypeAdv8=true| How updates to this reflection probe should happen in updates if this probe is a realtime probe.
|TimeSlicing|'''[[#TimeSlicingMode|ReflectionProbe.TimeSlicingMode]]'''|TypeAdv8=true| How updates to this reflection probe should happen in updates if this probe is a realtime probe.
|Resolution|Int| the forced resolution of the reflection map from this reflection probe shown in the reflections of shiny objects.
|Resolution|Int| the forced resolution of the reflection map from this reflection probe shown in the reflections of shiny objects.
Line 23: Line 23:
|NearClip|Float| The closest distance to render from the reflection probe center when using "Realtime" on <code>ProbeType</code>
|NearClip|Float| The closest distance to render from the reflection probe center when using "Realtime" on <code>ProbeType</code>
|FarClip|Float| The furthest distance to render from the reflection probe center when using "Realtime" on <code>ProbeType</code>
|FarClip|Float| The furthest distance to render from the reflection probe center when using "Realtime" on <code>ProbeType</code>
|SkyboxOnly|Bool|
|SkyboxOnly|Bool| Whether to render only the skybox or not.
|ShowDebugVisuals|Bool| Shows the box influence area and the center point of this reflection probe
|ShowDebugVisuals|Bool| Shows the box influence area and the center point of this reflection probe
|_debugVisual|{{RootFieldType|SlotCleanupRef`1|[[Type:Slot|Slot]]}}|TypeAdv18=true| The current debug visual that this reflection probe is showing, if applicable.
|_debugVisual|{{RootFieldType|SlotCleanupRef`1|[[Type:Slot|Slot]]}}|TypeAdv18=true| The current debug visual that this reflection probe is showing, if applicable.
Line 35: Line 35:


== Type ==
== Type ==
An [[:Category:Enums|Enum]] of "Realtime" or "Baked" realtime renders a new cube map outwards from the center of the probe every second while baked will use the provided <code>BakedCubemap</code>
{{Table EnumValues
|Realtime|0| render a new cube map outwards from the center of the probe every second
|OnChanges|1| render a new cubemap every time one of the elements in <code>ChangesSources</code> changes.
|Baked|1| use the provided <code>BakedCubemap</code>
}}


== Clear ==
== Clear ==
An [[:Category:Enums|Enum]] of "Skybox" or "Color". Color backs the transparent parts of the reflection map with <code>BackgroundColor</code> due to far or near clipping with realtime, or transparent pixels in the provided <code>BakedCubemap</code>. Skybox when selected will instead back transparent parts with the Skybox of the world.
{{Table EnumValues
|Skybox|0| back transparent parts of the reflection map due to far or near clipping or transparent pixels in the provided <code>BakedCubemap</code> with the Skybox of the world.
|Color|1| backs the transparent parts of the reflection map due to far or near clipping with realtime, or transparent pixels in the provided <code>BakedCubemap</code> with <code>BackgroundColor</code>.
}}


== TimeSlicingMode ==
== TimeSlicingMode ==
Line 46: Line 53:
|NoTimeSlicing|2| No time slicing should be applied to capturing. Update happens within one frame.
|NoTimeSlicing|2| No time slicing should be applied to capturing. Update happens within one frame.
}}
}}
An [[:Category:Enums|Enum]]


== Usage ==
== Usage ==
{{stub}}
Attach to a slot to start using this component as a point source for reflection map data.


== Examples ==
== Examples ==
{{stub}}
Can be used for real time lighting changes, or to create custom reflection maps in an area.


== See Also ==
== See Also ==

Revision as of 21:54, 7 April 2025

Component image 
Reflection Probe component as seen in the Scene Inspector

The ReflectionProbe component is used to make points in space that makes reflective surfaces within a box around the point show a different reflection map than the skybox. This is useful for controlling the lighting and look of a scene.

Fields

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't.
ProbeType ReflectionProbe.Type What mode this reflection probe uses.
Importance Int How much priority this probe takes over another probe when two probes overlap
Intensity Float how strong or bright the reflection is
BlendDistance Float how far the probe will slowly take over the reflection map of objects as an object goes towards the center of influence
BoxSize Float3 the area that this reflection probe will affect the reflection maps of objects
BoxProjection Bool project the reflection map in a box shape from the reflection probe rather than a sphere.
BakedCubemap Cubemap The cube map to replace the refection maps of reflective objects with in the influence area of this reflection probe
ChangesSources list of RelayRef`1<IChangeable> A list of elements that will prompt this reflection probe to render a new map whenever they change.
TimeSlicing ReflectionProbe.TimeSlicingMode How updates to this reflection probe should happen in updates if this probe is a realtime probe.
Resolution Int the forced resolution of the reflection map from this reflection probe shown in the reflections of shiny objects.
HDR Bool Whether the color encoding should be in HDR.
ShadowDistance Float how far to render shadows from the reflection probe
ClearFlags ReflectionProbe.Clear Whether to use the skybox or color when backing transparent pixels
BackgroundColor ColorX The color to clear with when ClearFlags is set to "Color"
NearClip Float The closest distance to render from the reflection probe center when using "Realtime" on ProbeType
FarClip Float The furthest distance to render from the reflection probe center when using "Realtime" on ProbeType
SkyboxOnly Bool Whether to render only the skybox or not.
ShowDebugVisuals Bool Shows the box influence area and the center point of this reflection probe
_debugVisual direct SlotCleanupRef`1<Slot> The current debug visual that this reflection probe is showing, if applicable.

Sync Delegates

Triggers
Method Name Method type and Arguments. Is the method hidden? Description
OnBake:ButtonEventHandler ButtonEventHandler
Bake:Action Action X Creates a static cubemap and inserts it into BakedCubemap instead of having ProbeType be set to realtime.

Type

Values
Name Value Description
Realtime 0 render a new cube map outwards from the center of the probe every second
OnChanges 1 render a new cubemap every time one of the elements in ChangesSources changes.
Baked 1 use the provided BakedCubemap

Clear

Values
Name Value Description
Skybox 0 back transparent parts of the reflection map due to far or near clipping or transparent pixels in the provided BakedCubemap with the Skybox of the world.
Color 1 backs the transparent parts of the reflection map due to far or near clipping with realtime, or transparent pixels in the provided BakedCubemap with BackgroundColor.

TimeSlicingMode

Values
Name Value Description
AllFacesAtOnce 0 spreads update over 9 frames
IndividualFaces 1 spreads update over 14 frames
NoTimeSlicing 2 No time slicing should be applied to capturing. Update happens within one frame.

Usage

Attach to a slot to start using this component as a point source for reflection map data.

Examples

Can be used for real time lighting changes, or to create custom reflection maps in an area.

See Also