PRIM_REFLECTION_PROBE
integer PRIM_REFLECTION_PROBE = 44;llSetLinkPrimitiveParamsFastPRIM_REFLECTION_PROBE, integer enabled, float ambiance, float clip_distance, integer flagsllGetLinkPrimitiveParams, llGetPrimitiveParamsPRIM_REFLECTION_PROBE → integer enabled, float ambiance, float clip_distance, integer flagsinteger enabledfloat ambiance// Range 0–100float clip_distance// Range 0–1024integer flags// Values: ReflectionProbeType
Other PrimParam values (42)
PRIM_ALLOW_UNSIT39PRIM_ALPHA_MODE38PRIM_BUMP_SHINY19PRIM_CLICK_ACTION43PRIM_COLLISION_SOUND53PRIM_COLOR18PRIM_DAMAGE51PRIM_DESC28PRIM_FLEXIBLE21PRIM_FULLBRIGHT20PRIM_GLOW25PRIM_GLTF_BASE_COLOR48PRIM_GLTF_EMISSIVE46PRIM_GLTF_METALLIC_ROUGHNESS47PRIM_GLTF_NORMAL45PRIM_HEALTH52PRIM_LINK_TARGET34PRIM_MATERIAL2PRIM_NAME27PRIM_NORMAL37PRIM_OMEGA32PRIM_PHANTOM5PRIM_PHYSICS3PRIM_PHYSICS_SHAPE_TYPE30PRIM_POINT_LIGHT23PRIM_POS_LOCAL33PRIM_POSITION6PRIM_PROJECTOR42PRIM_RENDER_MATERIAL49PRIM_ROT_LOCAL29PRIM_ROTATION8PRIM_SCRIPTED_SIT_ONLY40PRIM_SIT_FLAGS50PRIM_SIT_TARGET41PRIM_SIZE7PRIM_SLICE35PRIM_SPECULAR36PRIM_TEMP_ON_REZ4PRIM_TEXGEN22PRIM_TEXT26PRIM_TEXTURE17PRIM_TYPE9
Other PrimParamGet values (40)
PRIM_ALLOW_UNSIT39PRIM_ALPHA_MODE38PRIM_BUMP_SHINY19PRIM_CLICK_ACTION43PRIM_COLLISION_SOUND53PRIM_COLOR18PRIM_DAMAGE51PRIM_DESC28PRIM_FLEXIBLE21PRIM_FULLBRIGHT20PRIM_GLOW25PRIM_GLTF_BASE_COLOR48PRIM_GLTF_EMISSIVE46PRIM_GLTF_METALLIC_ROUGHNESS47PRIM_GLTF_NORMAL45PRIM_HEALTH52PRIM_MATERIAL2PRIM_NAME27PRIM_NORMAL37PRIM_OMEGA32PRIM_PHANTOM5PRIM_PHYSICS3PRIM_PHYSICS_SHAPE_TYPE30PRIM_POINT_LIGHT23PRIM_POS_LOCAL33PRIM_POSITION6PRIM_RENDER_MATERIAL49PRIM_ROT_LOCAL29PRIM_ROTATION8PRIM_SCRIPTED_SIT_ONLY40PRIM_SIT_FLAGS50PRIM_SIT_TARGET41PRIM_SIZE7PRIM_SLICE35PRIM_SPECULAR36PRIM_TEMP_ON_REZ4PRIM_TEXGEN22PRIM_TEXT26PRIM_TEXTURE17PRIM_TYPE9
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.
PRIM_REFLECTION_PROBE, integer boolean, float ambiance, float clip_distance, integer flags- integer boolean
- float ambiance — Ranges from 0.0 to 100.0.1 Is the brightness of lighting effects from the probe, but not reflection effects. If the environment settings has nonzero reflection probe ambiance, the effective probe ambiance is the greater of the two.
- float clip_distance — Ranges from 0.0 to 1024.0.2 Is the minimum distance from the probe’s center where the surroundings are included for imaging.
- integer flags — PRIM_REFLECTION_PROBE_* flags
When used with llSetLinkPrimitiveParamsFast
llGetLinkPrimitiveParams(LINK_THIS, [ PRIM_REFLECTION_PROBE ]);Returns the same values, in the same order.
| type Flags | V | Description | Notes | ||||
|---|---|---|---|---|---|---|---|
PRIM_REFLECTION_PROBE_BOX | 1 | Determines if the reflection probe is a box or a sphere. | Unset by default (probe is a sphere) | ||||
PRIM_REFLECTION_PROBE_DYNAMIC | 2 | Determines if avatars are included by the probe for imaging. | Unset by default (probe does not image avatars). Imaging avatars in probes has a performance cost. | ||||
PRIM_REFLECTION_PROBE_MIRROR | 4 | Determines if objects intersecting the probe act as a mirror. | Unset by default (probe does not act as a mirror). Rendering mirrors has a performance cost. | ||||
Caveats
Section titled “Caveats”- 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.
Examples
Section titled “Examples”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]); }}See also
Section titled “See also”Functions
Section titled “Functions”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.
Footnotes
Section titled “Footnotes”-
Viewer
746d768339:llprimitive/llprimitive.cpp:85-86;llprimitive/llprimitive.h:210↩ -
Viewer
746d768339:llprimitive/llprimitive.cpp:90-91;llprimitive/llprimitive.h:211↩