TrisRender Vertex??

Blitz3D Forums/Blitz3D Beginners Area/TrisRender Vertex??

Yue(Posted 2012) [#1]
This would be feasible for the number of vertices of a scene?

Vertex = TrisRender() * 3



Yasha(Posted 2012) [#2]
No. "Welded" polygons share vertices, and any efficient mesh will be built out of "welded" polygons. The actual figure could - and generally will - be much lower than that.

On the other hand, the particular nature of vertices is such that I have to wonder why you need this number? They're not really "things" in their own right, from the graphics system's point of view.


Yue(Posted 2012) [#3]
Just was curious, just wondering if it was possible to establish the vertices of a scene that are rendering.


Floyd(Posted 2012) [#4]
You could make an estimate. Find out how many triangles and vertices are in your meshes. Then (vertices/triangles) is the average number of vertices per triangle. Multiply by TrisRendered() to get a rough idea of the number of vertices.


PowerPC603(Posted 2012) [#5]
Take a welded cube for example.
It only has 8 vertices (the corners of the cube), but has 6 sides with 2 triangles each for a total of 12 triangles.

You could get a very precise vertex-count if you loop through all your meshes.
For each mesh (also it's children), you loop through every surface (using CountSurfaces) of that mesh and use CountVertices on each surface, which you add together.
The final result should be correct if you haven't missed any meshes/surfaces.

Last edited 2012


Yasha(Posted 2012) [#6]
I'd add that things like terrains, MD2s, possibly also BSPs all count towards the TrisRendered total: these are not B3D "meshes" and you can't use the normal surface commands for counting their vertices or triangles. So if you're using any of these non-mesh meshes, you have to allow for that change to the total figure by getting data from your editor or terrain detail settings.