添加建筑物
Sandworm allows the procedural generation of buildings based on shapes stored in the vector data sources.Sandworm允许程序生成的建筑基于形状存储在矢量数据来源。
The Procedural Generation Assets add-on contains 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.Procedural Generation Assets附加组件包含额外的建筑材质,为城市景观增添了多样性。 您可以使用自己的材质,只要它们是按照 规则 创建的。
See Also另请参阅#
观看这段视频,来自Sandworm地形生成系列视频教程:
Setting the Building Object添加构建对象#
-
Create the object: in the Objects panel, click + for Buildings.创建对象:在Objects面板中,单击 Buildings 的 +。
-
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.在 Parameters 选项卡中,添加源:单击 Add Source(s) 按钮,选择 Assets 并将路径设置为 sw_georeferenced/vector/buildings.shp 文件。
As the source is added, we can click the Preview button below to see the building data preview on the map.添加源以后,我们可以单击Preview按钮下面看到地图上的建筑数据预览。
-
Add a filter if you want to pick specific data from the source.如果您想从源中选择特定数据,请添加 filter。
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.打开属性表(按钮)查看所有可用的数据和任何您想要的过滤器。如果您没有添加过滤器,所有建筑物将生成。
-
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.事实上,我们已经可以使用自动设置生成建筑。然而,如果您这样做,您会发现一些摩天大楼等不典型的城镇。这是由于floor列中提供的数据属性表的:一些值是不相关的。过滤器也不能帮助在这种情况下的数据字符串格式。
To solve this problem, let's switch to the Manual mode and set the Floor Number parameter to Random:为了解决这个问题,让我们切换到Manual模式,设置Floor Number参数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.在这种情况下Sandworm将无视任何数据源和地板数量值生成随机数的建筑楼层设置在Floor Number Range从1到5。
- Click the Create Building Object button.单击Create Building Object按钮。
Generated Buildings生成的建筑#
What Else还有什么#
- Check the article on Buildings Customization.查看关于 建筑定制 的文章。