查看: 2117|回复: 0
打印 上一主题 下一主题

内置着色器指南之标准着色器家族:视差高光着色器

[复制链接]
.    

3797

主题

11

听众

5万

积分

首席设计师

Rank: 8Rank: 8

纳金币
32328
精华
41

活跃会员 优秀版主 荣誉管理 论坛元老

跳转到指定楼层
楼主
发表于 2013-2-20 17:12:36 |只看该作者 |倒序浏览
Parallax Normal mapped Properties 视差法线贴图属性Parallax Normal mapped is the same as regular Normal mapped, but with a better simulation of "depth". The extra depth effect is achieved through the use of a Height Map. The Height Map is contained in the alpha channel of the Normal map. In the alpha, black is zero depth and white is full depth. This is most often used in bricks/stones to better display the cracks between them.视差法线贴图与常规的法线贴图类似,不过有了更好的"深度"模拟效果。额外的深度效果是通过Height Map 来完美实现的。这个高度图包含在Normal Map贴图的Alpha通道里边,全黑表示没有高度,而白色表示有高度。这个经常被用来表现砖块或石头的裂缝。The Parallax mapping technique is pretty simple, so it can have artifacts and unusual effects. Specifically, very steep height transitions in the Height Map should be avoided. Adjusting the Height value in the Inspector can also cause the object to become distorted in an odd, unrealistic way. For this reason, it is recommended that you use gradual Height Map transitions or keep the Height slider toward the shallow end.Parallax mapping 技术相当简单,因此它会出现人工痕迹或者异常的效果。尤其是在Height Map里急剧陡峭的高低转换应尽量避免。在检视面板里调整Height值也能改变物体范围但是会造成扭曲古怪的不真实效果。鉴于这个原因,推荐使用高度变化平缓的高度图或者将高度设置比较低。
Specular Properties 高光属性Specular computes the same simple (Lambertian) lighting as Diffuse, plus a viewer dependent specular highlight. This is called the Blinn-Phong lighting model. It has a specular highlight that is dependent on surface angle, light angle, and viewing angle. The highlight is actually just a realtime-suitable way to simulate blurred reflection of the light source. The level of blur for the highlight is controlled with the Shininess slider in the Inspector.Specular 和 Diffuse 使用同样简单的光照模型,另外增加了一个和观察角度相关的反射高光。这个叫做Blinn-Phong 高光模型。它包含了一个反射高光,取决于物体反射高光物体表面角度,光线入射角度和观察角度。这种高光计算方法实际上恰好是模拟实时光源模糊反射的一种方法。高光模糊等级通过检视面板里的Shininess来控制。Additionally, the alpha channel of the main texture acts as a Specular Map (sometimes called "gloss map"), defining which areas of the object are more reflective than others. Black areas of the alpha will be zero specular reflection, while white areas will be full specular reflection. This is very useful when you want different areas of your object to reflect different levels of specularity. For example, something like&nbsp***sty metal would use low specularity, while polished metal would use high specularity. Lipstick has higher specularity than skin, and skin has higher specularity than cotton clothes. A well-made Specular Map can make a huge difference in impressing the player.此外,主纹理的Alpha通道用来做Specular Map(高光贴图,有时称为'Gloss Map') ,定义物体反光区域大小(物体反光率),Alpha通道中黑色区域反光率为零(完全不反光),白色区域反光率为100%(完全反光)。这在想要让物体的不同区域呈现不同反光率时非常有用。比如:生锈的金属会有比较低的反光率,而精制的磨光金属会有比较高的反光率。口红的反光率比皮肤高,而皮肤比棉质的衣服反光率高。一个精心制作的Specular Map能够给玩家产生巨大影响,印象深刻。
Performance 性能Generally, this shader is on the more expensive rendering side. For more details, please view the Shader Peformance page.一般情况下,这个Shader比较耗费渲染资源。更多详细资料请查看Shader Peformance页面。  【来源:互联网】
更多精彩教程,尽在web3D纳金网http://www.narkii.com/college/
分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

关闭

站长推荐上一条 /1 下一条

手机版|纳金网 ( 闽ICP备08008928号

GMT+8, 2024-5-3 01:44 , Processed in 0.084444 second(s), 33 queries .

Powered by Discuz!-创意设计 X2.5

© 2008-2019 Narkii Inc.

回顶部