Effects
Effects are visual features rendered by the viewer from a few parameters set by a script. Once set, most of them keep running with no further script activity: the script describes the effect, it does not animate it frame by frame.
High quality effects often combine features: a technical mesh shape made in a modelling tool such as Blender, with an animated texture and glow, can look like particles while costing far less.
Concepts
- Particle systems
- A prim can emit one particle system, described by a list of rules for the emitter pattern, particle lifetime, size, color, speed, texture and flags
- Combine flags with the bitwise OR operator (|)
- An empty list stops the system; another prim in the linkset can be set too
- Hover text
- Floating text above a prim, with a color and alpha
- It is a prim property, so it stays when the script is removed
- Texture animation
- Plays frames from a grid on a texture, or scrolls, rotates or scales the texture, entirely in the viewer
- Works on any prim in the linkset
- Light, glow and full bright
- Prims can be point lights or
projectors - Faces can
glowor ignore lighting - PBR materials add emissive color
- Prims can be point lights or
- Media and sound
Functions and events
void | llParticleSystem(list rules) |
void | llLinkParticleSystem(integer link, list rules) |
void | llSetText(string text, vector color, float alpha) |
void | llSetTextureAnim(integer mode, integer face, integer sizex, integer sizey, float start, float length, float rate) |
void | llSetLinkTextureAnim(integer link, integer mode, integer face, integer sizex, integer sizey, float start, float length, float rate) |
void | llSetLinkPrimitiveParamsFast(integer link, list rules) |
Particles
Particle rules are PSYS_* constants: emitter (PSYS_SRC_*) and particle (PSYS_PART_*) settings. See the reference below.
Technical mesh
A mesh shaped for the effect, with texture animation and glow, can replace many particles.
Scripting Details
void | llParticleSystem(list rules)Creates or updates a particle system on the prim containing the script based on rules. An empty list removes the particle system. |
void | llLinkParticleSystem(integer link, list rules)Creates or updates a particle system on the linked prim link based on the list of rules. An empty list removes the particle system. |
void | llSetText(string text, vector color, float alpha)Displays floating text above the prim with the specified color vector and transparency alpha. |
void | llSetTextureAnim(integer mode, integer face, integer sizex, integer sizey, float start, float length, float rate)Animates the texture on face of the prim by setting its scale and offset. mode defines options, sizex/sizey define frames, start defines the start frame/angle, length defines duration, and rate defines playback speed. |
void | llSetLinkTextureAnim(integer link, integer mode, integer face, integer sizex, integer sizey, float start, float length, float rate)Animates the texture on face of the linked prim link by setting the scale and offset according to mode. Parameters sizex/sizey define frames, start defines the start frame/angle, length defines duration, and rate defines playback speed. |
void | llSetLinkPrimitiveParamsFast(integer link, list rules)Sets primitive parameters for the linked prim link according to rules with no built-in script sleep delay. |
Additional
llParticleSystem— the rules listPSYS_PART_FLAGS— bitfield of particle flags, combined with |PSYS_PART_EMISSIVE_MASK— particles are full-bright and unaffected by global lightingPSYS_PART_RIBBON_MASK— joins emitted particles into a continuous ribbon stripPSYS_SRC_PATTERN— the generation pattern, such asPSYS_SRC_PATTERN_EXPLODE(outward in all directions)PSYS_SRC_TEXTURE— inventory name or UUID of the particle texture
llSetTextureAnim— the mode flagsllSetLinkPrimitiveParamsFast— light, glow and text as prim parametersPRIM_POINT_LIGHT— local lighting; color in linear space (usellsRGB2Linear)PRIM_PROJECTOR— texture, field of view, focus and ambiance of a light projectionPRIM_GLOW— glow intensity on a facePRIM_FULLBRIGHT— full-bright rendering on a facePRIM_GLTF_EMISSIVE— the GLTF emission override of a facePRIM_TEXT— hover text, equivalent tollSetText
Particle rules
Section titled “Particle rules”Constant groups ParticleParam 27ParticleFlag 10ParticleSourcePattern 5ParticleBlendFunc 8
Texture animation modes
Section titled “Texture animation modes”Constant groups TextureAnimMode 7
Related
Section titled “Related”See also Category ParticlesSL Wiki LSL ParticlesSL Wiki Script library: particlesPlanned Recipe: particle effect presets
See also SL Wiki LSL Floating Text
See also Feature Textures & MaterialsPlanned Guide: technical mesh with texture animation
See also SL Wiki LSL LightFeature Prims
See also Feature SoundCategory Effects