Game Development Community

How does T3D calculate PolyCount?

by Oscar Velzi · in Torque 3D Beginner · 04/11/2010 (4:23 pm) · 2 replies

I've been working on optimizing the models for our game, reducing drawcalls. For this, I just merged several of the textures in the model in a bigger one. Thing is, when check my levels with the metrics(gfx); command, the draw calls are reduced, but for some reason the PolyCount is greatly increased, when I did not changes to the models at all. For some reason, it seems that texture size affects the PolyCount calculation. So... My question is: How is the PolyCount number calculated? How does texture size factors in it?

Thanks!

#1
04/12/2010 (1:21 pm)
The "polycount" is just the number of primitives passed to the low level drawPrimitive calls. So its essentially the triangles drawn in your scene. There is no tie between texture size and draw calls of any kind... thats not the issue.

My first inclination is that something weird happened to your models or your numbers are incorrect in some way. I would suggest stepping back and rechecking the metrics with the original model and the ones after.

In theory you should only see a reduction in draw calls and maybe a few extra primitives when merging materials.

Also if you do...

metrics( shadows )

... you'll see the drawcalls/primitives used when rendering to the shadows. It would be good to see how much of your draw calls and primitives are in shadows before and after.
#2
04/12/2010 (6:04 pm)
Thanks for the response, Tom.

About the texture, yes, something strange went on there... I can't reproduce the same effect...

But still the numbers seem off. I've tested a simple model, that has 164 triangles, but metrics(gfx); show much more, like 495. I've tested it using basic lighting, so there's no extra primitives from that, and I got that number by subtracting from the shown number the amount that come from the GUI and other elements. Also I'm pretty sure that no other elements were rendered with that model.

http://img687.imageshack.us/img687/5294/screenshot01100000.jpg

http://img541.imageshack.us/img541/9840/screenshot01100001.jpg

Maybe there is something I'm missing or I'm not understanding? Thanks!