High quality texture filtering with elliptical filtering

 
 
 

Use elliptical filtering for high quality texture filtering and anti-aliasing. Instead of using point sampling, elliptical filtering uses an area (an ellipse) to perform an image lookup. This ellipse contains many pixels; the pixels are averaged and the average color is returned as a result.

In order to use elliptical filtering, the texture should first be prefiltered to a pyramidal format. Because it is time consuming to average all the pixels in the area; Maya looks up this pyramid map instead. For example, a 1K texture contains data for resolutions of 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1.

Maya looks up the corresponding texture resolution in the texture pyramid based on two aspects: size of the ellipse (over the object surface) and the elliptical filtering quality factor.

For example, if you render a ground plane with a texture, the ellipses at the horizon cover a lot more surface compared to the ellipses close to the camera. When ellipses cover a large surface over the object, Maya uses the lower resolutions in the texture pyramid, since those resolutions have been scaled down and are pre-filtered to avoid texture flickering.

For example, an ellipse located at the horizon might cover a large area over the object's surface, and Maya would lookup the 2x2 resolution in the texture pyramid. By contrast, the ellipses close to the camera cover a much smaller area. If the quality factor is set to 8, Maya looks up the pyramid level that matches the ellipse size. In this case, the minor radius of the ellipse is used to determine the texel density that, in turn, determines the pyramid level.

Applying elliptical filtering to your file texture

  1. Set mental ray as your renderer. This feature is only supported by mental ray for Maya.
  2. In the Attribute Editor of your file node, select Mipmap as your Filter Type. Elliptical filtering is an extension of mipmap filtering.
  3. Expand the mental ray section in the Attribute Editor of your file node. Select Advanced Elliptical Filtering to enable elliptical filtering.
  4. Use the Anti-aliasing Level slider to tweak your filtering. Maya uses the ellipse size over the object surface to determine what resolution in the pyramid to use.

    For example, an Anti-aliasing Level of 64 means that 64 texture pixels must fit inside the minor radius of the ellipse in the UV domain of the object.

    When tweaking this value, you must choose a balance between quality and speed. If the minor radius is very large, then Maya needs to look up a higher texture resolution in the pyramid, which will cause more pixels to be read and loaded by Maya.

    You should therefore select a number that strikes a balance between the lookup time and the quality of the anti-aliasing.

  5. Convert your texture to a format optimized for elliptical filtering (pyramid or multi-resolutions) by selecting the Convert File to Optimized Format. This option is automatically enabled when you enable Advanced Elliptical Filtering.

    This option is the override for the global Use optimized textures (auto-conversion) option in the Preferences window, under the Rendering section. The global option converts all textures in your scene to the optimized format, while this option within the file node only converts the selected texture to an optimized format. To override the global setting in the Preferences window, select Override Global Auto-Conversion Settings.