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

How a Graphics Card Works - Page 6

Surface Colours and Maps

Okay, so at this point we've got a basic understanding of how the graphics card has created a three dimensional environment made up from wire frames, which are in turn made up from countless numbers of polygons, each having its own 'surface normal'. The surface normals help with lighting calculations and make the environments, and the objects in those environments, react to light more realistically.

The next stage we'll focus on is the matter of surface colours. Besides simply setting each polygon to specific colour, we can also use something called 'image mapping', this technique is widely used in all of the top games to produce very realistic looking surfaces. Image mapping treats a two dimensional image, such as those you could create in any image editing application, as a flexible sheet which can be 'wrapped' around any 3D surface.

E.g. When creating tiled floors or brick walls, it's a fairly simple to get a photograph of part of a wall or floor, and to then repeat this image over the entire 3D model, giving a realistic surface, with very little work involved (instead of storing the data to individually colour each triangle).

Image mapping isn't just confined to scenery either, it's also used to create detailed character models in games, as shown below:

 

 
Some of the image maps used to create 'Matthew Kane' in Quake 4, shown below:


The character 'Matthew Kane' from Quake 4, covered in textured goodness

 

Since we're on the subject of image maps, this seems like the perfect opportunity to mention 'Mipmaps' and 'Bump mapping'.

 

MIP Maps

MIPmaps (Latin: "Multum In Parvo" or "many things in a small place") are optimized collections of images that sometimes accompany a main texture/image map. Their goal is to increase the rendering speed of a scene, and to reduce artefacts.

Each image of a MIP map set is a version of the main texture, but at a certain reduced level of detail/quality. The main texture is still used when the view is sufficient to render it in full detail, but as the object being rendered gets further away, the engine can switch to a suitably lower quality MIP map image (or 'mix' the two nearest).

Rendering speed increases since the number of texture pixels being processed can be much lower than with simple 'non-MIP map' textures. Artifacts are also reduced since the mipmap images are effectively already anti-aliased, taking some of the burden off of the GPU.

 


A simple example of a mipmap, with the original texture on the left, and the successively reduced quality versions on the right.

 

MIP maps are also handy for reducing the 'shimmering' effect that can be caused by shrinking large textures down to very small sizes.

 

Bump Mapping

Bump mapping is a technique where at each pixel, a perturbation to the current surfaces normal is looked up in a texture map, this is then applied before the lighting calculation is done. This results in a more detailed surface representation that better resembles the finer details you often see in real materials.

        
Bump mapping in action: The sphere on the left uses no bump mapping, the one on the right is geometrically the same as the left, but has a bump map applied


<<< 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: