Inactive General Particle System

Linus

Member
Contributor
Name: General Particle System

Summary: The goal of the project is to give developers more freedom in the definition and usage of particle systems than the current BlockParticleSystem. The new system will allow developers to
define and alter the behavior of the particles at runtime. This makes it possible to create a wider range of particle systems and also allows the environment to influence the particles.

Scope: Engine

Current Goal: Initial release (ticked boxes are done):
  • [x] runtime particle system definition
  • [ ] performant instanced rendering (have to rework this, might postpone it to a later version)
  • [x] compatability rendering for older hardware
  • [ ] API for modules
  • [x] core/default/engine set of affectors and generators
  • [ ] defining new affector and generator types in modules (almost done)
  • [x] Textured particles
  • [ ]one shot particle systems and proper cleanup

Phase:
Implementation
Curator:@Linus
Related:
 
Last edited:

Linus

Member
Contributor
Particles can now have textures:
texturedFire.jpg
From left to right:
  • No texture (reverts to colored squares)
  • Blurry dot texture
  • Smoke/cloud texture
  • Toon sphere particle
  • Toon smoke particle atlas with 2 textures (my favorite :p)
Short summary of how to do this:
  • To create textured particles, you first have to specify what image you want to use as texture (atlas) in the ParticleSystemComponent.
  • By default, it is assumed that the image just contains a single sprite.
  • If the image contains multiple sprites: add a TextureOffsetGeneratorComponent to the particle system entity, in which you specify:
    • how many rows and columns of sprites there are in the atlas
    • which of these sprites you want to use to texture the particles.
    When a particle spawns, one of these sprites is assigned to it at random.
  • The final color is determined by multiplying the texture color with the color of the particle, which works best if you either use a grayscale image to define shadows and highlights or use a colored image and set the particle color to white.
I could add a TextureOffsetAffectorComponent in the future, which would enable particle systems with sprite based animations.
 
Last edited:
Top