How Can I Write Custom Depth From Niagara Particles?

I am trying to export custom depth by using the checkbox on a niagara component.

It appears that it doesn’t work while cascade does in fact work with the same checkbox. I also tried it on the same mesh in the viewport without being part of the particle system and it works fine.

This is an opaque mesh not a translucent one. I believe this is a bug.

Thank you.

This is said to be feature request where this is a blocker bug in many cases. This should not be considered a feature. It should be treated as a blocker. Please make this a blocker and include in the next version of unreal. Cascade does this perfectly. "Niagara can do everything cascade can do and more! Except THIS AND THIS AND THIS AND THIS!!!

This is resolved in UE 4.26

New: Niagara particles will now properly support custom depth writes, lighting channels, disabling rendering in the main pass, and volumetric translucent shadows.

I’ve read those notes, but do you know how exactly to configure the particles to render to custom depth? There does not seem to be any settings exposed in Niagara for this

UNiagaraComponent inherits from UPrimitiveComponent

This does nothing for niagara component.GBuffer available in Niagara Scratchpad modules as one of the input.

Could You share some more info please? :slight_smile:

Once you spawn your NiagaraSystem from Blueprints you can then use the object reference of the NiagaraSystem Instance to set up custom depth stencil writes as follows:

2 Likes