All Topics  
Anisotropic filtering

 

   Email Print
   Bookmark   Link

 

Anisotropic filtering


 
 

In 3D computer graphics3D computer graphics

3D computer graphics are works of graphic art that were created with the aid of digital computers and specialized 3D softwar...
, anisotropic filtering (abbreviated AF) is a method of enhancing the image quality of texturesTexture filtering

In computer graphics, texture filtering is the method used to determine the texture color for a texture mapped pixel, using ...
 on surfaces that are at oblique viewing angles with respect to the camera where the projection of the texture (not the polygon or other primitive it is rendered on) appears to be non orthogonal. Like bilinearBilinear filtering

Bilinear filtering is a texture filtering method used to smooth textures when displayed larger or smaller than they actually...
 and trilinear filteringTrilinear filtering

Trilinear filtering is an extension of the bilinear texture filtering method, which also performs linear interpolation betwe...
 it eliminates aliasingFacts About Aliasing

In statistics, signal processing, and related disciplines, aliasing is an effect that causes different continuous signals to...
 effects, but introduces less blur at extreme viewing angles and thus preserves more detail. Anisotropic filtering is relatively expensive (usually computationComputation Summary

Computation is a general term for any type of information processing....
ally, though the standard space-time tradeoffSpace-time tradeoff

In computer science, a space-time or time-memory trade-off is a situation where the programmer can reduce memory use a...
 rules apply) and only became a standard feature of consumer-level graphics cards in the 1990s. Anisotropic filtering is now common in modern graphics hardware and enabled either by users through driver settings or by graphics applications & video games through programming interfaces.

An Improvement on Isotropic MIP Mapping

Hereafter, it is assumed the reader is familiar with MIP mappingMipmap

In 3D computer graphics texture filtering, MIP maps are pre-calculated, optimized collections of bitmap images that accompan...
.

If we were to explore a more approximate anisotropic algorithm, RIP mapping (rectim in parvo) as an extension from MIP mapping, we can understand how anisotropic filtering gains so much texture mapping quality. If we need to texture a horizontal plane which is at an oblique angle to the camera, traditional MIPmap minification would give us insufficient horizontal resolution due to the reduction of image frequency in the vertical axis. This is because in MIP mapping, each MIP level is isotropic, so a 256×256 texture is downsized to a 128×128 image then a 64x64 image and so on, so resolution halves on each axis simultaneously, so a MIP map texture probe to an image will always sample an image that is of equal frequency in each axis. Thus when sampling to avoid aliasing on a high frequency axis the other texture axes will be similarly downsampled, and therefore potentially blurred.

With RIP map anisotropic filtering, in addition to downsampling to 128x128 images are also sampled to 256x128 and 32x128 etc. These anisotropically downloadsampled images can be probed when the texture mapped image frequency is different for each texture axis and therefore one axis need not blur due to the screen frequency of another axis and aliasing is still avoided. RIP mapping has a limitation in that it only supports anisotropic probes that are axis aligned in texture space so diagonal anisotropy still presents a problem for example, and real use cases of anisotropic texture commonly have such screenspace mappings.

Degree of Anisotropy Supported

Different degrees or ratios of anisotropic filtering can be applied during rendering and current hardware rendering implementations set an upper bound on this ratio. This degree refers to the maximum ratio of anisotropy supported by the filtering process. So for example 4:1 (pronounced 4 to 1) anisotropic filtering will continue to sharpen more oblique textures beyond the range sharpened by 2:1. In practice what this means is that in highly oblique texturing situations a 4:1 filter will be twice as sharp as a 2:1 filter (it will display frequencies double that of the 2:1 filter). However most of the scene will not require the 4:1 filter, only the more oblique and usually more distant pixels will require the sharper filtering. This means that as the degree of anisotropic filtering continues to double there are diminishing returns in terms of visible quality with fewer and fewer rendered pixels affected and the results become less obvious to the viewer. When one compares the rendered results of an 8:1 anisotropically filtered scene to a 16:1 filtered scene only a relatively few highly oblique pixels mostly on more distant geometry will display visibly sharper textures and they are also sharpened to a lesser degree in the 8:1 filtered scene so the frequency information on these few pixels will only be double that of the 8:1 filter. The performance penalty also diminishes because fewer pixels require the data fetches of greater anisotropy. In the end it is the additional hardware complexity vs. these diminishing returns which causes an upper bound to be set on the anisotropic quality in a hardware design. Applications and users are then free to adjust this trade-off through driver and software settings up to this threshold.

Implementation

True anisotropic filtering probes the texture anisotropically on the fly on a per-pixel basis for any orientation of anisotropy. In graphics hardware typically when the texture is sampled anisotropically, several probes|texel]] samples) of the texture around the center point are taken, but on a sample pattern mapped according to the projected shape of the texture at that pixel. Each probe is often in itself a filtered MIP map sample which adds more sampling to the process. Sixteen trilinear anisotropic samples might require 128 samples from the stored texture, as trilinear MIPmap filtering needs to take four samples times two MIP levels and then anisotropic sampling (at 16-tap) needs to take sixteen of these trilinear filtered samples.

Performance & Optimization

The sample count required can make anisotropic filtering extremely bandwidthMemory bandwidth

Memory bandwidth is the rate at which data can be read from or stored into a semiconductor memory by a processor....
 intensive. Multiple textures are common, each texture sample could be four bytes or more so each anisotropic pixel could require 512 bytes from texture memory, although texture compression is commonly used to reduce this. A display can easily contain over a million pixels, and the desired frame rate tends to be high 30-60 frames per second or even more so the hit on texture memory bandwidth can get very high (tens to hundreds of gigabytes per second) very quickly. Fortunately several factors mitigate in favor of better performance. The probes themselves share cachedCache

In computer science, a cache is a collection of data duplicating original values stored elsewhere or computed earlier, wher...
 texture samples both inter and intra pixel, even with 16 tap anisotropic filtering not all 16 taps are always needed because only distant highly oblique pixel fill tends to be highly anisotropic and such fill tends to cover small regions of the screen and finally magnification texture filters require no anisotropic filtering.

See also

  • Bilinear filteringBilinear filtering

    Bilinear filtering is a texture filtering method used to smooth textures when displayed larger or smaller than they actually...
  • Trilinear filteringTrilinear filtering

    Trilinear filtering is an extension of the bilinear texture filtering method, which also performs linear interpolation betwe...
  • Anti-aliasingAnti-aliasing

    In digital signal processing, anti-aliasing is the technique of minimizing aliasing when representing a high-resolution sign...


External links