3D 图形:法线贴图与凹凸贴图?
我知道法线贴图描述了在不增加多边形数量的情况下向网格添加细节的过程,这是通过使用特定的法线纹理来操纵光线应用于对象的方式来实现的。好的。
- 那么凹凸贴图是什么?它只是法线贴图的另一个术语吗?
- 视觉结果比较如何?这两种技术可以结合起来吗?
I know that normal mapping describes the process of adding detail to meshes without increasing the polygon count, and that this is achieved by using specific normal textures for manipulating the way light is applied to the object. Okay.
- But what is bump mapping then? Is it just another term for normal mapping?
- How do the visual results compare? Can both techniques be combined?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
凹凸贴图描述了模拟对象表面凹凸和皱纹的通用技术。这通常是通过在进行照明计算时操纵表面法线来完成的。
法线贴图是凹凸贴图的一种变体,其中表面法线通过纹理提供,法线嵌入到图像的 RGB 通道中。
其他技术(例如视差贴图)也是凹凸贴图技术,因为它们会扭曲表面法线。
为了回答问题的第二部分,可以很容易地将它们组合起来。基础表面法线可以根据法线贴图确定,然后通过另一种凹凸贴图技术进行修改。
Bump Mapping describes a general technique for simulating bumps and wrinkles on the surface of an object. This is normally accomplished by manipulating surface normals when doing lighting calculations.
Normal Mapping is a variation of Bump Mapping in which the surface normals are provided via a texture, with normals embedded into the RGB channels of the image.
Other techniques, such as Parallax Mapping, are also Bump Mapping techniques because they distort the surface normals.
To answer the second part of the question, they could fairly easily be combined. The base surface normals could be determined from a normal mapping and then modified via another bump mapping technique.
凹凸贴图最初由 Jim Blinn 于 1978 年提出。他的系统基本上通过使用该纹素的高度和周围纹素的高度来扰动表面上的法线来工作。
这与 DUDV 凹凸贴图非常相似(您可能还记得 DX6 中引入的原始环境映射凹凸贴图是 DUDV)。这是通过预先计算上面的导数来实现的,这样您就可以错过计算的第一阶段(因为它不会改变每一帧)。
法线贴图是一种非常相似的技术,其工作原理很简单,就是替换每个纹素位置的法线。从概念上讲,它要简单得多。
还有另一种技术可以产生“类似”的结果。它称为浮雕凹凸贴图。此方法通过使用多通道渲染来工作。基本上,您最终会从最后一次传递中减去灰度高度图,但根据光线方向对其进行少量偏移。
还有其他模拟表面拓扑的方法。
高程贴图使用高度图作为 Alpha 纹理,然后使用不同的 Alpha 值通过该纹理渲染多个切片以模拟高度的变化。然而,如果执行不正确,切片可能会非常明显。
置换贴图的工作原理是生成使用纹理作为基础的 3D 网格。显然,这会大大增加您的顶点数。
陡峭视差、浮雕贴图等都是最新技术。它们的工作原理是通过高度图投射光线直至相交。这有一个很大的优点,如果一个肿块应该遮挡它后面的纹理,那么它现在就会遮挡它,因为光线不会击中它最初击中的位置后面的高度图,因此始终显示“最接近”的纹素。
Bump mapping was originally suggested by Jim Blinn back in 1978. His system basically works by perturbing the normal on a surface by using the height of that texel and the height of the surrounding texels.
This is quite similar to DUDV bumpmapping (You may recall the original environment mapped bump mapping as introduced in DX6 which was DUDV). This works by pre-calculating the derivatives from above so that you can miss out the first stage of the calculation (as it does not change each frame).
Normal mapping is a very similar technique that works by, simply, replacing the normal at each texel position. Conceptually its much simpler.
There is another technique that produces "similar" results. It is called emboss bump mapping. This method works by using multipass rendering. Basically you end up subtracting a gray scale heightmap from the last pass but offsetting it a small amount based on the light direction.
There are other ways of emulating surface topology as well.
Elevation mapping uses the height map as an alpha texture and then renders multiple slices through that texture with a different alpha value to simulate the change in height. If not performed correctly, however, the slices can be very visible.
Displacement mapping works by generating a 3D mesh that uses the texture as its basis. This, obviously, massively increase your vertex count.
Steep parallax, relief mapping, etc are the newest techniques. They work by casting a ray through the heightmap until it intersects. This has the big advantage that if a lump should block out the texture behing it now does as the ray doesn't hit the heightmap behind where it initially hits so always displays the "closest" texel.