The Graphics Pipeline - Pipelining in the GPU
(Page 2 of 4 )
In games or other renderings, each object in the scene started off as a separate 3D model created by someone. It has its own coordinate system and scale specific to that "part", and the whole part is rendered from every angle. These parts are made up of triangles in general, since triangles can be described with three vertices, and only reside in one plane. When a scene is generated, it needs to involve multiple parts, all placed within a "world" coordinate system, with a worldwide scale. That's the job of the game engine and where your CPU earns its money.
Stages in the Pipeline
The first stage in the pipeline is transforming each object or part from its own space to the "world" one. This model transformation also involves scaling. While a car might have been drawn as big as a coffee table by the modeller, one is obviously going to be be bigger than the other in the game. This gives your basic frame for the scene, and includes everything. As of yet, the viewer himself hasn't been taken into account. Think of it as a "God" type view for now.
The next stage is transferring everything to the perspective that the viewer will be looking from. This is called the "camera" angle, and involves another translation and transformation of the scene. All the objects must be based on coordinates from the camera's point of view. In order to move objects from that world space to the view space, they often have to be rotated (spinning on an axis), translated (shifting along an axis), or scaled (made bigger, smaller, or even stretched/shrunk along a certain axis). Closer objects are going to be bigger than further ones for the obvious reasons.
After that is completed, it's time to reduce the amount of further work to be done by the video card. This stage is called "occlusion culling", and involves removing triangles that are hidden. There is no point in rendering something that is hidden behind a wall. As well, the triangles on the backside of an object can be left behind as well. If you are on the same plane as our car again, and can only see the passenger side, there isn't much point in going through and rendering the driver's side, now is there?
This does have to be somewhat carefully done however. Sometimes there will be objects such as water, which are translucent. You can't throw away the model of a fish in a river if the surface of the water is clear. For a stage that is often called "trivial rejection", there are some parts that are certainly less than just "trivial".
Next: The Illumination Stage >>
More Video Cards Articles
More By DMOS