This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
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

生成管道、围栏、电力线

警告
本文介绍的功能在 Community SDK 版本中不可用。
您应该升级到 Engineering / Sim SDK版本才能使用它。

Fences, pipes, and similar objects are placed along line segments selected from vector data sources (*.shp files).围栏、管道和其他此类对象沿从矢量数据源(*.shp 文件)中选择的线段放置。

The general workflow is as follows:基本工作流程如下:

1. 准备一个基本对象#

First, we create a primary object, that will be used as a building block for the generation — any *.node file containing a single root node with any hierarchy.首先,我们创建一个基本对象,它将用作生成的构建块——包含具有任何层次结构的单个根节点的任何 *.node 文件。

注意
The primary object must be located and have a pivot at the origin (0, 0, 0).必须找到基本对象并在原点 (0, 0, 0) 处有一个枢轴。

2. Adding a Vector Data Source and Specifying Filters2. 添加矢量数据源并指定过滤器#

This step is the same as Adding a Vector Data Source and Specifying Filters for Roads.这一步与添加矢量数据源指定过滤器为道路。

3. Adding the Object and Specifying Parameters3. 添加对象和指定参数#

Now we must add the primary object created at the first step and bind it to the Filters created at the second step.现在,我们必须添加在第一步创建的基本对象并将它们绑定到在第二步创建的过滤器。

  1. On the Sources panel, click + Add Object.Sources 面板上,单击 + Add Object.

  2. In the drop-down, select the type of object you generate according to the Slot data. In our case, it is Points. Click Import.在下拉列表中,根据槽数据选择要生成的对象类型。在我们的例子中,是 Points。单击 Import

Specify the following parameters for the primary object:为每个基本对象指定以下参数:

Slot 由您创建的用于组织数据过过滤器的槽。
Node The path to the primary object's *.node file.通往基本对象*.node 文件。
Enabled 当打开时,将生成这种类型的对象。关闭时,这种类型的对象不会生成,也不存在于包含生成的地形的世界中。
Use as Fence Toggling on this option allows creating a line of object instances along the selected vector data.切换此选项允许沿选定的矢量数据创建一行相同的对象。
Auto size

Autosizing for lengthy objects, such as fences and pipes. If enabled, the primary object instances are stretched and placed with zero-spacing so that bounding boxes of the first and the last instance are aligned with start and end points of the line segment, respectively.自动调整长对象,如围栏和管道。如果启用,基本对象将被拉伸并以零间距放置,以便第一个和最后一个基本对象的边界框分别与线段的起始点和结束点对齐。

Disabling this option makes the following parameters available:禁用此选项将使以下参数可用:

Step Distance between two adjacent instances, in units.两个相邻基本对象之间的距离,单位。
Start offset Offset for the first instance's pivot from the start point of the line segment, in units.第一个基本对象的轴距线段起点的偏移量,以单位为单位。
End offset Offset for the last instance's pivot from the end point of the line segment, in units.最后一个基本对象的轴距线段终点的偏移量,以单位为单位。
Fit to size Enables stretching/shrinking of primary object instances to place them along line segments without spaces between them.启用基本对象的拉伸/收缩,以便它们沿着线段放置,而它们之间没有空格。
Collider

Flag indicating if collisions for the generated object are to be detected.指示是否要检测生成对象的碰撞的标志。

注意
Available only for the geometry type.仅适用于几何类型。
Drop to ground Flag indicating if the generated object will be aligned with the terrain surface.指示生成的对象是否与地形表面对齐的标志。
Height offset

Distance from the terrain surface along the Z-axis, in units. 沿 Z 轴到地形表面的距离,以单位为单位。

注意
If the generated object is partially under the ground, increase this value to lift it above the terrain surface.如果生成的对象部分位于地下,则增加此值以将其提升到地形表面上方。
Bake to cluster

Flag indicating if the generated objects will be baked to a Mesh Cluster.指示生成的对象是否将烘焙为 Mesh Cluster 的标志。

注意
The option is available only when the specified *.node file contains a Static Mesh.该选项仅在指定的 *.node 文件包含 Static Mesh 时可用。

Don't use baking to a Mesh Cluster for large areas because of the coordinates precision limitations.由于坐标精度限制,不应将烘焙到 Mesh Cluster 用于大面积。

Forward axis Axis along which the primary object is to be tiled: X, -X, Y, -Y.基本对象沿其平铺的轴:X, -X, Y, -Y

Placing Billboards放置广告牌#

You can also place billboards along the line segments selected from vector data sources.您还可以沿着从矢量数据源中选择的线段放置广告牌。

This option can be used, for example, to simulate lights along the generated roads. The general workflow is the same as described above with the following additions:例如,此选项可用于模拟沿生成的道路.基本工作流程与如上所述增加了以下内容:

  • At Step 1, use a *.node file containing a single Billboards object as the primary object. The Billboards object should have an emissive material assigned to its surface.步骤1使用包含单个 Billboards 对象的 *.node 文件作为基本对象。 Billboards 对象应该有一个发光材料分配给它的表面。

    注意
    If a *.node file contains several billboards, only the settings of the first one will be used.如果 *.node 文件包含多个广告牌,则只会使用第一个的设置。
  • At Step 2, select the vector data of the road along which the lights are to be placed.第2步选择要放置灯光的道路的矢量数据。
  • At Step 3, when specifying parameters, do the following:第 3 步, 在指定参数时,应执行以下操作:

    1. Disable the Autosize option.禁用 Autosize 选项。
    2. Set the value for the Step parameter that determines the distance (in units) between the two adjacent lights (Billboards) placed along the road.设置 Step 参数的值,该参数确定沿道路放置的两个相邻灯 (Billboards) 之间的距离(以单位为单位)。

    The extra parameter becomes available: Split Billboards length (km). This parameter allows you to control the number of Billboards objects that will be generated due to area splitting:额外的参数变得可用:Split Billboards length (km)。此参数允许您控制由于区域分割而将生成的 Billboards 对象的数量:

    • Low values will increase the number of generated Billboards objects.低值将增加生成的 Billboards 对象的数量。
    • High values will reduce this number.值会减少这个数字。
    注意
    The maximum number of Billboards contained in a single Billboards object is limited to 8000. Thus, the number of generated Billboards objects is also affected by the Step value, that you specify, since a low value produces a large total number of Billboards. Although Billboards are performance-friendly, generating too many of them may reduce performance.单个 Billboards 对象中包含的 Billboards 的最大数量限制为 8000。因此,生成的 Billboards 对象的数量也受您指定的 Step 值的影响,因为较低的值会产生大量的 Billboards。虽然 Billboards 对性能很友好,但生成太多可能会降低性能。

4. Generating Objects4. 生成对象#

Now you need to configure the output settings and generate (or regenerate) the terrain which contains these vector objects by clicking the Generate button.现在你需要配置输出设置产生(或者再生) 通过单击 Generate 按钮包含这些矢量对象的地形。

By default, the generated objects are added to the world hierarchy as NodeReferences. However, they can be baked to a MeshCluster, if the corresponding option is enabled.默认情况下,生成的对象作为 NodeReferences 添加到世界层次结构中。然而,它们可以被烘焙到 MeshCluster,如果对应选项已启用。

Vector Objects as NodeReferences向量对象为 NodeReferences
Vector Objects as MeshCluster向量对象为 MeshCluster
最新更新: 2022-08-08
Build: ()