OGRE (Object-Oriented Graphics Rendering Engine)

Standard Particle Emitters Provided With Ogre

 

Ogre comes preconfigured with a few particle affectors. New ones can be added by creating plugins: see the OgreSfxPlugin project as an example of how you would do this (this is where these affectors are implemented).

Linear Force Affector

This affector applies a force vector to all particles to modify their trajectory. Can be used for gravity, wind, or any other linear force. It's extra attributes are:

force_vector

Sets the vector for the force to be applied to every particle. The magnitude of this vector determines how strong the force is.

format: force_vector <x> <y> <z>
example: force_vector 50 0 -50
default: 0 -100 0 (a fair gravity effect)

force_application

Sets the way in which the force vector is applied to particle momentum.

format: force_application <add|average>
example: force_application average
default: add

The options are:

average
The resulting momentum is the average of the force vector and the particle's current motion. Is self-stabilising but the speed at which the particle changes direction is non-linear.
add
The resulting momentum is the particle's current motion plus the force vector. This is traditional force acceleration but can potentially result in unlimited velocity.

 

To create a linear force affector, include a section like this within your particle system script:

affector LinearForce
{
    // Settings go here
}

Please note that the name of the affector type ('LinearForce') is case-sensitive.

ColourFader Affector

This affector modifies the colour of particles in flight. It's extra attributes are:

red

Sets the adjustment to be made to the red component of the particle colour per second.

format: red <delta_value>
example: red -0.1
default: 0

green

Sets the adjustment to be made to the green component of the particle colour per second.

format: green <delta_value>
example: green -0.1
default: 0

blue

Sets the adjustment to be made to the blue component of the particle colour per second.

format: blue <delta_value>
example: blue -0.1
default: 0

alpha

Sets the adjustment to be made to the alpha component of the particle colour per second.

format: alpha <delta_value>
example: alpha -0.1
default: 0

To create a colour fader affector, include a section like this within your particle system script:

affector ColourFader
{
    // Settings go here
}

See also:

Particle Scripts

Particle Affectors

 

Back to Index << Previous sectionNext section >>