PDA

View Full Version : Character Limitations



Suamere
05-27-2010, 10:39 AM
I have created a successful MUD using C++, and am now moving into OpenGL to begin transitioning the game mechanics into a 3d world. I have already mastered the tutorials on OpenGL, such as being able to create terrain, use collision detection, and place characters on the terrain. However, I have one question on theory...

How many polygons would be the max for a character, assuming there were 100 characters loaded at any one time. I don't even know if I'm asking it properly, but from my Blender experience, the more polygons you have, the more detail you have, and I assume it would slow down your game.

Is there a suggestion on this information? Or perhaps just general "rendering file size" or something per character?

Ilian Dinev
05-27-2010, 11:05 AM
650 million triangles per second, if all get culled :).

Anyway, in modern games with up to 20 skinned meshes onscreen, 15k tris/mesh is the upper limit; You should target 2k-5k tris, imho. And make heavy use of LOD.

Suamere
05-27-2010, 02:30 PM
StartEdit- Awesome! I just did some research into LOD, which was my main re-question, and found out how you can parent multiple detail levels with dependencies like distance and such. So I answered my own question there. -EndEdit

This is just a follow up question on the same subject that you may not know, so I'll be fine looking elsewhere if you say so...:
How do I know how many "tri's" my character has (If you don't know, I can look more into Blender Help Files). Lastly, My humanoid I created is mostly made of square mesh areas, with maybe 6% triangular ares. Does tri's simply refer to these faces? Or is he converted into all triangles when he renders or something?

Ilian Dinev
05-27-2010, 02:46 PM
Press Ctrl+T in editmode, to make sure it's converted to triangles, and see the top status bar. "Ve" means count of vertices, Ed = edges, Fa=faces (triangles).

http://img215.imageshack.us/img215/3219/facesj.png (http://img215.imageshack.us/i/facesj.png/)

Suamere
05-27-2010, 03:11 PM
Thanks Homie G-funk Masta Flex. I notice your model is broken into triangles, but I heard squares are the best way to go... is that fail advice? Perhaps the person I heard from didn't focus on video games? What's your take on it, or have you not really compared? My main concern is how efficient it is in OpenGL.

HAL-10K
05-27-2010, 03:38 PM
Quads are not being used commonly because they can be non-planar.

ZbuffeR
05-27-2010, 03:57 PM
Quad is great as a control cage for catmull-clark subdivision meshes, so it is good for modeler artists. Triangles tend to introduce ugly interpolations.

But ultimately, the rendering must be done with triangles, so go with triangles for all the low level rendering engine.

Even OpenGL quads are rasterized as a pair of triangles anyway. But the dividing line is choosen by the GPU, and it is better to control it yourself. GPU hardware only works on triangle.

Ilian Dinev
05-27-2010, 04:03 PM
I failed to note "and then do Ctrl+Z, to go back to editing quads" :) .
Keep your skinmesh faces as quads for as long as you can! Only the gpu needs the data as triangles.
1) Quads are easier to handle when modeling,
2) When you subdivide (to add extra detail), rogue triangles will usually create nasty geometry that is hard or impossible to fix.

But oh well, ever since Blender has the Sculpt mode and its subdiv, it's easy to keep everything as 500k tris and then simply Decimate.
The model in the screenshot already went through model_rough (in quads), sculpt, paint, decimate; that's why it's in triangles.

HAL-10K
05-27-2010, 04:13 PM
GPU hardware only works on triangle.For OpenGL 1.x this was up to the implementation. Has this changed with the newer specs?

ZbuffeR
05-27-2010, 04:34 PM
GPU hardware only works on triangle.For OpenGL 1.x this was up to the implementation. Has this changed with the newer specs?
The GL3+ specs deprecates quads.
And in practice I have never heard of actual hardware implementation of a quad-based renderer.


EDIT: the only GPU with actual quad handling would be Nvidia first 3D accelerator, back in 1995 : http://en.wikipedia.org/wiki/NV1

Suamere
05-28-2010, 10:30 AM
Lmao, 15k is the upper limit eh... This model has 400 faces, 600 edges, 200 vertices. I guess I can do better, he could be smoother.