Spawning particle systems over time degrade performance

Hey guys,

So I have a particle system that is supposed to fill a room with 500 balloon sprites that have a life of 10 seconds. The particle system works fine the first 5 times that I spawn the emitter but then starts to slow down game performance more and more with each time I spawn them. Any thoughts on what may be causing this?

Thanks!

Ignore the balloons spilling out of the room. There’s an open invisible door.

Hey thevfxguy13 -

What is your spawn rate? Are those true Particle Sprites or Meshes? In Cascade what is your Particle Counter running at ### / ###?

Let me know -

Eric Ketchum

They all spawn at once, a burst of 500. And they are sprites with a translucent material. Texture size is 256x256

The counter is at 500/505.

Hey thevfxguy13 -

I can make an educated guess here as to the reason that you may be having some performance issues. I am assuming that your balloons are CPU particles, since they have collision with an invisible object I feel fairly confident of that fact and I am also going to assume that you are spawning the next emitter before the full 10 second lifetime is up. Assuming those facts, the engine is probably struggling to keep the number of CPU particles rendered at one time, particularly since if as you said they are all translucent which means you have an dense section of overdrawing happening in the room where you have tasked the engine with re-drawing the same pixels multiple times.

You have developed what I like to call the Perfect Storm. CPU Particles with Collision, maxed out to 500 spawned per emitter, and translucent materials. I have a suspension that if you where to use the shader complexity Visualization (under lit) that you would get a Red to White area where your room is with some green on the edge.

To help increase performance, could you use GPU particles instead of CPU particles and either create a Vector Field which pushes back on the balloons as they attempt to leave the room or alternatively keep a CPU system but instead of collision use a kill box and a seperate emitter that makes one particle seemingly escape from the balloon room.

Thank You

Eric Ketchum

Hey Eric,

I will definitely try the GPU particles and see if that will help with the performance. I was waiting until all the particles were killed to spawn the next round of balloons but the performance still steadily dropped.

I did talk to my colleague about this issue and he said he notices that his game will steady increase in RAM usage when playing in the game editor. I think I will also try to package the game and see if the performance is still an issue.

Thank you for the advice and I will get back to you if I still have problems Thank you!

Doug Van Zee

It seems as though going from 4.7.2 to 4.7.3 fixed this issue. I can now spawn 10,000 balloons and have no performance issues.