Level Of Detail



In the above section, mipmapping was discussed. It must be said that mipmaps are usually chosen by comparing the size of the polygon (as it will be drawn) to the sizes of the mipmap images. OpenGL allows specifying the minimum as well as maximum level of detail that are used. When mipmapping, each texture map is referred to as one Level Of Detail (LOD). All 3D hardware automatically selects default LOD for each textured pixel displayed. To set the level of detail limits, the glTexParameterf function is used :

glTexParameterf(GL_TEXTURE_ENV, GL_TEXTURE_MIN_LOD, min_lod);
glTexParameterf(GL_TEXTURE_ENV, GL_TEXTURE_MAX_LOD, max_lod);

Additionally, you can bias whatever level of detail that is implemented, which can dramatically increase or decrease the detail of mipmapped textures. This primarily acts to compensate for under or over sampling of texture images. Applying a negative bias to the default LOD will result in more detail while a positive bias will result in less detail. When the texture data supplied by a game is oversampled, an image will look blurry; a negative LOD bias will help to give more apparent detail as well as making the scene crisper. When the texture data supplied by a game is undersampled, an image may look unusually (and perhaps unrealistically) crisp; a positive LOD bias will help reduce the "overly detailed" look. The drawback to applying negative bias is the introduction of texture aliasing. One side effect to this is when very detailed textures will seem to "swim", which is anĀ  artifact of aliasing.


Click for a bigger version


Click for a bigger version


Click for a bigger version