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

建筑定制

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

This article reviews the main concepts of the building composition to give a deeper understanding of how the assets should be prepared.本文回顾了建筑组合的主要概念,以更深入地了解应如何准备资产。

Main Concepts主要概念#

For the sake of the generation of buildings, we differentiate between the following two types of buildings:为了建筑物的生成,我们区分以下两种类型的建筑物:

  • Single-story buildings, which have only one floor单层建筑,只有一层
  • Multi-story buildings, which have two or more floors有两层或更多层的多层建筑

Conceptual representation of single-story and multi-story buildings单层和多层建筑的概念表示
  • Underground Basement is the part of the basement that goes down under the terrain level. This part is required when a building is generated on uneven terrain and would otherwise partially hover above the ground. Its height is controlled by the Underground Basement Height value and is 3 meters down from the terrain level by default.Underground Basement 是地下室的一部分,位于地形水平之下。当建筑物在不平坦的地形上生成时需要此部分,否则会部分悬停在地面上。它的高度由Underground Basement Height值,默认情况下比地形水平低 3 米。
  • The Basement height is defined by the Basement Height value and is 0.7 meter high above terrain by default.Basement 高度由 Basement Height 值定义,默认情况下高于地形 0.7 米。
  • The Ground Floor height is defined by the Row Size value and is 3 meters high by default.Ground Floor 高度由行大小值,默认为 3 米高。
  • Single-story buildings don't require any texture for upper floors, while the texture for the basement is mandatory, as it is an anchor for all other textures in a set.单层建筑不需要上层的任何纹理,而地下室的纹理是强制性的,因为它是集合中所有其他纹理的锚。

Buildings Texturing建筑物纹理#

UNIGINE provides a set of built-in materials for generated buildings: they are inherited from mesh_base and named according to the rules. You can also create your custom textures and set up materials. However, your textures should meet a set of requirements described below.UNIGINE 为生成的建筑提供了一套内置材质:它们继承自 mesh_base 并根据规则.您还可以创建自定义纹理并设置材质。但是,您的纹理应该满足下面描述的一组要求。

Four types of textures should be prepared for a building: a texture for the basement, a texture for the wall with windows (and sometimes doors), a texture for the solid wall, and a texture for the roof. The UV map of each part of the building depends on the size of the wall segment that is shown on the texture.应该为建筑物准备四种类型的纹理:地下室的纹理、带有窗户(有时还有门)的墙壁的纹理、实心墙的纹理和屋顶的纹理。每个的 UV 映射建筑物的一部分取决于纹理上显示的墙段的大小。

注意
Textures for walls differ depending on the part of the building they are applied to: if a texture is applied to Basement, it should depict Basement and Underground Basement.墙壁的纹理根据它们应用于建筑物的部分而有所不同:如果纹理应用于 Basement,它应该描绘 BasementUnderground Basement
  • For Underground Basement and Basement, a single texture for a wall is applied. The texture height corresponds to the height of all these parts (in sum), and the texture is stretched vertically to fit this part of the building.对于 Underground BasementBasement,应用单个墙壁纹理。纹理高度对应于所有这些部分的高度(总和),并且纹理被垂直拉伸以适应建筑物的这一部分。

    Texture for Underground Basement and BasementUnderground BasementBasement 的纹理
  • For the Ground Floor, an individual texture is applied. The texture height is applied to the building using the Row Size value as the floor height.对于 Ground Floor,应用单独的纹理。纹理高度使用行大小值作为楼层高度。

    Texture with windows for Ground Floor带有 Ground Floor 窗口的纹理
    Solid texture for Ground FloorGround Floor 的实体纹理
  • For Upper Floors, a single texture for a wall with windows is applied.For Upper Floors, a single texture for a wall with windows is applied.

    Texture with windows for Upper FloorsTexture with windows for Upper Floors
    Solid texture for Upper FloorsSolid texture for Upper Floors

    There are two parameters — Rows per Texture and Columns per Texture — that form a grid for this texture.There are two parameters — Rows per Texture and Columns per Texture — that form a grid for this texture.

    Texture Grid

    The texture for the upper floors with windows is applied wherever possible along the wall from the first floor upward and from the center to the building corners horizontally and is cut according to these imaginary grid lines, creating one surface. Edges are tiled using the solid texture and form another surface.The texture for the upper floors with windows is applied wherever possible along the wall from the first floor upward and from the center to the building corners horizontally and is cut according to these imaginary grid lines, creating one surface. Edges are tiled using the solid texture and form another surface.

    For Upper Floors, a single texture for a wall with windows is applied.Texture with windows for Upper FloorsSolid texture for Upper FloorsThere are two parameters — Rows per Texture and Columns per Texture — that form a grid for this texture.The texture for the upper floors with windows is applied wherever possible along the wall from the first floor upward and from the center to the building corners horizontally and is cut according to these imaginary grid lines, creating one surface. Edges are tiled using the solid texture and form another surface.

    For Upper Floors, a single texture for a wall with windows is applied.对于 Upper Floors,应用带有窗户的墙壁的单个纹理。

    Texture with windows for Upper Floors带有 Upper Floors窗口的纹理
    Solid texture for Upper FloorsUpper Floors的实体纹理

    There are two parameters — Rows per Texture and Columns per Texture — that form a grid for this texture.有两个参数——每个纹理的行数每个纹理的列- 为这个纹理形成一个网格。

    Texture Grid

    The texture for the upper floors with windows is applied wherever possible along the wall from the first floor upward and from the center to the building corners horizontally and is cut according to these imaginary grid lines, creating one surface. Edges are tiled using the solid texture and form another surface.上层带窗户的纹理尽可能沿墙壁从一楼向上,从中心到建筑物的角落水平应用,并根据这些假想的网格线切割,形成一个表面。边缘使用实体纹理平铺并形成另一个表面。

  • For Roof, two textures should be applied — for the roof and the ridges. Ridges are used to cover the connection of two roof planes.对于 Roof,应该应用两个纹理——屋顶和山脊。脊用于覆盖两个屋顶平面的连接。

    Roof texture屋顶纹理
    Ridges texture山脊纹理

    The roof material can be used as is or change the color based on the imagery data. Enabling the corresponding option allows multiplying the material albedo by the color taken from the imagery data.屋顶材料可以按原样使用,也可以根据图像数据更改颜色。启用对应选项允许将材质反照率乘以从图像数据中获取的颜色。

Materials Naming材料命名#

注意
Each material should be inherited from mesh_base.每个材质都应该从 mesh_base 继承。

For materials to be correctly applied by Sandworm to the generated buildings, follow these rules:要让 Sandworm 正确地将材料应用于生成的建筑物,请遵循以下规则:

  • Define a prefix that a group of materials applied to walls (basement, ground floor, and upper floors) will use.定义一组应用于墙壁(地下室、底层和上层)的材料将使用的前缀。

    You can use the source data material value as the prefix of the material. In this case, the material will be applied automatically to all buildings that have this value assigned.您可以使用源数据材料值作为材料的前缀。在这种情况下,材料将自动应用于所有分配了该值的建筑物。

    Roof materials also can use a key value of source data as a prefix. In this case, the material will be applied automatically to all roofs that have this value assigned.屋顶材料也可以使用源数据的键值作为前缀。在这种情况下,材质将自动应用于所有指定了该值的屋顶。

    If your source data don't have material details, you can choose an arbitrary name.如果您的源数据没有材料详细信息,您可以选择任意名称。

  • Materials should use the following name postfixes:材料应使用以下名称后缀:

    • *_basement_sw — material for Basement and Underground Basement, a mandatory material which is an anchor for other building materials, except roofs.*_basement_sw — 用于地下室和地下室的材料,这是一种强制性材料,是除屋顶以外的其他建筑材料的锚。
    • *_ground_sw — material for the Ground Floor wall without doors and windows*_ground_swGround Floor 无门窗墙的材质
    • *_ground_windows_sw — material for the Ground Floor wall with doors and windows*_ground_windows_sw — 带门窗的 Ground Floor 墙的材质
    • *_upper_sw — materials for the Upper Floors wall with doors and windows*_upper_sw — 带门窗的 Upper Floors 墙的材质
    • *_upper_windows_sw — materials for the Upper Floors wall without doors and windows*_upper_windows_swUpper Floors 无门窗墙的材质
    • *_roof_sw — material for Roof*_roof_swRoof 的材料
    • *_ridge_face_sw — material for the Roof ridges connecting the roof sections*_ridge_face_sw — 连接屋顶部分的 Roof 脊的材料

The basic set of building materials is available in the /core/materials/buildings/ folder. /core/materials/buildings/ 文件夹中提供了基本的建筑材料集。

Naming Example命名示例#

Let's assume we have an area with buildings, which can be made of bricks or wood. If we use OSM data with their specific naming, we should use the following prefixes for building materials:假设我们有一个有建筑物的区域,它可以由砖块或木头制成。如果我们将 OSM 数据与他们的具体命名,我们应该使用以下前缀来进行建筑材料:

Building OSM Value Material Names
made of bricks用砖块做的 brick

brick_basement_sw.mat

brick_ground_sw.mat

brick_ground_windows_sw.mat

brick_upper_sw.mat

brick_upper_windows_sw.mat

made of wood木质的 wood

wood_basement_sw.mat

wood_ground_sw.mat

wood_ground_windows_sw.mat

wood_upper_sw.mat

wood_upper_windows_sw.mat

Then, the roofs of these buildings can be covered with tiles, metal, or concrete. According to the OSM roof material naming, we should name the roof materials as follows:然后,这些建筑物的屋顶可以用瓷砖、金属或混凝土覆盖。根据 OSM屋顶材料命名,我们应该将屋顶材料命名如下:

Roof OSM Value Material Name
covered with tiles用瓷砖覆盖 roof_tiles

roof_tiles_roof_sw.mat

roof_tiles_ridge_face_sw.mat

covered with metal用金属覆盖 metal

metal_roof_sw.mat

metal_ridge_face_sw.mat

covered with concrete用混凝土覆盖 concrete

concrete_roof_sw.mat

concrete_ridge_face_sw.mat

Custom Parameters自定义参数#

In addition to the basic parameters that are available for Auto generation, the following parameters become available in the Manual generation mode:除了基本参数可用于 Auto 生成,以下参数在 Manual 生成模式下可用:

Base Parameters:

Base Building Parameters

Base parameters fine-tune the look of the building walls.Base parameters fine-tune the look of the building walls.

Base parameters fine-tune the look of the building walls.
基本参数:

Base Building Parameters

Base parameters fine-tune the look of the building walls.基础参数微调建筑墙壁的外观。

Base Material Distribution
  • Attribute + Random — the value is taken from Attribute. If Attribute contains no value, the material is applied randomly.Attribute + Random — 该值取自 Attribute。如果 Attribute 不包含值,则随机应用材质。
  • Random — materials are applied randomly from the materials that Random Material List contains.Random — 从 Random Material List 包含的材料中随机应用材料。
Random Material List The list of materials that will be applied to generated buildings. Only the base material (*_basement) of each group is displayed. Other materials from this group are referred to using the prefix, which should be identical for all materials of a group. The figure right to each material specifies its frequency. The toggle to the left of each material allows enabling/disabling it.将应用于生成的建筑物的材料列表。仅显示每组的基础材料 (*_basement)。该组中的其他材料使用前缀表示,该前缀对于组中的所有材料应相同。每种材料右侧的数字指定其频率。每个材质左侧的切换按钮允许启用/禁用它。
Column Size (m) Width of one texture column, in meters. A texture cell is mapped to this width on the building wall.一个纹理列的宽度,以米为单位。质感细胞映射到建筑物墙壁上的这个宽度。
Columns per Texture Number of columns in one texture. This value allows forming a grid for a more precise texture mapping. The texture mapped to walls above the ground floor is split into a grid in order to be cut properly, avoiding such visual artifacts as a part of a window.一个纹理中的列数。这个值允许形成一个网格以获得更精确的纹理映射。映射到一楼以上墙壁的纹理被分割成一个网格,以便正确切割,避免像窗户一样的视觉伪影。
Row Size (m) Height of one row, in meters. In fact, this is a floor height. A texture cell is mapped to this height on the building wall.一排的高度,以米为单位。事实上,这是一个楼层高度。质感细胞映射到建筑物墙上的这个高度。
Rows per Texture Number of rows in one texture. This value allows forming a grid for a more precise texture mapping. The texture mapped to walls above the ground floor is split into a grid in order to be cut properly, avoiding such visual artifacts as a part of a window.一个纹理中的行数。这个值允许形成一个网格以获得更精确的纹理映射。映射到一楼以上墙壁的纹理被分割成一个网格,以便正确切割,避免像窗户一样的视觉伪影。
Floor Number
  • Attribute + Random — the value is taken from Attribute. If Attribute contains no value, the number of floors is applied randomly from Floor Number Range.Attribute + Random — 该值取自 Attribute。如果 Attribute 不包含值,则从 Floor Number Range 开始随机应用楼层数。
  • Random — number of floors is assigned randomly from Floor Number Range.Random — 楼层数从 Floor Number Range 中随机分配。
Floor Number Range Minimum and maximum floor number values. A random value from this range will be used as a floor number if no data is available or Floor Number is set to Random.最小和最大楼层编号值。如果没有可用数据或 Floor Number 设置为 Random,则此范围内的随机值将用作楼层号。
Roof Parameters:

Roof Parameters

Roof parameters fine-tune the look of roofs.Roof parameters fine-tune the look of roofs.

Roof parameters fine-tune the look of roofs.
屋顶参数:

Roof Parameters

Roof parameters fine-tune the look of roofs.屋顶参数微调屋顶的外观。

Roof Type Distribution
  • Attribute + Random — the value is taken from Attribute. If Attribute contains no value, the number of floors is applied randomly from the available Roof Types.Attribute + Random — 该值取自 Attribute。如果 Attribute 不包含值,则从可用的 Roof Types 中随机应用楼层数。
  • Random — the roof type is assigned randomly from the available Roof Types.Random — 屋顶类型是从可用的 Roof Types 中随机分配的。
Roof Type Type of the roof with a probability multiplier. The following types of roofs are available:
Flat

Flat roof

Skillion

Skillion roof

Gabled

Gabled roof

Hipped

Hipped roof

You can delete the roof types that are not required to exclude them at all. You can add the previously deleted type by clicking the Plus button and selecting it in the drop-down window.You can delete the roof types that are not required to exclude them at all. You can add the previously deleted type by clicking the Plus button and selecting it in the drop-down window.

注意
If the same roof type is set more that once, the value set for the line closer to the bottom will count.If the same roof type is set more that once, the value set for the line closer to the bottom will count.

If a building top-down form is different from rectangular, it will be with a flat roof. Other types of roofs are unavailable for such buildings.If a building top-down form is different from rectangular, it will be with a flat roof. Other types of roofs are unavailable for such buildings.

You can delete the roof types that are not required to exclude them at all. You can add the previously deleted type by clicking the Plus button and selecting it in the drop-down window.If the same roof type is set more that once, the value set for the line closer to the bottom will count.If a building top-down form is different from rectangular, it will be with a flat roof. Other types of roofs are unavailable for such buildings.
带有概率乘数的屋顶类型。提供以下类型的屋顶:
Flat

Flat roof

Skillion

Skillion roof

Gabled

Gabled roof

Hipped

Hipped roof

You can delete the roof types that are not required to exclude them at all. You can add the previously deleted type by clicking the Plus button and selecting it in the drop-down window.您可以删除根本不需要排除它们的屋顶类型。您可以通过单击 Plus按钮并在下拉窗口中选择它来添加先前删除的类型。

注意
If the same roof type is set more that once, the value set for the line closer to the bottom will count.如果相同的屋顶类型设置多次,则为更接近底部的线设置的值将计算在内。

If a building top-down form is different from rectangular, it will be with a flat roof. Other types of roofs are unavailable for such buildings.如果建筑物自上而下的形式不同于矩形,它将是平屋顶。此类建筑物无法使用其他类型的屋顶。

Roof Height Distribution
  • Attribute + Random — the value is taken from Attribute. If Attribute contains no value, the roof height is taken randomly from the user-defined height range for the corresponding roof type.Attribute + Random — 该值取自 Attribute。如果 Attribute 不包含值,则屋顶高度从用户定义的 height range 中随机获取,用于相应的屋顶类型。
  • Random — the roof height is assigned randomly from the available height range for the corresponding roof type.Random — 屋顶高度是从对应屋顶类型的可用 height range 中随机分配的。
Roof Type Height

The height range (minimum and maximum possible height) of the corresponding roof type. A random value is taken from this range, if necessary. The height value for the flat roof defines the height of the roof parapet.相应屋顶类型的高度范围(最小和最大可能高度)。如有必要,从该范围中获取一个随机值。平屋顶的高度值定义了屋顶护栏的高度。

注意
If the same roof type is set more that once, the value set for the line closer to the bottom will count.如果相同的屋顶类型设置多于一次,则为靠近底部的线设置的值将计入。
Roof Material Distribution
  • Attribute + Random — the value is taken from Attribute. If Attribute contains no value, the roof material is taken from the material set for the corresponding roof type.Attribute + Random — 该值取自 Attribute。如果 Attribute 不包含任何值,则屋顶材料取自对应屋顶类型的 material 集。
  • Random — the roof material is assigned as set for the corresponding roof type.Random — 屋顶材料被指定为对应屋顶类型的 set
Roof Type Material The material set for the corresponding roof type. You can enable or disable materials, to avoid incorrect use of a material for an unsuitable type of roof, for example, disable tiles for flat roofs because it's nonsense.
注意
If the same roof type is set more that once, the value set for the line closer to the bottom will count.If the same roof type is set more that once, the value set for the line closer to the bottom will count.
If the same roof type is set more that once, the value set for the line closer to the bottom will count.
为相应屋顶类型设置的材质。您可以启用或禁用材料,以避免将材料错误地用于不合适的屋顶类型,例如,禁用平屋顶的瓷砖,因为这是无稽之谈。
注意
If the same roof type is set more that once, the value set for the line closer to the bottom will count.如果相同的屋顶类型设置多于一次,则为靠近底部的线设置的值将计入。
Common Parameters:

Common Parameters

Common parameters fine-tune the look of the basement, visibility of buildings, and splitting of the Buildings object into sectors.Common parameters fine-tune the look of the basement, visibility of buildings, and splitting of the Buildings object into sectors.

Common parameters fine-tune the look of the basement, visibility of buildings, and splitting of the Buildings object into sectors.
常用参数:

Common Parameters

Common parameters fine-tune the look of the basement, visibility of buildings, and splitting of the Buildings object into sectors.常用参数微调地下室的外观、建筑物的可见性以及将建筑物对象分割成扇区。

Underground Floor Offset (m) The height of the underground basement part. Used for uneven ground surfaces where buildings partially hover above the ground. The default value is 3 meters. You can set this value to 0.7 if you don't require it to be displayed.地下室部分的高度。用于建筑物部分悬停在地面上的不平坦地面。默认值为 3 米。如果您不需要显示此值,则可以将此值设置为 0.7
Basement Floor Offset (m) The height of the basement above the terrain level. The default value is 3 meter. You can set this value to 0 if you don't require it to be displayed.地下室高于地形水平的高度。默认值为 3 米。如果您不需要显示此值,则可以将此值设置为 0

See Also也可以看看#

最新更新: 2022-04-20
Build: ()