EvilEngine/PARP

A Particle Emitter Property asset contains settings for particles created by a Particle Emitter.

Format
A Particle Emitter Property asset describes how a particle changes over its lifetime, such as its color, size, and velocity. Each of these properties are defined by an xParInterp struct:

struct xParInterp {   float val[2]; unsigned int interp; float freq; float oofreq; };


 * val is an array of 2 floats. The 1st float is the start ("A") value of the interpolation, and the 2nd float is the end ("B") value.
 * interp is the interpolation mode, which determines how the current value of the interpolation is computed over time, where time starts at 0.0 and ends at 1.0:
 * ConstA (0 or 0x48e48e7a) - Always the A value.
 * ConstB (1 or 0x48e48e7b) - Always the B value.
 * Random (2 or 0x0fe111bf) - A random value between the A and B value.
 * Linear (3 or 0xb7353b79) - A value between A and B, found by using linear interpolation.
 * Sine (4 or 0x0b326f01) - A value between A and B, found by using sine interpolation.
 * Cosine (5 or 0x498d7119) - A value between A and B, found by using cosine interpolation.
 * Unused/Unknown (6)
 * Step (7 or 0x0b354bd4) - The A value if time < 0.5, and the B value if time >= 0.5.
 * Either freq or oofreq determines the frequency (scale) of time for the interpolation. freq is used when the interpolation mode is either Linear or Step, and oofreq is used when the interpolation mode is either Sine or Cosine. A value of 1.0 means that the interpolation will be the same length/speed as the lifetime, a value of 2.0 means that the interpolation will be half the length/double the speed, etc. When freq is used, oofreq is set to 0, and vice versa.

The actual asset is defined by an xParEmitterPropsAsset struct, which inherits xBaseAsset (Object Asset):

struct xParEmitterPropsAsset : xBaseAsset {   unsigned int parSysID;

// This union is so that you can either access each xParInterp individually, // or as an "array" of xParInterps // value is length 1 but you'd access it as if it were a length 14 array // (rate is index 0, life is index 1, etc... vel_angle is index 13) union {       xParInterp rate; xParInterp value[1]; };

xParInterp life; xParInterp size_birth; xParInterp size_death; xParInterp color_birth[4]; xParInterp color_death[4]; xParInterp vel_scale; xParInterp vel_angle; xVec3 vel; unsigned int emit_limit; float emit_limit_reset_time; };


 * parSysID is the ID of the Particle System that the Particle Emitter should use.
 * rate
 * life
 * size_birth
 * size_death
 * color_birth
 * color_death
 * vel_scale
 * vel_angle
 * vel
 * emit_limit
 * emit_limit_reset_time

At the end of the xParEmitterPropsAsset is a list of Links.