Manual/PartIV/Bump and Normal Maps

Wikipedia,自由的百科全书

Image:LeftArrowHeader.png
[[../UV Mapping UV映射|      ]]>
Image:RightArrowHeader.png
[[../Environment Maps 环境映射|      ]]>
User Manual: Contents | Guidelines | Blender Version 2.37a

Normal Maps and Bump Maps both serve the same purpose: they simulate the impression of a 3D-Surface, e.g. a relief. But this relief will not cast any shadows and will not obstruct other objects. If the camera angle is to flat to the surface, you will notice that the surface is not really shaped. 法线映射和凸块映射都是为了一个目的:它们仿真一个三维便面的视感,即浮雕。但是这个浮雕不会投射任何阴影,并且不会遮挡其他对象。如果摄像机相对表面的角度太小,你就会法线表面有些失真

The terms "Normal Map" and "Bump Map" are often used synonymously, but there are certain differences: 术语“法线映射”和“凸块映射”经常同时使用,但是它们还是有些区别的:

  • Bump Maps are textures that store the relative height of pixels from the viewpoint of the camera. The pixels seem to be moved in the direction of the facenormals, either in direction to or away from the camera. You may either use greyscale pictures or the intensity values of a RGB-Texture (including images).
  • 凸块映射是存储像素相对与摄像机视点的高度的纹理。像素看上去将会在面法线的防线上被移动,或是正对着远离/靠近摄像机。你可以使用灰度图片或是一个RGB纹理(包括图像)的强度值
  • Normal maps are images that store normals directly in the RGB values of an image. They change the Normals in a way, that the Pixels seem to be moved in an arbitrary way. So you can create any relief you like.
  • 法线映射是这样一些图像:它们直接以RGB值的形式存储图像的法线。它们以如下方式改变法线:像素看上去以一种任意的路径移动。这样你就能创建想要的任何浮雕

Normal maps in Blender store a normal as follows:

  • Red maps from (0-255) to X (-1.0 - 1.0)
  • Green maps from (0-255) to Y (-1.0 - 1.0)
  • Blue maps from (0-255) to Z (0.0 - 1.0)

Blender中的法线映射存储法线如下:

  • 红色从 (0-255) 映射到 X (-1.0 - 1.0)
  • 绿色从 (0-255) 映射到 Y (-1.0 - 1.0)
  • 蓝色从 (0-255) 映射到 Z (0.0 - 1.0)

Since normals all point towards a viewer, negative Z-values are not stored (they would be invisible anyway). In Blender we store a full blue range, although some other implementations also map blue colors (128-255) to (0.0 - 1.0). The latter convention is used in "Doom 3" for example. 既然法线都指向一个视,负的Z值就不会被存储(它们将不可见)。虽然一些其他应用也将蓝色 (128-255) 映射到(0.0 - 1.0),但是在Blender中我们存储一个完整的蓝色范围。其他应用例如“Doom 3”

Examples 例子

We are going to look at some examples. First the render of "Suzanne" (Suzanne Render). The second picture shows Suzanne's Normal Map (Normal Map of Suzanne). I havn't used the camera in Ortho mode to make it easier to compare between the pictures. 我们将看一些例子。首先“Suzanne”的渲染(Suzanne渲染)。第二幅图显示Suzanne的法线映射(Suzanne的法线映射)。我没有在正交模式下使用摄像机,这样使得比较图片变得容易一些

The rightmost picture in the top row shows the Bump Map of Suzanne. It was created with the ZUtilz Plugin. The resolution of the Bump Map is too small for the relatively great range of Z-Values. You will notice that if you look closely at the render of the Bump Map. 最上面一行最右侧的图片显示Suzanne的凸块映射。它使用Z工具插件创建。凸块映射的分辨率对于相对较大的Z值范围而言显得太小了。如果你近距离观察凸块映射的渲染,你就会注意到这一点

Suzanne Render Suzanne渲染
Enlarge
Suzanne Render Suzanne渲染
Normal Map of Suzanne (not orthogonal)Suzanne法线映射(非正交)
Enlarge
Normal Map of Suzanne (not orthogonal)Suzanne法线映射(非正交)
Bump Map of Suzanne. The 8-Bit depth of the Bump Map is too small to cover the details. Suzanne凸块映射。8比特的凸块映射深度太小,以致于无法掩盖细节
Enlarge
Bump Map of Suzanne. The 8-Bit depth of the Bump Map is too small to cover the details. Suzanne凸块映射。8比特的凸块映射深度太小,以致于无法掩盖细节

I've used both Maps as textures with a plane, first the Normal Map (Render of the Normal Map), than the Bump Map (Render of the Bump Map). In both cases the camera stayed in the same position in wich the Maps were made (perpendicular to the plane). 这两种映射我都作为纹理在一个平面上应用了,首先时法线映射(法线映射渲染),凸块映射(凸块映射渲染)。两种情况下,摄像机都处于同一位置,也就是映射应用的位置(垂直于平面)

Render of the Normal Map, perpendicular to the surface.法线映射渲染,垂直于平面
Enlarge
Render of the Normal Map, perpendicular to the surface.法线映射渲染,垂直于平面
Render of the Bump Map. Klick on the picture to see an enlarged version.凸块映射渲染。单击图片显示放大版本
Enlarge
Render of the Bump Map. Klick on the picture to see an enlarged version.凸块映射渲染。单击图片显示放大版本
Side view render of the Normal Map.法线映射的边延视图渲染
Enlarge
Side view render of the Normal Map.法线映射的边延视图渲染
Side view render of a Normal Map made with an Ortho camera. The same cameraposition as in the previous picture, less perspective distortion.使用正交摄像机的法线映射的边延视图渲染
Enlarge
Side view render of a Normal Map made with an Ortho camera. The same cameraposition as in the previous picture, less perspective distortion.使用正交摄像机的法线映射的边延视图渲染

The Render of the Normal Map is only pseudo 3D. You can't look at the side of the head (Side view render). 法线映射渲染是伪三维的。你不能看到头部的边延(边延视图渲染

If you use an Ortho camera to create the Normal Map, you will get less perspective distortion (Render with an Ortho camera). 如果使用正交摄像机来创建法线映射,你将获得较小的透视扭曲(使用正交摄像机的渲染

Using Normal Maps and Bump Maps 使用法线映射和凸块映射

Normal Map Button in the Image Panel 图像面板中的法线映射按钮
Normal Map Button in the Image Panel 图像面板中的法线映射按钮

Normal and Bump Maps are simple to use. Make sure you apply the Texture in the Material buttons Map To panel to Nor. The strength of the effect is controlled with the NumButton Nor on the same Panel. 法线和凸块映射的使用很简单。确认你在映射输出面板的材料按钮组中选择了法线。效果的强弱是由同一面板中的数字按钮法线控制的

If you want to use a Normal Map, you have to set the Normal Map button in the Image Panel in the Texture buttons F6 (Normal Map Button). 如果想使用法线映射,你必须设置映射输出面板中纹理按钮组F6法线映射按钮

Since only the normals get affected during render, you will not get shadow or AO or other '3D' effects. It's still just a texture. 既然在渲染只影响法线,那么你将不会得到阴影、AO或是其他三维效果。它仍然只是纹理


Creating Normal Maps 创建法线映射

Creating normal maps in Blender is relatively easy. 在Blender中创建法线映射相对简单

1) Create a model and align it with the world coordinates. This will make it easier to position the camera. 创建一个模型并且将其与世界坐标对齐。这样将便于定位摄像机

Camera settings to create a Normal Map 创建法线映射的摄像机设置
Camera settings to create a Normal Map 创建法线映射的摄像机设置

2) Position the camera straight above the middle of your model. Set Ortho in the Camera Panel in the Editing Buttons (F9) . The parameter Scale governs the size of the display detail (Camera settings to create a Normal Map). 将摄像机定位于你的模型的正上方。设置摄像机面板中编辑按钮组(F9)的正交按钮。参数缩放控制显示细节的尺寸(创建法线映射的摄像机设置
3) The material of the model should be set to Shadeless, so we don't have to bother about lighting (Materialsettings to create a Normal Map). 模型的材料应该被设置为无阴影,这样我们就没有必要为了灯光烦恼(创建法线映射的材料设置
4) We need three texturechannels, all set to a linear Blend Texture (Texturesettings to create a Normal Map). 我们需要三个纹理管道,都设置为线性混合纹理(创建法线映射的纹理设置
5) All three texturechannels use Nor in the Map Input Panel, the Map To Panel is set to Col. 三个纹理管道都使用映射输入面板的法线按钮,the 映射输出面板设置颜色

  • The first texture uses Map Input (X, -, -), Color Red (1, 0, 0), Blending Mode Mix (X-coordinate).
  • 第一个纹理使用映射输入(X, -, -),红色(1, 0, 0),混合模式混合X坐标
  • The second texture uses Map Input (Y, -, -), Color Green (0, 1, 0), Blending Mode Add (Y-coordinate).
  • 第二个纹理使用映射输入(Y, -, -),绿色(0, 1, 0),混合模式添加Y坐标
  • The third textures uses Map Input (Z, -, -), ofsX (-0.5), sizeX (2.0), Color Blue (0, 0, 1), Blending Mode Add (Z-coordinate).
  • 第三个纹理使用映射输入(Z, -, -),X偏移(-0.5),X大小(2.0),蓝色(0, 0, 1),混合模式添加Z坐标

By moving and scaling the blue texture we get a higher resolution in the Z-Direction (full range). 通过移动和缩放蓝色纹理,我们在Z方向上获得了一个更高的解析度(完整范围)

To get an overview all material settings in pictures: 如图你可以对所有的材料设置有一个整体认识:

Materialsettings to create a Normal Map. 创建法线映射的材料设置
Materialsettings to create a Normal Map. 创建法线映射的材料设置
Texturesettings to create a Normal Map. 创建法线映射的纹理设置
Texturesettings to create a Normal Map. 创建法线映射的纹理设置
X-coordinate X坐标
X-coordinate X坐标
Y-coordinate Y坐标
Y-coordinate Y坐标
Z-coordinate Z坐标
Z-coordinate Z坐标

You can download an examplefile with the material from the page with the Release Notes. You have to append the material "normalmap" from the file "normalmap_material.blend". 你可以从Release Notes页面下载附带材料的例子文件。你必须附加文件“normalmap_material.blend”中的材料“normalmap”

Normal Maps and curved surfaces'法线映射和曲线化表面: Normal Maps will give the expected results only if you use them with flat surfaces. 法线映射只有当你将其使用在平坦表面时才会给出理想的结果
Previous: [[../UV Mapping UV映射]] Contents Next: [[../Environment Maps 环境映射]]
Personal tools