VRay GGX材质实例:更写实的高光

Maya , 3Ds Max473 字

[scode type="share"]
作者:Neil Blevins
編譯:Hammer Chen
[/scode]

这篇教学讨论GGX Shading模型能够仿真真实的粗糙表面的反射效果。
以下是我用iphone拍出来的真实物体的照片:
![](https://aduvfx-1252404142.cos.ap-beijing.myqcloud.com/ueditor/php/upload/image/20160812/1470939306788101.jpg)![](https://aduvfx-1252404142.cos.ap-beijing.myqcloud.com/ueditor/php/upload/image/20160812/1470939306710348.jpg)![](https://aduvfx-1252404142.cos.ap-beijing.myqcloud.com/ueditor/php/upload/image/20160812/1470939306300261.jpg)![](https://aduvfx-1252404142.cos.ap-beijing.myqcloud.com/ueditor/php/upload/image/20160812/1470939306844364.jpg)
注意到反射具有很亮的光线,中心很亮,然后有很长的衰减:
![](https://aduvfx-1252404142.cos.ap-beijing.myqcloud.com/ueditor/php/upload/image/20160812/1470939340215166.jpg)
标准的Blinn 或 Ward的衰减无法做出这样长又柔化的衰减。这样的效果或许是来自相机或是其他可能性才导致最终的相片会看到这种长衰减现象。
![](https://aduvfx-1252404142.cos.ap-beijing.myqcloud.com/ueditor/php/upload/image/20160812/1470939362682148.jpg)
第一张是拍摄真实金属球, 第二张是GGX shader,第三张是Beckmann shader (接近于Blinn) 。注意到GGX shader很接近真实的金属球的效果,也就是中心锐利的高光,然后软的衰减 。

### GGX Shader in Vray for 3dsmax

以下范例只是在Vray for 3dsmax的GGX shader效果,首先用单一的方形区域光去照反射球。 先用Vray Material将其shader设为Ward(这是以前最棒的金属高光shader) glossiness设定小于1。
![](https://aduvfx-1252404142.cos.ap-beijing.myqcloud.com/ueditor/php/upload/image/20160812/1470939670126576.png)
Ward, 0.96 Glossiness
接着我们把shader切换成GGX

![](https://aduvfx-1252404142.cos.ap-beijing.myqcloud.com/ueditor/php/upload/image/20160812/1470939450403625.png)
GGX, 0.96 Glossiness, Tail 2.0
注意到看起来相当不同,注意反射高光的模糊程度

![](https://aduvfx-1252404142.cos.ap-beijing.myqcloud.com/ueditor/php/upload/image/20160812/1470939603744384.png)
GGX, 0.83 Glossiness, Tail 2.0

![](https://aduvfx-1252404142.cos.ap-beijing.myqcloud.com/ueditor/php/upload/image/20160812/1470939617118464.png)
GGX, 0.83 Glossiness, Tail 3.0

![](https://aduvfx-1252404142.cos.ap-beijing.myqcloud.com/ueditor/php/upload/image/20160812/1470939628840747.png)
GGX, 0.83 Glossiness, Tail 4.0

如果给予较低的尾衰减数值,那么反射效果就接近ward shader,但是方形区域光在GGX shader还是看起来有点方, 而Ward里面看起来比较圆,所以GGX shader的效果还是比较写实。
接下来我们试试更复杂的场景 ─ 水管然后套用hdr环境光加上高强度的方形区域光:

![](https://aduvfx-1252404142.cos.ap-beijing.myqcloud.com/ueditor/php/upload/image/20160812/1470939700128118.png)
Ward, 0.96 Glossiness

![](https://aduvfx-1252404142.cos.ap-beijing.myqcloud.com/ueditor/php/upload/image/20160812/1470939714763539.png)
GGX, 0.96 Glossiness, Tail 2.0

![](https://aduvfx-1252404142.cos.ap-beijing.myqcloud.com/ueditor/php/upload/image/20160812/1470939735864951.png)
GGX, 0.83 Glossiness, Tail 2.0

稍微模糊一下环境贴图,让其跟GGX的模糊程度相当,但是在GGX的高光会有比较长的尾部(衰减) 。我最爱的是以下图片中展示了这个衰减效果,提供了长的亮的条纹,这在Ward是看不到的!
![](https://aduvfx-1252404142.cos.ap-beijing.myqcloud.com/ueditor/php/upload/image/20160812/1470939753535752.jpg)

当然你必须要微调tail amount 与 glossiness 才会得到你最终要的高光效果。以下是不同参数所得到的效果图:
![](https://aduvfx-1252404142.cos.ap-beijing.myqcloud.com/ueditor/php/upload/image/20160812/1470939765648342.jpg)

希望这篇教学有说服你,金属的高光还是改用GGX shader最好了!

admin
博学之,审问之,慎思之,明辨之,笃行之。
OωO
开启隐私评论,您的评论仅作者和评论双方可见