# Niagara particles don't display correctly with a material that hides objects far away

**URL:** <https://forums.unrealengine.com/t/niagara-particles-dont-display-correctly-with-a-material-that-hides-objects-far-away/2388323>\
**Category:** Rendering\
**Tags:** unreal-engine, question\
**Created:** [March 13, 2025, 2:44pm UTC](https://forums.unrealengine.com/t/niagara-particles-dont-display-correctly-with-a-material-that-hides-objects-far-away/2388323 "2025-03-13T14:44:16Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [April 13, 2025, 9:47pm UTC](https://forums.unrealengine.com/t/niagara-particles-dont-display-correctly-with-a-material-that-hides-objects-far-away/2388323/10 "2025-04-13T21:47:19Z")

</div>

thanks for sharing the code.  
instead of using an If you could use a step or smooth step. since you’re only thresholding. and could be faster than an if. and simpler.  
also i personally recommend using a different arithmetic. there’s something like an offset and division that gives you a fade instead of a hard cut.  
the smoothstep will give you a small fade.

you can do something like  
((AWP - CamPos) + Offset )/ Distance \> saturate or smooth step

this guy uses that patter a ton, i think he uses it in the video. check it out (it for a different thing but at some point he usses that patterns and explains it (i think, iirc)) [https://www.youtube.com/watch?v=-ynkbsCT2Ic](https://www.youtube.com/watch?v=-ynkbsCT2Ic)

> [@vimesito](#):
>
> my game is for VR standalone for quest and for android volumetric fogs doesn’t work

i’m not sure.  
there’s a fog that it’s a simple fog based on distance. you’ll have to do some research. it might help.  
i think it should work on vr because it’s a trivial fog, but i cant remember if ue exposes it directly.

also check my alternative solution about configuring the stage for the post process and the particles materials.

 ![{6F5E8348-04BB-456C-8392-88197ACF75EF}](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/6/1/26103458668189268298941cd5dd00b8f56d70c1.png)

that’s only for post process i think.

OOOOOotherwise i just thought of a random approach you can use that might work (please check the postprocess first)  
You can set the cull distance to a lower value, then make all materials have a DistanceCullFade or PerInstanceFadeamount to drive a fade out.  
and have a solid black bg where things fade into.  
also use a cull distance volume.  
also i’d recomend on the material to use Opaque/Masked and drive the opacity (mask) through a ditherTemporalAA.  
making your materials translucents will make your game much less performant on VR. and also will not write to depth buffer.

it’s a round about way but might work. the problem is that those nodes i think are per mesh, not per vertex. so it will fade kinda like that sonic in saturn (iirc).

> [@Fade Distance Smoothing](https://forums.unrealengine.com/t/fade-distance-smoothing/454681/2):
>
> Idk what perinstancefadeamount does, but here’s how to set up a fade in using cameradepthfade and per instance random. the functions are in the engine content so you’ll need to check the ‘show engine content’ checkbox to find them. if you want the grass to pop in instead of fade in you can modify the camera fade function. edit: figured out how the per instance fade amount works, it gives you a value from 0-1 based on the cull distance you g…

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/0/2/c02131ddf0d3f3c5e0b59a1bf1555a675682ebd5.jpeg "Distance Cull Fade Material node in UE5 Tutorial | UE5 Material All Node Series") ](https://www.youtube.com/watch?v=E0A9JHxHNCI)

---

_[View the full topic](https://forums.unrealengine.com/t/niagara-particles-dont-display-correctly-with-a-material-that-hides-objects-far-away/2388323)._
