本教程由ChinaVFX.NET翻译整理

准备
1.首先创建一个简单的场景用于我们的练习。创建一个50x50的 Plane(平面),并在上面放置一个 Torus(圆环面)。为 Plane 赋予默认的 Lambert 材质,临时给 Torus 添加一个 Phong 材质。

2.删除 Infinit Light,创建一个 spot light 照射 Torus。

3.最后,如下图所示新建一个 Image Based Lighting Pass 用于反射,选择一张对比强烈的 HDRI 文件。在 render region option(区域渲染选项)中,将 Final Gathering 和 Preview Final Gathering 设为 on(打开),其它保留默认。

材质
4.下面开始制作材质。打开 Render Tree(快捷键"7")并选择 Torus。选择:Nodes/Mixers/Mix 2 colors,如下图所示。

将 Phong4 重命名为 Reflection_M。这个节点用于生成材质的高光和反射。
Reflection_M:
Diffuse color: 0,0,0
Ambiant: 0,0,0
Specular: decay: 5(可生成大面积的高光)
5.如下图所示,连接 Mix_2colors 到 specular,并将Phong和Phong2分别连接到 base_color 和 color1 上。这样我们可以获得一个强烈的小面积高光(600)和一个柔和的大面积高光(18.436)。

6.连接 Incidence(入射角)节点到 reflectivity(反射),并设置
Surface/Camera
Bias : 0,62
Gain: 0,285
如下图所示在 Incidence 和 Reflectivity 间加入一个 Intensity 节点。

这个 Incidence 节点可以通过渐变条来控制反射度。

7.材质的第一部分完成,下面我们来制作汽车的颜色。连接一个 Blinn 节点到第一个 Mix_2colors 的 base color。
在 RenderTree 中,进入 Nodes/Mixers 并选择 Gradient,如图设置渐变颜色,
Color 1: 0,067 0,000 0,000
Color 2: 0,071 0,000 0,000
Color 3: 0,631 0,115 0,000
这将使汽车随视角的改变而产生变化。不要忘记转换到 Linear 模式。

8.如下图所示添加一个 Incidence 节点并连接到 Gradient 节点的 input 上。

9.最后就剩金属效果了。如下图所示,我们使用一个 3d_fractale 并连接到一个新 Mix_2color 节点的 weight 上,并使用 Vector_State 控制 fractal。

为了更像金属,我们还需要调整 Blinn's 的高光直到得到满意的效果。
下载 shader 文件

