Specular mode: Specular parameter 高光模式:高光参数 Standard Shader系列7

本文主要解析Unity的Specular高光模式和参数,探讨如何通过Specular控制高光的亮度和颜色,以及Smoothness参数如何影响高光的清晰度。在高光模式下,RGB颜色决定高光反射强度和色调,而Smoothness控制反射的清晰度。通过使用纹理贴图,可以实现材质表面不同区域的高光效果差异化。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Specular mode: Specular parameter 高光模式:高光参数

本文档主要是对Unity官方手册的个人理解与总结(其实以翻译记录为主:>)
仅作为个人学习使用,不得作为商业用途,欢迎转载,并请注明出处。
文章中涉及到的操作都是基于Unity2018.3版本
参考链接:https://docs.unity3d.com/Manual/StandardShaderMaterialParameterSpecular.html
在这里插入图片描述

Specular parameter

The Specular parameter is only visible when using the Specular setup, as shown in the Shader field in the image above. Specular effects are essentially the direct reflections of light sources in your Scene, which typically show up as bright highlights and shine on the surface of objects (although specular highlights can be subtle or diffuse too).
高光参数只有在使用高光设置时才可见,如上图中的Shader字段所示。高光效果本质上是你的场景中光源的直接反射,它通常以明亮的高光出现并照射在物体的表面(尽管高光也可以是精细调节的或漫反射产生的)。
在这里插入图片描述

Both the Specular setup and Metallic setup produce specular highlights, so the choice of which to use is more a matter of setup and your artistic preference. In the Specular setup you have direct control over the brightness and tint colour of specular highlights, while in the Metallic setup you control other parameters and the intensity and colour of the specular highlights emerge as a natural result of the other parameter settings.
高光设置和金属设置都会产生高光的高光,所以选择使用哪种高光更多的是一个设置和你的艺术偏好的问题。在高光设置中,你可以直接控制高光的亮度和颜色,而在金属设置中,你可以控制其他参数,高光的强度和颜色是其他参数设置的自然结果。

When working in Specular mode, the RGB colour in the Specular parameter controls the strength and colour tint of the specular reflectivity. This includes shine from light sources and reflections from the environment. The Smoothness parameter controls the clarity of the specular effect. With a low smoothness value, even strong specular reflections appear blurred and diffuse. With a high smoothness value, specular reflections are crisper and clearer.
在高光模式下工作时,高光参数中的RGB颜色控制着高光反射率的强度和颜色。这包括来自光源的光和来自环境的反射。平滑度参数控制高光效果的清晰度。如果光滑度值较低,即使是强烈的镜面反射也会出现模糊和漫反射。高光平滑度越高,高光反射更加清晰。
在这里插入图片描述
The Specular Smoothness values from 0 to 1

You might want to vary the Specular values across the surface of your material - for example, if your Texture contains a character’s coat that has some shiny buttons. You would want the buttons to have a higher specular value than the fabric of the clothes. To achieve this, assign a Texture map instead of using a single slider value. This allows greater control over the the strength and colour of the specular light reflections across the surface of the material, according to the pixel colours of your specular map.
你可能想要改变材质表面的高光值——例如,如果你的贴图包含有一些有闪亮纽扣的人物外套。你会希望纽扣的高光值高于衣服的布料。要实现这一点,赋值一个纹理贴图,而不是使用一个滑块值。这样就可以根据高光贴图的像素颜色,更好地控制反射光在材质表面的强度和颜色。

When a Texture is assigned to the Specular parameter, both the Specular parameter and Smoothness slider disappear. Instead, the specular levels for the material are controlled by the values in the Red, Green and Blue channels of the Texture itself, and the Smoothness levels for the material are controlled by the Alpha channel of the same Texture. This provides a single Texture which defines areas as being rough or smooth, and have varying levels and colors of specularity. This is very useful when working Texture maps that cover many areas of a model with varying requirements; for example, a single character Texture map often includes multiple surface requirements such as leather shoes, fabric of the clothes, skin for the hands and face, and metal buckles.
当纹理被指定为高光参数时,高光参数和平滑滑块(无此项)都会消失。相反,材质的高光层由贴图本身的红、绿、蓝通道值控制,材质的平滑层由相同贴图的Alpha通道控制。这提供了一个单一的纹理,它将区域定义为粗糙或光滑,并具有不同的高光层和颜色。这在处理纹理映射时非常有用,纹理映射覆盖了模型的许多区域,并且具有不同的需求;例如,一个角色纹理图通常包括多个表面需求,如皮鞋、衣服的面料、手和脸的皮肤,以及金属扣。
在这里插入图片描述
An example of a 1000kg weight with a strong specular reflection from a directional light.
这是一个1000公斤重的例子,带有来自方向光的强高光反射。

Here, the specular reflection and smoothness are defined by a colour and the Smoothness slider. No Texture has been assigned, so the specular and smoothness level is constant across the whole surface. This is not always desirable, particularly in the case where your Albedo Texture maps to a variety of different areas on your model (also known as a Texture atlas).
在这里,高光反射和平滑度由颜色和平滑滑块定义。由于没有赋值纹理,所以整个表面的高光和平滑程度是恒定的。这并不总是可取的,特别是在您的反照率纹理映射到模型上的各种不同区域的情况下(也称为纹理图集)。
在这里插入图片描述
The same model, but with a specular map assigned, instead of using a constant value.
相同的模型,但使用高光贴图,而不是使用常量值。

Here, a Texture map controls the specularity and smoothness. This allows the specularity to vary across the surface of the model. Notice the edges have a higher specular effect than the centre, there are some subtle colour responses to the light, and the area inside the lettering no longer has specular highlights. Pictured to the right are the RGB channels controlling the specular colour and strength, and the Alpha channel controlling the smoothness.
在这里,纹理贴图控制高光和平滑。这允许在模型的表面上高光有变化性。注意边缘比中心有更高的高光效果,对光线有一些微妙的颜色反应,字母内部的区域不再有高光。右图是控制高光颜色和强度的RGB通道,以及控制平滑度的Alpha通道。

Note: A black specular color (0,0,0) results in nulling out the specular effect.
注:黑色高光(0,0,0)会使高光效果为零。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值