Hey,
I’m using foliage meshes that have nanite enabled in UE 5.7, and I’d like lower scalability levels (Low/Medium/High) to render them with fewer triangles than on Epic.
I tried to use r.Nanite.ViewMeshLODBias.Offset but it didnt reduce all meshes to a lower triangle count/was not sure if that is an applicable solution in this case.
Is there an engine-supported way to control mesh-nanite triangles per scalability level?
[Attachment Removed]
Hi,
In addition to r.Nanite.ViewMeshLODBias.Offset, you can try changing r.Nanite.MaxPixelsPerEdge to reduce the Nanite triangle count. It controls the triangle edge length, measured in pixels, that is targeted by Nanite. Higher values means less triangles. The value is used to calculate the InvDiceRate (see NaniteCullRaster.cpp), which is used in NaniteTessellation.ush to compute the Nanite tessellation factors. This should affect all meshes.
Edit: increasing r.Nanite.ViewMeshLODBias.Min also reduces the triangle count, but you may have to move the camera back to trigger the triangle reduction in all distant meshes.
Hopefully that helps, but let me know if you have more questions.
Thanks,
Sam
[Attachment Removed]
Hey, thank you very much!
After trying both cvars we noticed it doesn’t fit our needs. We would love to have a solution that reduces the overall triangle count, not something that’s only view-distance or LOD based.
For example: if the graphics settings are set to medium, all meshes should render with only 50% of the triangles unrelated to their distance to the player/camera.
Thanks,
Max
[Attachment Removed]
Hi,
Unreal Engine doesn’t provide a setting to reduce Nanite’s overall triangle count as Nanite was designed to dynamically and automatically determine how many triangles it should draw based on screen resolution, visibility and cluster culling. Because of this, Unreal doesn’t let you directly scale Nanite triangle counts the way you would with LODs. Epic’s Nanite documentation mentions that Nanite renders at most one triangle per pixel and only for visible areas, not a fixed percentage of the source mesh.
That said, if you set r.Nanite.ViewMeshLODBias.Min to very high values (like 20 or higher), there should be a reduction of all triangles (including those that are close the camera), however it’s not recommended to increase the setting by that much as distant geometry will look low poly and cracks may start to appear. The maximum value for that setting should probably be 2.5 to 3, which still provides a decent reduction in triangle count without too many obvious artifacts.
Please let me know if you have further questions.
Thanks,
Sam
[Attachment Removed]