Bargain Bin Review

Anisotropic Filtering

What is anisotropic filtering? Simply put, it is a new feature on many video cards that improves perceived image quality. Going beyond that, however, is a great deal more complex because of its relatively recent inclusion in consumer level boards it is often implemented in different ways on various cards and is never enabled as a default. In fact, some cards need special 3rd party (not created by the manufacturer) driver modification programs in order to turn on anisotropic filtering or set it at different levels. Because of the differences in how it is implemented, it is often easier to say what anisotropic filtering is intended to do, rather than what it does. For that reason, I will stay away from the math involved and focus on how the resulting image is perceived.

In the art world, Leonardo DaVinci is often credited with defining "atmospheric perspective" though we know that the technique was known and used in paintings done in Roman Pompeii and with likelihood, earlier than that. "Atmospheric perspective" simply states that the world is filled with air. This air filters out red and yellow light so objects appear less detailed and more blue the further away they are from the viewer.

As computer graphics attempt to duplicate the real world, or even worlds that are anything but real, it is necessary to accurately portray how the human eye sees. However, as video cards are only so fast it is often necessary to make concessions where they can be made.

Right now, the most memory intensive aspect of 3D graphics in PC games are not the models (which still use relatively few polygons) but the texture maps that cover them like skins. Because objects in real life grow less detailed as they move farther away from the viewer, due to both physics and imperfections in the human eye, 3D artists can get away with using smaller and less detailed textures in far away objects (these textures are often just shrunk down versions of the larger textures created for close objects).

This process is called "mip-mapping" which is derived from a Latin phrase multum in parvam or "many in few" as there are often many various "mip-levels" that individual texture images are scaled to for specific levels of distance (LOD).

LOD settings on video cards can be tweaked by specific games or even users themselves (though the settings are often buried deeply in the drivers) to allow further objects to be seen as more detailed at a slight tradeoff in speed. Though "more detail" is always a crowd-pleaser, it is not physically accurate and often leads to a phenomenon known as "texture aliasing." This is different than the edge-aliasing which is the variety that full screen anti-aliasing (FSAA) tries to mitigate. In texture aliasing, specific pixels within a texture map vie for dominance, causing them to appear to move when they should remain stationary, contributing to an effect that many call "pixel swimming."

To counter that effect, the images that are displayed must be filtered. The simplest of these filtering methods is bilinear filtering. In a bilinear filtered image, there is a certain distance at which textures change abruptly from detailed to blurry. This distance can easily be seen as a distinct line across the ground texture (or a square if enclosed in a tight virtual "hallway") and is an obvious detraction to the image quality. Trilinear filtering specifies three regions allowing the central one set at mid-distance to blend the two other ranges of texture quality together, though lines are still visible) separating the three filtering sections) to astute observers.

Anisotropic filtering allows for the gradual decrease in mip-map size over distance without any resulting visual lines delimiting the various zones. Instead, textures scale in a shape that looks like a disc surrounding the player, who stands at its "normal," a perpendicular line rising from its center. There are various levels of anisotropy that can be selected on modern video cards that push back the blurred texture effect even further, though at a higher cost in rendering speed.

Using a Geforce 3 video card, the following Quake III image will display various methods of filtering:

Click for loss less compressed PNG 24 format image

I have marked the various ranges in bilinear and trilinear filtering with faint red lines to make them more obvious to those with casual eyes who are not experienced with examining 3D graphics closely. Most people will agree, however, that the first level of anisotropy (in this case, labeled 2X) is the most important. It both eliminates the lines and creates a very attractive range of texture degradation. The setting 4X improves upon that with a higher cost in speed, resulting in somewhat lower FPS. At 8X, the law of diminishing returns sets in, as while it increases the range over 4X, it does so only slightly and at a greatly increased cost in speed.

This improvement is also evident on the walls of scenes. Examine the blue "circuitry" texture on the left of the image. While it appears brighter in the bilinear and trilinear strips, the texture displayed is at a lower resolution and lacks the intricate detail of the anisotropic 8X mode.

Click for loss less compressed PNG 24 format image

One of the most problematic issues for mip-mapping has been the use of "alpha textures." Alpha textures use an "alpha channel" to denote transparency to either make the texture look see through in sections or to disguise the fact that the texture itself is square or rectangular as the framing pixels are transparent. These alpha textures are then mapped to a single polygon to form a 2D stand-in for a 3D object when creating it in full 3D would be cumbersome or unnecessary--such as the trees and shrubs that line the roads in racing games. As players never get to freely move around these objects or examine them closely the fact that they are essentially just decals is not especially problematic.

However, in some cases, alpha textures are used on objects that players can move around and interact with; the most common example being fencing. Rather than create a chain link fence out of hundred or even thousands of polygons it is often easier to just create a polygon in the shape of the fence and to project a picture of a fence onto it, with the voids in it set by the alpha-channel to be "see-through." There are then many mip-levels created for the fence texture, with each to be displayed at a different distance from the viewer.

This results in a strange visual effect when using bilinear or trilinear filtering (the modes used by the majority of gamers) as the fence might sometimes be rendered using two different mip-maps with a seam between the two. Anisotropic filtering rectifies this problem

.

This phenomenon can be seen here in this image taken from the "cs_assault" map on the popular Counter-Strike mod for Half-Life:

Bilinear Filtering

Anisotropic Filtering

Sometimes, texture aliasing is inevitable, especially in games that take place outside among rolling hills. Even so, anisotropic filtering leads to a more stable image. When combined with FSAA it allows gamers to push back their LOD even further to prove that when it comes to computer graphics, 20/20 vision is only the beginning.