Particles take some draws and ms even off screen space

Hello!

I have some particle emitters on my scene, but when I move my camera away from them, ParticleSimulation still uses 28 draws and takes 5ms. Why??

Here are some screens:

With particles:

http://s1.uploadpics.ru/images/-yq-7Eikwe.jpg

Without particles (only sky):

http://s1.uploadpics.ru/images/ZkCJX4ikwg.jpg

Screens say, that particles take even more, than on the screen, but it’s just a bad moment.

80% of time offscreen-particles take same time to render, as onscreen ones.

Can anyone give some advice, how can I optimize them, so they do not take much (or any) of my frame render pass…

Make sure you set Fixed Bounds in the Particle System. You’ll probably find that the bounds are still on-screen hence the render time.

Particles always simulate however, so they won’t stop simulation if off-screen.

I thought, that particles stop simulation when off screen… I just found out, that that proplem only appears in the editor, so question is probably solved, but I still need some info on that.

If it did, it would cause continuity errors. Say you have an explosion on-screen, you look away then look back again, and the explosion would keep going from where it was when you stopped looking at it, which you don’t want.

But that should go on CPU, not GPU…

If it’s on the GPU at all, then that means that the particle bounds are within the view frustrum. Otherwise, the GPU wouldn’t even know it was there because the CPU wouldn’t create draw calls for it.

To clarify, when using GPU sprite emitters, the emitter stops drawing particles when the bounds are no longer off screen to avoid wasting resources (and for technical reasons too, primarily the limits of GPU emitters). The emitter continues ticking particles, so the emitter will still eat into computation time depending on how complex your particles are to tick (this will become apparent if Niagara has the same occlusion system as Cascade), but just stops rendering the entire emitter if it is off-screen. This should dramatically lower how expensive your effect is on your GPU, but the CPU will still have a little bit of cost associated with the emitter.