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

Sandworm allows the procedural generation of buildings based on shapes stored in the vector data sources.

Procedural Generation Assets contain additional building materials to add a variety to the city view. You can use your own materials as long as they are created following the rules.

Setting the Building Object#

Notice
Currently, Sandworm allows using only offline vector data sources for the generation.
  1. Create the object: in the Objects panel, click + for Buildings.

  2. In the Parameters tab, add a source: click the Add Source(s) button, select Assets and set the path to the sw_georeferenced/vector/buildings.shp file.

    As the source is added, we can click the Preview button below to see the road data preview on the map.

  3. Add a filter if you want to pick specific data from the source.

    Open the Attributes Table (the button) to look through all available data and set any filter you want. If you add no filters, all buildings will be generated.

  4. In fact, we can already generate the buildings with Auto settings. However, if you do that, you'll notice several skyscrapers not typical for such towns. This is due to the data provided in the floor column of the Attributes table: some values are irrelevant. Filters also can't help in this case as the data is in the string format.

    To solve this problem, let's switch to the Manual mode and set the Floor Number parameter to Random:

    In this case Sandworm will disregard any floor number values from the data source and generate buildings with a random number of floors from 1 to 5 as set in Floor Number Range.

  5. Click the Create Building Object button.

Generated Buildings#

The generated buildings will look as follows:

Generated buildings

What Else#

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