Avoid Texture Aliasing and Mipmapping

In ray tracing, if the objects with textures are far from the camera, the spatial sampling frequency would be relatively low, i.e. each pixel of the viewing plane would have to cover multiple texels (texel is the pixel of texture images). As such, it would lead to a kind of aliasing called moir´e pattern. The following is an exampling of the moire pattern (on the surface of floor and buildings):



The problem of aliasing can be addressed by sampling and filtering techniques. The signal frequency of texture depends upon how closely spaced its texels are on the screen. Due to the Nyquist limit, we need to make sure that the texture's signal frequency is no greater than half the sample frequency. For example, say an image is composed of alternating black and white lines, a texel apart. The wavelength is then two texels wide (from black line to black line), so the frequency is 1/2. To properly display this texture on a screen, the frequency must then be at least 2*1/2, i.e. at least one pixel per texel. So, for textures in general, there should be at most one texel per pixel to avoid aliasing.

To achieve this goal, either the pixel's sampling frequency has to increase or the texture frequency has to decrease. The anti-aliasing methods give ways to increase the pixel sampling rate. However, these give only a limited increase in sampling frequency. To more fully address this problem, various texture minification algorithms have been developed.

Mipmapping

The most popular method of anti-aliasing for textures is called mipmapping. It is implemented in some form on even the most modest graphics accelerators now produced. When the mipmapping minimization filter is used, the original texture is augmented with a set of ssmaller versions of the texture before the actual rendering takes place. The texture (level zero) is downsampled to a quater of the origianl data, with each new texel value often computed as the average of four neighbor texels in the original texture. The new, level-one texture is sometimes called a subtexture of the original texture. The reduction is performed recursively until one or both of the dimensions of the texture equals one texel. The set of images as a whole is often called a mipmap chain.

Two important elements in forming high-quality mipmaps are good filtering and gamma correction. The common way to form a mipmap level is to take each 2*2 set of texels and average them to get the mip texel value.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值