I Think I Broke It!  Free online help for your everyday computer problems

How a Graphics Card Works - Page 7

Lights, Camera, Action!

Now we've covered image mapping and three dimensional geometry data, the next stage is to create a 'camera' to look at the scene we've created (to allow the creation of a two dimensional version of the scene). The position of the camera in the scene, and the point it's currently looking at, can be defined be a set of 'x, y, z' coordinates, one set for the camera, and another for the 'target'. By changing these coordinates, the position of the camera in the scene can be altered.

The camera works by viewing the current scene through a screen of virtual pixels matching the current resolution of the frame buffer (imagine walking around with a clear sheet of grid paper in front of your face). This area is known as the 'viewing frustum'.

A straight line is extended from the 'eye' of the camera, out through the centre of each virtual pixel and into the current scene. If this line intersects with any polygon faces, then an appropriate pixel colour for that surface is calculated by the GPU, this is done by using a set of instructions that are collectively known as 'pixel shaders' (more on those later).

The camera starts in a corner, and creates a colour value for each pixel in the frame buffer, pixel by pixel, horizontal row by row. It does this until it reaches the final pixel on the final row. Once it's reached this point, a new frame will have been created. The process then begins again to produce the next frame, reflecting any change in camera position or changes to the geometry of the scene.


The virtual 'camera' creates a 2D projection by extending a straight line from its eye point through each virtual pixel into the 3D scene.


<<< Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 Next >>>

Article Navigation:

Latest Question

Stop Automatic Restarts after Automatic Windows Updates - After leaving my computer to encode a large video the other day, I was surprised to come back and find it sitting at the login screen. ...

View Full Question & Answer
 

Search
To search the site, enter your search string in the box below: