General Analysis

In the previous chapter, you saw how any good 3D pipeline can be divided into clipping, culling, occluding, and computing the right level of detail (LOD). This structure can be adapted to any game genre, so different genres emphasize certain components to reach the desired performance. Let's now analyze clipping, culling, occlusions, and LODs to understand how indoors games work and why they have been (and still are) so popular.

To begin with, we must understand that the clipping phase is usually independent from the game genre. Cameras always cover more or less the same angle, so the amount of clipped geometry can be considered stable. A camera covering 90° will statistically clip around three-quarters of the global geometry of the level. Culling follows a pretty similar pattern: It is usually performed by the hardware, and we can expect about one-half of the geometry to be back-facing, and thus not painted. Combining both clipping and culling, we reach the conclusion that approximately one-eighth of the incoming geometry effectively survives this two-pass sequence and can be considered to be both onscreen and front-facing.

In an ideal world, this one-eighth would be sufficient to display the desired geometry, but this is not usually the case. Game graphics are about richness and complexity; therefore, we will often need more than we can afford. Thus, we need to use the LOD and occlusion phases to reduce the triangle count even more. Now, is level-of-detail relevant to an indoors game, where view distances are bounded? Clearly not much, because we will rarely see geometry from very far away. Thus, by elimination, occlusion culling must be the way to go, because we have lots of walls that are perfect occluders.

We can now formally define an indoors rendering algorithm as one software piece that optimizes the rendering pipeline by quickly determining occlusions (in addition to clipping and culling) in the level geometry, thus allowing interactive rendering. This clearly draws a distinction with outdoors rendering methods (explained in the next chapter), which will in turn emphasize LOD processing because view distances will be large. This characterization does not imply that an indoors algorithm does not use LODs: some of them do, some don't. But it's the occlusion component that will dominate. In addition, both indoors and outdoors algorithms will have similar approaches with regard to clipping and culling, which are genre independent and provide the same speed-up factors in both cases.



Core Techniques and Algorithms in Game Programming2003
Core Techniques and Algorithms in Game Programming2003
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 261

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net