Game Development Community

How many polygons should each level be restricted to

by Aaron Maldonado · in Torque 3D Beginner · 06/04/2013 (2:55 am) · 9 replies

For smooth game play oviously, I wanted to know how many polygons should be restricted in levels. How does a game creator tell this, and how does it different between mmos smaller multiplayer games or just solo?

#1
06/04/2013 (3:33 am)
There is no real polygon limit, polygon count does not generally affect performance the most, it depends on the situation. I noticed most performance seems to be used for lighting, so if you have hundreds of plants animated in the wind and the shadows all getting updated in real time, this will eat a lot of resources.
Poly limit for more modern games, maybe 1 or 2 million in a scene.
#2
06/04/2013 (3:56 am)
I have managed to pull off 3 million + but, Duion is exactly correct. There are a number of issues a developer must take into account when it comes to performance. Lights, Shadows, AI routines, and the list goes on and on. This is why you develop and test, develop and test... over and over. We won't even get into Level of Detail and other tricks you can use to max out the visuals.

Ron
#3
06/05/2013 (3:04 am)
Thank you both for the help. This seems to make things more clear for me. I am getting closer to the time where I will finally have to start doing stuff with game models I made.
#4
06/05/2013 (8:09 am)
Drawcalls are what you really need to watch.

Every object has a drawcall. Every material on an object has a drawcall. 500 meshes with 5 matierals each are going to be drawn by the engine 2500 times. That's bad.

Using forestEditor you can instance objects - though you might want to increase -
$pref::TS::maxInstancingVerts = "200";

This is a hard coded default and is very low (just 200 verts) because on very low spec systems it can decrease rather than improve performance.

Personally I'd find your most used static model (usually a tree or something) set maxInstancingVerts to whatever it's tris count is. Then define $pref::TS::maxInstancingVerts = "2000"; in core/scripts/client/default.cs (where it should have been defined in the first place to let the end using dev know it existed).

So now if you have 500 trees with 5 materials (which is bad anyway) you'll only use 5 drawcalls and not 2500! You'll still draw all of the visible polygons though.

Remember to LOD models aggressively, and try and reduce materials, fx, shaders as you LOD. Also try and get the model to have only one material for the final LOD - or better still for other LODs too. Some people call this a "megatexture" or "atlus-texture".

img715.imageshack.us/img715/1567/oldnewmegamap.jpg

Have a look at this, the top image has 5 512x tileable materials (plus a low res material for megatexture at low LOD which doesn't cast shadows or have normal mapping or specular). The bottom picture has only 2 materials, one for the low res material for low LOD but also has a single 1024x megatexture for the higher LOD.

When a megatexture is done right it can be barely indistinguishable close-up - though that depends on how detailed you want your final game aesthetic to be.
#5
06/05/2013 (9:36 am)
Why is instancing not activated by default, if it is so good?
#6
06/05/2013 (5:59 pm)
I tried with over 6 000 000 polys and it still ran, even on my low-end machine, but I had to turn some settings down to keep the fps over 20, so the polygons are not so much your limit.
An average scene usually seems to be from one to three million polys, so that is what you may want to aim for.
#7
06/05/2013 (7:05 pm)
Yep, T3D can push polys like crazy. Again though, polys alone don't make a game and Steve brings up a great point. Draw calls can KILL a good video card quickly. (That little fan spinning up and going crazy.... that's your card working overtime... probably due to draw calls.)

Overall, it's better to think about the time it takes to render a single frame. Simply put, a single frame represents one cycle in the process, now, you can have a fantastic scene that renders well and takes 30 mspf. (milli seconds per frame.) However, that same cycle would need to support AI calculations, collision detection and a host of other 'per tick' processes all within that same 30 milliseconds. So, you can see how if 30 mspf is your 'performance cap' you will quickly lose cycle time to other game play related development aspects. Keep in mind systems like the Oculus Rift require 1/2 that time to function correctly. (otherwise, your head turns and such will lag and you will get your players motion sick really quick.)

This issue has become VERY apparent in this generation's console games over the last few years, your development PCs can push out a TON of polys, and calculate AI, etc. but, if you port that build straight to a current gen console.... you will quickly see screen tears, crashes and general sluggish performance because unlike your ability to add a new video card to your PC you can't upgrade the hardware in a console. Most of which are what now.... 5 to 7 years old tech wise? Even the 'new' consoles that were announced will not fix this issue. My current development PC is already at or beyond the stats that were put out for the new PS4.... and it's almost 2 years old.

Anyway, I am rambling now... If you keep in mind all of the things a game has to do PER cycle you can better figure out your art limits.

Ron
#8
06/06/2013 (2:46 am)
I wonder if it is really necessary for the default environment like terrain, sky, water etc to have so much polys by default, I mean even an "empty" level can have 500 000 to 1 000 000 polycount. Even the very simple small terrain of the "emtpy terrain" default level starts with an average of 700 000 polys, I mean even the sky is divided into a lot of triangles and it is just a flat surface. If you could save half of the million by default, that would be a lot of stuff you could add.
#9
06/06/2013 (3:14 am)
Also Torque seems to eat polygons sometimes, I took an empty terrain added over 500k polys and polygoncount is something like 600k in total, lower than the default empty terrain which has 700k-1000k, so what is happening there?
Also my 6 million testlevel got reduced to 2 million the next time I loaded it.
That is not fake, because the performance increase is amazing, but still no visible difference.

edit: Found out why, deactivating advanced lighting can reduce polygon by 3 or 4 times.