Particle System Ringbuffer NonLoopReplaceOldest

Hello. #richardkettlewell

Long story short: can we have more one RingBufferMode - nonLoopReplaceOldest?

at this time we have two ring buffer mode both make particle alive forever till new appear.
Earlier people asked for “remove oldest, to follow the maxParticles limit”
Today is this possible with ring buffer?

I can achive this visualy, if set ring buffer to LoopUntilReplace and set time markers to (1,1). But old particles stay invisible and alive, I’m working on mobile and spawning particles by hand, and particle count is important cause of performance reason

I don’t yet understand what you are asking for :slight_smile:

This sounds like the PauseUntilReplaced mode?
But are you saying this hides the particles, even though they still technically exist?

But if you want them to be killed, it sounds like you don’t want to use Ringbuffer mode at all, and just have the particles be removed after their lifetime.

I’m a bit confused :slight_smile:

1 Like

Thanks for answer, let me explain my point:

I m making bullet decals system,

  • particles should die by lifetime
    -when last died, system stop callback - > return system to pool
  • use ParticleSystem.main.maxParticlesCount as limit
  • call ParticleSystem. Emit(1, params) when need to spawn new decal

When system reach maxParticlesCount if i call ParticleSystem. Emit(1) - nothing happends, no new particle appear

What I expect:

  • particles die by lifetime
  • system stop by last particle die
  • MaxParticleCount reached + ParticleSystem. Emit(1) = kill oldest particle, spawn new one
1 Like

Oh I see… so, like a hybrid of ringbuffer mode and non-ringbuffer mode, where particles die naturally after N seconds, BUT, if you hit the max-particles limit, start recycling particles so the Emit never fails.

Interesting. I’ll add it to our roadmap - I can’t say how easy/hard that might be - I’ll have to remind myself of the code first.

Thanks for clarifying!

5 Likes

Big thanks, have a good day

+1 for this.

This is a desperately needed performance feature for dealing with overdraw, especially on mobile. I also think it should be the default way the particle system is setup. Making particles fail to emit by default is extremely graphically jarring, and I doubt anyone actually ever lets it happen and thanks the particle system for it.

Ideally, particle systems should have similar options to how instance-stealing works in Audio Middleware solutions for sound effects.

  • Oldest: Stop the event instance that was started the longest time ago.
  • Quietest: Stop the event instance that is the least audible, taking distance attenuation into consideration.
  • Furthest: Stop the event instance that is the furthest away from the listener, regardless of its volume.
  • None: No stealing occurs, therefore no new event instances can be played until an existing event instance stops.

It would be interesting if you could check the color alpha channel, and make it so you can steal the least visible particle. That might be not very performant and out of scope though. :stuck_out_tongue:

Either way, oldest stealing would be very, very, very appreciated by a lot of people, and I’m happy to hear it’s potentially on the roadmap.

6 Likes

Hello,

Are there any news on this topic? A ticket I can watch or something?
This feature is something I would love to use too.

Thanks!

2 Likes

Exactly! I’m always looking for a “Replace Oldest” policy, and discover that that’s almost how the Ring Buffer works, but not quite!

It’s just nice to make sure you can set a MaxParticles value, but never fail to emit.

1 Like