How do I get the exact number of polygons in my scene ?

Hello,

I am able to successfully use PSTAT and my C++ code connects to the PSTAT server but I am unable to understand what the geom graph is showing me - is it the total polygon count of my scene ?

If so how do I get the exact polygon count value of my scene ? The graph is only showing a green segment and the right hand side axis denotes markings like - 125, 250, 375, 500. What is the scale of that axis - are they in thousands or just numbers ? And more importantly how do I get to know the exact polygon count of my scene ?

Thanks,

It should be showing an exact number in the upper right corner of each graph.
A geom is basically a chunk of triangles that are part of the same object and share the same render state (same textures, for example).
I think the graph you want is Vertices.
Those two should give you a good idea of how heavy your scene is. Geoms should be around 200 or less if you want a good frame rate. Vertices depends on the speed of the minimum hardware you want to run on.
Keep in mind that the graphs are showing you what is actually being rendered (in the camera view), not the entire scene. This is good because objects not being rendered are not affecting your render time.

Actually what is not clear to me is what those numbers on the right most axis stands for - are they number of triangles / vertices / polygons / objects ? 200 in throusand or just 200 number of triangles /vertices /objects ?

You said - “A geom is basically a chunk of triangles that are part of the same object and share the same render state (same textures, for example).” - I want to know how many polygons are getting rendered in my scene - in number - not in memory consumption or in other relative terms such as number of vertices. I have put my camera top down and high up covering the whole scene objects so that the camera renders all the objects at the same time.

In other engines I find easy way to find this with a single function - but I am unable to find anything now here. DRW adviced me to use render.analyze() function but I am still to figure out how to implement that in my C++ code. :frowning:

The numbers on each graph depend on what graph you are looking at. On the geom graph it is telling you the number of geoms. The Vertices graph is in thousands of vertices (denoted by the letter K in the title of the graph).

Take a look in the list of graphs, if there isn’t one for triangles then that information is not available.
You have to ask yourself though WHY you want to know the number of triangles. For example the number of vertices is just as good (or better) than triangles for determining how much geometry is being rendered.

You need to understand the difference between what pstats provides vs. a function you can run in your game code. Pstats provides realtime data of what is rendering right at that moment in time. That is very different from things like the analyze function which is going to tell you information about your whole scene regardless of where the camera is looking or what is actually rendering.

@teedee: Thank you for explaining everything.