UE5 / nanite foliage culling, how to get rid of?

Hello, I’m working on a meadow scene, using foliage and nanite.
I would like not to have any culling on my scene, since it’s obvious the foliage is popping into place (instance fading?) as the camera gets closer. Take a look here:

All the grass meshes are nanite-enabled and it says here Foliage Mode in Unreal Engine | Unreal Engine 5.0 Documentation
that

“Nanite-enabled meshes are not affected by culling distance and instance fading”

So, ideally I want the grass always visible -independently on where the camera is-. Could someone please point me in the right direction?

Thanks

1 Like

The foliage tool has a culling distance, it might be causing a problem. You could try changing it.

1 Like

Sure, but these are nanite enabled foliage meshes and in the documentation it says they “are not affected by culling distance and instance fading”

After looking at the video again it dosnt look like culling. It looks like the grass is changing in quality. If its the case you can try changing the Nanite settings.
Also, why do you have so much grass?
The less grass, the harder to see it change in quality. Hope it helped.

1 Like

Thanks mate, will definitely look into Nanite settings.
As for the amount of grass, I need to create a really dense meadow look -but maybe I’m overdoing it, so will also play with the density-. Will post results in the comings days. Thanks again

So there’s a console command solution and it’s explained here:

Command here
r.Raytracing.Geometry.InstancedStaticMeshes.Culling 0

Thanks again for pointing me in the right direction and again Don William Faucher has me covered :slight_smile:

1 Like

Great to see that you found the fix.

Make sure to click the answer button on your last comment so others can find the answer too, that video.

Then people wont think that you sill have a problem.

1 Like

Actually, I spoke (typed) too fast. I assumed that was going to work -just like in the 4.x tutorial-, but it doesn’t.

Will keep looking

Nanite is quite complex, I know LOD’s had a certain distance at witch they would change quality. Maybe one exists for Nanite.

But this fading in will happen still just further away. Nanite is great but it still has to change the meshes quality. So you can only leviate the problem.

Did the console command work temporarily?

Nope the console command didn’t work. I was away from my computer when saw the tutorial and assumed it was going to work but it didn’t. Reading a lot these days about relevant/similar issues, but not really an answer yet. Thanks for stopping by Riipitud1

Hi. Met same thing with trees. Enabled nanites=culling at certain dist.
Found solution: checkbox “preserve area” in mesh editor near nanite enable chbx.

7 Likes

This is actually not true. It’s possible they added this feature in 5.1 and just forgot to update the docs. You need to however make sure you re-generate the foliage if coming from UE4 or maybe even 5.0 depending on when they changed the way foliage instances are stored.

Had the same issue with grass(foliage). Try to enable option “Explicit Tangents” in your asset (tree or grass) mesh “details” panel (I’m using UE 5.3). Also enable “preserve area” checkbox, like @Andariel_yo mentioned.

If you enable explicit tangents you need to also make sure your material explicitly specifies tangents… eg: give it a tangent output.

I was struggling with the same issue and found this reddit thread, this is exactly what’s happening in my case.

Most assets on the store and all made by speedtree use translucency maps (alpha maps) which means you are rendering only the parts which are not masked. This means your GPU is still rendering the geometry but not showing it (its not visible to your eye)