Introduction to Unity-Chan Toon Shader 2

本文档主要是对UTS2官方手册的个人理解与总结(其实以翻译记录为主:>)
仅作为个人学习使用,不得作为商业用途,欢迎转载,并请注明出处。
翻译中有些术语不准确,但不影响理解的,不再一一调整,有些简单的示例可能会被跳过,请谅解。
参考链接:https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/blob/master/Manual/UTS2_Manual_en.md

Unity-Chan Toon Shader (UTS) is a toon shader for images and video that is designed to meet the needs of creators working on cel-shaded 3DCG animations.
Unity-Chan Toon Shader(UTS)是一个用于图像和视频的卡通(Toon)着色器,旨在满足3DCG动画创作者的需要。

[外链图片转存失败(img-kye4nSwD-1562039279774)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UT2018_UTS2_SuperTips_10.jpg)]
This Toon shader is configured to easily produce all shadows essential to character design, such as those that accentuate the form of various parts of a character model, without having to worry about the position and intensity of light sources. Shadow color settings can also be used to make it easy for the person responsible for color design to create shadows.
这个Toon着色器可以很容易地生成角色设计所需的所有阴影信息,比如那些强调角色模型各个部分形状的阴影,而不必担心光源的位置和强度。阴影颜色设置也可以用来让负责色彩设计的人更容易地创建阴影。

One of this shader’s particularly powerful features is the ability to adjust shadows using sliders within the shader itself, eliminating the need for multiple light sources.
这个着色器的一个特别强大的功能是能够在着色器内部使用滑块调整阴影,消除了对多个光源的需要(不需要多个光源)。

[外链图片转存失败(img-rreGyfDQ-1562039279775)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/0713-06_01.jpg)]
Performance was greatly enhanced in Unity-Chan Toon Shader Ver. 2.0; the same rendering capabilities as Ver. 1.0 were retained while also allowing for an even more sophisticated look.
在UTS 2中,性能得到了极大的提高。保留了1.0相同的渲染功能,同时允许更复杂的外观。

[外链图片转存失败(img-2gFPscuO-1562039279775)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/SS_SampleScene.jpg)]
In addition to the 3 basic layers of Base Color, 1st Shade Color, and 2nd Shade Color, colors and textures can also accept a wide variety of customization options, such as High Color, Rim Light, MatCap (sphere mapping), and Emissive (light emission).
除了基本色、一阶阴影色和二阶阴影色这3个基本层之外,颜色和纹理还可以接受多种定制选项,比如高光(High Color)、Rim Light(轮廓光)、MatCap(球面映射)和Emissive(自发光)。

[外链图片转存失败(img-uNCvFvjf-1562039279776)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UT2018_UTS2_SuperTips_11.jpg)]
The level of gradation between colors can also be adjusted in Unity in real-time.
颜色之间的渐变也可以在Unity中实时调整。

[外链图片转存失败(img-YR7xzzgo-1562039279776)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UT2018_UTS2_SuperTips_13.jpg)]
This shader also has 2 options for creating fixed shadows necessary to the design: the Position Map, which assigns a set casting point to each shadow, and the Shading Grade Map, which can adjust shadow intensity based on the lighting.
这个着色器也有2个选项来创建设计所需的固定阴影:阴影位置贴图,它为每个阴影分配一个设置的投射点;阴影等级图,它可以根据光照调整阴影强度。

There are several other convenient tools for things like how visible eyes and eyebrows are through bangs, which can further emphasize an anime-style look.
还有其他一些方便的工具,比如眼睛和眉毛通过刘海的可见程度,可以进一步强调日本动漫的风格。

In short, Unity-Chan Toon Shader 2.0 (UTS2) makes a wide variety of character designs possible, from cel-shaded to light novel illustration styles.
简而言之,Unity-Chan Toon Shader 2.0 (UTS2)使各种各样的人物设计成为可能,从cel-shaded到light新颖的插画风格。

Of course, it also supports Unity’s system shadow feature.
当然,它也支持Unity的系统阴影功能。

[外链图片转存失败(img-BDvE7ReB-1562039279777)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/Comp_ST_UTS2.jpg)]
[外链图片转存失败(img-YcgJy9xI-1562039279777)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/Comp_ST_UTS2_2.jpg)]
Adding post effects allows UTS2 to use non-photorealistic rendering (NPR) to create any picture-like element that can be made with a standard shader that supports physics-based rendering (PBR).
添加后期效果(post effects)允许UTS2使用非真实感渲染(NPR)创建任何类似于图片的元素,这些元素可以使用支持基于物理的渲染(PBR)的标准着色器生成。

Several techniques have been implemented to beautifully display characters in a variety of lighting environments, thanks to recent feedback from VRChat users.
由于最近来自VRChat用户的反馈,已经实现了几种技术来在各种照明环境中漂亮地显示角色。

See for yourself by coloring your best character model with Unity-Chan Toon Shader 2.0 (UTS2).
您自己可以通过使用UTS2为您最好的角色模型着色。

You may be surprised to see your character looking better than ever before.
你可能会惊讶地发现你的角色看起来比以前更好了。

This manual focuses on the newest version of Unity-Chan Toon Shader Ver. 2.0: UTS2 v.2.0.5 Release.
本手册主要介绍UTS2的最新版本:v.2.0.5发行版。

Development Environment 开发环境

Unity-Chan Toon Shader Ver. 2.0 is developed based on Unity 5.6.3p1, and verification of compatibility with the latest versions of Unity 2018.x is ongoing.
UTS2是基于Unity 5.6.3p1开发的,并验证了与最新版本Unity 2018.x的兼容性。

(However, as version 5.6.3p1 is in the legacy pipeline, it is not currently compatible with SRP).
(但是,由于5.6.3p1版本在传统渲染管线中实现,所以它目前与SRP不兼容)

Target Environment 目标环境

Unity 5.6.x or later is required. This shader is confirmed to be compatible with Unity 2017.4 15f1 LTS. Unity 2018.1.0f2 and later versions can also be used.
This package is developed in Unity 5.6.3p1.

This package uses a forward rendering environment. Using a linear color space is recommended.
此包使用前向渲染环境。建议使用线性颜色空间。
(A gamma color space can also be used, but this tends to strengthen shadow gradiation. For more details, see Linear or Gamma Workflow. )
(伽玛空间也可以使用,但这往往加强阴影梯度。有关详细信息,请参见线性或Gamma工作流。)

Download the project

Installation

Basic UTS2 Settings

For those completely new to UTS2, practicing “making a picture with Step and Feathering using only the Base Color and 1st Shade Color” is recommended, rather than immediately attempting to use all the available features.
对于UTS2的新手,建议练习“只使用基本颜色和第一个阴影颜色来制作带有分级和渐变的着色”,而不是立即尝试使用所有可用的特性。

It is important to first become familiar with the basics of UTS2, then gradually add rim lights and a 2nd Shade Color if necessary.
首先要熟悉UTS2的基本知识,然后在必要时逐渐添加轮廓光和第二层阴影颜色,这一点很重要。

Feel free to use the following video for reference while practicing.
练习时请随意使用以下视频作为参考。

Using the Different Shaders in UTS2

Opening the shader class (UnityChanToonShader) installed by Unity-Chan Toon Shader 2.0 (UTS2) shows that it contains a variety of shader files.
打开UTS2的Shader文件夹下会发现很多文件。

At this point, most users would simply close this; instead take a closer look at the various name blocks in the menu. These name blocks (Toon, DoubleShadeWithFeather, Clipping, StencilMask, etc.) are actually one of the most basic features of UTS2. This structure ensures that shaders that have the same name block as one shown in the menu will have the same features.
此时,大多数用户不需要关心它;相反,请仔细查看Shader菜单中的各种名称。这些名称块(Toon、DoubleShadeWithFeather、Clipping、StencilMask等)实际上是UTS2最基本的特性之一。此结构确保具有与菜单中显示的名称相同的着色器具有相同的特性。

Now, let’s take a look at each name block and their features.
现在,让我们看看每个名称块及其特性。

The Shaders in the UnityChanToonShader Root Folder Shaders菜单中UnityChanToonShader根目录

[外链图片转存失败(img-ACGaZqrE-1562039279778)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2_Standard.jpg)]
UTS2 shaders fall into two main categories.
UTS2着色器分为两大类。

  • DoubleShadeWithFeather : The standard shader for UTS2. Allows for 2 shade colors (Double Shade Colors) and gradation between colors (Feathering). UTS2的标准着色器。允许两种阴影色(双阴影色)和颜色之间的渐变(平滑)。
  • ShadingGradeMap: A more advanced UTS2 shader. In addition to the DoubleShadeWithFeather features, this shader can also hold a special map called a ShadingGradeMap. 一个更高级的UTS2着色器。除了DoubleShadeWithFeather特性外,这个着色器还可以保存一个称为ShadingGradeMap的特殊贴图。

[外链图片转存失败(img-XWnfnD1N-1562039279778)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/Comp_UTS2_Shaders.jpg)]
Both types have the same basic features, so the same look can be achieved with either type by matching the color (_Step) and gradation (_Feather) values.
这两种类型都具有相同的基本特性,因此通过匹配颜色类型/分级(_Step)和渐变(_Feather)值,可以用任何一种类型实现相同的外观。

Choosing which shader to use is a matter of personal taste, but generally DoubleShadeWithFeather is more suited to cel styles that need sharp, well defined colors, while ShadingGradeMap may be better for illustrated styles where the colors are more blurred together.
选择使用哪个着色器是个人喜好的问题,但是一般来说,DoubleShadeWithFeather更适合需要锐利的、定义良好的颜色的卡通(cel)风格,而ShadingGradeMap可能更适合颜色更加模糊的插画(illustrated )风格。

Additionally, having Toon at the beginning of the shader name means that the shader can create outlines using the object inversion formula.
此外,在着色器名称的开头有Toon意味着着色器可以使用对象反转公式创建勾边。

Outlines in UTS2 have a lot of customization options: the strength of outlines made with dedicated textures, the level of blending with the Base Color, camera base offset, and more.
UTS2中的勾边有很多自定义选项:用专用纹理制作勾边的强度、与基本颜色的混合程度、基于相机偏移量等等。

Shader names also have name blocks such as Clipping at the end. These indicate the following kinds of features.
着色器名称也有名称块,比如末尾的裁切Clipping。这表明了以下几种特性。

  • Clipping: Shader contains a clipping mask, a kind of “texture omitter” capable of things like cut outs, dissolves, etc.
    裁切:着色器包含一个裁切蒙版,一种“纹理省略”,可以剪切、溶解等。
  • TransClipping: Also indicates a clipping mask, but takes the mask’s αTransparency into account when omitting a texture. This allows for better omission, but creates a greater load than Clipping.
    透明裁切:也是一个裁切蒙版,但考虑了蒙版的alpha 透明当作纹理省略的依据。这允许更好的省略,但是创建了比单裁切更大的负载。
  • StencilMask: Uses the stencil buffer to designate how visible certain parts are through others. For example, for an anime style character it may be desirable to always have the eyebrows visible instead of covered by the character’s bangs. This shader must always be used with a StencilOut type shader.
    模板遮罩:使用模板缓冲区指定某些部分通过其他部分的可见性。例如,对于动画风格的角色来说,最好总是让眉毛露出来,而不是被刘海遮住。此着色器必须始终与StencilOut类型着色器一起使用。
  • StencilOut : Used together with StencilMask type shaders. In the above example, this shader would be set on the “bangs” part to make them transparent so that the “eyebrows” parts are visible.
    模板去除:与StencilMask类型着色器一起使用。在上面的例子中,这个着色器将设置在“刘海”部分,使它们透明,以便“眉毛”部分可见。
    [外链图片转存失败(img-0dTO9Il0-1562039279778)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/1230-11_10.jpg)]
    The Shaders in the UnityChanToonShader/NoOutline Folder

[外链图片转存失败(img-sQ7NiKHB-1562039279779)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2_NoOutline.jpg)]
The shaders in the NoOutline folder have ToonColor at the front of their names, but here this indicates that the shader does not have the outline feature.
NoOutline文件夹中的着色器的名称前面有ToonColor,但在这里这表示着色器没有勾边特性。

Parts without the outline function will have one less drawing pass, so these shaders are ideal for designs that do not require outlines or when using high accuracy toon line shaders like PSOFT Pencil+ 4 Line for Unity.
没有勾边功能的部件将会少一个的渲染pass,所以对不需要勾边或在Unity中使用高精度卡通Line着色器如PSOFT Pencil+ 4 Line之外,这些着色器是更好的选择。

[外链图片转存失败(img-cx9H1h97-1562039279779)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/ToonColor_Transparent.jpg)]
Some of the NoOutline shaders have the Transparent name block at the end of their names.
一些没有勾边着色器的名称末尾有一个透明的名称块。
These are special transparency shaders. They are useful for parts meant to have a “blush” look, or for glass and glass-like objects.
这些是特殊的透明着色器。它们适用于具有“粉红色”外观的部件,或用于玻璃和类似玻璃的物体。

[外链图片转存失败(img-6WUXYhgV-1562039279780)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/CheekMaterialSetting.jpg)]
The Shaders in the UnityChanToonShader/AngelRing Folder

[外链图片转存失败(img-k8xCQLRe-1562039279780)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2_AngelRing.jpg)]
The AngelRing folder contains shaders with an “angel ring” feature.
天使之环文件夹包含带有“天使之环”特性的着色器。

The “angel ring” is a highlight effect, as demonstrated in the image below. They have a fixed position from the camera’s perspective.
“天使之环”是一个高光效果,如下图所示。从透视相机的角度看,它们有一个固定的位置。

[外链图片转存失败(img-LNrNibaH-1562039279780)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/AR_Image.jpg)]
Only UTS2’s hi-spec ShadingGradeMap shaders and their variant ShadingGradeMap_TransClipping shaders have this “angel ring” feature.
只有UTS2的高规格ShadingGradeMap着色器及其变体ShadingGradeMap_TransClipping着色器才具有这种“天使之环”特性。

These shaders are primarily used in “hair” parts, which puts them in a similar category to StencilOut shaders, which are omitted by stencils.
这些着色器主要用于“毛发”部分,这使它们与模板去除着色器处于类似的类别。

The Shaders in the UnityChanToonShader/Mobile Folder

[外链图片转存失败(img-6Yhi293m-1562039279781)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2_Mobile.jpg)]
Lightweight versions of shaders, intended for Mobile and VR content, that generally won’t change the look of objects can be found in the Mobile folder.
轻量级着色器版本,适用于移动和VR内容,通常不会改变对象的外观,可以在Mobile文件夹中找到。

The following features are restricted in order to make these shaders lighter for mobile platforms.
为了使这些着色器在移动平台上更轻,限制了以下特性。

  • Only one real-time directional light may be used (multiple lights and real-time point lights are also unsupported).
    只能使用一个实时方向光(不支持多个光和实时点光源)。
  • Point lights are supported by using baked point lights and light probes. This may require certain adjustments to GI_Intensity.
    支持由点光源和光探针烘焙的点光源。这可能需要对GI_Intensity进行某些调整。

Mobile shader properties are compatible with normal Toon_DoubleShadeWithFeather shaders and Toon_ShadingGradeMap shaders, so if the above features are acceptable, mobile shaders can be substituted for their standard versions in order to improve rendering performance.
移动端着色器属性与普通的Toon_DoubleShadeWithFeather着色器和Toon_ShadingGradeMap着色器兼容,因此,如果上述特性是可接受的,可以用移动着色器替换它们的标准版本,以提高渲染性能。

The Mobile/AngelRing folder contains mobile shaders that support the “angel ring” feature.
Mobile/AngelRing 文件夹包含支持“天使之环”特性的移动着色器。

The basic features of each shader are identical to their standard version counterparts.
每个着色器的基本特性都与标准版本相同。

The Shaders in the UnityChanToonShader/Tessellation Folder

[外链图片转存失败(img-UCbuemyS-1562039279781)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2_Tess.jpg)]
UTS2 shaders that support DirectX 11 Phong Tessellation can be found in the Tessellation folder.
支持directx11 Phong细分方式的UTS2着色器可以在Tessellation 文件夹中找到。

Phong Tessellation corrects the position of subdivided surfaces so that they will be more closely aligned with the mesh’s normal vectors. It’s an effective method for smoothing low-poly meshes.
Phong细分修正了细分曲面的位置,使它们更接近网格的法向量。这是一种有效的低网格平滑方法。

UTS2 can only use Phong Tessellation with DirectX 11 in a Windows environment.
UTS2只能在Windows directx11环境中使用Phong细分。

The Tessellation/Light folder contains lightweight versions of the Tessellation shaders with the same restrictions as the Mobile shaders.
Tessellation/Light文件夹包含轻量级版本的细分着色器,具有与移动着色器相同的限制。

The rest of the folders also contain versions of the previously described shaders, with added support for Phong Tessellation.
其他文件夹还包含前面描述的着色器的版本,增加了对Phong细分的支持。

[外链图片转存失败(img-j0jkaJwe-1562039279782)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/DX11Tess.jpg)]
Adding Phong Tessellation noticeably improves the quality of outlines and other small details such as the lips.
添加Phong细分明显提高了勾边和其他小细节的质量,如嘴唇。

These shaders are primarily intended for pre-rendered content, however they also have applications in high-end VR character content with requirements such as having characters get very close to the user.
这些着色器主要用于预渲染内容,但它们也适用于高端VR角色内容,比如让角色非常接近用户。

The shaders in the UnityChanToonShader/Helper Folder
[外链图片转存失败(img-wlDPbwRy-1562039279782)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2_Helper.jpg)]
The Helper folder contains shaders that are only used to show the outline object.
Helper文件夹包含仅用于显示勾边对象的着色器。

The outline object can be applied to a character as a multi-material.
勾边对象可以作为多材质应用于角色。

[外链图片转存失败(img-RP6Ib0xG-1562039279782)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/OutlineHelper.jpg)]
Add outlines by going to the mesh’s Skinned Mesh Renderer > Materials and increasing Size by 1, then register the desired outline material.
添加勾边通过进入网格的蒙皮网格渲染器>材质大小增加1,然后注册所需的勾边材质。

Warning: The outline will be added on top of the other materials, which will increase the PC burden. Keep this in mind when using these shaders…
警告:轮廓将添加在其他材料之上,这将增加PC的负担。使用这些着色器时请记住这一点。

Sample Scenes

The following sample scenes can be found by opening a project and opening the \Assets\Sample Scenes folder.
通过打开一个项目并打开\Assets\ sample scenes文件夹,可以找到以下示例场景。

  • BoxProjection.unity :Lighting a dark room using Box Projection. 投射光照到黑房子中
  • ToonShader.unity :Settings for an illustration-style shader. 插画风格着色器
  • ToonShader_CelLook.unity :Settings for a cel-style shader. 卡通风格着色器
  • ToonShader_Emissive.unity :Settings for a shader with an emissive . 自发光着色器
  • ToonShader_Firefly.unity :Multiple real-time point lights. 多个实时点光源
  • Baked Normal\Cube_HardEdge.unity:Baked Normal reference. 烘焙法线引用
  • Sample\Sample.unity :Introduction to the basic UTS2 shaders. 基本的UTS2 着色器
  • ShaderBall\ShaderBall.unity:UTS2 settings on an example shader ball. 着色器球示例
  • PointLightTest\PointLightTest.unity:Sample of cel-style content with point lights. 卡通风格受点光源的示例
  • SSAO Test\SSAO.unity :Test for SSAO in PPS. 后期效果SSAO
  • NormalMap\NormalMap.unity :Tricks for using the normal map with UTS2. 使用法线贴图到UTS2上的技巧
  • LightAndShadows\LightAndShadows.unity:Comparison between the standard shader and UTS2. 标准着色器和UTS2之间的比较
  • AngelRing\AngelRing.unity:”Angel ring” and ShadingGradeMap sample. 天使之环与ShadingGradeMap示例
  • MatCapMask\MatCapMask.unity:MatcapMask sample. MatcapMask示例
  • EmissiveAnimation\EmisssiveAnimation.unity:EmissiveAnimation sample. 自发光动画示例

Each scene is intended as a reference for the relevant shader and lighting settings.
每个场景都是作为相关着色器和光照设置的参考
They should come in handy as an example when creating your own scenes.
在创建自己的场景时,它们应该作为一个示例派上用场。

“Basic Shader Settings” Menu for UTS2

[外链图片转存失败(img-cmUOvfTC-1562039279783)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_01_00.jpg)]
In this menu, in addition to performing the basic setting of UTS2, you can specify reference number of stencil buffer, set culling method, and specify what kind of mask is set for each clipping shader.
在这个菜单中,除了执行UTS2的基本设置外,还可以指定模板缓冲区的参考编号、设置 裁切culling 方法,以及为每个裁切clipping 着色器设置哪种掩码。

※ Hint: The culling formula applies to every shader, but stencil and clipping settings only apply to shaders which use those settings.
※提示:裁切culling 公式适用于所有着色器,但模板和剪切clipping 设置只适用于使用这些设置的着色器。

Items in the menu are automatically expanded to the following maximum format according to the type (function) of the shader.
根据着色器的类型(函数),菜单中的项将自动扩展为最大格式。
[外链图片转存失败(img-YfUGK9Tt-1562039279783)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_01_01.jpg)]

Item Function Property
Stencil No Used by StencilMask / StencilOut shaders. Designates a stencil reference number between 0 - 255 (note that in some cases 255 carries a special significance). Matches the number for the cutting material and the material to be cut. _StencilNo
模板编号 用于StencilMask/StencilOut 着色器。指明0-255作为一个模板编号(有些案例255会作为特殊指令)。匹配裁切材质的编号和裁切。
Clipping Mask Used by Clipping / TransClipping shaders. Designates the grayscale clipping mask. White indicates “none”. If no settings are chosen, the clipping feature will be inactive. _ClippingMask
裁切蒙版 用于Clipping /TransClipping 着色器。指明灰度图作为裁切蒙版。白色代表“none”。如果没有设置,裁切特性将处于非活动状态。
Inverse Clipping Mask Inverts the clipping mask. _Inverse_Clipping
裁切蒙版反转 1 - 剪辑蒙版
Clipping Level Designates the strength of the clipping mask. _Clipping_Level
裁切水平 指定剪切蒙版的强度
Transparency Level Used by TransClipping shaders. Adjusts the transparency level by treating the clipping mask grayscale level as an α value. _Tweak_transparency
透明水平 用于TransClipping 着色器。调整透明度通过处理裁切蒙版灰色水平作为alpha值
Use BaseMap α as Clipping Mask A property only found in TransClipping shaders. Checking this property will use the A channel, including the BaseMap, as a clipping mask. Designating a ClippingMask is not required. _IsBaseMapAlphaAsClippingMask
用主贴图alpha作为裁切蒙版 只出现在TransClipping 着色器。检查此属性将使用A通道(包括BaseMap)作为裁切蒙版。不需要指定裁切蒙版。
Current UI Type The current selection of user interface is displayed on the button. By pressing the button, you can switch UTS2’s GUI to Beginner mode. In Beginner mode, you can control basic UTS2 functions only. Toggle back to Pro / Full Controll mode.
当前UI类型 按钮上显示当前用户界面的选择。通过按下按钮,您可以将UTS2的GUI切换到初学者模式。在初学者模式中,您只能控制基本的UTS2功能。切换回专业/完全控制模式。
VRChat Recommendation Set up convenient settings for enjoying VRChat all at once. When setting up for VRChat, recommend you to start from this button first.
VRChat 推荐 设置适当的设置,共享VRChat所有设置。在设置VRChat时,建议您首先从这个按钮开始。
Remove Unused Keywords/Properties from Material Just before building your project or publishing It to VRChat system, execute this command to remove unnecessary shader keywords and unused property values from UTS2 materials. These values will naturally accumulate while your working on Unity. By removing these unnecessary values from each material before publishing, it is possible to avoid giving unnecessary load to the system. After executing this command, be sure to save the project by executing File> Save Project just in case (because all materials are saved at this time).
从材质中删除未使用的关键字/属性 在构建您的项目或将其发布到VRChat系统之前,执行此命令从UTS2材质中删除不必要的着色器关键字和未使用的属性值。当你使用Unity的时候,这些值自然会积累起来。通过在发布之前从每个材质中删除不必要的值,可以避免给系统带来不必要的负载。执行此命令后,请确保通过执行File> Save Project来保存项目,以防万一(因为此时已保存了所有材料)

[外链图片转存失败(img-Ac3IwcLz-1562039279783)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/0102-06_02.jpg)]
TransClipping shaders have the same general features as Clipping shaders, but can also use the clipping mask grayscale level as an α value.
TransClipping着色器和Clipping 着色器有着一样的特性,但也可以使用剪切蒙版灰度水平作为alpha值。

These shaders are often used to cut the ends of long, straight hair using a mask which references the alpha, or for things like strands of hair that stick up out of the top of a character’s head.
这些着色器通常用于使用一个参照alpha值的蒙版来裁切掉长而直的头发的末端,或者用来剪掉角色头顶上的头发。

Adjust the transparency level using the Tweak_transparency slider.
使用微调透明(Tweak_transparency )滑块调整透明度级别。

“Basic Three Colors and Control Maps Setups” Menu

[外链图片转存失败(img-imfoPtOx-1562039279784)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_02_00.jpg)]
This Menu defines the basic colors used by UTS2: the Base Color, 1st Shade Color, and 2nd Shade Color.
These colors are arranged in order from the light source’s direction, Base Color⇒ 1st Shade Color ⇒ 2nd Shade Color.
Each color is determined by multiplying each pixel in the texture by each color, then multiplying by the light color.
每种颜色都是由纹理中的每个像素乘以每种颜色,然后乘以光照颜色确定的。

※ Hint: The Shade Colors do not have to be darker than the Base Color, and there’s nothing wrong with making the 2nd Shade Color lighter than the 1st Shade Color. In fact, doing so can give the impression of reflecting light from the environment.
阴影色不必比主色深,第二种阴影色比第一种阴影色浅也没有什么错。事实上,这样做会给人一种反射光的感觉。

※ Hint: The design of the content determines whether the 2nd Shade Color is used or not. If it is not used, there is also no need to designate one.
内容的设计决定了是否使用第二种色调。如果不使用,也没有必要指定一个贴图。

From the submenu, you can also set the sharing setting of texture for basic three colors, normal map, shadow control maps.
在子菜单中,还可以为基本的三种颜色(法线贴图、阴影控制贴图)设置纹理的共享设置。

“NormalMap Settings” Submenu
[外链图片转存失败(img-PWCh2esT-1562039279785)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/Is_NormalToBase.jpg)]

The Normal Map is generally used in UTS2 for Shade Color gradation…
UTS2中通常使用法线贴图进行阴影渐变。

Using the Normal Map along with standard shading allows for more complex gradation effects. In the above image, the left side reflects the normal map in color, the right does not reflect it.
使用法线贴图和标准阴影允许更复杂的渐变效果。在上面的图像中,左侧反射法线贴图的颜色,右侧未反射它。

Besides, the normal map is used to adjust skin texture by using it together with the scale. Also, by preparing a normal map for MatCap, it is used to express hair texture.
此外,使用法线贴图和缩放一起调整皮肤纹理。此外,通过为MatCap准备法线贴图,它可以用来表示头发的纹理。

[外链图片转存失败(img-BEPYR97V-1562039279785)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/NormalMap01.jpg)]
[外链图片转存失败(img-ekSJOUF2-1562039279785)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/NormalMapforMatCap.jpg)]
By using normal maps, you can enjoy various expressions.
通过使用法线贴图,您可以享受各种表达式。

Item Function Property
NormalMap Effectiveness Select whether to reflect the normal map on each color. If the button is Off, that color does not reflect the normal map but is evaluated by the geometry of the object itself.
法线贴图效果 选择是否在每种颜色上反射法线贴图。如果按钮关闭,则该颜色不反映法线贴图,而是由对象本身的几何形状来评估。
3 Basic Colors Set Active when you want the normal map to be reflected in the colors. _Is_NormalMapToBase
当您希望法线贴图在颜色中反射时,将其设置为活动状态
HighColor Set Active when you want the normal map to influence the high color. _Is_NormalMapToHighColor
当您希望法线贴图影响高颜色时,请设置为活动。
RimLight Set Active when you want the normal map to influence the RimLight. _Is_NormalMapToRimLight
当您希望法线贴图影响边缘光时,请设置为活动。

视频
※ Hint: The Normal Map can also be used for pseudo-solid effects like bumps. However, the Normal Map will not actually make the surface of the object’s geometry bumpy and instead will cause the lighting to give the appearance of bumps. Therefore it is necessary to set the Base Color/1st Shade Color/2nd Shade color step so that it is easier for the light to bring out this effect. In the example above, the Base Color step is set to 0.8, the Shade Color step is set to 0.5, and a slightly darker Hi-Color is used to emphasize the object as solid.
※ 注意:法线贴图也可以用于假实体效果,比如凹凸。然而,法线贴图实际上不会使物体的几何表面凹凸不平,相反,它会使光线产生凹凸不平的效果。因此,有必要设置主色/第一阴影/第二阴影的分级,以便于光更容易产生这种效果。在上面的例子中,基本颜色分级设置为0.8,阴影颜色分级设置为0.5,稍微暗一点的Hi-Color用于强调对象为实体。

“Shadow Control Maps” Submenu

Specify the position map and shading grade map to adjust the shadow fall condition.
指定位置图和阴影渐变图来调整阴影效果。

Depending on the shader you use, the items in the sub menu will change.
根据您使用的着色器,子菜单中的项将发生更改。
[外链图片转存失败(img-muv3EchH-1562039279786)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_02_03.jpg)]
1st Shade Position Map:Uses a Position Map to force the 1st Shade Color’s position, independent of the lighting. Indicates areas that must have a shadow in black.
使用位置贴图强制第一个阴影颜色的位置,独立于光照。表明必须有黑色阴影的区域。

【What is the Position Map?】
[外链图片转存失败(img-n6uAYLLn-1562039279786)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/0906-18_03.jpg)]
The Position Map designates shadows that you want to cast regardless of the lighting.
位置贴图指定您想要投射的阴影,而不考虑光照。

It can be added to a material in addition to the lighting, for times when you want a particular shadow to show in each scene or when there are directorial reasons to add shadows.
当你想在每个场景中显示一个特定的阴影,或者有特定的原因需要添加阴影时,它可以添加到除光照之外的材质中。

※ Hint: It might be easier to draw those shadows directly using a 3D painter like Substance Painter, etc.
※提示:直接使用像Substance Painter等3D工具绘制阴影可能会更简单。

【How the 1st and 2nd Shade Color Position Maps Interact】
[外链图片转存失败(img-CJNMxgaS-1562039279787)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/0102-22_03.jpg)]
In order to display the 2nd Shade Color independent of lighting, make sure to fill in the places where the 1st and 2nd Shade Color Position Maps will overlap.
为了在不依赖光照的情况下显示第二阴影颜色,请确保填入第一和第二阴影颜色位置贴图重叠的位置。

This way, even if shadows from other lighting fall on the 2nd Shade Color area, it will continue to show.
这样,即使来自其他光源的照射落在第二个阴影区域,阴影仍将继续显示。

On the other hand, for areas where the 2nd Shade Color doesn’t show (areas designated by the 2nd Shade Color Position Map, but not the 1st Shade Color Position Map), the 2nd Shade Color will only show when covered by shadows created by the lighting.
另一方面,对于第2个阴影颜色不会显示的区域(由第2个阴影颜色位置图指定的区域,但不在第1个阴影颜色位置图),第2个阴影颜色只会在被光照产生的阴影覆盖时才会显示。

ShadingGradeMap Shaders
[外链图片转存失败(img-zqga5dQk-1562039279787)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_02_04.jpg)]

Item Function Property
ShadingGradeMap Designates the Shading Grade Map as grayscale. Be sure to set SRGB (Color Texture) to OFF in the texture import settings for Shading Grade Map. _ShadingGradeMap
阴影渐变图 将阴影渐变图指定为灰度图。阴影渐变图一定要在纹理导入设置中把SRGB(颜色纹理)设置为关闭。
ShadingGradeMap Level Level correction of the gray scale value of Shading Grade Map. The default is 0, and it can be adjusted in a range of ±0.5. _Tweak_ShadingGradeMapLevel
阴影渐变图 水平 阴影渐变图的灰度值的水平校正。默认值为0,可以在±0.5范围内进行调整
Blur Level of ShadingGradeMap Blur the Shading Grade Map using the Mip Map function. To enable Mip Map, set Advanced> Generate Mip Maps to ON in the texture import settings. The default is 0 (no blur). _BlurLevelSGM
阴影渐变图的模糊水平 使用Mip Map功能模糊阴影渐变图。要启用MipMap,请在纹理导入设置中将 Advanced> Generate Mip Maps设置为ON。默认值是0(没有模糊)。

【What is the Shading Grade Map?】

Toon_DoubleShadeWithFeather.shader is the basic shader in UTS2, and that shader is based on the shading grade map, which is a shading gray scale map. The Toon_ShadingGradeMap shader is further expanded to use the UV points to control shadows.
Toon_DoubleShadeWithFeather.shader是UTS2中的基本着色器,该着色器基于阴影渐变图,是一种阴影灰度图。Toon_ShadingGradeMap着色器进一步扩展,使用UV点来控制阴影。(其实前者是使用3 Basic Colors)

[外链图片转存失败(img-zPlZe6p9-1562039279788)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/0122-06_04.jpg)]

Adding the Shading Grade Map to the normal toon shader allows the 1st and/or 2nd Shade Colors to be controlled at the UV point level.
将阴影渐变贴图添加到普通的卡通着色器中,可以在UV点的水平上控制第一和/或第二种阴影颜色。

This map’s fine level of control makes effects like “hiding the wrinkles in clothes when the light hits them” possible.
这张贴图的精细控制使得“当光线照射到衣服上时,隐藏衣服上的皱纹”这样的效果成为可能。

The black portions of an image are handled by the 2nd Shade Color of the Shading Grade Map, and the way shadows fall changes based the gray portions, which depend on the density of the black portions.
图像的黑色部分由阴影渐变图的第二阴影颜色处理,阴影下降的方式基于灰色部分,这取决于黑色部分的密度。

The denser the gray, the more easily shadows fall, so shadows can also fall between two gray areas.
灰色越密集,阴影越容易落下,所以阴影也可以落在两个灰色区域之间。

Applying a shading map like the Ambient Occlusion map to the shading grade map makes it easier for shadows to fall depending on the lighting. This is useful for things like creating shadows that follow hair bangs or the concave parts of clothing.
将阴影贴图(如环境遮挡贴图)应用到阴影渐变贴图上,可以使阴影更容易地随光照的变化而下降。这对于在刘海后面或衣服的凹部创建阴影很有用。

“Basic Lookdevs : Shading Step and Feather Settings” Menu
[外链图片转存失败(img-ciIFwlE2-1562039279788)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_03_00.jpg)]
This block is where the Base Color/1st Shade Color/2nd Shade Color Step and the Feathering Intensity are set. In addition to the real-time directional light settings, these are the most important settings in UTS2. These settings will determine the basic look of your content. This menu is where basic items for making Cel and Illustration Styles are gathered.
这个块是设置基本颜色/第一阴影颜色/第二阴影颜色分级和平滑的地方。除了实时定向光设置,这些是UTS2中最重要的设置。这些设置将决定内容的基本外观。这个菜单集中了制作卡通和插画风格的基本参数。

These settings can be checked repeatedly in real-time in Unity.
这些设置可以在Unity中实时反复检查。

There is no need to render and confirm the effects of every single property change, making it easier to deliberately design and assemble content.
不需要渲染和确认每个属性更改的效果,从而更容易有目的地设计和组装内容。

Adjust the Step and Feather parameters to create totally different looks, without changing the direction of the light source.
调整分级和平滑参数,创建完全不同的外观,而不改变光源的方向。
视频
This covers the basics of using the Step slider, which controls the color levels, and the Feather slider, which controls the gradation at the boundaries between colors.
这涵盖了使用分级滑块(控制颜色级别)和平滑滑块(控制颜色边界处的渐变)的基础知识。

DoubleShadeWithFeather Shaders

There are common items among DoubleShadeWithFeather shaders, the standard shaders in UST2.
These shaders can have 2 Position Maps, a special feature that allows the 1st and 2nd Shade Colors to be fixed to a model regardless of lighting.
在UST2的标准着色器DoubleShadeWithFeather shaders着色器中有一些常见的项。
这些着色器可以有两个位置贴图,这是一个特殊的特性,允许第1和第2种阴影颜色固定到一个模型,而不管光照。
[外链图片转存失败(img-mJq1uI1b-1562039279788)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_03_01.jpg)]

Item Function Property
BaseColor Step Sets the boundary between the Base Color and the Shade Colors. _BaseColor_Step
设置基本颜色和阴影颜色之间的边界
Base/Shade Feather Feathers the boundary between the Base Color and the Shade Colors. _BaseShade_Feather
平滑基本颜色和阴影颜色之间的边界
ShadeColor Step Sets the boundary between the 1st and 2nd Shade Colors. Set this to 0 if no 2nd Shade Color is used. _ShadeColor_Step
设置阴影1颜色和阴影2颜色之间的边界.如果没有使用第二种阴影,则将此设置为0。
1st/2nd_Shades Feather Feathers the boundary between the 1st and 2nd Shade Colors. _1st2nd_Shades_Feather
平滑阴影1颜色和阴影2颜色之间的边界.

ShadingGradeMap Shaders

These items are common among UTS2’s high spec ShadingGradeMap shaders.
这些参数在UTS2的高规格ShadingGradeMap着色器中很常见。
Shaders with a Shading Grade Map can control the sharpness and intensity of shadows in relation to the lighting.
带有阴影渐变图的着色器可以控制与光照相关的阴影的锐度和强度。
These maps allow you to set shadows of any shape and in any place you like, regardless of geometry or vectors.
这些贴图允许您设置任何形状和任何地方的阴影,无论几何形状或向量。
Compared to Point Maps, in addition to placing shadows, Shading Grade Maps can also adjust how shadows look depending on the way the light hits them.
与点贴图(应该是位置贴图)相比,除了布置阴影,阴影渐变贴图还可以根据光线照射的方式调整阴影的外观。
[外链图片转存失败(img-II05L8P9-1562039279789)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_03_02.jpg)]

“System Shadows : Self Shadows Receiving” Items

These are adjustment items to make Unity’s shadow system and toon shading familiar.
这些是调整参数,使Unity的阴影系统和卡通阴影相似。
In the case of the toon shade, the shadow provided by the system is necessary to express the character 's self - shadow (falling shadow to himself).
卡通阴影中,系统提供的阴影是必要的,用来表达人物自身的影子(投射到自己身上的影子)。

Use this when you want to make further fine adjustments after deciding the coloring level with the “Basic Lookdevs: Shading Step and Feather Settings” submenu items and want to fine-tune the way ReceiveShadow exits, such as self shadow.
在使用“Basic Lookdevs: Shading Step and Feather Settings”子菜单项决定着色级别后,如果想进一步精细调整着色级别,并想微调ReceiveShadow退出(应为exist存在)的方式(如self shadow),请使用此选项。
[外链图片转存失败(img-sDMDqnWa-1562039279789)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_03_03.jpg)]
视频

When using the system shadow with Unity and adjusting the Step slider, noise may appear in the area with shadow color. These noises are troublesome in Cel-look style, so I show you how to improve them using the System Shadows Level slider and Tessellation.
当使用Unity系统阴影并调整分级滑块时,阴影颜色区域可能会出现噪声。这些噪音是卡通风格所麻烦的,所以我向你展示如何改善他们使用系统阴影水平滑块和细分方式。

There are other ways to eliminate noise, so please also refer to Additionl Notes in this manual.
还有其他方法可以消除噪音,所以请参考本手册中的附加说明。

“Additional Settings” Submenu

These are adjustment items mainly for the real-time point light group processed in the ForwardAdd path.
This submenu is not available in the Mobile/Light version.
这些调整项主要针对在ForwardAdd 路径中处理的实时点光源组。
此子菜单在移动/轻版本中不可用。
[外链图片转存失败(img-loSE9L4O-1562039279789)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_03_04.jpg)]

Item Function Property
Step Offset for PointLights Fine tunes light steps (boundaries) added in the ForwardAdd pass, such as real-time point lights. _StepOffset
微调光源分级(边界)添加到ForwardAdd pass,如实时点灯。
PointLights Hi-CutFilter Cuts unnecessary highlights from the Base Color area of lights added during the ForwardAdd pass, such as real-time point lights. This is particularly useful for cel-shaded styles, where there is little to no feathering. _Is_Filter_HiCutPointLightColor
在ForwardAdd pass中,从添加的灯光的基本颜色区域中删除不必要的高光,例如实时点光源。这对于卡通渲染风格特别有用,因为它几乎没有平滑。

【Adjusting the different colors of point lights :Step Offset、PointLights Hi-Cut Filter】

视频

In UTS2 v.2.0.5 we have improved the reaction of Real-time Point Light in cel-styles that doesn’t use feathering. As a result, we can create a cel-shaded look with just point lighting.
在UTS2 v.2.0.5中,我们改进了卡通渲染风格中实时点光源不使用平滑的反应。因此,我们可以创建一个只使用点光源的卡通渲染外观。

This is done by adjusting the Step slider of the Base Color /1st Shade Color, 1st Shade Color / 2nd Shade Color. With point lighting, the changes in shadows are more obvious when moving, compared to directional lighting.
这是通过调整基本色/第一阴影、第一阴影/第二阴影的分级滑块来完成的。与定向光照相比,点光源在移动时阴影的变化更为明显。

To make it less obvious, use “Step_Offset” to make finer adjustments.
为了不那么明显,可以使用“_StepOffset”进行更精细的调整。

视频

By using “Step Offset”, you can adjust the Realtime light steps (the level of gradation) like point lighting that will be added to the ForwardAdd path.
通过使用“Step Offset”,您可以调整实时光照分级(渐变级别),比如将添加到ForwardAdd 路径的点光源。

The adjustments on “BaseColor_Step” will determine the main light’s gradation but you can also use it to adjust the point lighting settings.
“BaseColor_Step”上的调整将决定主灯光的渐变,但您也可以使用它来调整点光源设置。

By using “Step Offset” at the same time, you can adjust the finer details of point lighting. In particular, this is useful when expressing highlights for machine-related art.
通过使用“Step Offset”同时,您可以调整更精细的点光源的细节。特别是,当表达与机械相关的艺术的亮点时,这是非常有用的。

The brightness of the lighting depends on how close an object is, so the highlight might be too bright in some cases, especially for the base color (bright color).
灯光的亮度取决于物体离得有多近,所以在某些情况下,高光可能太亮了,尤其是主色(明亮的颜色)。

When this happens, you can turn on “PointLights Hi-Cut Filter” to make the highlights dimmer, and make it blend in more with the cel-look.
当这种情况发生时,您可以打开“PointLights Hi-Cut Filter”,使高光变暗,并使它与卡通风格更加混合。

If you want the highlights to be brighter, turn off “PointLights Hi-Cut Filter”.
如果你想让高光更亮,关掉“PointLights Hi-Cut Filter”。

“HighColor Settings” Menu

[外链图片转存失败(img-FkShjdu8-1562039279790)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_04_00.jpg)]

High Color is also known as Highlights or Speculum Lighting.
高颜色也被称为高光或反射光。
It is used to reflect the main directional light. When the light moves the reflection also moves accordingly. In UTS2, you can adjust the high color rendering.
它用来反射主方向光。当光移动时,反射也随之移动。在UTS2中,可以调整高光。

Item Function Property
Specular Mode In case of Active, render the high color range as speculum lighting (gloss). If turned off it the boundaries of the high color range will be drawn as circles. _Is_SpecularToHighColor
如果激活,渲染高颜色作为高光光照(光泽Gloss)。如果关闭它,高颜色范围的边界将被画成圆圈。
Color Blend Mode In case of Additive, add the High Color to the base color(It becomes brighter). Specular can only be used with the Add mode. In case of Multiply, multiply the High color with the base color(It becomes darker). _Is_BlendAddToHiColor
如果是Additive,在底色中加入高颜色(它会变得更亮)。高光只能使用Additive。在Multiply的情况下,将高颜色与底色相乘(底色会变深)。
ShadowMask on HighColor In case of Active, mask the high color area on the shadow area. _Is_UseTweakHighColorOnShadow
如果激活,使用高颜色的阴影区域蒙版。
HighColor Power on Shadow Adjusts the power of the high color range in shadows. _TweakHighColorOnShadow
调整阴影中的高光范围的power。
HighColor Mask Hicolor Mask settings below.
高光蒙版

※Tip: If you want to enable high color of real-time point lights, set PointLights Hi-Cut Filter to Off.
如果您想启用实时点光源的高颜色,请将PointLights Hi-Cut Filter设置为Off。

By using HighColorMask, you can dim light (on skin etc.) that reflects too much depending on the angle.
This is useful when highlighting skin color on the cheeks and chest.
通过使用高颜色蒙版,你可以使(皮肤上的)光线变暗,这取决于角度反射的光线过多。
这在突出脸颊和胸部的皮肤颜色时很有用。
[外链图片转存失败(img-WcpV0ReP-1562039279790)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UT2018_UTS2_SuperTips_32.jpg)]
You can also use HighColorMask as a specular lighting map for reflective surfaces. So it can also be use for metallic textures as well.
你也可以使用HighColorMask作为反射表面的高光贴图。所以它也可以用于金属纹理。

“RimLight Settings” Menu

In realistic styles, RimLight is a technique in which light is set to shine on the rims of the object.
在现实主义风格中,轮廓光(RimLight)是一种技术:光线会照射到物体的边缘。
In non-photorealistic styles that includes Toon Shader, highlights are also placed on the edges of objects to make it more visible, and it is also called RimLight.
在非真实感风格,包括Toon着色器,高光也被放在物体的边缘,使它更可见,它也被称为RimLight。
You can use these RimLight options in UTS2.

[外链图片转存失败(img-6NcY13rr-1562039279791)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_05_01.jpg)]

Item Function Property
RimLight Inside Mask Adjusts the power of the inside masking of the RimLight. _RimLight_InsideMask
调整轮廓光内蒙版的强度。
LightDirection Mask In case of Active, only shows RimLight in the light’s direction. _LightDirection_MaskOn
在活动的情况下,只显示在光方向上的轮廓光。
Antipodean(Ap)_RimLight In case of Active, shows RimLight (AP RimLight) in the opposite direction of the light’s direction. _Add_Antipodean_RimLight
如果激活,则显示与光方向相反的轮廓光(AP RimLight)。

[外链图片转存失败(img-oYCDhXMO-1562039279791)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UT2018_UTS2_SuperTips_14.jpg)]

The RimLight is generally shown around the objects edges from the camera’s perspective. In UTS2, you can adjust where the rim light is shown in relation to where the main light is. (‘LightDirection Mask’)
从相机的角度看,边缘光通常显示在物体的边缘。在UTS2中,你可以根据主光源的位置调整边缘光源的显示位置。(“LightDirection Mask”)

You can also set RimLight in the opposite direction of the light source. You can also render “light reflection” with ‘Add Antipodean_RimLight’.
你也可以在光源方向的相反设置RimLight。你也可以渲染“光照反射(应LightDirection Mask)”与“添加相反光照方向的轮廓光”。

Specify the RimLight’s color of the light direction as Black (0,0,0) if you only want the rim light to be shown on the opposite direction of the light source and cut the rim light in the direction of the light source.
如果您只想让边缘光显示在光源方向的相反上,请将边缘光的颜色指定为黑色(0,0,0),并沿着光源的方向剪切边缘光。

[外链图片转存失败(img-960tnfCq-1562039279791)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UT2018_UTS2_SuperTips_15.jpg)]
RimLight can also be too bright like HighColor depending on the camera’s angles.
根据相机角度的不同,RimLight也会像HighColor一样太亮。

In UTS2, you can adjust RimLight’s mask to make it dimmer.
在UTS2中,你可以调整RimLight的遮罩,让它变暗。

In the image above, the RimLight’s color in the light source’s direction and the light reflection’s direction is changed. The rim light is also masked around the underarms to prevent unnecessary highlights.
在上图中,边缘光的颜色在光源的方向和光线反射的方向发生了变化。边缘光周围的腋下被掩码,以防止不必要的亮光。

[外链图片转存失败(img-Nk5MCr00-1562039279792)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UT2018_UTS2_SuperTips_33.jpg)]
[外链图片转存失败(img-OlA5LG1G-1562039279792)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UT2018_UTS2_SuperTips_34.jpg)]
[外链图片转存失败(img-QwS9dx0X-1562039279792)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UT2018_UTS2_SuperTips_35.jpg)]

By masking the RimLight, you can also emphasize the metallic textures in comparison to other materials, or adjust the incidental light on clothes to create wrinkles on velvet.
通过蒙版边缘光,你也可以强调与其他材质相比的金属质感,或调整衣服上的光线效果,在天鹅绒上产生皱纹感。

“MatCap : Texture Projection Settings” Menu

MatCap is a camera based sphere map that you can paste on to objects. It is used for ZBrush texture rendering.
MatCap是一个基于相机的球形贴图(cubemap),你可以把它附着到物体上。它用于ZBrush 纹理渲染。

When you google image search for Matcap, you can find a lot of examples. It was used to create metallic reflections before physics-based shaders were common.
当你搜索谷歌图像的Matcap,你可以找到很多例子。在基于物理的着色器普及之前,它被用来创建金属反射。

You can use Matcap to create all kinds of textures in addition to metallic textures.
除了金属材质,你还可以使用Matcap创建各种材质。

In UTS2, you can enjoy MatCap with Adding mode, as well as Multiplication mode.
在UTS2中,您可以使用叠加模式和乘法模式来使用MatCap。

※ HINT: UTS2 v.2.0.5 and later, appropriate adjustments will be made to distortions caused by the camera. So the Matcap will not be distorted even when the object is on at the edge of the camera’s perspective…
※提示:UTS2 v.2.0.5及以后会对相机造成的失真进行适当的调整。所以即使物体在相机视角的边缘,Matcap也不会被扭曲。

[外链图片转存失败(img-O8kNP5Si-1562039279793)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_06_01.jpg)]

Item Function Property
Scale MatCapUV You can adjust the MatCap’s range by adjusting the UV of the MatCap Sampler from the center to a circle by scalling. _Tweak_MatCapUV
你可以通过调整MatCap采样器的UV值来调整MatCap的范围。从中间点到一个圆环
CameraRolling_Stabillizer In case of Active, it prevents MatCap from rotating for camera rolling (Rotation with the depth direction as the axis). This function is useful when you want to fix MatCap against the rolling of the camera. _CameraRolling_Stabilizer
相机旋转的稳定性 在活动状态下,它阻止MatCap随相机滚动而旋转(以深度方向为轴旋转)。这个功能是有用的,当你想固定MatCap对相机的滚动。(测试下来,没有效果)
MatCap on Shadow In case of Active, masks the MatCap area that is shadowed. _Is_UseTweakMatCapOnShadow
对在阴影中的MatCap掩码处理
MatCap Projection Camera Specify the projection of the camera to use in the game view. Camera distortion correction works when the perspective camera (Perspective). _Is_Ortho
MatCap 相机投射 指定要在游戏视图中使用的摄像机的投影方式。透视相机会使扭曲校正工作(透视)。
Matcap Mask By setting a grayscale mask for MatCap, you can adjust how MatCap is shown. The MatcapMask is placed based on the UV coordinates of the mesh that the MatCap will be projected on. Mask with black and unmask with white. _Set_MatcapMask
通过设置MatCap的灰度蒙版,可以调整MatCap的显示方式。MatcapMask是基于MatCap将投射到的网格的UV坐标放置的。黑色蒙版,白色未蒙版。

[外链图片转存失败(img-z5Y1xtgk-1562039279793)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UT2018_UTS2_SuperTips_36.jpg)]
In the example above, Matcap is used as a similar environment map.
在上面的示例中,Matcap用作类似的环境贴图。
By using MatCap, you can create light reflections of smooth surfaces while keeping the illustration style.
通过使用MatCap,您可以创建光滑表面的光照反射,同时保持插画风格。

[外链图片转存失败(img-nyTsrELF-1562039279793)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/MatcapTips.jpg)]
In the example above, MatCap, NormalMap for MatCap and MatcapMask is used to express the light reflections on hair.
在上面的例子中,MatCap, NormalMap和MatcapMask被用来表现头发上的光照反射。

  • MatCap_Sampler : Used for the light circles that is multiplied. 用于乘的光圈
  • NormalMapForMatCap : If only MatCap is used, it will be rendered as is, but by repeatedly using NormalMapForMatCap, the crescent-shaped light reflections are created. This is known as Speculum Masking. The normal map used here is not used for bumpy textures.
    如果只使用MatCap,它将按原样渲染,但是通过使用可重叠的NormalMapForMatCap,就会创建新月形的光反射。这就是所谓的高光遮蔽。这里使用的法线贴图不适用于凹凸不平的纹理。
  • MatcapMask : Adjusts the range where MatCap is shown. By setting the gradation mask vertically, and adjusting the Matcap Mask Level slider, you can easily control the range of the MatCap shown.
    调整显示MatCap的范围。通过设置垂直渐变遮罩,并调整Matcap遮罩水平滑块,您可以轻松地控制要显示的Matcap的范围。

[外链图片转存失败(img-SQZZShL4-1562039279794)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/MatcapMask.jpg)]
You can also express light cookies like this with MatcapMask.
您还可以使用MatcapMask来表现这样的光照cookie。

“AngelRing Projection Settings” Menu

Angel Ring is a highlight that is always shown in a fixed place from the camera’s perspective. It is used on highlights for hair. Shaders that have the Angel Ring function can be found in the AngelRing folder.
天使之环是一个高光,总是显示在一个固定的地方,从相机透视的角度。它用于头发的高光部分。具有天使之环特性的着色器可以在AngelRing 文件夹中找到。
[外链图片转存失败(img-IJqC6DHb-1562039279795)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/AngelRing.jpg)]
Angel Ring is influenced by the UV2 of the mesh that it will be projected on. So you have to set the UV2 of the DCC tools like Maya, 3ds Max, Blender, etc. beforehand.
天使之环受将要投射到网格上的UV2的影响。所以你必须事先设置好像Maya, 3ds Max, Blender等DCC工具的UV2。

[外链图片转存失败(img-LAZiGasW-1562039279795)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_07_01.jpg)]

Making materials for Angel Ring.

First, set a second UV that will be applied to the Angel Ring function of the hair’s mesh.
首先,设置第二个UV将应用于头发网格的天使之环特性。

The UV for AngelRing is separate from the UV for the hair’s texture and is created orthographically from the character’s front.
天使之环的UV与头发纹理的UV是分开的,是从人物的正面正交投射创建的。
[外链图片转存失败(img-a9bnrlBm-1562039279795)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/HairModel.jpg)]
The steps from here, including creating UV2, are done with DCC tools like Maya, 3ds Max, Blender etc…
从这里开始的步骤,包括创建UV2,是用的DCC工具,如Maya, 3ds Max, Blender等。

By using the AngelWing’s UV as a guide, draw the texture of the highlights. The highlight’s color will be added to the original color.
使用天使之翼的UV作为向导,绘制高光的纹理。高亮的颜色将添加到原始颜色中。
Register the created texture as AngelRing_Sampler.
将创建的纹理注册到AngelRing_Sampler。
You can draw the highlight with white and add color in AngelRing_Color too.
您可以用白色绘制高亮部分,并在AngelRing_Color中添加颜色。
[外链图片转存失败(img-besZ2nGO-1562039279796)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/Hair_UV1.jpg)]
In case of Active with Use α channel as Clipping Mask, you can use the α channel that is included in the AngelRing’s texture as a clipping mask, as shown below.
开启使用α通道作为剪切蒙版,您可以使用包括在AngelRing纹理的alpha通道作为剪裁蒙版,如下所示。
You can set the color of the AngelRing directly instead of adding it.
您可以直接设置天使的颜色,而不是添加它。
[外链图片转存失败(img-4stwAOBX-1562039279796)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/0609-04_13.jpg)]
“Emissive : Self-luminescene Setings” Menu

Emissive means that objects emit light.
自发光是指物体本身发出光照。
By defining the HDR color for ‘Emissive’, you can create parts that are brighter than the other colors.
通过为“自发光”定义HDR颜色,您可以创建比其他颜色更亮的部件。

[外链图片转存失败(img-ozFXgKWv-1562039279797)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UT2018_UTS2_SuperTips_17.jpg)]
By using it with post-effects that are attached to the camera, like Bloom in Post Processing Stack you can make parts emit light effectively.
通过将它与附加到相机上的后期效果一起使用,比如在后处理堆栈(PPS)中使用Bloom,您可以使部件有效地自发光。
[外链图片转存失败(img-bckoBJcy-1562039279797)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_08_01.jpg)]

Item Function Property
The α channel of Emissive Texure As of v. 2.0.7, the alpha channel can be used as a mask for emissive textures. Emissive is displayed at the position where the alpha channel is set to white (RGB = (1, 1, 1)) on UV basis. When black (RGB = (0, 0, 0)), the emissive disappears. _Emissive_Tex.a
从v. 2.0.7开始,alpha通道可以用作自发光纹理的遮罩。在UV的基础上,将alpha通道设置为白色(RGB =(1,1,1))的位置显示自发光。当黑色(RGB =(0,0,0))时,自发光消失。
Emissive Animation By making it Active, you can animate the RGB channel part of the texture specified by Emissive in various ways. Alpha channel is a mask, so it can not be animated. EMISSIVE MODE = ANIMATION
通过激活它,您可以用各种方式动画纹理的RGB通道部分。Alpha通道是一个蒙版,所以它不能被动画化。
Base Speed (Time) Specifies the base update speed of the animation. If the value is 1, it will be updated in 1 second. Specifying a value of 2 results in twice the speed of a value of 1, so it will be updated in 0.5 seconds. _Base_Speed
指定动画的基本更新速度。如果值为1,它将在1秒内更新。指定值为2会导致值为1的速度的两倍,因此它将在0.5秒内更新。
UV Coord Scroll, View Coord Scroll Specifies the coordinate system to use for scrolling. In the case of UV Coord Scroll, scrolling is performed based on the UV coordinates of Emissive_Tex. In the case of View Coord Scroll, it scrolls based on the same view coordinates as MatCap. Scrolling in the view coordinate system is very useful because it does not take into account the UV coordinates of the texture, but it is often the case that objects with flat faces like cubes can not be displayed well. On the other hand, the view coordinate system can be used very conveniently for objects with many surfaces such as characters. _Is_ViewCoord_Scroll
指定用于滚动的坐标系。在UV Coord滚动的情况下,滚动是基于Emissive_Tex的UV坐标执行的。在View Coord Scroll的情况下,它基于与MatCap相同的视图坐标进行滚动。在视图坐标系中滚动非常有用,因为它没有考虑纹理的UV坐标,但通常情况下,具有平面(如立方体)的对象不能很好地显示。另一方面,视图坐标系可以非常方便地用于具有许多表面(如角色)的对象。
ColorShift with Time By setting it to Active, the color multiplied to the Emissive texture changes by linear interpolation (Lerp) toward Destination Color. When using this function, it is better to set the Emissive texture to grayscale and design the each colors on the color side to be multiplied. _Is_ColorShift
随着时间的推移颜色变化 通过将其设置为活动,颜色乘到发射纹理变化通过线性插值(Lerp)向目标颜色。使用此特性时,最好将发射纹理设置为灰度,并在颜色面上相乘颜色。
ColorShift Speed (Time) Set the standard speed for color shift. When the value is 1, change of one cycle should be approximately 6 seconds as a guide. _ColorShift_Speed
颜色变化速度(时间) 设置标准的移色速度。当值为1时,一个周期的变化应以大约6秒为指导。
ViewShift of Color Active shifts the color relative to the camera’s viewing angle to view the object. When viewed from the front of the surface of the object, the normal Emissive color is displayed, and the color changes to the shifted color as the view angle gradually inclines. _Is_ViewShift
颜色随位置变化 开启将颜色相对于相机的视角角度以查看对象。当从物体表面的正面观察时,会显示出正常的发射色,随着视角的逐渐倾斜,颜色会转变为平移后的颜色。

How to create a texture with alpha channel

Texture with alpha channel is created with DCC tools such as Photoshop.
纹理与alpha通道是用DCC工具,如Photoshop创建的。

You can use it as an alpha channel by adding a new channel from the channel tab and pasting a grayscale image on the created channel. If you use an image format that has an alpha channel such as Targa format, you can save as it is.
您可以通过在channel选项卡中添加一个新通道并在创建的通道上粘贴灰度图像,将其用作alpha通道。如果使用具有alpha通道的图像格式(如Targa格式),则可以按原样保存。

[外链图片转存失败(img-XOtC0I9s-1562039279797)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/Emissive_Tex00.jpg)]
To enable the alpha channel on Unity, set Alpha Source to Input Texture Alpha in the Import Settings of each texture.
要在Unity上启用alpha通道,可以将alpha Source设置为在每个纹理的导入设置中输入纹理alpha。

In the case of PNG format can not have an alpha channel directly in the image specification, so after loading an alpha channel as a selection range in Photoshop, specify “Layer mask> Mask outside selection range”, PNG Save in format.
PNG格式在图片描述中没有直接的alpha通道,因此在Photoshop中想要加载alpha通道作为可视范围,需选择“图层蒙版>从透明区域”,(然后就建立了一个新alpha通道,编辑),然后保存为PNG格式。

Then import it into Unity, and in Import Settings, set Alpha Source to Input Texture Alpha and Alpha Is Transparency to ON.
然后将它导入Unity,在导入设置中,将Alpha Source设置为输入纹理Alpha, Alpha透明度设置为ON。

Tips for setting Destination Color

When using the color shift function, set Destination Color as the target, but if the original color and the target color have the same hue, unexpected colors may be mixed into the frame. For example, if you shift from the color shown on the left side of the arrow to one of the two colors on the right that looks similar, the first color on the right of the arrow shifts color within the same hue range. The second color is a mixture of bluish frames.

当使用color shift特性时,将目标颜色设置为目标,但是如果原始颜色和目标颜色具有相同的色调,可能会将意想不到的颜色混合到框架中。例如,如果您从箭头左边显示的颜色移动到右边看起来相似的两种颜色中的一种,箭头右边的第一种颜色将在相同的色调范围内移动颜色。第二种颜色是蓝色框架的混合。
[外链图片转存失败(img-azTFG0Oy-1562039279798)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/DestColor00.jpg)]
This is because the color that mixes blueish frames has a B channel that has a higher value when compared to the RGB of the original color.
这是因为混合蓝色帧的颜色有一个B通道,与原始颜色的RGB相比,该通道的值更高。

In this way, when shifting colors with different luminance within the same hue to the target in this way, by aligning the direction of change of each RGB, it is possible to prevent unexpected colors from entering the frame.
这样,当将同一色调内不同亮度的颜色以这种方式移动到目标时,通过调整每个RGB的变化方向,可以防止意想不到的颜色进入帧内。
[外链图片转存失败(img-W8ec6ART-1562039279798)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/DestColor01.jpg)]
Example of color shift within the same hue. The target color RGB values are all smaller than the original color.
相同色调内的颜色变化的例子。目标颜色RGB值都小于原始颜色。
[外链图片转存失败(img-SuH46kmc-1562039279799)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/DestColor02.jpg)]
↑Example where frames outside the hue are mixed. The B value of the target color is higher than the original color, and the change in G value is extremely large.
例如,色调外的帧是混合的。目标颜色的B值高于原颜色,G值的变化非常大。

“Outline Settings” Menu

[外链图片转存失败(img-DfYgdweK-1562039279799)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_09_00.jpg)]
We are using the inverted outline method for material-based objects for the outline functions.
我们对反向勾边的方法对对象材质使用勾边特性。
This method, to put it simply, spawns the inverted surface normal slightly bigger than the original object with a shader.
简单地说,这个方法生成的反向表面法线略大于使用着色器的原始对象。

The object spawned for the object’s outline is drawn with front culling, so when it is overwritten by the original object, the parts that do not fit becomes the outline.
为对象的勾边生成是用前剔除法绘制的,因此当它被原始对象覆盖时,未填充的部分就成为勾边。

This method is light and easy to adjust, and it had been used for outlines in games for a long time.
该方法简便易行,长期以来一直被应用于游戏的勾边。

Please be aware that actual lines are not drawn around the objects.
请注意,实际勾边线并没有画在物体周围。

Reference: You can draw lines around the objects too, but that is mostly used as a post-process (post-effects) outline…
你也可以在对象周围画线,但那主要是作为一个后期处理(后期效果)的勾边。
The type of outline used in post-process affects the speed and quality. In games, the inverted-object method and light post-process methods are used to make adjustments.
后处理中使用的勾边类型影响速度和质量。在游戏中,采用反向对象和光照后期处理法进行调整。

[外链图片转存失败(img-mXM4f6P7-1562039279799)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_09_01.jpg)]

Item Function Property
Outline Mode Specifies how the inverted-outline object will be spawned. You can choose between Normal Direction(normal inverted method) / Position Scalling(position scaling method). In most cases, Normal Direction is used but if it is a mesh that is only made of hard edges (such as cubes), Position Scalling will prevent the outline from being disconnected. It will be good to use Position Scalling for simple shapes and use Normal Direction for characters and things that have complicated outlines. _OUTLINE
指定如何派生反向勾边对象。你可以选择法线方向(法线反向方法)/位置缩放(位置缩放方法)。在大多数情况下,使用法线方向,但如果它是一个网格,只有硬边(如立方体),位置缩放将防止勾边断开。对于简单的形状使用位置缩放,对于角色和具有复杂勾边的东西使用法线方向是更好的选项。
Outline Sampler When you want to see the “start” and “end” of your outlines, or when you only want to outline certain parts, use the outline sampler (texture). The thickest width with white and the least thickest with white. _Outline_Sampler
当你想看到勾边的“开始”和“结束”时,或者当你只想勾边某些部分时,使用勾边采样器(纹理)。最厚的宽度为白色和最不厚为黑色。(英文手误)
Offset Outline with Camera Z-axis Offsets the outlines in direction Z. The outline will be less visible for the spikey parts in spikey hair if you input a positive value. For most cases, just set this to 0. _Offset_Z
偏移勾边与相机z轴 偏移z方向的勾边。如果您输入一个正值,则spikey头发(一种尖尖的发型)上的spikey部分的勾边线将不那么明显。大多数情况下,把这个设为0

“Advanced Outline Settings” Submenu

Items in this submenu can further enhance the outline function.
此子菜单中的项可以进一步增强outline功能。
[外链图片转存失败(img-YDRjITSE-1562039279800)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_09_02.jpg)]

Item Function Property
Farthest Distance to vanish The width of the outline will change depending on the distance between the camera and the object. Specifies the farthest distance. The farthest distance will be when the outline becomes 0. _Farthest_Distance
消失的最远距离 勾边线的宽度会随着相机和物体之间的距离而变化。指定最远的距离。最远的距离是当轮廓变为0时。
Nearest Distance to draw with Outline Width The width of the outline will change depending on the distance between the camera and the object. Specifies the closest distance. The closest distance will be when the ‘Outline_Width” is the width that was set as the maximum. _Nearest_Distance
勾边线的宽度会随着相机和物体之间的距离而变化。指定最近的距离。最近的距离将是“Outline_Width”为设置为最大值的宽度时。
Outline Texture Use this when you want the outline to have special textures. By changing the textures, you can give the outlines patterns, or make the outline unique by changing the texture of the inverted object which will be front-face culled. _OutlineTex
当你想要勾边有特殊的纹理时使用这个。通过改变纹理,你可以给勾边图案,或者通过改变将被正面剔除的反向对象的纹理使勾边独一无二。

Adjusting the strength of outlines:Outline Sampler
[外链图片转存失败(img-1OI4tO3N-1562039279800)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/0906-18_01.jpg)]
Black means “no lines” and white means that the width is at 100%.
黑色表示“没有线条”,白色表示宽度为100%。

**Tips: When you are using Outline Sampler for multiple characters, by unifying the UV position of each character’s parts, you can adjust the the start and end of outlines easier. **
提示:当你对多个角色使用勾边采样器时,通过Unity每个角色部件的UV位置,你可以更容易地调整勾边的开始和结束。

Supplementing the inverted outlines of objects:UTS_EdgeDetection
补充对象的反向勾边:UTS_EdgeDetection

The inverted object outline that is used in UTS2 is a technique that has been used for a long time but it is still used in games that is real-time sensitive.
UTS2中使用的反向对象勾边是一种已经使用了很长时间的技术,但它仍然在实时性游戏中使用。

On the other hand, machine power is considerably better today so it is also used with material-based outlines and post-process effects outlines that are attached to the camera.
另一方面,硬件设备相当好的今天,也用到了基于材质的勾边和附加到相机的后期效果勾边。

[外链图片转存失败(img-8VjotJES-1562039279801)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UT2018_UTS2_SuperTips_23.jpg)]
UTS2 also has a post-effect called UTS_EdgeDetection that is used with the inverted object outline.
UTS2还具有一个名为UTS_EdgeDetection(边缘检测)的后期效果,用于反向对象勾边。

By attaching UTS_EdgeDetection to the main camera, UTS2’s inverted object outline looks better.
通过将UTS_EdgeDetection附加到主摄像头,UTS2的反向对象勾边看起来更好。

[外链图片转存失败(img-F3LqmrLj-1562039279801)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS_EdgeDitectionV1.jpg)]

UTS_EdgeDetection is provided at UTS2’s project route, UTS_EdgeDetection.unitypackage.
You can install this package by drag and dropping it to Unity.
ToonShader_CelLook.unity is the sample scene so please check the UTS_EdgeDetection component that is attached to the scene’s main camera.

UTS_EdgeDetection.unitypackage

[外链图片转存失败(img-hqgwKs3X-1562039279802)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS_EdgeDetectWindow.jpg)]
This is a post-effect edge extraction filter.
这是一个后效边缘提取过滤器。
In addition to the three filters that were made by modifying Unity’s standard assets, Sobel Color Filter has been added.
除了通过修改Unity的标准资产创建的三个过滤器之外,还添加了Sobel Color Filter。

By using Sobel Color Filter, you can emphasize toon line edges effectively and reproduce the effects of color tresses of cel drawings.
采用Sobel彩色滤色器,可以有效地突出卡通勾边的边缘,再现卡通渲染的色卷效果。

Tracing baked vertices normals :Baked Normal for Outline
研究烘焙顶点法线:烘焙法线的勾边

You can now read normal maps that have vertices normals baked on to them additionally when setting the inverted outlines. By using this you can give hard-edged objects soft-edged outlines according to the baked normal maps.
现在,您可以在设置反向勾边时,读取具有顶点法线的法线图。通过使用这个,根据烘焙的法线贴图你可以给硬边对象软边勾边。

Normal maps that can be used as Baked Normal for Outline are as follows.

  1. Does not overlap with the UV of the object that it will be applied to. This means that it is essential that UV expansion and all
    normals maps will not overlap.
    不与它将被应用到的对象的UV重叠。这就意味着UV扩展和所有这些都是必不可少的法线图不会重叠。
  2. Normal maps are based on OpenGL, as Unity is.
  3. The texture settings of normal maps are as follows:
    ・Set Texture Type to “Default” . Note: Do not set this to “Normal Map”
    ・Make sure that sRGB (Color Texture) is turned “OFF”.

For more please check the assets in the Baked Normal folder of the sample project.

Note: This kind of vertex normal adjusting is done by the vertex shader, so it will depend on the number of vertices that it will be applied to. This means that it does not correct the vertex normals like pixel shader, so please be careful.
注意:这种顶点法线调整是由顶点着色器完成的,所以它将取决于它将应用到的顶点的数量。这意味着它不能纠正顶点法线,如像素着色器,所以请小心。

Moving the outline away from the camera:Offset Outline with Camera Z-axis
[外链图片转存失败(img-taMJTsmc-1562039279802)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/0205-11_01.jpg)]
By inputting a value in Offset Outline with Camera Z-axis , you can offset the outline in Z direction.
通过在相机Z轴的偏移勾边输入一个值,您可以在Z方向上偏移勾边。

You can use this when your model has spikey hair to adjust the outlines of the spikes.
当你的模型有尖尖的头发时,你可以用这个来调整尖尖的勾边。

In normal situations, please set this to 0.
在正常情况下,请将此设置为0。

“DX11 Phong Tessellation Settings” Menu

You can only use Tessellation on UTS2 with Windows/DX11.

[外链图片转存失败(img-htWPoqMF-1562039279803)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_10_00.jpg)]

“LightColor Contribution to Materials” Menu

This menu collects switches that can individually turn ON/OFF “the influence of color of real time light”(LightColor Contribution) in the scene for each color.
这个菜单收集了可以为每种材质颜色单独打开/关闭“实时灯光颜色的影响”(灯光颜色的贡献)的开关。

In the case of Active, the effect of the color of the real time light on each color is effective, and in the case of Off, the setting color of each color when the intensity = 1 is displayed as it is.
在Active情况下,实时灯光的颜色对每种颜色的效果都是有效的,在Off情况下,强度= 1时显示每种颜色的设置颜色。
[外链图片转存失败(img-NpEVanRa-1562039279803)(https://camo.githubusercontent.com/368a8767c9eb46fa48b23f0fd6c59ff3c2cc4d64/68747470733a2f2f696d672e796f75747562652e636f6d2f76692f54487a6f52635770556d552f302e6a7067)]
From this menu you can centrally manage the presence / absence of light color contribution to each color.
从这个菜单中,您可以集中管理每种颜色的光照颜色贡献的存在/不存在。

While actually using the character lights used in the scene, you can see in real-time how the effect on each color will change with / without light contribution. It is a good idea to use it to finish the look-dev.
在实际使用场景中使用的人物灯光时,您可以实时看到每种颜色的效果在有/没有灯光的情况下会发生怎样的变化。使用它来完成look-dev是一个好主意。

※ Hint: Turning off any color switch will cause that color’s Light Intensity to be set to 1 with a light color of white, regardless of the strength of other lights in the environment.
关闭任何颜色开关都会导致该颜色的光强度被设置为1,而光的颜色为白色,而不考虑环境中其他灯光的强度。

“Environmental Lighting Contributions Setups” Menu

[外链图片转存失败(img-DumkWP0h-1562039279803)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_12_00.jpg)]
In this menu, adjust the response of the UTS 2 to “the ambient light setting”(Environment Lighting including Skybox, Gradient and Color) and the light probe in the scene, and adjust the brightness of the shader built-in light that starts up in an environment where there is no real-time directional light Items are included.
在这个菜单,调整UTS 2“环境光设置”(环境照明包括天空体、Gradient 和颜色)和场景中的光照探测器,并调整着色器内置的光的亮度,其在启动的环境中没有包括在内的实时定向光选项。

It is also possible to control ON/OFF of the white jump prevention function like SceneLights Hi-Cut Filter, which is a useful function for VRChat users, from this menu.
也可以从这个菜单中控制跳跃性白色特性的开关,比如SceneLights Hi-Cut Filter(场景光照高光剔除),这对VRChat用户来说是一个有用的功能。

[外链图片转存失败(img-XzwbXh4g-1562039279804)(https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/raw/master/Manual/Images_jpg/UTS2UI_12_01.jpg)]

Item Function Property
GI Intensity By setting GI Intensity to 0 or higher, it will deal with the GI system within Unity’s Lighting window, especially Light Probe. When GI Intensity is 1, the GI intensity will be 100%. This function is improved with v.2.0.6, if you want to use GI including light probes, first set 1 (almost the same brightness as Standard Shader). and then adjust as necessary. _GI_Intensity
GI强度 通过设置GI强度为0或更高,它将处理Unity的照明窗口内的GI系统,特别是光照探头。当GI强度为1时,GI强度为100%。这个功能在v2.0.6中得到了改进,如果你想使用GI(包括光照探头),首先设置1(几乎与标准着色器相同的亮度)。然后根据需要调整。
Unlit Intensity When there is no real-time directional light in the scene, the scene’s brightness and color will be determined by Environment Lighting’s Source Settings, boost it by Unlit Intensity and use it as a light source (This is called Ambient Blending). The default is 1 and 0 is to turn it off completely. This is used when you want to have the environment color blend with the material color, but if you want it to be a darker blend, set it to 0.5~1 and if you want it to be a lighter blend, set it to 1.5~2. (From v.2.0.6, the maximum value has become 4.) _Unlit_Intensity
无光照强度 当场景中没有实时方向光时,场景的亮度和颜色将由环境光的光源设置决定,通过非光照强度提高亮度,并将其用作光源(这称为环境混合)。默认值是1,0是完全关闭它。这是当你想要使用的环境颜色混合到材质的颜色,但是如果你想要一个更暗的混合,将其设置为0.5 ~ 1,如果你想要一个更亮混合,将其设置为1.5 ~ 2。(最大值由v.2.0.6变为4)。
SceneLights Hi-Cut Filter This will minimize overexposure when the light intensity is too high, or when there are multiple real-time directional lights, or multiple real-time point lights. By turning this one you can maintain the light colors and its attenuations while only cutting the intensity of the material color to avoid overexposure. The default is OFF. When using this function, please make sure that the basic 3 colors are Active in “LightColor Contribution to Materials” menu. We recommend VRChat users to turn this on. Hint: If overexposure still occurs even when this is turned on, please check the post-effect bloom settings. (In particular, when Bloom’s threshold value is under 1, it is easier to happen.) _Is_Filter_LightColor
场景光照高光剔除过滤器 这将最大限度地减少过度曝光时,光强度过高,或当有多个实时定向灯,或多个实时点灯。通过开启这个选项,你可以保持光照颜色和它的衰减,同时只削减过度曝光的材质颜色的强度。默认为关闭。使用此功能时,请确保在“LightColor Contribution to Materials”菜单中基本的3种颜色是激活的。我们建议VRChat用户打开它。提示:如果开机后仍有过度曝光现象,请检查后期效果Bloom设置。(特别是当Bloom的阈值小于1时,更容易发生。)
Built-in Light Direction For experienced users, you can activate the Built-in Light Direction’s vector (the vector of the virtual lights in the shader). When this is activated, the intensity and color of the light will follow the real-time directional light’s values within the scene. If there aren’t lights like that, the values for ambient blending will be used。 _Is_BLD
对于有经验的用户,您可以激活内置的光方向向量(着色器中虚拟光的向量)。当这被激活,光的强度和颜色将遵循实时定向光在场景中的值。如果没有这样的灯光,则使用环境混合的值。

Adjusting the ambient blending:Unlit Intensity

The ambient light settings are now reflected in the light colors. The minimum intensity of the directional light is the setting of the scene`s ambient light.
环境光设置现在反射到光照颜色中。方向光的最小强度是场景环境光的设置。

In VRChat, the brightness of ambient light can be adjusted with the Unlit_Intensity slider.
在VRChat中,环境光的亮度可以通过Unlit_Intensity滑块进行调节。

Unlit_Intensity boosts the brightness of the ambient light.
Unlit_Intensity 提高了环境光的亮度。

The default is 1.

If there is no directional light in the scene, the default light that is included in the shader is used, and the direction is always according to where the camera is.
如果场景中没有方向光,则使用着色器中包含的默认灯光,并且方向总是根据相机的位置来确定。

As a result,lighting is always good where the camera is pointed at.
因此,相机对准的地方光线总是很好。

This light will function when the ambient light is blended.
当环境光混合时,这种光就会起作用。

This is a video that explains the Unlit_Intensity function and ambient blending.
这是一个解释Unlit_Intensity函数和环境光混合的视频。

视频

Preventing overexposure when there are multiple bright lights in a scene :SceneLights Hi-Cut Filter

SceneLights Hi-Cut Filteris a very useful function for VRChat users.
对VRChat用户来说,场景光照高光剔除过滤器是一个非常有用的功能。

This is a video that explains it in detail.
It also explains in brief how to set the tone mapper with PPS.
并简要说明了如何使用PPS设置色调映射。

视频

Adding Built-in Light Direction as an advanced feature

As an advanced feature for experienced users, you can now set the light direction vector that is built into the shader. Materials that have Built-in Light Direction activated can have their own light direction vector for shading purposes which is independent of the mesh object’s coordinates. This means that it will have the same effect as having an exclusive fixed light.
作为资深用户的高级功能,您现在可以设置内置在着色器中的光方向向量。有内置光方向激活的材质可以有自己的光方向矢量用于阴影的目的,这是独立于网格对象的坐标。这意味着它将具有与具有唯一固定光相同的效果。

The drop shadow of this part will be used for the directional light in the scene so you can also change how shading and drop shadows look. To set the light color of Built-in Light Direction, use the main directional light settings of the scene.
这部分的阴影将用于场景中的定向光,因此您还可以更改阴影和阴影的外观。要设置内置灯光方向的灯光颜色,请使用场景的主方向灯光设置。

Please watch this video about how to use Built-in Light Direction.

视频

Using it for visuals(pre-render) 用于图形处理(预渲染)

If you are using it pre-render, disable Anti_Aliasing in Image Effects and minimize things that were output with 4K frame capture to the suitable size. It will look better. (This is practically super sampling)
如果使用预渲染,请在图像效果中禁用抗锯齿,并将4K帧捕获输出的内容再最小化到合适的大小。它看起来会更好。(这实际上是超级采样)

Frame Capturer is provided here: Frame Capturer

You can use what you have output from frame capture in NUKE and AfterEffects.
You can also use Alembic Importer/Exporter for videos. Alembic

About Licensing

For the convenience of users, we would like to ask you to state things such as “UTS2 v.2.0.5 was used” to make it easier for later versions but other than that, you are not required to state anything.
为了方便用户,我们想让您声明一些内容,例如“UTS2 v.2.0.5 was used”,以便以后的版本更容易使用,但是除此之外,您不需要声明任何内容。
We would also like to ask you not to remove the header that states the UCL2.0 license in each file.
我们还希望您不要删除每个文件中声明UCL2.0许可的标题。

Additional Note.

  1. Tips: Minimizing the artifacts that appear at the edge of each color when using system shadow.
    在使用系统阴影时,最小化每种阴影颜色边缘的伪影(锯齿)。
    1:Changing the linear color space
    2:Increase mesh density
    3:Make artifacts disappear by adjusting BaseColor_Step/System Shadows Level
    4:Increasing the bias of the directional light

  2. Tips: Minimizing light slips when using multiple real-time point lights
    使用多个实时点光源时,尽量减少光照重叠

  3. Solution to trouble cases sent to user support
    3-1. Shadows appear in unexpected places
    3-2. I uploaded the avatar to the VRChat server, and when I saw it on the HMD, the parallax between the left and right is off.
    3-3. Bloome may glow badly on VRChat

Unity-Chan Toon Shader 2 介绍相关推荐

  1. 【Unity Shader】Unity Chan的卡通材质

    写在前面 时隔两个月我终于来更新博客了,之前一直在学东西,做一些项目,感觉没什么可以分享的就一直没写.本来之前打算写云彩渲染或是Compute Shader的,觉得时间比较长所以打算先写个简单的. 今 ...

  2. 【Shader】解读Unity Chan的卡通材质

    目录 写在前面 Unity Chan使用的Shader 写给自己 CharaOutline:描边 CharaMain:衣服和头发 光照衰减 高光反射 反射 阴影 边缘高光 CharaSkin:皮肤 写 ...

  3. 【Unity3D】 Unity Chan项目分享

    写在前面 之前的一个博文里分享了日本Unity酱的项目,如果大家有去仔细搜Unity酱的话,就会发现日本Unity官方还放出了一个更完整的Unity酱的项目,感觉被萌化了!(事实上,Unity日本经常 ...

  4. Unity3D Shader编程】之二 雪山飞狐篇:Unity的基本Shader框架写法颜色、光照与材质

    本系列文章由@浅墨_毛星云 出品,转载请注明出处. 文章链接: http://blog.csdn.net/poem_qianmo/article/details/40955607 作者:毛星云(浅墨) ...

  5. unity自发光透明shader

    unity自发光透明shader 这本来是一个glass的shader,但是我发现也可以用到自发光+透明,这两个脚本都是unity文档里面的.呵呵~~~ [html] view plaincopypr ...

  6. 阿诺德给物体加描边_【C4DtoA 27】Arnold渲染器: Toon shader 1/3

    Tips:共计约2400字,预计阅读用时8min,预计实践用时30+min: 内容提要:Toon Shader /卡通渲染 /赛璐珞着色法 /三渲二 多图预警. ------------------- ...

  7. 【Unity 3D游戏开发】在Unity使用NoSQL数据库方法介绍

    随着游戏体积和功能的不断叠加,游戏中的数据也变得越来越庞杂,这其中既包括玩家产生的游戏存档等数据,例如关卡数.金币等,也包括游戏配置数据,例如每一关的配置情况.尽管Unity提供了PlayerPref ...

  8. Unity学习之Shader

    Shader 是用来实现图像渲染的,用来替代固定渲染管线的可编辑程序.其中Vertex Shader(顶点着色器)主要负责顶点的几何关系等的运算,Pixel Shader(像素着色器)主要负责片元颜色 ...

  9. Alternate Realities大赛作品引发的思考(二)——如何完全按照自己的思路制作一个toon shader

    目标 在blender的球上实现Toon Shader,理解blender着色器的工作原理. 完全通过自己的思考,不参考任何完整的教程,可以参考官方文档. 初始工程 1. 建球,改灯光颜色. 问题1: ...

  10. Unity官方代言角色Unity Chan(Unity娘/优妮蒂/ユニティちゃん)模型免费下载

    Unity Chan Unity Chan就是下面这个角色啦 游戏引擎研发商Unity Technologies日本分公司Unity Technologie Japan日前宣布,自2014年4月7日起 ...

最新文章

  1. SAP SD基础知识之SD常见流程概述
  2. map(&:name)在Ruby中是什么意思?
  3. 水准网测量平差matlab_【干货】史诗级测量大神分享道路测量全过程经验
  4. Java 异常Exception
  5. webpack入门(四)——webpack loader 和plugin
  6. 人生苦短,我用Python(Python快速教程 - 基础篇)
  7. Tornado 高并发源码分析之六---异步编程的几种实现方式
  8. python-环境安装-pycharm安装-新手入门可使用社区版
  9. “云联邦”构建连云成片、无缝混合的一朵云
  10. 外贸电商ERP都有哪些值得用?
  11. Linux内核的学习(二)
  12. Linux计划任务入门详解
  13. Dos窗口文字背景颜色设置
  14. Idea 2017 破解流程详解
  15. 如何更优雅地使用微博
  16. Microsoft Edge浏览器黑色背景修改
  17. 2020年5个最佳免费WordPress托管提供商
  18. java 流计算_Java 流收集器 ( Stream Collectors ) ( 一 ) - 统计计算
  19. 活动星投票网络文明公益广告网络评选微信的投票方式线上免费投票
  20. 24. GD32F103C8T6入门教程-IAP升级教程

热门文章

  1. [转载]JS的IE和Firefox兼容性汇编(原作:hotman_x)
  2. Gitter+Sidecar制作聊天室
  3. Let X be a finite set f : X → X a function. Prove that f is injective if and only if f is surjective
  4. 苹果公司的创始人_世界名校巡礼15——苹果公司创始人的母校加州大学伯克利分校...
  5. 单片机——A/D数模转换篇
  6. java ico_Java 读写 ICO 图像
  7. mysql undo表空间_MySQL 8.0.2起UNDO表空间管理更灵活
  8. 计算机菜单命令后省略号,windows菜单命令项的右边有省略号…表 – 手机爱问
  9. 无法在此iPhone激活面容ID怎么办?
  10. JAVA访问控制权限