This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
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
创建内容
Content Optimization
Materials
Art Samples
Tutorials

生成管道、围栏、电力线

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

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

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

1. Preparing a Basic Object1. 准备一个基本对象#

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

注意
The basic 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 Tags2. 添加矢量数据源并指定标签#

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

3. Specifying Parameters3. 指定参数#

Now, we must add basic objects created at the first step and bind them to the tags created at the second step.现在,我们必须添加在第一步创建的基本对象并将它们绑定到在第二步创建的标签。

  1. On the Sources panel, select the Vector data source type and the following settings will be displayed in the Vector tab of the Parameters panel.Sources 面板上,选择Vector数据源类型,以下设置将显示在 Parameters 面板的 Vector 选项卡中。

  2. Add a basic object for generation by clicking the Add button on the Parameters panel and specify the object's name. You can add as many objects as necessary.通过单击 Parameters 面板上的 Add 按钮并指定对象的名称,添加一个用于生成的基本对象。您可以根据需要添加任意数量的对象。

  3. For each basic object specify the following parameters:为每个基本对象指定以下参数:

    Name The object's name, which is displayed in the Objects list in Sandworm and in World Nodes when the terrain is generated.对象的名称,在 Sandworm 中显示在 Objects 列表中,在生成地形时显示在 World Nodes 中。
    Tag The tag for the selected object from the list of created tags.标签对于从创建的标签列表中选择的对象。
    Type Type of the vector object to be generated. In this case, we are generating Points.要生成的矢量对象的类型。在这种情况下,我们生成 Points
    Node The path to the basic object's *.node file.通往基本对象*.node 文件。
    Enabled When toggled on, the objects of this type will be generated. When toggled off, the objects of this type are not generated and won't exist in the world containing the generated terrain.当打开时,将生成这种类型的对象。关闭时,这种类型的对象不会生成,也不存在于包含生成的地形的世界中。
    Use as Fence Toggling on this option allows creating a line of identical objects along the selected vector data.切换此选项允许沿选定的矢量数据创建一行相同的对象。
    Auto size

    Enables or disables autosize mode for node placement. When this mode is enabled, basic objects are placed with zero-spacing so that bounding boxes of the first and the last basic objects are aligned with start and end points of the line segment respectively.启用或禁用节点放置的自动调整模式。启用此模式后,基本对象以零间距放置,以便第一个和最后一个基本对象的边界框分别与线段的起点和终点对齐。

    Step Distance between two adjacent basic objects, in units.两个相邻基本对象之间的距离,单位。
    Start offset Offset of the first basic object's pivot from the start point of the line segment, in units.第一个基本对象的轴距线段起点的偏移量,以单位为单位。
    End offset Offset of the last basic object's pivot from the end point of the line segment, in units.最后一个基本对象的轴距线段终点的偏移量,以单位为单位。
    Fit to size Enables stretching/shrinking of basic objects so that they are placed 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 时可用。

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

    Forward axis Axis along which the basic 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 basic 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 basic 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, you should 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
最新更新: 2021-07-09
Build: ()