Particles Tutorial

Although a staple of many video games, IMVU is just now working to bring a Particle System to its 3D environments. A Particle System is used to create visual special effects like smoke, fire, sparks, bubbles, and countless other magic for your 3D world. Particles are points that interact with each other based on certain parameters, like gravity, velocity, and length of life over time. To these points you apply a texture to represent a spark, drop of water, flake of snow, or puff of smoke. The best way to imagine a Particle System is to think of a fountain spraying water, now apply to each water droplet its own texture (.png), and regulate the flow of each droplet to create a variety of effects.

The IMVU Particle System is in ALPHA, so please use at your own risk. Although we are only planning to refine and add to the existing system, we can't guarantee future changes won't alter some of your effects settings. With that in mind we do hope you will play inside the Particles TAB within the Previewer and see what you come up with. Below are quick descriptions of some of the settings and menus you will encounter within the Particles TAB. These various parameters can be a little daunting at first glance, so we suggest you have a look at some of our initial particle effects products and play with these to become better acquainted with what the Particle System is capable of. To explore a few pre-set Particles products, click on one of the below images to go to their product page. From there you can click the Derive button and have a look at their settings, and see what happens when you alter them:

Bubbles
Sparkles
Smoke
Fire
Fountain

The Previewer- Particles TAB

Gravity
The direction and intensity of the gravity that the particles are subjected to. This is a 3-vector.ex "0,0,0" means no gravity at all.

Texture
A texture image. All particles use this texture. We recommend .PNG files (which allows for transparency) and keep files to 32x32 pixels for best results. We understand that this is small, but particles can really slow down the frame rate of a computer, especially if your effect includes a high particle generation Rate per second.

Rules
Each particle effect consists of a set of rules that describe how the particles ought to behave.

For now, there are 10 different types of rules. (except that 3 of them don't do anything yet)


Source
The source rule brings new particles into existence every frame.

Rate (per second) - The rate at which particles are created, in particles per second.

Position - Particles' initial positions will be a randomly chosen point from the specified domain*. (domains are described below)

The three position numbers represent the location within the 3D environment. 0,0,0 is at the very center of the Root node of your product, and variations in that number move this position point up, down or to the sides, front, and back in relation to the Root. Customarily the 0,0,1 is at he middle of the avatar, and 0,0,2 is near the head:

Periodically you will be asked to place a Normal number in an available field. A Normal is a 1-unit vector which forms a right angle with the surface you're describing.  Conveniently, you don't actually have to enter a true normal into this field--any vector will do.  If I describe a plane as the point 0,0,2 with a normal of 0,0,1, that plane is parallel with the "ground" and goes approximately through the avatar's head.  It points upwards.

Velocity - Particles' initial velocities will be a randomly chosen vector from the domain *.


Sink
Particles that come into contact with a Sink are destroyed.
The domain* describes the shape of the sink.


KillOld
Destroys particles whose age is above some number of seconds. The AgeLimit determines the distance the particle travels before disappearing. If you wish to fill a room with particles then leave the number high, but if you want them close to the origin point, reduce the AgeLimit to a lower number.

RandomAccel
Add a random velocity vector from the domain given into each particle's velocity every frame.

This makes the particles appear to wander around a bit instead of moving in parabolic arcs.


RandomDisplace
Add a random displacement vector from the domain into each particle's position every frame.

This makes particles appear to twitch.


SpeedLimit
Describes minimum and maximum speeds for all particles.

TargetVelocity
Every frame, adjust the velocity of all particles in the system to be closer to the velocity given.

"Scale" is the percentage of the target velocity that is applied each second.


TargetColor, TargetSize, and TargetRotVelocity do not do anything yet, as our
renderer does not yet support colored, scaled, or rotating particles

* Domains
A domain is a geometric shape. Many rules use a domain to select a random position or velocity vector for a particle.

For instance, a Source may be given a "Point" domain to say that all particles are spawned at exactly one position, but a spherical domain for their initial velocity, which means that new particles can have a velocity in any direction, with any velocity up to the radius of the sphere.

The supported domains are:

Point
A single geometric point.


Sphere
Takes a position that is the centre of the sphere, plus an inner and outer radius. If the inner radius is nonzero, then the sphere is hollow.


Box
Takes two positions: these two positions are opposing corners of the box.

Cone
Takes two positions: the "top" is the pointy end of the cone, and the "bottom" is the blunt end.

The Inner and Outer radius are the radii of the blunt end. (a nonzero inner radius produces a hollow cone)

Cylinder
Takes two positions which are endpoints of the cylinder.

Inner and outer radius work in the same way as they do for cones and spheres.

Line
Takes two positions: the endpoints of the line.

Disc
Takes a centre point of the disc, a normal vector which points away from the disc, and two radii scalars.

Plane
An infinitely large, flat plane.

Takes one position which is any point on the plane, and a normal vector.

Rectangle
A rhomboid plane. Takes a centre point, and two vectors that determine the centre points of the sides.

I will draw a diagram, this one is really hard to describe.

Triangle
A simple triangle. Takes three positions that are the corners of the triangle.