Graphics Links at

Tricelpa Logo

Tricelpa - An OpenGL Particle Engine
Ryan Holmes

What is Tricelpa?

Tricelpa is a small program for creating and viewing particle systems. The system parameters are stored in .tpe (Tricelpa Particle Effect) files. Tricelpa was written for my own entertainment to experiment with creating particle effects. Tricelpa has a companion program, TricelpaSaver, that is a Windows screensaver. TricelpaSaver is a stripped down version of Tricelpa that simply displays a .tpe file created with Tricelpa as a screensaver.

Download Tricelpa (275KB zip file)

Download TricelpaSaver (127KB zip file)

Download example TPE files from the gallery page.


Tricelpa is a fairly simple particle engine. It uses Verlet integration of an initial force, a constant update force, and two optional positionally varying attractive/repulsive forces to move particles through space. If and when a particle leaves the area of the effect, it is discarded. While a particle is live, it is rendered as a texture-mapped quadrilateral. This is slower than using point or line primitives, but allows for more interesting effects.

File Handling

Tricelpa loads and saves particle configurations using TPE files. Any texture applied to the system must reside in the same directory as the TPE file in order to be found on load. Textures are not written out by the save, so if you save a TPE file in a directory other than the directory with your currently loaded texture, be sure to copy the texture as well.

Viewing Options

From the View menu you can display some basic information about the currently running system. This information includes:

Also from the View menu you can toggle the display of the particle system's bounding box, and display of the particle system itself (for timing purposes, as this speeds up the rendering stage significantly).

Tools Options

From the Tools menu you can configure the particle system, load a texture to apply to each particle, toggle animation of the system, and change the background color. Configuring the particle system is described in its own section below. Windows Bitmap (BMP) or Targa (TGA) textures can be loaded, although Targa files are preferred, because they can have alpha channels. The texture is applied to every particle, and the texture filename is saved in the TPE file as described above.

Configuring the Particle System

The Configure Particle Effect menu option contains all of the particle system settings except for the texture to apply. Each parameter is described in the table below. For various examples that demonstrate interesting combinations of these parameters, see the gallery page.

Screenshot of
the Configure Particle Effect dialog box - Click for full-size image
Particle System Parameters
Parameter Description
Number of Particles Total number of particles allowed in the system.
Update Step Time, in milliseconds, that an update is considered to take. This affects how smoothly the system updates, and the parameters that are update dependant, such as Max Update Particles. Tricelpa attempts to let the particle system know to update itself every 50 milliseconds. When the system gets this message, it uses the Update Step to determine how many updates to actually run.
Initial Particles Number of particles to initialize when the system is started.
Max Particle Age Number of milliseconds to allow particles to live. If this is zero, particles live until they exit the effect volume.
Min Update Particles Minimum number of dead particles that must exist before adding new particles during an update. This allows systems that perform burst creations, rather than constantly trickling in new particles.
Max Update Particles Maximum number of particles to add per update. This allows particles to be added over time, until the system fills.
Origin Location where particles are created. Must be within the effect volume, which is centered around zero and scaled according to the Effect Size parameter.
Random Offset When enabled, each particle is created at the origin plus or minus a component-wise random scaling of this vector. Thus, a random offset of (10, 5, 0) and an origin of (0, 0, 0) means particles can be created anywhere within the rectangle (-10, -5, 0) - (10, 5, 0).
Blend Type Two options are available for Blend Type: Additive and Layered. Additive blending combines the color of the particle with the color below it by adding it in, so particles tend to saturate as they combine. Layered blending combines the particle with the color behind by mixing the two, giving a transparent effect (See Depth Sort below).
Depth Sort If this is checked, particles are sorted by distance from the camera, so that the farthest away particles are rendered first. This is highly recommended for the Layered Blend Type. Additive blending is order-independent, and so does not require depth sorting.
Orientation Type Three options are available for Orientation Type: Camera Up, Manual Up, and Particle Up. These options are listed in increasing computation cost. Camera Up means that the top of the texture will always appear on the side of the particle closest to the top of the window, no matter how the camera is moved. This is suitable for circular or radially symmetric textures. Manual Up means that the particle will be oriented using the Manual Orientation parameter. This is suitable for rain effects, where changing the camera should change how the particle is oriented. Particle Up means that the top of the texture will appear on the "back" edge of the particle, based on its current velocity. This is suitable for streaked textures that orient with the particle.
Manual Orientation This direction is used by the Manual Up and Particle Up Orientation Types. For Manual Up, particles are always oriented using this direction. For Particle Up, particles that are stationary (e.g. if no Initial Acceleration is given) use this orientation. The direction is normalized by Tricelpa, but may be entered as any vector.
Birth Size This is the scaling size of particles. A particle is rendered as a square between (-birthSize, -birthSize) and (birthSize, birthSize).
Death Size This determines the size of a particle when it dies from old age. If no Max Particle Age is set, this parameter has no impact. If a Max Particle Age is set, the actual size of the particle is the linear interpolation between Birth Size and Death Size, based on the percentage of Max Particle Age it has survived.
Effect Size This is the size of the effect volume. The effect volume is centered around (0, 0, 0). This means that a size of (20, 20, 20) gives an effect volume from (-10, -10, -10) to (10, 10, 10). Particles are automatically terminated when they leave the effect volume.
Initial Acceleration This is the initial force vector that is applied to each particle when it is created. The Random Variation sub-parameter gives a maximum angular variation in degrees. A Random Variation of 0 means that every particle will have the given Initial Acceleration. A Random Variation of 90 means that every particle will have an initial acceleration of the same magnitude as the given Initial Acceleration, in a random direction chosen in the hemisphere centered around the given Initial Acceleration.
Update Acceleration This acceleration force is applied to each particle every update. See Initial Acceleration for more.
Line Attractor The Line Attractor must be enabled to have any effect. When enabled, an acceleration of the given Strength is applied to each particle, toward the closest point on the line that passes through the two given points. Note that the line definition points do not have to be located inside the effect volume, nor does the line have to intersect the volume. Also note that a negative value for the strength creates a repeller.
Point Attractor The Point Attractor must be enabled to have any effect. When enabled, an acceleration of the given Strength is applied to each particle, toward the given location. Note that the attractor does not have to be located inside the effect volume. Also note that a negative value for the strength creates a repeller.

Valid XHTML 1.0!   Tricelpa Gallery   Tricelpa Background   Valid CSS!