How to create custom particles
From Rigs of Rods Wiki
Contents |
Manual
Can be found there: http://www.ogre3d.org/docs/manual/manual_31.html
Variables
First of all: I don't know exactly what every parameter means. That's why I don't explain every one. But it will be enough to create your own particles.
First line
The first line in a particle file describes the name of the particles. You can use every name you want. Example:
tracks/fire
material
The material section defines the used material for the particles. You can create new materials to give the particles a different look. It's actually the texture of the particles. Example:
material tracks/SmokeMat
particle_width and particle_height
Those parameters scale the particles. Example:
particle_width 0.2 particle_height 0.4
This particle is higher than it's broad.
quota
Quouta describes how many particles can be emitted. The higher value, the more particles may be in a scene. If the particle amount is higher than quota, the emitter will stop emitting until the amount is lower than quota.
quota 250
time_to_live
This is the time a particle exists, until he is deleted.(Probably in seconds) Attention, to high values will decrease the framerate!
time_to_live 2
direction
This is the direction a particle is emitted. The first parameter is the roll axis, second the vertical axis and third the diagonal axis.
direction 0 1 0
This particle is emitted upwards.
velocity_min and velocity_max
The minimum and maximum velocity the particle can reach.
velocity_min 2 velocity_max 4
colour
Here you describe the colour of the particles. The first value is how much red there will be, the second is how much green and the third is how much blue. It's easy to remember with RGB.(0-1) The last value is the transparency of the particles(0 is completely invisible, 1 is not transparent).
colour 1.0, 0.5, 0.0, 0.5
This particle is orange(Red+ A bit of green=orange), and a bit transparent.
alpha
You can decrease the transparency per second with that:
alpha -0.04
force_vector
This is a kind of gravity. You can also make positive gravity, so the particles are pulled upwards:
force_vector 0 -1 0
downforce
force_vector 0 1 0
upforce
rotation
Rotation_range_start: The starting angle of the particle rotation_range_end: The angle when the particle is deleted
rotation_range_start 0 rotation_range_end 360
affector Scaler
The rate value there let's you scale the particle while it's flying.
rate 1.2
The complete file
Here you can see how those parameters are implantated:
tracks/Smoke
{
material tracks/SmokeMat
particle_width 0.2
particle_height 0.2
cull_each false
quota 250
billboard_type point
// Area emitter
emitter Point
{
angle 11
emission_rate 125
time_to_live 2
direction 0 1 0
velocity_min 2
velocity_max 4
colour 0.0, 0.0, 0.0, 0.4
}
affector ColourFader
{
alpha -0.04
}
affector LinearForce
{
force_vector 0 -1 0
}
affector Rotator
{
rotation_range_start 0
rotation_range_end 360
rotation_speed_range_start -10
rotation_speed_range_end 10
}
affector Scaler
{
rate 1.1
}
}


(gold)
(silver)
(bronze)

