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
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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

添加管道、围墙、电线

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

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).栅栏、管道和类似的对象放置在线段所选矢量数据来源(*.shp文件)。您也可以模拟飞机警告灯(在本例中广告牌作为基本的对象)。

In this chapter, let's create lights using the Billboards object and place a fence along a road.在这一章,让我们创建灯光使用Billboards对象和地点沿着道路栅栏。

See Also另请参阅#

观看这段视频,来自Sandworm地形生成系列视频教程:

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.主要对象用于一代应该是*.node文件(Node Reference)包含一个根节点的层次结构。

Preparing Billboards准备广告牌#

  1. Create a Billboards: click Create —> Billboards —> Base on the Menu bar.创建一个Billboards:单击菜单栏上的Create -> Billboards -> Base
  2. Inherit the surface material and enable the Emission state. You can change the emission color and any other parameters in the Parameters tab.继承表面材质和使Emission状态。您可以改变发射颜色和任何其他参数Parameters选项卡。

  3. Export the object to a *.node file.将对象导出到 *.node 文件。
注意
The *.node file should contain a single Billboards object.*.node文件应该包含一个Billboards对象。

Now that the primary node (the *.node asset) is ready for use, you can disable it or delete from the scene.现在,主节点(*.node资源)是准备使用,您可以禁用或删除从现场。

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.我们为道路创建的平面宽度是10个单位,因此我们需要将栅栏从支点移动5个单位以上,这样它就不会在道路上。

The reimported model will look as follows:重新导入的模型如下所示:

带有移位枢轴的围栏

Placing Points放置点#

Placing Billboards放置广告牌#

In Sandworm, create a Point object and add the data source.Sandworm 中,创建一个 Point 对象并添加数据源。

As we are going to place billboards along the road, let's use sw_georeferenced/vector/roads.shp file as the vector data source.我们要沿路的广告牌,我们用sw_georeferenced/vector/roads.shp文件作为矢量数据源。

  1. Select the created Node Reference as Node.选择创建的Node Reference作为Node
  2. Enable the Use as Fence option.使Use as Fence选项。
  3. Disable the Autosize option.禁用Autosize选项。
  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设置为Step参数的值决定之间的距离(单位)两个相邻的灯光沿着路(Billboards)放置。
  5. Click the Create Point Object button.单击Create Point Object按钮。

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.Sandworm 中,创建一个 Point 对象并添加数据源。

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.由于我们要在道路上放置围栏,让我们使用 sw_georeferenced/vector/roads.shp 文件作为矢量数据源并设置 过滤。 在所有道路上放置围栏可能对性能不太友好。

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.选择创建的Node Reference作为Node
  2. Enable the Use as Fence option.使Use as Fence选项。
  3. Click the Create Point Object button.单击Create Point Object按钮。

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.您可以手动修改集群,但请记住,如果您重新生成对象所有手动更改将丢失。一个解决方案可能是克隆编辑对象和离开Terrain对象的层次结构。

What Else还有什么#

最新更新: 2023-04-13
Build: ()