This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资源工作流程
版本控制
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
VR Development
双精度坐标
应用程序接口
Animations-Related Classes
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
VR-Related Classes
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Mesh Decal(网格贴花)

A Mesh Decal is a decal based on the arbitrary .mesh file and projected onto a surface by means of the orthographic projection.Mesh Decal是基于任意.mesh文件的贴花,并通过正投影投影到表面上。

注意

The decals are always of the same size regardless of the projection box location relatively to the projection surface.无论投影框相对于投影曲面的位置如何,贴花总是相同的大小。

Roads Based on the Mesh Decal基于Mesh Decal的道路

另请参阅

  • The DecalMesh class to manage mesh decals via APIDecalMesh类通过API管理网格贴花
  • A set of samples located in the data/samples/decals/ directory:位于data/samples/decals/目录中的一组示例:

    1. deferred_mesh_00
    2. deferred_mesh_01
    3. deferred_mesh_02
    4. deferred_mesh_03
    5. deferred_mesh_04

Mesh Requirements网的需求#

The mesh used for projection onto a decal comply with the following requirements:用于在贴花上投影的网格符合以下要求:

  • The mesh shouldn't be two-sided or have any overlapping parts — this causes sorting artifacts. The mesh, however, may be curved in order to be applied to the sides of the object onto which it is projected by enabling the Screen Projection option.网格不应该是双面的,也不应该有任何重叠部分——这会导致排序工件。然而,网格可以弯曲,以便应用到对象的侧面,通过启用Screen Projection选项将其投影到对象上。

    Mesh used for projection has overlapping parts of surface that cause artifacts用于投影的网格表面有重叠的部分,导致伪影
    Any unnecessary surfaces are cut off the mesh to have it projected correctly任何不必要的表面被切断网格有它的投影正确
  • The mesh triangles should be as close to regular as possible — don't use triangles with one side significantly less than the other two sides.网格三角形应该尽可能地接近规则-不要使用一个边明显小于另两个边的三角形。
  • A source mesh should have less than 10,000 polygons.一个源网格应该有少于10000的多边形。
  • The mesh that is used for projection should contain a single surface. If the mesh contains several surfaces, only the one with the 0 index will be used. Thus, the area of the decal will differ from the initial mesh.网格用于投影应该包含一个单一的表面。如果网格包含几个表面,只有将使用一个0指数。因此,贴花纸的面积将不同于初始网格。

Creating a Mesh Decal创建一个网格贴花#

To create a Mesh Decal:创建一个Mesh Decal:

  1. On the Menu bar, choose Create -> Decal -> Mesh.在菜单栏上,选择Create -> Decal -> Mesh

  2. In the file dialog window that opens, choose a mesh for the decal that is in line with the mesh requirements:在打开的文件对话框窗口中,为贴花选择一个符合网格要求的网格:

  3. Press the OK button and place the decal somewhere in the world (for the decal to be projected, the mesh should intersect the surface).OK按钮,把贴花放在世界的某个地方(贴花要投影,网格应该与表面相交)。

Editing a Mesh Decal编辑网格贴花#

In the Node tab of the Parameters window, you can adjust the following parameters of the Mesh Decal: Parameters 窗口的 Node 页签中,可以对 Mesh Decal 的以下参数进行调整:

Node tabNode选项卡

Decal Mesh贴花纸网#

Projection parameters of the Mesh Decal:Mesh Decal 的投影参数:

Radius

The height of the projection box along the Z axis, in units.投影框沿Z轴的高度,单位为。

Radius = 10Radius= 10
Radius = 20Radius= 20
Mesh Path to the .mesh file on which the decal is based.贴花所基于的 .mesh 文件的路径。

Decal Common贴花纸常见#

Parameters common for all types of decals:参数共同为所有类型的贴纸:

Bit Masks一些面具#

Viewport Mask A Viewport mask, specifying if the decal can be seen in the camera's viewport. Viewport掩码,指定贴花是否可以在相机的视口中看到。
Intersection Mask The decal's Intersection mask is used paired with the cutout intersection mask of clutters and grass to cut out the clutter or grass in the areas of intersection with the decal (e.g. can be used to remove grass from the surface of a road projected using decal).贴花的 Intersection 蒙版与 cluttersgrass 的切口交叉蒙版一起使用 剪掉与贴花相交区域的杂物或草(例如,可用于去除使用贴花投影的道路表面的草)。
注意
You can specify a Shadow mask and a Material mask in the decal_base material.您可以在 decal_base 材质中指定一个 Shadow 蒙版和一个 Material 蒙版。

Visibility Parameters可见性参数#

Parameters controlling decal's visibility:参数控制贴花的可见性:

Min Visibility A minimum visibility distance, starting at which the decal begins to fade in and then becomes completely visible, in units.最小可见距离,贴花开始渐隐,然后完全可见,单位为单位。
Min Fade A minimum fade-in distance, across which the decal smoothly becomes visible due to the alpha fading. It is counted starting from the minimum visibility distance value, in units.最低淡入距离,跨越的贴花顺利成为可见由于α衰落。它是计算从最小能见度距离值,在单位。
Max Visibility A maximum visibility distance, starting at which the decal begins to fade out until becomes completely invisible, in units.最大可见距离,从该点开始贴花开始淡出直到完全不可见,单位为单位。
Max Fade A maximum fade-out distance, across which the decal smoothly becomes invisible due to the alpha fading. It is counted starting from the maximum visibility distance value, in units.最大淡出距离,在贴花纸顺利成为看不见的由于α衰落。它是计算从最大能见度距离值,在单位。
Opacity Opacity of the decal. This parameter enables you to control whether the decal should be semi-transparent or fully opaque (by the value of 1).不透明的贴纸。该参数允许您控制的贴花是否应该半透明或完全不透明(1)的价值。

Setting a Material设置材质#

The material selection: 材质选择:

Material A new material for the decal.贴花的新材质。
最新更新: 2023-12-19
Build: ()