Targetware: Particle Effects


Particle Effect File Format: .par

This document will describe the makeup of the .par particle file. No special software is required to edit .par files, a simple text editor will suffice.

[Particle] Header, tells game engine the file is a particle file.
type = x Determines the type of particle effect to be rendered, where x is "points", "scaled_points", "lines", "quads", or "beam".

Points are simple dots on the screen, no texture, but a color can be assigned. The size is a constant, given in pixels.

Scaled Points are similar to points, except that the size is a base size. They will get larger when you are closer, smaller away when far away. The size is still given in pixels, but it scales.

Lines are texture-less lines that can be given a color. Suitable for tracers.

Quads are quadrangles that can display a texture and color. Quad type particles are not connected to each other, but drawn separately. They can be made to form an explosion or a virtual smoke/fire trail by increasing the number of particles drawn so that they overlap, and appear to be continuous.

Beams are quadrangles that can display a texture and color, but rather than render on top of itself, beam quadrangles are tied together in an unbroken chain of textured rectangles. Appropriate for smoke trails, leaks, vapor trails, fire, and other effects that require a trail.
lighting = x Controls whether or not atmospheric lighting (darkness at midnight, dusk lighting conditions, bright noon sun, etc) is applied to the particle effect. Defaults to 1.
0 - no atmospheric lighting is applied; appropriate for "glow in the dark" particles (such fire, muzzle blast, etc).
1 - atmospheric lighting will be applied to the particle.
trail = x 0 - doesn't trail when the particle system source moves. When the source of the particle system moves, the particles dont move or trail, they just continue to emit.

1 - leaves a trail when the particle system source moves. This is a true trail. When the particle source moves, particles are automatically emitted to create a trail without gaps. This is how smoke, fire, etc. should be set. Otherwise, you get a smoke trail with holes in it.

2 - all the particles move along with the source. This is the opposite of a trail, kind of. When the particle source moves, all the particles move with it.


This defaults to 0. 1 is the behaviour you want for things like smoke, coolant leaks, etc. 2 is a bit of an odd behaviour, more useful for things like a muzzle flash particle system, or something like that.
display_dist = x Outside of this distance in meters, the particle system isnt drawn.
texture = filename.pcx Use .pcx files for alpha-only textures, .tga files for RGB and RGBA textures.
init_color = r,g,b,a This color is applied when a particle first appears. The first 3 numbers are Red, Green, and Blue, the last is an alpha value. 255 is fully opaque, 0 is fully transparent.
final_color = r,g,b,a This is what the particle fades to before it finally disappears.
init_size = n The size, in meters, the particle is rendered when first drawn.
final_size = n The size of the particle at the end of its life.
size_var = 0.25 Allows you to add variation into the particle's rendering size. Entered in a percentage, 0 being no variation, 1 meaning it will vary in size up to double it's specified size.
direction = 0.0, 0.0, 1.0 The direction the particle is initially travelling, expressed as an xyz vector. The first value is direction in the x plane (east/west), the second is in the y plane (north/south), and the last in the z plane (up/down).
dir_var = 60 Variation in degrees of initial direction.
speed = 12 Speed, in meters per second. If speed is zero, and the source is not moving, the particle will be drawn in the same place over and over again.
speed_var = 0.25 Variation of speed, as a percentage
gravity = 0.0 A scalar value controlling how gravity affects the particle effect. 0 is a good value for smoke. -9.81 is a good value for any kind of solid object (9.81 m/s^2 straight down).
emit_rate = c The number of times the particle will be drawn each second.
particle_ttl = c TTL = "time to live". This number controls how long an individual particle exists after it is emitted, in seconds.
ttl = c This is how long the particle effect as a whole lasts, in other words how long it emits particles for before it stops. Useful for fires that will burn for 5 minutes, then go out, for example. Given in seconds.
max_particles = x The maximum number of particles that will be drawn on the screen for this effect at any one time. The lower you set this number, the less the hit on the player's system is. Setting it too low will result in some effects being cut short, especially quad particles swt up to trail. Defaults to 100.
num_child = x Then number of child particle effects will be attached to this particle. This allows for more complex particle effects, such as fires that also generate smoke, or explosions with shockwaves, that perhaps also send off bits of metal shooting in random directions.
[Child x] Header for sections detailing child particles. Numbering begins with 1. One section must be created for each child effect specified in the "num_child = " line.
time = x Controls the timing of the start of the child particle effect. Time is elapsed time, in seconds, since the parent effect became active.
particle = x Path and filename of the child particle to be activated. Particle effects can only call other .par files, and never .anm files.