How many tri's is to many?

Blitz3D Forums/Blitz3D Programming/How many tri's is to many?

D_Town_Tony(Posted 2004) [#1]
Any one do ny tests on how many tri's is to many for Blitz, whats a good number to keep it around?


Gabriel(Posted 2004) [#2]
This question keeps getting asked, and the answer is always the same. There is no good number. It varies *so* much according to other factors. Tri count is not even the major factor. Surface count is so much more of an issue. And the number of models with skeletal animation is a much bigger hit too. Not to mention that there is a huge difference between games that are aiming at a GF4 for minimum spec and those that are aiming at an old onboard SIS chipset for minimum spec. If you want an even vaguely useful guess ( and that's probably the best you can hope for without actually running your game ) you at least need to give an estimated number of surfaces, number of skeletal models ( as well as bones per model and vertices per model ) and an idea of minimum spec, you might get some useful estimates.


BlackD(Posted 2004) [#3]
Just to reinforce what Syb already said about tri's not being a major factor.. When I had this question, I went and wrote a program to test it. Even up to 300,000 tri's on-screen, there still wasn't any real slowdown. This is the equivalent of rendering the high-poly versions of the Doom3 models (ranging from 250,000 to 500,000 polys, from which the normal maps are generated) without a performance hit.

That was using a single surface. However, adding a second surface for half the polys dropped the rendering speed to almost half! Adding more and more surfaces resulted in slower speeds still, but not as much as that first jump. And as syb said, there are more things too - animation is a big one. Tri count is about the last thing you'll need to worry about. :)

The reason why many older game editors warned so heavily to modellers to limit their polygon count, was simply because most 3D map modellers work on CSG and every new shape you create makes a new surface. Therefore in those cases, more polys = more suraces = more slowdown. Some modelling software now "compiles" surfaces which share textures into a single mesh, which brings me to .. single surface systems!

Single Surface Particle systems are pretty popular you might have noticed. Regular (or newbie) particle systems work on multiple surfaces. They create a new sprite for each particle. The problem with this is, each "sprite" in Blitz, has a new surface. Instead, the way single surface systems work is, a mesh is created to handle all the particles, and a single surface is assigned to that mesh. Then the particles are created as two poly shapes on the surface. They don't have to be contiguosly placed - they can be put anywhere in space. And each loop, it displaces the location of each of the poly-pairs within the mesh to appear as an animated particle system.

Single surfaces can be used for more than just polys. Say you have a house in your virtual game world - kind of a house "prop" that you walk past. If you model this in 3D and assign different textures to the windows, the roof, the doors, the walls, the framework, the chimney, etc - you're going to end up with a simple prop using up 10 surfaces, and that's a lot of GPU real-estate. Instead, you put all the textures into one texture file, merge the model into a single mesh, and learn about UV mapping. ;)

As you make your program, you'll find more and more ways to save on GPU speed. Much of 3D programming, even by the most highly respected professionals, is spent finding new ways to cheat the video card into drawing something more quickly than it's meant to, or by finding a way to draw something so it LOOKS like it's being done properly, but it's not. :)

+BlackD


Synchronist(Posted 2004) [#4]
Or, you can use the general purpose "Programmer's Zen" answer;

"One more than you need is too many. One less than you need is not enough."


Paolo(Posted 2004) [#5]
As a fast answer,

if your code is really big, I mean with a lot AI routines, lot of particles at the same time, many things moving at the same time ... I would say not going above 20 thousands per screen, not per level, but per screen, to keep the fps at 30 or above ... I think this is not a hardware limitation but a Blitz limitation ...