Heavy Nanite Bug. Mesh Disappears at Distance

Hey,

I have a problem with Nanite.

When i enable Nanite on my meshes, the mesh will disappear at certain distances. Watch the video for example.

The left mesh has Nanite enabled and the right one has it disabled. It happens with every mesh that has Nanite enabled.

I tried alot already. My Windows and my drivers are up-to-date and im using DirectX12 in the engine.

The mesh is a regular mesh from Quixel Bridge.

I didn’t had this problem in version 5.0 EA2

Anyone else having this problem? Or can replicate that? Someone know what i could do?

1 Like

So i did so more testing.

I found out that this bug has to do something with the location.
For example: When i place the Nanite mesh at 0,0,0 in world location, everything works fine and the mesh does NOT disappear/pop in.

But when i place the mesh at 0,200000,0 in world location for example , then this bugs start to occur and the mesh starts to disappear when i move away with the camera.
So it seems that Nanite gets some problems with meshes that are placed further away from world origin.

1 Like

Hi, Check static mesh LODs configuration. Maybe it is relationed with triangles reduction. I had some problems using Nanite+LODs too. And i solved it (more o less) changing a little bit the LODs configuration… and if you are using DIRECTX11 probably Nanite wont work. Update to DIRECTX12.

1 Like

I have the same problem.
It makes me crazy.

Have you found a solution?

Yes i did. It is not a solution, more a wacky workaround.
You have to increase the bounding box of your meshes.
So in your content browser go to your mesh, double click on it so Mesh editor window pops up.
Then on the right panel search for"bounds", increase bounding box until it fixes your problem.

1 Like

I am using a mesh bounding box to calculate the mesh size. If I change it, will this influence the result of the calculation?

Hi,

Open your Mesh / Asset, under “Details” search for “LOD Settings”, change the LOD Group to “LevelArchitecture”, then Reimport the mesh (upper left corner).
Hope it works for you! - same method was used in Epic’s City Sample Project, even has a custom LOD Group!

Best wishes,
Eric A. Navarra

Hey,

I tried out your answer but sadly that didn’t fix the problem.
I appreciate the effort but i think its just a bug at this point.
In UE5 Early Access, Nanite worked like intended. Not fumbling around with LOD Settings and such. But again, the only method what works for me now is to increase the bounds of the meshes.

Well your wacky workarround works, it is the only trick have worked for me

Finally Fixed the issue :sweat_smile::
Just add these settings to your DefaultEngine file.

[/Script/Engine.RendererSettings]
r.Nanite.CoarseMeshStreaming=True
r.Nanite.ProxyRenderMode=2

[SystemSettings]
r.Shadow.Virtual.NonNanite.IncludeInCoarsePages=0

; Imposters are not necessary because of HLOD
r.Nanite.Streaming.Imposters=0

; Set initial size to we prevent a resize to 6144 at the transition to chase
r.Nanite.Streaming.NumInitialRootPages=5120

; Increase the number of Nanite nodes to prevent some visual issues.
r.Nanite.MaxNodes=2621440

I got this information from CitySample Project Epic made.
Finally!!!

Wow, thats interesting.
I will try that later. But i do wonder why this is not enabled by default.

[/Script/Engine.RendererSettings]
r.Nanite.CoarseMeshStreaming=True
r.Nanite.ProxyRenderMode=2

[SystemSettings]
r.Shadow.Virtual.NonNanite.IncludeInCoarsePages=0

; Imposters are not necessary because of HLOD
r.Nanite.Streaming.Imposters=0

; Set initial size to we prevent a resize to 6144 at the transition to chase
r.Nanite.Streaming.NumInitialRootPages=5120

; Increase the number of Nanite nodes to prevent some visual issues.
r.Nanite.MaxNodes=2621440
[/quote]
I think the Nanite has some issue. it was not solved.

Hi, July014. your script didn’t work. In fact none of the given solution solved my issue. :pensive:

I copied the settings scrips into the DefaultEngine.ini
here is the .ini look of the script

I tried changing the Collision box scale

I tried to change the Bounds extension. Increased it from 0 to 1000000
image

and
I also tried changing “LOD Settings” LOD Group to “LevelArchitecture”,

!!! None of them work. !!!

In my case I am using a speed tree asset as foliage.
I tried to import the tree in to the scene both as foliage and as simple static mesh in to the level. But it does not work.

If I go far away from the tree it starts to disappear the leaves and at some longest distance I start to lose the tree branches.
here is the screen shot.

If some one found any real solution please let us have it.

And @July014 I think it is not related to the DefaultEngine settings of the project. because I literally imported my tree into the Matrix city sample you are talking about. and it still have the same issue.

close distance screen shot

medium distance screen shot

far distance screen shot

None of them work because this is just inherent to the way Nanite works. Nanite simplifies meshes by collapsing edges, this approach will not work on foliage.

Thanks for your reply.
I would love to know if there is any other way to solve my problem. Thanks in advanced.

Hi @anonymous_user_a0fadbe9 ,

I discovered that the script from Matrix city only works for Nanite mesh rather than foliage.
For foliage, we may wait for ue5.1.

It seems that the issue was fixed, or at least much improved, in 5.1 PREVIEW 2…

5.1 Preview 2: the grass disappears when we are 3 meters away from it…

I’m using nanite foliage in 5.1 preview 2 and it’s being rendered (including it’s shadow) up to very far… but I don’t know about grass since I’m not using it… I guess the distance it stops rendering is proportional to the meshe’s size, maybe the grass is smaller and only renders close… I don’t know…

yeah, move the project to 5.1 and enable the “preserve volume” flag in your foliage. That should fix the leaves disapearing

hello!I got them same problem a few days ago.I already solved it.You should check out this:

Change the OpacityMaskClip to 0.1

3 Likes