Skip to content
lsl.devlsl.devLSL Dev

PRIM_REFLECTION_PROBE

constant
Constant
integer PRIM_REFLECTION_PROBE = 44;

Constant groups

PrimParam · PrimParamGet

Other PrimParam values (42)
Other PrimParamGet values (40)

PRIM_REFLECTION_PROBE is used to change the reflection probe configuration of the prim.

A reflection probe is a volume used for image-based lighting (IBL). It takes an image of its surroundings and uses it as the basis for reflection effects (shiny surfaces) and ambiance effects (light bouncing).

Typically, the viewer automatically places reflection probes. Prim-based probes enable artists to provide hints to the render engine to improve the quality of image based lighting. Only objects in the probe’s influence volume are affected.

Lighting is most accurate when the edges of a probe volume are near the geometry that appears in reflections. For example, objects inside a room with a box shaped reflection probe that hugs the walls, floor, and ceiling would show accurate reflections and ambient lighting from the walls of the room.

  • A viewer must have reflections enabled to see the effects of reflection probes.
  • By default, the viewer auto-places reflection probes with 0.0 ambiance. Environment settings for the region or parcel can be adjusted to increase reflection probe ambiance for these auto-placed probes.
  • Automatically-placed reflection probes do not image avatars. Imaging avatars in probes has a performance cost.
Increase the prim’s reflection probe ambiance when an agent is detected in the sensor range of the prim. Decrease the probe ambiance when an agent is no longer detected.
16 collapsed lines
integer probe_enabled = TRUE;
float probe_no_agent_ambiance = 0.0;
float probe_agent_ambiance = 1.0;
float probe_clip_distance = 0.0;
integer probe_flags = 0;
default
{
state_entry()
{
integer sensor_type = AGENT;
float sensor_range = 3.0;
float sensor_rate = 5.0;
llSensorRepeat("", "", sensor_type, sensor_range, PI, sensor_rate);
}
sensor(integer num_detected)
{
llSetPrimitiveParams([PRIM_REFLECTION_PROBE, probe_enabled, probe_agent_ambiance, probe_clip_distance, probe_flags]);
}
no_sensor()
{
llSetPrimitiveParams([PRIM_REFLECTION_PROBE, probe_enabled, probe_no_agent_ambiance, probe_clip_distance, probe_flags]);
}
}
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.