@setsphere=n creates a post-processing "sphere" effect for the sending object. Every rendered pixel is given an effect strength that depends on the distance between the 3D point it shows and the sphere origin (the avatar or the camera), and the chosen effect is applied with that strength. Typical uses are blindfolds and fog (blend towards a color beyond a distance) or blurred vision.

Syntax

@setsphere=<n|y|add|rem>
@setsphere_<modifier>[:<value>]=force

Modifiers

ModifierTypeDefaultMeaning
modeint00 blend, 1 blur, 2 variable blur, 3 chromatic aberration, 4 pixelate
originint00 avatar, 1 camera
colorr/g/b0/0/0Blend color (stored as params r/g/b/1)
parama/b/c/d0/0/0/0Mode-specific parameters (shares storage with color)
distminfloat m0Distance where strength is valuemin
distmaxfloat m0Distance where strength is valuemax
distextendint1Bit 1: keep valuemax beyond distmax; bit 2: keep valuemin inside distmin
valueminfloat1Strength at distmin
valuemaxfloat1Strength at distmax
tweenfloat s0Interpolation time for later changes

Specification

For a pixel at distance d from the origin:

With the defaults (both distances 0, both values 1, extend 1, mode blend, color black) the whole scene is blended fully to black: a complete blindfold.

Examples

// Fog: clear up to 2 m, solid grey from 8 m
llOwnerSay("@setsphere=n");
llOwnerSay("@setsphere_color:0.5/0.5/0.5=force");
llOwnerSay("@setsphere_distmin:2=force");
llOwnerSay("@setsphere_distmax:8=force");
llOwnerSay("@setsphere_valuemin:0=force");
llOwnerSay("@setsphere_valuemax:1=force");

See also

Implementation notes

Comparison with RLV

This command works differently from RLV's @setsphere; see the comparison.