Archived

This topic is now archived and is closed to further replies.

How many triangles do most computer games render per frame?

This topic is 5986 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m currently working on contract on a 3d version of a card game. Up to 15 characters per frame must be drawn (right now each character consists of around 1300 triangles) with a background consisting of 3800 triangles. Right now the game is running at less than 10 frames per second on my 800 Mgz Intel with GeForces 2. Oviously something needs to be done. Is this any exceptable amount of triangles to render in a standard 3d computer game? How many triangles per frame do most games render?

Share this post


Link to post
Share on other sites
The answer is: As few as they can get away with!

Sending 20,000+ triangles down your pipeline every frame will bring just about any video card to it''s knees in a hurry. The bandwidth alone will starve the framerate. I know that the higher-end cards now claim they can render 31 million triangles per second, so why cant you render 1.2 million per second? Well... That 31 million triangles is assuming all white triangles with no color no texture no normals and no lighting and that they are perfectly optimized triangle strips, setup to take full advantage of the video cards cache, display lists, etc. And that those triangles are so small that you could barely see them (or perhaps cant see them).

First I would say that you probably want to try and convert everything to triangle strips if possible. This will save you alot of bandwidth if your models are well suited for striping.

You also might want to think about creating some kind of LOD scheme where the number of triangles in your models is reduced as they get further away from the camera. You don''t need 1300 triangles if the guy is going to be 1 inch tall on your screen.

There is a demo for this that I cant find the link to right now but I will try to post it later. You can reduce the number of triangles on a 1500poly model by about 80% and not lose very much detail if the model is not close to the camera and is not wildly jagged.

If you keep your number of rendered triangles under 10,000 per frame you should be ok on most newer video cards. This would still be pushing it on older video cards though.

Also the resolution of your textures makes a difference. You should not be trying to render 10,000 triangles per frame using lots of 512x512 textures either. Make sure your textures are an appropriate size for their purpose, and that you are using mipmapping.

Seeya
Krippy

Share this post


Link to post
Share on other sites
So how many faces per frame would you suggest for most videocards? About the LOD method. Wouldn''t reducing the number of polys mess up the texture coordinantes. Thanks a lot for the post by the way.

Share this post


Link to post
Share on other sites
Im a newbie to 3D programming but I think you may want to cull some of those triangles. If they are in the back you dont need to display them so a model with 1300 triangle may only be showing 800 or so of them saving you a lot of extra processing. Also try optimizing your code in general like changing something like:

var = var + 1;
to
var++;

It may seem miniscule but if your program is looping that statement over and over it will be a much bigger difference.

"Ogun''s Laughter Is No Joke!!!" - Ogun Kills On The Right, A Nigerian Poem.

Share this post


Link to post
Share on other sites
Heh.. actually.. if you look at the compiled code, all four of the methods to increment a variable in C/C++ (+, +=, ++ prefix and ++ postfix) achieve exactly the same thing. Well.. except for the order of operations between prefix and postfix, but I mean the addition is the same thing.

Grasshopper: You probably should check out the LOD thing.. What I'm wondering though, is why would a card game require so many triangles? You might need to think about and optimize your design a little more...

Good luck.

Edited by - Qoy on July 29, 2001 3:12:50 AM

Share this post


Link to post
Share on other sites
quote:
Original post by Krippy2k
The answer is: As few as they can get away with!

Sending 20,000+ triangles down your pipeline every frame will bring just about any video card to it''s knees in a hurry. The bandwidth alone will starve the framerate. I know that the higher-end cards now claim they can render 31 million triangles per second, so why cant you render 1.2 million per second? Well... That 31 million triangles is assuming all white triangles with no color no texture no normals and no lighting and that they are perfectly optimized triangle strips, setup to take full advantage of the video cards cache, display lists, etc. And that those triangles are so small that you could barely see them (or perhaps cant see them).




This is an slight exaggeration. I can render a triangle list with 65K tris at 60fps. That is roughly 4 million triangles a second, textured and (vertex) lit with specular highlights. I have a Thunderbird 700 with a Radeon 32DDR.

Share this post


Link to post
Share on other sites
BTW those 4M tris are rendered at a resolution of 1600x1200 32bit with an overdraw of about 1.5

My points is, today''s (TnL) videocards are more powerful than you think.

Share this post


Link to post
Share on other sites
But do you want to have a card game that needs the latest 3d card to play? That is the question. (Well, not really... but it is a question which needs answering )

Trying is the first step towards failure.

Share this post


Link to post
Share on other sites
I guess you might need all those polygons if it was strip poker

If your geometry is static, a GF2 GTS/Pro/Ultra should be able to handle > 100,000 polygons at well over 30 fps. I''ve pushed my GF2 over 9 million tris/sec. If you have lots of dynamic geometry and you are writing a lot of vertices into VBs every frame, you''ll be limited to around 20,000 - 30,000 polygons.

Remember static/dynamic doesn''t relate to movement, but to whether you need to re-write the data every frame. Movement should almost always be performed with matrices.

General speed advice - use Vertex Buffers, use triangle strips, support hardware vertex processing, put your VBs in vram, batch send your polys by texture, use as few DrawPrimitive/DrawIndexedPrimitive calls as you can, make sure you are drawing at least a few thousand triangles per call if possible.

Also special effects like multi-texturing, environmental mapping, bump mapping, fog etc are all slow.

Lastly *make sure* you are using mip-mapping (very important).

Share this post


Link to post
Share on other sites
Well, nVidia publishes demos that render 100k poly models at well over 30 fps on my GF2MX. Perhaps that''s something to look into...

Share this post


Link to post
Share on other sites
Thanks for all the suggestions. About the design of the games and why all the polys, its really not up to me. Like i said i''m working on contract. All lot of the info isn''t static as all the characters are animated. I guess the best thing for me to do would be to use somekind of LOD approach. I''ll look in to mipmapping as well.

Share this post


Link to post
Share on other sites