Nanite Tessellation usage recommendation

Helllo !

We are investigating the use of Nanite tessellation for a project in pre-production. Our analysis show that the tech can be really expensive on the GPU (2ms) if the effect is too pronounced on screen.

Our investigation end up with the following guide lines:

  • The tessellation effect should use the whole range of 0-1 value on the height map texture.
  • The tessellation magnitude should be minimal to limit GPU cost, and should always activate the material property "Displacement Fade "
  • Material used for Tessellation should be as simple as possible (as it seems that nanite get “upscaled” to one triangle per pixel, causing a lot of extraneous material invocation.
  • Tessellated object should not be close to the camera, as it will be slow down the nanite main passes, increasing the GPU time.

Does those guidelines seems reasonable ? Nanite tessellation is experimental, but do you have anything specific we should be aware of ? What are your plans for 5.7 or 5.8?

I didn’t found a lot of console command or CVar to control the tessellation in the plugin, is there any CVar we should investigate to reduce the cost of the tessellation, especially at higher resolution ?

Hi Zacharie,

Those guidelines seem pretty sound, and mostly echo the guidance we’ve given teams both internally and externally. Except for maybe the “close to the camera” point. If you’re seeing that I’m curious if perhaps the content has high overdraw or if maybe you’re tessellating very large triangles down to very small ones - it should generally perform better to have a decent amount of tessellation in the base mesh than to try to use displacement to generate all the detail/silhouette of the object. That said, we have seen some Virtual Shadow Map performance issues with shadowed point/spot lights intersecting tessellation, so maybe try to limit or eliminate those if shadow costs get unmanageable.

There hasn’t been much work with 5.7 on the Nanite Tessellation front, due to other priorities. We should hopefully be able to work a bit on it for 5.8, but we’re not certain that we’re going to be able to improve performance notably, and some of the issues we still need to fix (cracks on UV seams, vector displacement, etc.) could make that effort even more challenging, by adding necessary complexity to the displacement logic.

One CVar you should be aware of to try to get some performance out of Nanite Tessellation is `r.Nanite.DicingRate`. This affects how large in screen space to target diced triangle sizes. We’ve seen performance improve by setting this to 3 or 4 without noticing much of a difference in some of the content we’ve worked with. There is a point where increasing the diced triangle size can actually hurt performance though, so it’s important to gauge the best value for your content by looking at the performance (e.g. stat GPU in the console) while changing this value.

Hope this provides you some value and answers your questions!

-Jamie