Changes between Version 1 and Version 2 of ParticleFormat


Ignore:
Timestamp:
Apr 9, 2011, 3:01:01 PM (13 years ago)
Author:
Philip Taylor
Comment:

more particle details

Legend:

Unmodified
Added
Removed
Modified
  • ParticleFormat

    v1 v2  
    5151  The RGB colour of the texture is drawn over the background, with transparency determined by the alpha channel. This is useful for more solid-looking particles, but may introduce visible glitches when particles are drawn over nearer particles, so it should be tested carefully from all angles.
    5252
     53== Parameters ==
     54
    5355The main part of the effect file is specifying '''initial particle parameters'''. Every time a new particle is created by the particle emitter, its state is determined by these parameters.
    5456
     
    6870 * '''`color.g`'''
    6971 * '''`color.b`'''
     72
     73Each parameter can be specified in a number of ways:
     74 * '''`<constant name=`"'''''parameter'''''`" value="`'''''number'''''`"/>`''' - the parameter will always have the given value.
     75 * '''`<uniform name=`"'''''parameter'''''`" min="`'''''number'''''`" max="`'''''number'''''`"/>`''' - the parameter will be given a random value between min and max. Every value in that range is equally likely (hence the "uniform"). Max must be greater than min.
     76 * '''`<copy name=`"'''''parameter'''''`" from="`'''''parameter'''''`"/>`''' - the parameter's value will be copied from the value of some other parameter. This lets you do randomised greyscale colours - use a `uniform` for `color.r` so that it's given a random value, then use some `copy` so that `color.g` and `color.b` are given the ''same'' random value as `color.r`. The 'from' parameter must have been computed first (i.e. be higher up in the parameter list from earlier in this section - `color.g` can copy from `color.r`, but can't copy from `color.b` since that's computed later).
     77 * '''`<expr name=`"'''''parameter'''''`" `'''''...'''''`"/>`''' - a hopefully-temporary inflexible hack to make construction dust scale with the number of workers. You probably shouldn't use this.
     78
     79Each parameter has a sensible default value, so you don't need to explicitly specify them all. E.g. you can omit all the `position` parameters if the particles should just be emitted directly from the emitter point instead of being spread randomly over a larger volume.
     80
     81== Effectors ==
     82
     83Once a particle has been emitted, it will move and spin according to its velocity, and it will automatically fade in and out. You can add more complex motion with '''particle effectors'''.
     84
     85Currently they're very limited so the only thing you can do is:
     86 * '''`<force x=`"'''''number'''''`" y=`"'''''number'''''`" z=`"'''''number'''''`"/>`''' - each particle will be subjected to a constant acceleration force (in metres per second per second) in each direction. Each attribute will default to 0, so typically you can just write e.g. `<force y="-2.5"/>` to get downwards acceleration (simulating gravity).