I’m using Unreal Engine 5.1. I have a scene comprising a grid of Nanite-enabled objects only (nothing else in the scene). The raw triangle count of the whole set of objects is about 2.3 billion. When I check the total number of instanced triangles (Sum Tris, the tooltip informs that it is the triangle count of all mesh occurrences), the Statistics window reports 26 million triangles no matter how the camera moves (i.e., regardless of objects in camera view). When I check Triangles Drawn (under RHI) in Profiler of Session Frontend, the average of a 10s camera movement in the grid is given to be a mere 580. I think this 580 doesn’t make any sense. And since the total number of instanced triangles is constant through the whole 10s camera move, it cannot be tied to the number of drawn triangles either. So how can I get the accurate number of drawn triangles per frame with Nanite in Unreal Engine 5?
If you look at the sky (ie: no geometry on screen) then does the number of drawn triangles drop?
Nanite tries to keep the number of triangles consistent regardless of the number of objects on screen or their complexity.
no the number remains the same
What “statistics window” are you looking at?
Yeah thats just asset statistics, it has nothing to do with whats being rendered. You need to be using the NaniteStats
command.
alright that’s great to know. Do you happen to know a general-purpose equivalent of this to see the number of drawn triangles per frame for/including stuff that are not Nanite?
The RHI stats should report the number of triangles drawn by the hardware rasterizer, and you can get more nanite stats about the shadow passes, see the console section of the docs: Nanite Virtualized Geometry in Unreal Engine | Unreal Engine 5.0 Documentation
It’s generally a mess, because Nanite falls back to the hardware rasterizer for triangles that exceed a certain size. I don’t know that there is any way to filter by nanite/non-nanite triangles.
Can I ask why you need this information?
It’s for a project where I am trying to see how my method compares to Nanite. I know it sounds kind of ambitious but actually I’m trying to see the amount of improvement when I use both methods.
Actually to be able to get an accurate report, I need to have the average number of drawn triangles for a sample run (like for example 10s I mentioned above). Do you know how I can record/save Tris count from NaniteStats so that I can compute its average? OSD printout alone doesn’t help with that
Honestly no clue. You can try using Unreal Insights to record a trace, but I don’t know how much detail it captures about rendering of the scene (it may only be limited to timing data… I’m not sure, haven’t worked with it)
ok I guess I’ll have to take a couple screenshots and find an average using them to get an approximate. thanks for all the help
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.