This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
创建内容
内容优化
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

Vertex Color 示例

This material graph sample demonstrates how to use vertex color for texture blending when creating materials.此材质图表示例演示了在创建材质时如何使用顶点颜色进行纹理混合。

Vertex color data retrieved via the Vertex Color node is passed to a portal for the ease of access. 4 sets of Albedo and tangent-space Normal textures are blended with accordance to the channels of the vertex color data:通过 Vertex Color 节点检索到的顶点颜色数据被传递到门户网站为了方便访问。 4组Albedo和切线空间法线纹理按照顶点颜色数据的通道进行混合:

  • Each of the color channels (RGB) gets its own Linear Interpolation expression.每个颜色通道 (RGB) 都有自己的线性插值表达式。
  • The data from the first Albedo A texture sampled by the Sample Texture node is plugged to the A port of the first Lerp node.Sample Texture 节点采样的第一个Albedo A纹理的数据被插入到第一个 Lerp 节点的A端口。
  • The data from each of the other three albedo Textures (B-D) sampled by the corresponding Sample Texture node is plugged to the B port of its corresponding Lerp node.由对应的 Sample Texture 节点采样的其他三个反照率纹理 (BD) 中的每一个的数据被插入到其对应的 Lerp 节点的 B 端口。
  • The first Lerp node corresponding to the Texture A plugs into the A port of the Lerp node corresponding to Texture B, with Coefficient driven by the Red channel from the vertex color (connected via the x port adapter).纹理 A 对应的第一个 Lerp 节点插入到纹理 B 对应的 Lerp 节点的 A 端口,系数由顶点颜色的红色通道驱动(通过 x 连接端口适配器)。
  • The second Lerp node corresponding to Texture B plugs into the A port of the Lerp node corresponding to Texture C, with Coefficient driven by the Green channel from the vertex color (connected via the y port adapter).对应于纹理 B 的第二个 Lerp 节点插入对应于纹理 C 的 Lerp 节点的 A 端口,系数由顶点颜色的绿色通道驱动(通过 y 端口适配器连接)。
  • The third Lerp node corresponding to Texture C plugs into the Albedo port of the master material node, with Coefficient driven by the Blue channel from the vertex color (connected via the z port adapter).对应于纹理 C 的第三个 Lerp 节点插入主材质节点的 Albedo 端口,系数由顶点颜色的蓝色通道驱动(通过 z 端口适配器连接)。
  • Four Normal maps sampled by the corresponding Sample Texture nodes have the same kind of setup of Linear Interpolation expressions.由相应的 Sample Texture 节点采样的四个法线贴图具有相同的线性插值表达式设置。

Finally, the data output is passed to the Final node.最后,将数据输出传递给 Final 节点。

The result结果
最新更新: 2022-04-06
Build: ()