- Home /
"Automatic simulation culling support." Particle Culling Bug
With Unity 4.0, the Shuriyuken Particle System received updates. The update that puzzles me is this one.
FEATURE/BUG "Automatic simulation culling support. Particle systems will only update when visible. When it is not possible to support this automatically, Shuriken shows why directly inside the UI."
Find it here.. http://unity3d.com/unity/whats-new/unity-4.0
I'm using NGUI's plugin for Unity. Inside my game I have a particle effect that holds two particle systems that both have a localScale of 1,1,1. I have that particle system nested within another game object, and the particle system has a localPosition of 0,80,0 within its parent game object. Doing this I can easily spin the parent game object which has the effect of the particle system orbiting around a center.
The PROBLEM becomes evident when this assembly rotates near the edge of the screen. If the particle system rotates to a position outside of the camera's view-port, then all of the particles of the particle system immediately shutoff.. then turn on upon re-entry. My question is whether this blinking behaviour is caused by the "Automatic Simulation Culling" feature included in the Unity 4.0 update or is this frustum culling declaring the particle system not visible and refusing to render, and how do I work around it.
[This is irrelevant!] -The particle system is not a mesh, therefore it’s bounds cannot be modified.
[Should I fix this?] -I'm using an orthographic camera and the NGUI UICamera component. NGUI's UIRoot game object is designed to hold all game objects within the scene, and its default scale is (0.002604167,0.002604167,0.002604167).
[I have done this!] -Use a custom shader that overlays NGUI UIPanel assets -The custom shader has “Cull Off” -Manually set the particle system to “isVisible” during the “void onBecomeInvisible()” -Whenever the particle system is not emitting I manually relocate it to the center of the screen.
http://answers.unity3d.com/questions/305032/particles-disappear-when-emitter-shuriken-is-off-s.html http://www.tasharen.com/forum/index.php?topic=5841.0 http://docs.unity3d.com/Documentation/Components/SL-CullAndDepth.html http://forum.unity3d.com/threads/148608-Disable-particle-system-culling http://forum.unity3d.com/threads/71051-Disable-Frustum-Culling
I have the same issue. I was wondering how do actually you make the Particle System visible? I know OnBecameVisible and OnBecameInvisible tell us when this happens, but I don't know how to make the actual particles visible after that. I tried setting the enabled variable to true, but this still does not work.
Answer by wrobel221 · Sep 24, 2014 at 08:38 AM
Non uniform scaling set for ParticleSystem transform seems disabling culling. So I just set scale to 1.01, 1, 1 and it did work for me.
Answer by Arkade · May 11, 2014 at 07:48 PM
Have you tried enabling SubEmitters per http://answers.unity3d.com/questions/218369/shuriken-particle-system-not-rendering-particles-w.html ?
Answer by mr_duke · Jan 14, 2016 at 11:44 AM
( (ParticleSystemRenderer)gameObject.renderer ).mesh.RecalculateBounds();