ogre icon indicating copy to clipboard operation
ogre copied to clipboard

Particles emitting ParticleSystems

Open corentinjaffre opened this issue 3 years ago • 2 comments

As discussed in: https://forums.ogre3d.org/viewtopic.php?f=3&p=551187#p551187 The only way to create rocket trails, explosions fumes, etc. is to allow particles from an emitter to emit particles during their particle life/update.

Also, ideally, a particle system should emit one or several particle systems, not emitters: -to allow different materials per system (ex: one firework rocket using a material, will spawn a fire trail and a smoke trail) -to allow different modifiers per system: (ex: an explosion trail would use some particles for debris and a Force modifier for gravity, but the smoke emitted from those particles would use a different material and no Force, because this smoke is light weight) If this is not possible, maybe an emitter could have an emitterID, and a modifier would only modify particles from this emitterID?

Example of an explosion trail: https://wiki.popcornfx.com/images/thumb/8/89/Tuto_Trails_Preview.png/250px-Tuto_Trails_Preview.png In this picture, the parent particle is using a force for gravity, but not the smoke (if not, the smoke will also fall)

corentinjaffre avatar Aug 23 '21 15:08 corentinjaffre

allow particles from an emitter to emit particles during their particle life

one can currently achieve this by giving the emitted emitter duration 0. E.g. here: https://github.com/OGRECave/ogre/blob/8e0e0f378e3f9bfe48740d5877e75cd9adf39b37/Samples/Media/particle/emitted_emitter.particle#L34

This way it will be active right away.

ideally, a particle system should emit one or several particle systems, not emitters

this needs some thorough planning to play together with: https://github.com/OGRECave/evolution/blob/master/OEP-04-GPU_accelerated_affectors.md

The idea is certainly possible, as shown by particleuniverse. There you can emit a technique, which roughly corresponds to a particle_system in ParticleFX. However, the price you pay for this flexibility is performance.

maybe an emitter could have an emitterID, and a modifier would only modify particles from this emitterID?

this would require us to track and compare the particle origin, which would increase particle size and slow down particle update. Emitting particle systems is likely more efficient.

paroj avatar Sep 05 '21 17:09 paroj

assigning future label, as "rocket trails" are already possible and the particle_system emission is implemented in ParticleUniverse. For OgreMain I would like to implement GPU particles first.

paroj avatar Sep 12 '21 11:09 paroj