Editing Particle Systems

On January 23, 2011 at 10:21:37 AM
OK, heres a particle system editing tutorial...

All particle systems are found in data/particlesystems/ and have a file extension of .psys.

Like a lot of the data in SLT, they are XML files, so you're going to need a text editor.
Note
All names are case-sensitive, all values(except filenames) aren't.
e.g.
EmitFrom = "SpHerE" would work.
Emitfrom = "SpHerE" would not.



Code:

<?xml version="1.0" encoding="UTF-8" ?>
<System>
<Emitter Texture = "Particle.png" MaxParticles = "100" Rate = "0.1" Size = "1" EmitFrom = "Sphere" MinParticleColour = "1,0.2,0,1" MaxParticleColour = "1,0.2,0,1" MinDecay = "0.4" MaxDecay = "0.9f" MinSpeed = "-0.04,0.006,-0.04" MaxSpeed = "0.04,0.011,0.04" MinAcceleration = "-0.1,0,-0.1" MaxAcceleration = "0.1,6,0.1" MinParticleSize = "0.5f" MaxParticleSize = "1.0f"/>
<Emitter Type = "Pathed" Texture = "Particle.png" MaxParticles = "200" Rate = "0.05" Size = "0.1" EmitFrom = "Sphere" MinParticleColour = "0.2,0.8,0,1" MaxParticleColour = "0.4,1,0,1" MinParticleSize = "0.1f" MaxParticleSize = "0.2f">
<Path MaxSpeed = "7" MinSpeed="4">
<Point Position="0,0,0" Type="Relative" Time="0"/>
<Point Position="-2,0,0" Type="Relative" Time="0.5"/>
<Point Position="0,0,0" Type="Relative" Time="1"/>
</Path>
</Emitter>
</System>

(pointless example)

XML declaration
Code:

<?xml version="1.0" encoding="UTF-8" ?>


Required far a valid XML file.

System element
Code:

<System>

</System>


All emitters go in one of these.

Emitter element
Code:

<Emitter Texture = "Particle.png" MaxParticles = "100" Rate = "0.1" Size = "1" EmitFrom = "Sphere" MinParticleColour = "1,0.2,0,1" MaxParticleColour = "1,0.2,0,1" MinDecay = "0.4" MaxDecay = "0.9f" MinSpeed = "-0.04,0.006,-0.04" MaxSpeed = "0.04,0.011,0.04" MinAcceleration = "-0.1,0,-0.1" MaxAcceleration = "0.1,6,0.1" MinParticleSize = "0.5f" MaxParticleSize = "1.0f"/>

An emitter - there are two types, a regular one that just emits particles from an area and a pathed one which emits particles that follow a path.

Available properties are:
(anything highlighted in blue does not apply for pathed emitters)


So, if i wanted an emitter that emitted blue particles from a circle upwards at a constant speed...
Code:

<Emitter Texture = "Particle.png" MaxParticles = "100" Rate = "0.1" Size = "1" EmitFrom = "Circle" MinParticleColour = "0,0,1,1" MaxParticleColour = "0,0,1,1" MinDecay = "0.4" MaxDecay = "0.9" MinSpeed = "0.0,1.0,0.0" MaxSpeed = "0.0,2.0,0.0"  MinParticleSize = "1.0f" MaxParticleSize = "1.0f"/>


These are for path emitters.
Path element
Code:

<Path MaxSpeed = "7" MinSpeed="4">
</Path>

Defines a path for a pathed emitter.
Available properties are:


Point element
Code:
<Point Position="0,0,0" Type="Relative" Time="0"/>

Defines a point along a path.

Available properties are:


Note For a relative point, X and Y are perpendicular to the direction of the path and Z is along the path.

(Coming soon - spell editing tutorial!)