Command List
This section is a list of all the commands in particle script.
varying
Creates a varying attribute. Examples:
varying float3 position varying float4 color
uniform
Creates a uniform attribute. Examples:
uniform float3 gravity = [0,0,-9.8] uniform float1 spawnrate = 5
selection
Creates a named selection set. Examples:
selection lowparticles
select
Selects a subset of the particles. The right hand side must evaluate to a selection set: this can either be a named selection set or a boolean expression.
select lowparticles select new select (position.z < 0.0)
assignment
The assignment statement is the only command that doesn't start with a keyword. Instead, it starts with an attribute or named selection set. The right hand side must be a float-expression (in the case of an attribute) or a boolean expression (if the left hand side is a named selection set).
position = position + velocity lowparticles = (position.z < 0)
delete
Deletes a subset of the particles. The right hand side must evaluate to a selection set: this can either be a named selection set or a boolean expression.
delete (position.z < 0) delete all
spawnsteady
Spawn particles at a steady rate. The right hand side is a spawn-rate. The particle attributes are filled with zeros. The named selection set 'new' is set to the new particles.
spawnsteady 5.0
spawnuntil
Spawn particles at a steady rate until a specified limit is reached. The parameters are spawn-rate and maximum-total-particles. The particle attributes are filled with zeros. The named selection set 'new' is set to the new particles.
spawnuntil 20.0 100
renderpoints
Renders particles as points using GL_POINTS. Keyword parameters: pos, color. Keyword flags: blend, add. The blend flag enables regular blending, the add flag enables additive blending (you can't specify both).
renderpoints pos:position renderpoints color:clr pos:position add
renderlines
Renders particles as line segments using GL_LINES. Keyword parameters: begin, end, begincolor, endcolor, color. Keyword flags: blend, add. The begin and end parameters specify the two endpoints of the line. The begincolor and endcolor specified the colors of the two endpoints. The color, if present, sets both begincolor and endcolor. The blend flag enables regular blending, the add flag enables additive blending (you can't specify both).
renderlines begin:position1 end:position2 begincolor:color1 endcolor:color2 renderlines color:[1,0,0,1] begin:position1 end:position2 add
renderorbs
Renders particles as hazy, blurry orbs. Keyword parameters: pos, color, size. Keyword flags: blend, add. The blend flag enables regular blending, the add flag enables additive blending (you can't specify both).
renderorbs pos:position1 size:0.2 renderorbs color:clr pos:position add
renderbillboards
Renders particles as textured square billboards. Keyword parameters: pos, color, rotate, size, and texture. Keyword flags: blend, add. The blend flag enables regular blending, the add flag enables additive blending (you can't specify both).
renderbillboards texture:"username/image" size:0.2
group
The group command delineates disjoint groups of particles. A group command should be followed by attributes, selection sets, executable commands, and rendering commands for that group.
group fire ... group smoke ...
What's Missing
Many important commands are obviously missing: Ways to spawn particles at non-steady rates is one. Another clear gap is the the inability for different groups to interact with each other. The particle system is a work in progress, these expansions are coming soon.
- Printer-friendly version
- Login or register to post comments
-



