@setsphere=n turns on a screen-space visual effect centered on the avatar (or the camera). The effect's strength depends on each pixel's distance from that center, so it can black out, tint, blur or pixelate everything beyond a radius. Its shape and type are set with the @setsphere_* parameter commands.

Marine's viewer implements this feature to be compatible with RLVa: it reuses Kitty Barnett's RLVa-derived rlveffects code and shader, wrapped in RLV's own restriction handling. The spec copy in this project (RestrainedLoveAPI.txt) doesn't document it.

Syntax

@setsphere=<y|n>
@setsphere_<param>:<value>=<n|force>     set a parameter (both forms store it)
@setsphere_<param>:<value>=y              remove that exact parameter

Parameters

ParameterDefaultMeaningMixing across objects
setsphere_mode00 blend, 1 blur, 2 variable blur, 3 chromatic aberration, 4 pixelateper object; one effect per mode
setsphere_distmin0distance where the effect starts rampinglowest
setsphere_distmax0distance where it reaches full valuelowest
setsphere_distextend1bit 1: apply valuemax beyond distmax; bit 2: apply valuemin inside distminlowest
setsphere_valuemin1strength at distminhighest
setsphere_valuemax1strength at distmaxhighest
setsphere_tween0seconds to animate value changeslowest
setsphere_origin00 avatar, 1 cameralowest (avatar wins)
setsphere_param0;0;0;0mode-specific vector (color, kernel size, offsets, pixel size)depends on mode

Specification

Caveats

Examples

// Darkness closing in: clear up to 2 m, fully black by 6 m
llOwnerSay("@setsphere_distmin:2=n,setsphere_distmax:6=n,setsphere_valuemin:0=n,setsphere_valuemax:1=n,setsphere=n");

// Blurry vision beyond 3 m
llOwnerSay("@setsphere_mode:1=n,setsphere_distmin:1=n,setsphere_distmax:3=n,setsphere_valuemin:0=n,setsphere=n");

// Lift everything set by this object
llOwnerSay("@setsphere=y");

See also

Implementation notes

Client differences

Not implemented in CoolVL 2.09.29.30: there is no setsphere in mkrlinterface.cpp and no rlveffects code. In CoolVL the command is stored as an unknown restriction and has no effect.

Comparison with RLVa

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