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 29: Line 29:
== Emitter System ==
== Emitter System ==
Defines the position and movement behavior of particles.
Defines the position and movement behavior of particles.
{| class="wikitable" style="width:100%; background:white"
{| class="wikitable" style="width:100%"
|-  
|-  
! style="width:100px;text-align: left" | Field Name
! style="text-align: left" | Field Name
! style="text-align: left" | Field Type (default value) - Description
! style="text-align: left" | Field Type (default value) - Description
{{template:pfx_spec_row | spec | object | | The particle spec definition. }}
{{template:pfx_spec_row | spec | object | | The particle spec definition. }}
{{template:pfx_spec_row | type | string | "POSITION" | Defines the shape of the particle spawn positions, and how the <code>offsetRange''*''</code> keys are interpreted. }}
{{template:pfx_spec_row | type | string | "POSITION" | Defines the shape of the particle spawn positions, and how the <code>offset*</code> keys are interpreted. }}
|-
|-
| colspan="2" style="text-align:center" | <code>"POSITION"</code>, <code>"SPHEROID"</code>, <code>"SHELL"</code>, <code>"EMITTER"</code>, <code>"CYLINDER_X"</code>, <code>"CYLINDER_Y"</code>, <code>"CYLINDER_Z"</code>
| colspan="2" style="text-align:center;" | <code>"POSITION"</code>, <code>"SPHEROID"</code>, <code>"SHELL"</code>, <code>"EMITTER"</code>, <code>"CYLINDER_X"</code>, <code>"CYLINDER_Y"</code>, <code>"CYLINDER_Z"</code>


{{template:pfx_spec_row | linkIndex | number | -1.0 | Used when the <code>type</code> is set to <code>"EMITTER"</code> to define the emitter to attach to. }}
{{template:pfx_spec_row | linkIndex | number | -1.0 | Used when the <code>type</code> is set to <code>"EMITTER"</code> to define the emitter to attach to. }}
{{template:pfx_spec_row | offsetX</code><br/><code>offsetY</code><br/><code>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 <code>type</code> field. }}
{{template:pfx_spec_row | offsetX</code><br/><code>offsetY</code><br/><code>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 <code>type</code> field. }}
{{template:pfx_spec_row | offseRangetX</code><br/><code>offseRangetY</code><br/><code>offseRangetZ | emitter time curve | 0.0 | Define the starting spawn position range in which a particle can randomly deviate from <code>offsetX</code>, <code>offsetY</code>, and <code>offsetZ</code>. }}
{{template:pfx_spec_row | offsetRangetX</code><br/><code>offsetRangetY</code><br/><code>offsetRangetZ | emitter time curve | 0.0 | Define the starting spawn position range in which a particle can randomly deviate from <code>offsetX</code>, <code>offsetY</code>, and <code>offsetZ</code>. }}
{{template:pfx_spec_row | 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. }}
{{template:pfx_spec_row | velocityX</code><br/><code>velocityY</code><br/><code>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. }}
|}
|}

Revision as of 10:51, 14 February 2016


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

Work in progress, go here.

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.