Hello, what is the best way to render a Niagara system in front of all objects (walls)? I tried with the flag (Disable Depth Test) in the material, it seems to work at the begining, but when there are several systems in the level, that’s when it no longer seems to work… Thanks for the help.https://drive.google.com/file/d/1Ub6LLnkbcWnjBfJihK5zfoVldkRT1paZ/view?usp=sharing
Hi there,
Looks like Unreal is culling the particle system because the bounds of your emitter is getting occluded. Try changing the Calculate Bounds Mode in the emitter properties to fixed and giving it a large bounding box. Just keep in mind that anytime the camera can see the bounding box it will do the calculation for the emitter, even if the emitter isn’t on screen. If you want to see the bounds in the level you can do Show>Advanced>Bounds.
Hope this helps.
As supplementary to MRvfx answer, GPU emitter is culled when its bound is completely blocked by other object in depth test. This can be circumvented by having a separate dummy CPU emitter with zero sprite size (you still need to enable the sprite renderer with the simplest material) and arranging its particles positions to act as a mandatory bound for other GPU emitters in the same system.
Supplementary comment to the supplementary comment.
In the latest few versions of unreal the option has been added to force the bounds of a Niagara system manually from blueprint.
So this can be used as an alternative to the zero sized cpu particles with dynamic bounds
Actually I think our methods do not solve the disable depth test material still being culled when the particle is behind other opaque objects. (Our tricks still work in many circumstances.) I thought Niagara’s camera offset could do the trick, but it doesn’t and I believe it’s because the camera offset is done on the material/shader side and depth test/bound doesn’t take WPO into account, IIRC. (Also I just realized that Niagara’s Camera Offset is not clamped to prevent particles from being offset behind the camera…)
An alternative would be manually place the dummy “bound setting” particle right at the camera.
You doesn’t need to offset the particle even if the particle is right behind the near clip plane of the camera.
Obviously this would mean the particle effect will NEVER be culled, even if the visible effect is already out of screen, so you should only use this trick when you absolutely have to.
Camera offset doesn’t work because it doesn’t move the particle position, it just changes where the sprite is rendered. (It’s done in the sprite factory)