the particleSystem Node

The particleSystem node creates a general-purpose particle system. It can generate arbitrary numbers of particles, can apply color and textures, and can generate particles from a point or box volume. It includes the ability to apply forces such as gravity, wind, friction, nd attractors. each particle is a single square quad polygon.

Example:

particleSystem ( 
	emitterVolume (point 0 0 0),
	initialDirection(-1 -1 2 1 1 2),
	rotation(0 0 0 15 15 15),
	lifespan(20),
	speed(3),
	count(20),
	force("gravity" 0 0 -2)
)

Get the particleSystem Node

Node Reference

Derived from: ygNode

Messages

MessageParametersDefaultDescription
emitterVolume point x y z or
box x1 y1 x2 y2 z1
determines the volume of the particle system's emitter. a Point volume makes the particles emit from a single point, while a box volume makes the particles appear at random points within the box.
count int the total number of particles. you should actually apply this message last; it actually creates all the particles, based on the parameters set up in the other messages.
color red green blue the color of the particles
texture filename texture to apply to the particles. must be SGI format (.rgb)
size (size) or (min max) sets the size of the particles, or the range of sizes. size(min max) creates particles with random sizes between min and max
emitterRate rate controls how fast the emitter spits out particles. rate is in particles per second. NOTE: currently, when particles die, they are instantaneously re-emitted, which can affect the actual emitter rate.
also, currently the emitter won't go faster than 1 particle per frame.
lifespan seconds how long each particle lasts before being recycled.
initialDirection x y z or
minX minY minZ maxX maxY maxZ
determines the initial direction of a particle. x y z define a Direction Vector for the particle. giving a Min and Max vector makes the particles start off with a random direction between those values.
rotation x y z or
minX minY minZ maxX maxY maxZ
determines a range of rotation velocities for each particle. the values are angles around the X, Y, and Z axes (in degrees). this causes the particles to rotate as they move.
friction float if friction is greater than 0, it's applied to the velocity of each particle to make it slow down.
the friction equation is: velocity = velocity * (1- ( friction * dt)) where dt is the change in time (seconds) from one frame to the next.
friction values around 1.0 - 2.0 work well.
force x y z or
"name" x y z
a force can be either an impulse force, or a continual force. an Impulse Force is applied only once, while a continual force will keep acting on the particles until it's changed. giving a name to a force makes it a continual force. to change the force after it's been created, use the same name. the direction of the force is defined by its force vector.
attractorForce "name" x y z radius attraction creates an attractor that draws the particles towards it. the attractor volume is a sphere; particles are affected while they're inside the sphere.
name: the name of the force x y z
radius: defines the sphere of influence of the attractor
attraction: how powerful the attractor is. currently, the formula for attraction is:
magnitude = attraction + (attraction/distance) to create a basic kind of attenuation. future updates might include coefficients for the constant and linear terms, and an exponential term as well, for more subtle control of attractor power.
speed float determines the speed of particles

(c) Ben Chang