纳金网

标题: 内置着色器指南之标准着色器家族:高光着色器 [打印本页]

作者: .    时间: 2013-2-20 17:10
标题: 内置着色器指南之标准着色器家族:高光着色器
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 moderately expensive to render. For more details, please view the Shader Peformance page.一般情况下,这个Shader比较耗费渲染资源。更多详细资料请查看Shader Peformance页面。
【来源:互联网】
更多精彩教程,尽在web3D纳金网http://www.narkii.com/college/




欢迎光临 纳金网 (http://rs.narkii.com/club/) Powered by Discuz! X2.5