How does nanite handle a large mesh close to the camera but has a part that is far?

Suppose a large mesh that is close to the camera but has a part that is far. Will nanite give the whole mesh the same LOD or will it give each part a different LOD?

If it will give each part a different LOD, is it recommended to rely on that or manually split large mesh into smaller meshes? I find it weird I couldn’t find anything about that in the docs, all I can find is automatic LOD generation. I am new to unreal by the way.

welcome to the forum.

and… well… you shoulda read some more documentation or tried it yourself. nanite uses polygon clusters. the size is 64 faces per cluster iirc. that’s kinda important for scaling and performance. it will dynamicly rebuild the clusters based on a screenspace/screensize evaluation (?). that LOD system is completely dynamic. it’s not like traditional static LOD switching with per mesh instance depth evaluation.

example: a 200x200 meter grid. one singular mesh with 640k faces. shown with nanite visualization on in editor. you can see the LOD rebuild in action.

i hope that answers that question.

for the context of splitting. yes… it is more efficient to split very large objects into smaller chunks for this obvious per object/instance difference in LOD.

the maximum precision is 16-bit iirc. that gives you roughly 64 meters with 1cm (?) position precision. or you could make very small details. it depends on the size of the mesh. or you will get lower bits for more coarse meshes. the very fine technical details for optimizing nanite storage and runtime memory cost.

Thank you for answering. Based on the video you shared, and my testing, it seems nanite updates the LOD of the whole mesh at once (almost) rather than treating each part separately. I see in the video that even if you are at one corner of the grid, the opposite corner is still high poly.

Am I correct in assuming that, even though there are differences in LODs in a single mesh, the difference can only be small?

well… it is kinda complicated to cluster geometry without leaving holes in the mesh if it would include explicit distance LOD. this floor is maybe not the best for this demonstration or use case of nanite.

or… i gave you the “fix”/solution in the second part. using “chunked” terrain. it combines the depth evaluation of per chunk object LOD and the more immediate cluster LOD.

maybe in the future there will be tool or automation thing to chunk large meshes. for now you have to plan with that in mind to get the least cluster/vertex compute and performance on large scale objects. doesn’t matter if it’s terrain or other builds and buildings. if you wanna do it nice you gotta balance this.

or you kitbash the terrain out of instance pieces, but… that comes with it’s own performance penalties, being overlap and overdraw, cause… instances are not depth sorted. cluster culling fixes some of that, tho.

there’s a whole rabbit hole to this, for sure.