How to stop my particle systems from being frustum culled

Is it possible to control the culling of particle systems in Unity 2019? I am referring to the entire system, not individual particles.

In my use-case, I am modifying the vertex transformation to get the “distant object effect”.

When the camera thinks it is not viewing something it will cull it (frustum culling). For most game objects you can get around this by inflating the size of the bounds to make the camera think it is within its frustum and therefore not get culled. However, particle systems are not a single object, they are many particles and I can’t see a way of manipulating the total bounds of the system.

Any ideas?

No it’s not possible.
One thing you could do is force the bounds to be larger by adding 2 particles, one in each corner at a very large value.

Hi, do you mean with invisible “dummy” particles? How would I control it so that only 2 particles appeared in the corners?

You can call Emit with an infinite lifetime.
One at 10000, 10000, 10000 and one at -10000, -10000, -10000

Thank you for the answers, I have managed to get this working now. Much appreciated for taking the time.

Needless to say, this solution does feel very hacky, it’s a shame Unity doesn’t give us more control i.e. stop individual culling. Anyway, maybe a future feature.

2 Likes

Maybe someone else might find this helpful:
We had this problem, too, in 2021.2.17. With us it was because the ParticleSystem was inside a container moved in code. We fixed the problem by switching the ParticleSystem’s Simulation Space to Custom, and injected the ParticleSystem’s parent (the moving object) into the the Custom Simulation Space field. That fixed the problem for us.

For anyone else wondering, the only solution I found was to convert my particle systems to VFX graph particle effects. Luckily, the vertex shader I am using uses ShaderGraph, which seems to be the only way to use a custom shader using VFX Graph.

To get a ShaderGraph shader working with VFX Graph:

  • Have ShaderGraph and VFX Graph installed in project
  • Edit → Preferences → Visual Effects → Check “Experimental Operators/Blocks” (seen in 2nd post here )
  • Create a shader in Shader Graph
  • In the shader in Shader Graph, open the Graph Settings, scroll down, and check “Support VFX Graph” (seen in 2nd post here )
  • Create a Visual Effect in VFX Graph
  • Make the output a “Output Particle Mesh” node
  • Insert your Shader Graph shader into the “Shader Graph” section
  • Rejoice