Alpha Blend 示例
This material graph sample demonstrates creation of a simple Alpha Blend transparent material.此材质图表示例演示了如何创建简单的 Alpha Blend 透明材质。
Albedo RGB data for the Mesh Transparent PBR material (used for transparent materials) is taken from the output of the Color parameter (Color node). The Roughness value is specified directly using a Float node.Mesh Transparent PBR 材质(用于透明材质)的 Albedo RGB 数据取自 Color 参数(Color 节点)的输出。 Roughness 值直接使用 Float 节点指定。
The Opacity input for the material is constructed as follows:材质的 Opacity 输入构造如下:
- Initial Opacity data is taken from the texture (Texture 2D node) sampled by the Sample Texture node and connected via the X port adapter to the Power node (as only the R-channel is used for the opacity map).初始 Opacity 数据取自 Sample Texture 节点采样并通过 X 连接的纹理(Texture 2D 节点)端口适配器到 Power 节点(因为只有 R 通道用于不透明度贴图)。
- Power and Multiply nodes apply power and opacity values provided by two Slider parameter nodes (enabling you to adjust float values via the Parameters panel in UnigineEditor).Power 和 Multiply 节点应用由两个 Slider 参数节点提供的 power 和 opacity 值(使您能够通过 UnigineEditor 中的 Parameters 面板调整浮点值)。
- The resulting output of the Multiply node is then saturated to the [0.0f; 1.0f] range (Saturate node) and passed to the master material node.然后将 Multiply 节点的结果输出饱和到 [0.0f; 1.0f] 范围(Saturate 节点)并传递给主材质节点。
Finally, the data output is passed to the Final node.最后,将数据输出传递给 Final 节点。
The result结果
最新更新:
2023-06-23
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)