This thread should start some initial discussion and tinkering about generalized particle systems for various occasions. Currently, the only particle system is BlockParticleSystem which is restricted in several ways.
The ultimate goal is to have a set of basic particle systems that can easily be incorporated into modules. Some useful pre-defined effect classes would be for explosion, smoke, fog, ... Moreover, the location where particles should be spawned has to be adjustable, e.g., on the surface of a sphere, inside a cube, ...
Here are the main questions/aspects:
Defining an explosion would be as simple:
Another point are repeatedly created particles. Currently one needs to define a separate system which resets the amount of particles to spawn. Probably this could be generalized in class of RepeatableParticleEffect or by using a flag which indicates whether the effect is one-time or not.
The ultimate goal is to have a set of basic particle systems that can easily be incorporated into modules. Some useful pre-defined effect classes would be for explosion, smoke, fog, ... Moreover, the location where particles should be spawned has to be adjustable, e.g., on the surface of a sphere, inside a cube, ...
Here are the main questions/aspects:
- where are particles created (relative to some position, defined by position, radius, ...),
- how many particles and with which rate are spawned,
- how do they look (form, texture, size, ...)
- lifetime of particles
- bounding box in which particles live - any particle leaving this area will be deleted.
Code:
{
"SphereParticleEffect" : {
"radius": 5,
"surfaceOnly": true
}
}
Code:
{
"ExplosionParticleEffect" : {
"radius": 20,
"acceleration": [300, 300, 300]
}
}