API Reference · Lights
EnvironmentProbe
Namespace: Ava3D
public sealed class EnvironmentProbe
A baked room reflection with world-space box influence and box-projected specular parallax. Place the capture position inside Bounds and overlap room bounds at doorways for a smooth blend. Mutations require Ava3DView.InvalidateScene. A new Image is filtered on a worker while the atlas made from the old one keeps drawing; see EnvironmentProbe.Replace.
Properties
| Member | Description |
|---|
float BlendDistance { get; set; }
| Distance inside the box over which its contribution fades in. Default 0.5 world units. |
BoundingBox Bounds { get; set; }
| World-space influence and reflection proxy box. Must have positive extent on every axis. |
EnvironmentImage Image { get; set; }
| Room's immutable equirectangular radiance. Null disables this probe. |
float Intensity { get; set; }
| Linear radiance multiplier, clamped to 0..8 when prepared. |
string Name { get; set; }
| Optional diagnostic name. |
Vector3 Position { get; set; }
| World-space location at which the image was captured. Must lie inside Bounds, or the probe is disabled with a diagnostic. |
int Priority { get; set; }
| Higher priorities receive the two available room slots; ties keep collection order. |
float Rotation { get; set; }
| Rotation about world up in radians. |
Methods
| Member | Description |
|---|
Threading.Tasks.Task<EnvironmentImage> CaptureAsync(SceneRenderer renderer, Scene scene, ProbeCaptureOptions options = null, Threading.CancellationToken cancellationToken = default)
| Renders the room from EnvironmentProbe.Position as six 90° faces — looking along each axis, with the scene's own materials, lights and exposure but no tone map, bloom or vignette — and folds them into a new equirectangular EnvironmentImage: what this probe's own filter consumes once given to EnvironmentProbe.Replace. Always captures in linear radiance, forcing Scene.LinearHdr on for this render alone when the scene does not already have it. By default the capture does not see this scene's own room probes; see ProbeCaptureOptions.IncludeProbes. rendererRenders the six faces. A GPU preference falls back to the software renderer, which always exists, so a capture never depends on a live view being open. sceneThe room to capture. Read from the calling thread between faces; not changed. optionsFace size, exclusion, room-probe visibility and a cache key; defaults if null. cancellationTokenChecked before each of the six faces.
|
void Replace(EnvironmentImage image)
| Gives the probe a new image — a fresh capture of the room, usually. The swap never leaves the room unlit: the atlas filtered from the old image keeps drawing until the new one has been filtered, on a worker, and the scene then switches in one frame. Invalidate the view afterwards, as for any other change to a probe. imageThe room's new radiance. Set EnvironmentProbe.Image to null to disable the probe instead.
|
See also