subscribe

Point Sampling

texture filtering

MIP-maps are used to store several different copies of a texture, at different scales, for use in 3D scene rendering. One of the accompanying illustrations shows four versions of a texture applied to flat surfaces which were parallel to the screen, each surface covered by a single, unprocessed, copy of one of the textures stored in the MIP-map. In 3D programs which allow movement within a scene, however, textures of scales between those stored in the MIP-map have to be applied to surfaces as the viewer approaches or retreats from them. There are several methods which can be applied to achieve this scaling and they are known collectively as “texture filtering”. The simplest, and least effective, of these is known as “point sampling”.

Suppose that a texture consisting of alternating black and white pixels has to be reduced to 90% of its original size, as the viewer moves away from a surface. With point sampling, the software would calculate that the first pixel it should plot onto the surface would be black. To calculate the colour of the next surface pixel, the software would move on 90% of a texel’s width or height and would find that it was still looking at a black texel, so would plot another black point on the surface. The next point sample would occur 90% of a texel’s width or height further on where, this time, the software would be looking at a white texel. This would continue, with alternate black and white points being plotted, until, once again, the software made two point samples within the same texel, plotting two adjacent pixels of the same colour to the surface, this time white. As the surface was filled with points, the same error would occur at every tenth sample point, producing regular faults throughout the surface to be textured. This is obviously not the required result, as can be seen from the accompanying illustrations.

 

point sampling

 

The given example is one which is unlikely to occur in a real application, as, even with more advanced texture filtering methods, scaling a texture of alternating black and white pixels by 90% would not produce the required effect but it does clearly illustrate the way point sampling introduces unwanted errors.

Incidentally, the errors produced by the point sampling of our example texture are “aliasing” errors, as mentioned under Anti-aliasing. More accurate scaling can be achieved using a more advanced method of texture filtering, known as “bi-linear” texture filtering.