Nanite is strange when applied to simple grid mesh

I would like to use the new Nanite in 5.3 using a flat plane that is subdivided into 32x32 faces to make a grid.

However when I activate Nanite on this grid mesh, suddenly all the vertices are gone and replaced with a random arrangement of large triangles.

I have played around with the Nanite settings for the mesh, and nothing makes any difference.

I have tried subdividing the plane included in the starter content, using both the engine modelling tools and then tried again with Blender, but the result is the same.

I then tried applying Nanite to other meshes in my inventory, like a bottle or a table, and Nanite works as expected.

No random triangles, just normal Nanite geometry derived from the shape of the bottle or table, and the Nanite mesh settings work as expected.

But then I try and subdivide the bottle and table and, once you go beyond level 4 of subdivision, the random triangles appear again.

It seems like Nanite just doesn’t like flat planes, or flat areas of subdivided meshes.

Is there a way to make the grid mesh Nanite but retain all of the 32x32 faces ?

Or maybe my Nanite is malfunctioning?

Hey there @chrisw! Nanite can be a bit finicky when it comes to specific shapes and sparse geometry. I can offer some workarounds depending on your object, but I need a bit of a better idea. Is this just a plane you’ve subdivided or does it have depth? Could we get a look at the geometry with and without the nanite applied? (For the nanite image could you use the nanite overview to see each of it’s debug views)

Yes, I begin by dragging a Shape_Plane from the starter content, into the scene and then enable nanite on the object:

Everything looks normal, as nanite is using the prescribed vertices of the mesh.

Then I subdivide the mesh using the modelling tools, to 4 levels of subdivision with sharp corners:

When I accept and save the results, then nanite has ignored the vertices of the mesh, and created a weird assortment of triangles instead:

Here is the wireframe view to help further visualise the weirdness:

When I view the Shape_Plane mesh in the mesh editor, the weird triangles are more visible:

I can play around with the nanite settings in the mesh editor, including the preserve area and trim relative error settings, and nothing I do makes any difference.

Finally, I disable nanite support in the mesh editor, save the result, and the mesh goes back to normal:

And the issue also happens with cubes, bottles, tables, every mesh with a flat area exhibits the same problems with nanite…

I think you are watching the nanite “magic” at play here. Unless we see a certain weird situation, unreal takes the mesh and rearranges the triangles according to the nanite algorithm.

Ahhh, I see. This is actually part of what nanite actually does and how it reduces overhead. It changes the overall makeup while retaining the shape as best it can. So it’s primarily used for using high poly meshes while maintaining as much performance and fidelity as possible. What it shouldn’t do is deform the final silhouette or distort the material.

It shouldn’t cause any adverse affects for doing this, however it offers no performance gains (and arguably some performance loss technically) with geometry that isn’t large enough to utilize these mesh operations. What’s the use case for the plane?

I may have solved the problem.

I created a 100x100 grid mesh in Blender, and then selected the middle vertex, applied the proportional editing and then typed gz0.01 to grab the middle vertex and move it upwards by 0.01 units.

This created a slightly bent upwards grid mesh where the middle is slightly higher than the edges of the mesh, so now the mesh is no longer completely flat.

Here’s the result when I drag the mesh into the scene and enable Nanite on the mesh:

And with the triangles Nanite visualisation:

And in the mesh editor with Nanite enabled:

It seems that Nanite doesn’t like completely flat surfaces with lots of subdivisions.

You have to either have just a few subdivisions, or alternatively make the mesh very slightly bent and therefore not flat.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.