Particle Emitter

Addresses [GzWeb] Support particle emitters.

We use ShaderParticleEngine, a third-party library based in ThreeJS to render particles.

I followed this doc to set default values for the Particle Emitter, and to translate them to values used by SPE.

Since SPE has its limitations, I expect some tweaks are going to be necessary as we implement more particles in models.

Some things to have in mind:

  • Color Range Images cannot be used directly. SPE requires at most four color values to interpolate through the lifetime of the particle. We can have a similar behaviour by reading the rgba values of four pixels in the image.
  • Particles doesn't seem to be sorted by depth correctly (a particle rendered in a position behind another would appear to be forward, for instance). Playing with depthTest and depthWrite values of SPE didn't worked, so another way to fix this should be needed.
  • SPE uses just a texture for particles, and we cannot set the diffuse value of the material, for example.

The SPE Library was one of the best ones that I found for this task, but as we implement more particles and face its limitations, we might want to move away from it.

Can you ptal @iche033 or @nkoenig ?


GIF of a Fog Emitter

fog

Merge request reports

Loading
Loading