Manual/PartIII/Specular Shaders
Wikipedia,自由的百科全书
Unlike Diffusion, Specular reflection is viewpoint dependent. According to Snell's Law, light striking a specular surface will be reflected at an angle which mirrors the incident light angle, which makes the viewing angle very important. Specular reflection forms tight, bright highlights, making the surface appear glossy (Specular Reflection.). 不象漫反射,镜面反射与视点相关 . 根据Snell法则,光线发射到一个镜面后将会在某个角度被反射,该角度以曲面法线镜像于入射角,以至视角变的非常重要。镜面反射会产生紧密的高亮区,使得曲面显得有光泽(镜面反射.).
In reality, Diffusion and Specular reflection are generated by exactly the same process of light scattering. Diffusion is dominant from a surface which has so much small-scale roughness in the surface, with respect to wavelength, that light is reflected in many different directions from each tiny bit of the surface, with tiny changes in surface angle. 在现实中,漫反射和镜面反射其实是光产生散射的相同过程。相对于波长,具有很多细小颗粒的粗糙曲面,漫反射占主导地位,光线从曲面的每个细小区域被朝各个不同的方向反射,因为曲面的角度的改变非常细微。 Specular reflection, on the other hand, dominates on a surface which is smooth, with respect to wavelength. This implies that the scattered rays from each point of the surface are directed almost in the same direction, rather than being diffusely scattered. It's just a matter of the scale of the detail. If the surface roughness is much smaller than the wavelength of the incident light it appears flat and acts as a mirror. 另外一方面,考虑波长,镜面反射在曲面光滑的情况下占主导地位,这暗示着从曲面上每个点散射的光线几乎朝着同一个方向而不是被随意发散。这是一个相对的状况。如果曲面的粗糙度远远小于入射光的波长,曲面就显得平坦并可当作一面镜子。
| 注意:
It is important to stress that the Specular reflection phenomenon discussed here is not the reflection we would see in a mirror, but rather the light highlights we would see on a glossy surface. To obtain true mirror-like reflections you would need to use the internal raytracer. Please refer to the proper section of this manual. 非常重要的是,必须强调我们这里讨论的镜面反射现象不是我们看到的一面镜子的倒影,而是我们在一个有光泽的曲面上看到的东西。要获得类似镜子中的倒影你必须使用光线跟踪器。然而Blender不是一个光线跟踪器,但通过仔细的应用贴图它可以产生令人信服的类似镜子的表面,后面将会展示。 |
Like Diffusion, Specular reflection has a number of different implementations,
or specular shaders. Again, each of these implementations
shares two
common parameters: the Specular colour and the
energy of the specularity, in the [0-2] range. This effectively allows
more energy to be shed as specular reflection as there is incident energy.
As a result, a material has at least two different colors, a diffuse,
and a specular one. The specular color is normally set to pure white, but it can
be set to different values to obtain interesting effects.
The four specular shaders are:
类似漫反射,镜面反射也有许多不同的实现方法,或称镜面着色器。 同样, 每种实现方法使用两个公共的参数: 镜面颜色 和镜面光能量,后者限制在 [0-2] 的区间。 这就允许比入射光能更多的能量被镜面反射。因此,一个材质至少有两种不同的颜色,漫反射光颜色和镜面反射光颜色。镜面反射光颜色通常设为纯白色,但可以被设为其他颜色来获取有趣的效果。
四种高光着色器是:
- CookTorr - This was Blender's only Specular Shader up to version 2.27. Indeed, up to that version it was not possible to separately set diffuse and specular shaders and there was just one plain material implementation. Besides the two standard parameters this shader uses a third, hardness, which regulates the width of the specular highlights. The lower the hardness, the wider the highlights.这是Blender一直到2.27都仅有的着色器。事实上,一直到该版本都不能分开设置漫反射和镜面反射处理明暗的方式(着色器)。而且只有一个普通的材质实现方法。 除了两个标准参数外该着色器使用了第三个参数, 硬度, 它调节镜面高亮的宽度。硬度越低,高亮区越宽。
- Phong - This is a different mathematical algorithm, used to compute specular highlights. It is not very different from CookTorr, and it is governed by the same three parameters. It is more focused on plastics, though.这是一个不同的数学算法,用来计算镜面反射的高亮部分。它与CookTorr没有显著的差别,而且使用相同的三个参数。
- Blinn - This is a more 'physical' specular shader, thought to match the Oren-Nayar diffuse one. It is more physical because it adds a fourth parameter, an index of refraction (IOR), to the aforementioned three. This parameter is not actually used to compute refraction of rays (a ray-tracer is needed for that), but to correctly compute specular reflection intensity and extension via Snell's Law. Hardness and Specular parameters give additional degrees of freedom.这是一个更加自然的镜面着色器,当作漫反射中Oren-Nayar着色器相当的一个。它更加自然,因为在前述的三个参数的基础上增加了第四个参数折射率 (IOR),这个参数不仅用于计算光线的折射(光线跟踪器需要),而且矫正了镜面反射光强的计算并扩展了Snell法则。硬度和镜面反射参数提供了额外的自由度。
- Toon - This specular shader matches the Toon diffuse one. It is designed to produce the sharp, uniform highlights of toons. It has no hardness but rather a Size and Smooth pair of parameters which dictate the extension and sharpness of the specular highlights.这个镜面着色器与漫反射中的卡通着色器相匹配。它被设计为产生 锐化的,均衡的卡通图片的高亮区。它没有硬度参数但有成对的尺寸和光滑度参数来体现镜面高亮区的范围和锐利度。
- WardIso - This specular shader is focused mainly to plastic materials. Compared to the shader Phong, this shader has the specular highlight more defined. It use a supplementary parameter, rms.这种着色器主要着眼于塑料材质。与Phong着色器相比,这个着色器对镜面高光有更多的定义。它使用了一个补充的参数,rms.
Thanks to this flexible implementation, which keeps separate the diffuse and specular reflection phenomena, Blender allows us to easily control how much of the incident light striking a point on a surface is diffusely scattered, how much is reflected as specularity, and how much is absorbed. This, in turn, determines in what directions (and in what amounts) the light is reflected from a given light source; that is, from what sources (and in what amounts) the light is reflected toward a given point on the viewing plane. It is very important to remember that the material color is just one element in the rendering process. The color is actually the product of the light color and the material color. 感谢这些灵活的实现,它们保持了漫反射和镜面反射现象的分离, Blender允许我们容易的控制发射到曲面上一点的入射光有多少被散射,有多少被镜面反射,以及有多少被吸收。反过来说,这确定了一个给定的光源其在曲面上反射光朝什么方向(以及多少数量);那就是,朝给定一个投影平面上的点有哪些光源(有多少数量)的反射光。非常重要的是记住材质的颜色只是渲染过程中的一个元素。最终的颜色实际上是光的颜色与材质颜色的综合物。
|

