This wiki is archived from 2021-09-05

Particle System Reference: Difference between revisions

From Planetary Annihilation: TITANS and Classic PA Wiki
Jump to navigation Jump to search
No edit summary
Line 4: Line 4:


Work in progress, go [https://wiki.palobby.com/wiki/Particle_System here].
Work in progress, go [https://wiki.palobby.com/wiki/Particle_System here].
Overview of how the system works:
(mental notes)
Each effect, (called a particle system), is defined as a list of particle emitters. Each emitter can control things like the color, velocity, drag, and lifetime of the particles they spawn.
Emitter is an entity that spawns particles over time. Properties that you define for your emitter either apply directly to the way the emitter produces particles, or they apply to the particles that are spawned.
You can think of this as the emitter defining various properties over time, and then the moment a particle is spawned, it inherits a snapshot of those values.


= Glossary =
= Glossary =

Revision as of 11:37, 14 February 2016


File:Titans-icon.png Planetary Annihilation Titans & Classic Particle Effect System Reference

Work in progress, go here.

Overview of how the system works: (mental notes) Each effect, (called a particle system), is defined as a list of particle emitters. Each emitter can control things like the color, velocity, drag, and lifetime of the particles they spawn. Emitter is an entity that spawns particles over time. Properties that you define for your emitter either apply directly to the way the emitter produces particles, or they apply to the particles that are spawned. You can think of this as the emitter defining various properties over time, and then the moment a particle is spawned, it inherits a snapshot of those values.


Glossary

// Particle System
{
    "emitters": [{
        "spec" : {<particle properties>},
        <emitter properties>
    }],
    "color": <global color multiplier>
}

Particle System

The group of particle emitters.

Field Name Field Type (default value) - Description
emitters array ( [] )
The list of emitter objects in the system.
color color ( [1.0, 1.0, 1.0, 1.0] )
A system wide color multiplier. Value is RGBA linear float color values in a JSON array.

Emitter System

Defines the position and movement behavior of particles.

Field Name Field Type (default value) - Description
spec object ( )
The particle spec definition.
type string ( "POSITION" )
Defines the shape of the particle spawn positions, and how the offset* keys are interpreted.
"POSITION", "SPHEROID", "SHELL", "EMITTER", "CYLINDER_X", "CYLINDER_Y", "CYLINDER_Z"
linkIndex number ( -1.0 )
Used when the type is set to "EMITTER" to define the emitter to attach to.
offsetX
offsetY
offsetZ
emitter time curve ( 0.0 )
Define the starting spawn position for the particles in emitter space. The shape of the emitter space depends on the type field.
offsetRangetX
offsetRangetY
offsetRangetZ
emitter time curve ( 0.0 )
Define the starting spawn position range in which a particle can randomly deviate from offsetX, offsetY, and offsetZ.
offsetAllowNegZ bool ( true )
Allow particles to spawn with an initial positiong with a negative Z in emitter space, otherwise flip Z to a positive position. Useful for explosions on the ground so that particles travel only up.
velocityX
velocityY
velocityZ
emitter time curve ( 0.0 )
Initial velocity direction in emitter space. This is for indicating direction only, so if you increase any of these the actual speed of the particle will not change, only the direction.
velocityRangeX
velocityRangeY
velocityRangeZ
emitter time curve ( 0.0 )
Initial velocity direction range in which a particle can randomly deviate from velocityX, velocityY, and velocityZ.
useRadialVelocityDir bool ( false )
Use the starting location as a normalized vector in addition to the velocity direction values.
useShapeVelocityDir bool ( false )
Use the starting position on the shape from the emitter's type in addition to the velocity direction values.
velocity emitter time curve ( 1.0 )
Initial particle velocity along velocity direction vector at spawn.