Thursday, 6 June 2013

6. Constraints

Polygon Count

The two common measurements of a game character's 'cost' are polygon count and vertex count. Polygon is interchangeable with triangle in these measurements, as GPUs only see vertices and triangles, not 4+ sided polygons. Depending on the use, a game character may stretch anywhere from 200-300 triangles, to 40,000+ triangles. A high-end third-person console or PC game may use many vertices or triangles per character, and an iOS tower defense game might use very few per character.











Polygons Vs. Triangles


When a game artist talks about the poly count of a model, they really mean the triangle count. Games almost always use triangles not polygons because most modern graphic hardware is built to accelerate the rendering of triangles.
The polygon count that's reported in a modeling app is always misleading, because a model's triangle count is higher. It's usually best therefore to switch the polygon counter to a triangle counter in your modeling app, so you're using the same counting method everyone else is using.

Polygons however do have a useful purpose in game development. A model made of mostly four-sided polygons (quads) will work well with edge-loop selection & transform methods that speed up modeling, make it easier to judge the "flow" of a model, and make it easier to weight a skinned model to its bones. Artists usually preserve these polygons in their models as long as possible.

Triangle Count vs. Vertex Count

Vertex count is ultimately more important for performance and memory than the triangle count, but for historical reasons artists more commonly use triangle count as a performance measurement.
On the most basic level, the triangle count and the vertex count can be similar if the all the triangles are connected to one another. 1 triangle uses 3 vertices, 2 triangles use 4 vertices, 3 triangles use 5 vertices, 4 triangles use 6 vertices and so on.
However, seams in UVs, changes to shading/smoothing groups, and material changes from triangle to triangle... are all treated as a physical break in the model's surface, when the model is rendered by the game. The vertices must be duplicated at these breaks, so the model can be sent in renderable chunks to the graphics card.

Rendering

Because there are still PC systems being sold with limited graphics cards (or none at all), software rendering will always be required for some applications. Games for kids and casual gamers (who use outdated systems or systems primarily meant for office applications) can have a need for a software renderer as a fallback. For example Toy Story 2 Action Game has a choice of selecting either hardware or software rendering before playing the game while others like Half-Life default to software mode and can be adjusted to use OpenGL or DirectX in the Options menu. Some 3D modeling software also feature software renderers for visualization. And finally the emulation and verification of hardware also requires a software renderer. An example of the latter is the Direct3D reference rasterizer.

But even for high-end graphics, the 'art' of software rendering hasn't completely died out. While early graphics cards were much faster than software renderers and originally had better quality and more features, it restricted the developer to 'fixed-function' pixel processing.

Dependant on how large the polygon count is on a 3D model that is created, rendering times on a none high-end PC can take a long time. This is why even though rendering can be and is done quickly (within example below) some people are constrainted by the time it takes a 3D model to render. 

2 comments:

  1. I really like your take on the issue. I now have a clear idea on what this matter is all about.. projecto de arquitectura lsf

    ReplyDelete