@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.
@setsphere=<y|n>
@setsphere_<param>:<value>=<n|force> set a parameter (both forms store it)
@setsphere_<param>:<value>=y remove that exact parameter
| Parameter | Default | Meaning | Mixing across objects |
|---|---|---|---|
| setsphere_mode | 0 | 0 blend, 1 blur, 2 variable blur, 3 chromatic aberration, 4 pixelate | per object; one effect per mode |
| setsphere_distmin | 0 | distance where the effect starts ramping | lowest |
| setsphere_distmax | 0 | distance where it reaches full value | lowest |
| setsphere_distextend | 1 | bit 1: apply valuemax beyond distmax; bit 2: apply valuemin inside distmin | lowest |
| setsphere_valuemin | 1 | strength at distmin | highest |
| setsphere_valuemax | 1 | strength at distmax | highest |
| setsphere_tween | 0 | seconds to animate value changes | lowest |
| setsphere_origin | 0 | 0 avatar, 1 camera | lowest (avatar wins) |
| setsphere_param | 0;0;0;0 | mode-specific vector (color, kernel size, offsets, pixel size) | depends on mode |
@setsphere=n activates the effect for the mode it chose with @setsphere_mode (default 0). Objects that choose the same mode share one effect; their parameters are mixed as shown above, aiming to keep the most restrictive values.setsphere_distmax:8), so they appear in @getstatus and trigger @notify. RLVa-style =force is accepted as a synonym of =n for parameters.@setsphere (=y) also removes every setsphere_* parameter stored by the same object. @clear and the garbage collector rebuild the effects too.@setsphere=n probably blinds the user completely. Set the distances before or together with @setsphere.=y, giving the exact same option, or send @setsphere=y and start over.@setsphere are still applied to the mode-0 effect, if some other object activated mode 0 (the UUID-to-mode lookup defaults to 0).// 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");
setsphere_* pages listed in the table.=force and doesn't keep them as restrictions, which is why Marine accepts both forms.mContainsSetsphere (RRInterface.cpp:447); the add hook forcing graphics settings (1315-1336); the remove logic that strips the parameters (1410-1471); the force hack that turns setsphere_*=force into add() (2377-2379); and updateSetsphere() (6660-6881), which rebuilds one RlvSphereEffect per mode from all stored restrictions every time a setsphere command changes.RlvSphereEffect in rlveffects.cpp/h (Marine marked his changes //MK), the LLVisualEffect/LLVfxManager framework (llvisualeffect.h, "from Catznip"), and the shader rlvF.glsl.updateSetsphere say distextend keeps the "highest" value, but the code keeps the lowest.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.
This command works differently from RLVa's @setsphere; see the comparison.