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
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Adding Pipelines, Fences, Powerlines

Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Engineering / Sim SDK edition to use it.

Fences, pipes, and similar objects are placed along line segments selected from vector data sources (*.shp files). You can also simulate aircraft warning lights (in this case Billboards is used as the basic object).

In this chapter, let's create lights using the Billboards object and place a fence along a road.

Preparing a Primary Object#

A primary object to be used for the generation should be a *.node file (Node Reference) containing a single root node with any hierarchy.

Preparing Billboards#

  1. Create a Billboards: click Create —> Billboards —> Base on the Menu bar.
  2. Inherit the surface material and enable the Emission state. You can change the emission color and any other parameters in the Parameters tab.

  3. Export the object to a *.node file.
Notice
The *.node file should contain a single Billboards object.

Now that the primary node (the *.node asset) is ready for use, you can disable it or delete from the scene.

Preparing Fence#

An important issue about placing objects along the lines is the node's pivot point: it should be shifted, if you want a fence to be generated near the road, not in the middle of it. To do this, open the asset in a third-party Digital Content Creation software.

The width of the plane that we created for the road is 10 units, therefore we need to move the fence more than 5 units from the pivot, so that it wouldn't be on the road.

The reimported model will look as follows:

Fence with a shifted pivot

Placing Points#

Placing Billboards#

In Sandworm, create a Point object and add the data source.

As we are going to place billboards along the road, let's use sw_georeferenced/vector/roads.shp file as the vector data source.

  1. Select the created Node Reference as Node.
  2. Enable the Use as Fence option.
  3. Disable the Autosize option.
  4. Set 5 as the value for the Step parameter that determines the distance (in units) between the two adjacent lights (Billboards) placed along the road.
  5. Click the Create Point Object button.

The generated lights will look as follows (if you disable the sun light):

Placing Fence#

In Sandworm, create a Point object and add the data source.

As we are going to place a fence along the road, let's use sw_georeferenced/vector/roads.shp file as the vector data source and set a filter. Placing fences along all roads might be not very performance-friendly.

Let's set the same filter as for roads:

And set the following parameters for the object:

  1. Select the created Node Reference as Node.
  2. Enable the Use as Fence option.
  3. Click the Create Point Object button.

The generated fence will look as follows:

You can modify the cluster manually, but keep in mind that if you regenerate the object all manual changes will be lost. A solution may be to clone the edited object and move outside the Terrain hierarchy.

What Else#

Last update: 2022-10-10
Build: ()