ParticleData

consoledoc.h

Contains information for how specific particles should look and react including particle colors, particle imagemap, acceleration value for individual particles and spin information.

More...

AFX

Public Attributes

bool

If true, allow the particle texture to be an animated sprite.

string

A list of frames and/or frame ranges to use for particle animation if animateTexture is true.

string

Texture file to use for this particle if animateTexture is true.

Point2I

The number of frames, in rows and columns stored in textureName (when animateTexture is true).

LinearColorF
colors [8]

Particle RGBA color keyframe values.

float

Constant acceleration to apply to this particle.

float

Particle physics drag amount.

int

If animateTexture is true, this defines the frames per second of the sprite animation.

float

Strength of gravity on the particles.

float

Amount of emitter velocity to add to particle initial velocity.

int

Time in milliseconds before this particle is destroyed.

int

Variance in lifetime of particle, from 0 - lifetimeMS.

float
sizes [8]

Particle size keyframe values.

float

Maximum allowed spin speed of this particle, between spinRandomMin and 1000.

float

Minimum allowed spin speed of this particle, between -1000 and spinRandomMax.

float

Speed at which to spin the particle.

Point2F

4 element array defining the UV coords into textureName to use for this particle.

string

Texture file to use for this particle.

float
times [8]

Time keys used with the colors and sizes keyframes.

bool

Controls how particles blend with the scene.

float

Strength of wind on the particles.

Public Functions

void

Reloads this particle.

Detailed Description

Contains information for how specific particles should look and react including particle colors, particle imagemap, acceleration value for individual particles and spin information.

datablock ParticleData( GLWaterExpSmoke )
{
   textureName = "art/shapes/particles/smoke";
   dragCoefficient = 0.4;
   gravityCoefficient = -0.25;
   inheritedVelFactor = 0.025;
   constantAcceleration = -1.1;
   lifetimeMS = 1250;
   lifetimeVarianceMS = 0;
   useInvAlpha = false;
   spinSpeed = 1;
   spinRandomMin = -200.0;
   spinRandomMax = 200.0;

   colors[0] = "0.1 0.1 1.0 1.0";
   colors[1] = "0.4 0.4 1.0 1.0";
   colors[2] = "0.4 0.4 1.0 0.0";

   sizes[0] = 2.0;
   sizes[1] = 6.0;
   sizes[2] = 2.0;

   times[0] = 0.0;
   times[1] = 0.5;
   times[2] = 1.0;
};

AFX

filename textureExtName 
bool constrainPos 
float angle 
float angleVariance 
float sizeBias 
float spinBias 
bool randomizeSpinDir 

Public Attributes

bool animateTexture 

If true, allow the particle texture to be an animated sprite.

string animTexFrames 

A list of frames and/or frame ranges to use for particle animation if animateTexture is true.

Each frame token must be separated by whitespace. A frame token must be a positive integer frame number or a range of frame numbers separated with a '-'. The range separator, '-', cannot have any whitspace around it.

Ranges can be specified to move through the frames in reverse as well as forward (eg. 19-14). Frame numbers exceeding the number of tiles will wrap.

animTexFrames = "0-16 20 19 18 17 31-21";

string animTexName 

Texture file to use for this particle if animateTexture is true.

Deprecated. Use textureName instead.

Point2I animTexTiling 

The number of frames, in rows and columns stored in textureName (when animateTexture is true).

A maximum of 256 frames can be stored in a single texture when using animTexTiling. Value should be "NumColumns NumRows", for example "4 4".

LinearColorF colors [8]

Particle RGBA color keyframe values.

The particle color will linearly interpolate between the color/time keys over the lifetime of the particle.

float constantAcceleration 

Constant acceleration to apply to this particle.

float dragCoefficient 

Particle physics drag amount.

int framesPerSec 

If animateTexture is true, this defines the frames per second of the sprite animation.

float gravityCoefficient 

Strength of gravity on the particles.

float inheritedVelFactor 

Amount of emitter velocity to add to particle initial velocity.

int lifetimeMS 

Time in milliseconds before this particle is destroyed.

int lifetimeVarianceMS 

Variance in lifetime of particle, from 0 - lifetimeMS.

float sizes [8]

Particle size keyframe values.

The particle size will linearly interpolate between the size/time keys over the lifetime of the particle.

float spinRandomMax 

Maximum allowed spin speed of this particle, between spinRandomMin and 1000.

float spinRandomMin 

Minimum allowed spin speed of this particle, between -1000 and spinRandomMax.

float spinSpeed 

Speed at which to spin the particle.

Point2F textureCoords [4]

4 element array defining the UV coords into textureName to use for this particle.

Coords should be set for the first tile only when using animTexTiling; coordinates for other tiles will be calculated automatically. "0 0" is top left and "1 1" is bottom right.

string textureName 

Texture file to use for this particle.

float times [8]

Time keys used with the colors and sizes keyframes.

Values are from 0.0 (particle creation) to 1.0 (end of lifespace).

bool useInvAlpha 

Controls how particles blend with the scene.

If true, particles blend like ParticleBlendStyle NORMAL, if false, blend like ParticleBlendStyle ADDITIVE.

note:

If ParticleEmitterData::blendStyle is set, it will override this value.

float windCoefficient 

Strength of wind on the particles.

Public Functions

reload()

Reloads this particle.

// Get the editor's current particle
%particle = PE_ParticleEditor.currParticle

// Change a particle value
%particle.setFieldValue( %propertyField, %value );

// Reload it
%particle.reload();