This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
基础
专业(SIM)
UnigineEditor
界面概述
资源工作流程
Version Control
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
统一的Unigine着色器语言 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

建筑的定制材质和参数

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

See Also
另请参阅#

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多层建筑,具有两个或两个以上的地板

Concept 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 高度由 Row Size 值定义,默认为 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 Basement质地为Underground 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,应用了单独的纹理。 使用 Row Size 值作为楼层高度将纹理高度应用于建筑物。

    Texture with windows for Ground FloorGround Floor的窗户纹理
    Solid texture for Ground FloorGround Floor的实心纹理
  • For Upper Floors, a single texture for a wall with windows is applied.对于Upper Floors,一个带有窗户的墙的单一纹理被应用。

    Texture with windows for Upper FloorsUpper 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.有两个参数Rows per TextureColumns per 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_sw Ground 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_sw Upper Floors墙没有门窗的材质
    • *_ridge_face_sw — materials for the top part of the upper wall to be applied right below the roof. This type of material is used with flat roofs only.*_ridge_face_sw 上壁的顶部的材质将在屋顶下方使用。 这种类型的材质仅与平坦的屋顶 一起使用。
    • *_roof_sw — material for Roof*_roof_sw 屋顶材质
    • *_ridges_sw — material for the Roof ridges connecting the roof sections*_ridges_sw 连接屋顶部分的脊线材质

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 数据,我们应该为建筑材质使用以下前缀:

建筑 OSM 价值 材质名称
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

brick_ridge_face_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

wood_ridge_face_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 屋顶材质命名,我们应该将屋顶材质命名为:

屋顶 OSM 价值 材质名称
covered with tiles覆盖着瓷砖 roof_tiles

roof_tiles_roof_sw.mat

roof_tiles_ridges_sw.mat

covered with metal覆盖着金属 metal

metal_roof_sw.mat

metal_ridges_sw.mat

covered with concrete混凝土覆盖 concrete

concrete_roof_sw.mat

concrete_ridges_sw.mat

Parameters
参数#

The following parameters for the Buildings object generation are available:以下参数为Buildings对象生成可用:

Generation Mode

Buildings generation mode. There are two options:建筑生成模式。有两个选择:

  • Auto — materials and roof types are assigned automatically, the set of materials available in the /core/materials/buildings/ folder is applied.Auto -材质和屋顶类型自动分配,设置的材质可用/core/materials/buildings/文件夹。
  • Manual — allows configuring materials and roof types. Selecting this mode enables additional parameters.Manual -允许配置屋顶材质和类型。选择这种模式使额外的参数。
Base Material Attributes

The name of the column where the building material is specified, in the source data Attributes table. By default, the corresponding OpenStreetMap key is used. You can replace it or add another key using a comma, if necessary.在源数据属性表中指定建筑材质的列的名称。默认情况下,使用相应的 OpenStreetMap 键。 如有必要,您可以替换它或使用逗号添加另一个键。

Roof Type Attributes

The name of the column where the roof shape is specified, in the source data Attributes table. By default, the corresponding OpenStreetMap key is used. You can replace it or add another key using a comma, if necessary.在源数据属性表中指定屋顶形状的列的名称。 默认情况下,使用相应的 OpenStreetMap 键。 如有必要,您可以替换它或使用逗号添加另一个键。

Roof Height Attributes

The name of the column where the roof height is specified, in the source data Attributes table. By default, the corresponding OpenStreetMap key is used. You can replace it or add another key using a comma, if necessary.源数据属性表中指定屋顶高度的列的名称。 默认情况下,使用相应的 OpenStreetMap 键。 如有必要,您可以替换它或使用逗号添加另一个键。

Roof Unit Size (m) The size of one side of the square area to which the texture is applied (i.e. one tile).大小的正方形区域的一侧的纹理应用(即一个瓦)。
Use Imagery Color

If disabled, the color from the roof material is used. If enabled, the color from the Imagery source is used as the roof color.如果禁用,颜色从屋顶材质使用。如果启用,颜色从Imagery源作为屋顶的颜色。

注意
To use the imagery color, the roof material should have the Vertex Color state enabled with Vertex Color Albedo set to RGB.要使用图像颜色,屋顶材质应启用 Vertex Color 状态,并将顶点颜色反照率设置为 RGB。
Roof Material Attributes

The name of the column where the roof material is specified, in the source data Attributes table. By default, the corresponding OpenStreetMap key is used. You can replace it or add another key using a comma, if necessary.在源数据属性表中指定屋顶材质的列的名称。默认情况下,使用相应的 OpenStreetMap 键。 如有必要,您可以替换它或使用逗号添加另一个键。

Split Length (km)

The size of the grid cell by which the generated geometry will be divided. The geometry of each cell is represented as a separate ObjectMeshStatic object. If the specified value exceeds or equals the size of the Export Area, a single Static Mesh will be generated.的大小的网格单元生成的几何将分裂。每个单元的几何形状是代表一个单独的ObjectMeshStatic对象。如果指定的值超过或等于Export Area的大小,一个Static Mesh将生成。

For example, if you specify 100 and have a 1000x1000 km area, the buildings will be generated as 10 separate Static Mesh objects, 100x100 km each.例如,如果您指定100 1000 x1000公里区域,生成的建筑将10 Static Mesh分离对象,100 x100公里。

Min Visibility Minimum visibility distance from the camera at which generated objects (ObjectMeshStatic) start to appear on the screen. By default, this value is -inf.最低能见度距离的相机生成的对象(ObjectMeshStatic)开始出现在屏幕上。默认情况下,这个值是-inf
Max Visibility Maximum visibility distance at which generated objects (ObjectMeshStatic) are no longer fully visible: they can either disappear entirely or start to fade out. By default, this value is inf.最大的能见距离生成对象(ObjectMeshStatic)不再是完全可见的:他们可以完全消失或开始淡出。默认情况下,这个值是inf
Min Fade Minimum fade distance, over which generated objects (ObjectMeshStatic) fade in until they are entirely visible. Along this distance, the engine automatically interpolates the level of detail from Alpha of 0.0 (entirely invisible) to 1.0 (entirely visible). Fading-in starts when the camera has reached the minimum visibility distance and is in the full visibility range.最小淡入淡出距离,生成的对象 (ObjectMeshStatic) 在该距离上淡入,直到它们完全可见。 沿着这个距离,引擎会自动将细节级别从 0.0(完全不可见)的 Alpha 插入到 1.0(完全可见)。 当相机达到 最小可见距离 并且处于完整可见范围内时,淡入开始。
Max Fade Maximum fade distance, over which generated objects (ObjectMeshStatic) fade out until they are entirely invisible. Fading-out starts when the camera has reached the maximum visibility distance and is out of the full visibility range.最大淡出距离,生成的对象 (ObjectMeshStatic) 在该距离上淡出,直到它们完全不可见。 当相机达到 最大可见距离 并且超出完整可见范围时,淡出开始。

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 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 -该值取自属性。如果属性不包含值,材质是应用随机。
  • 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 number 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 -该值取自属性。如果属性不包含值,地板的数量从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.最小和最大楼层编号值。 如果没有可用数据或 FloorNumber 设置为 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 fine-tune the look of roofs.屋顶参数调整的屋顶。

Roof Type Distribution
  • Attribute + Random — the value is taken from Attribute. If Attribute contains no value, the roof type is applied randomly from the available Roof Types.Attribute + Random 该值取自属性。如果属性不包含值,则从可用的屋顶类型中随机应用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.您可以删除根本不需要排除它们的屋顶类型。 您可以通过单击 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 -该值取自属性。如果属性不包含值,屋顶高度是随机取自用户定义高度范围相应的屋顶类型。
  • Random — the roof height is assigned randomly from the available height range for the corresponding roof type.Random -屋顶高度可用高度范围的随机分配相应的屋顶类型。
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 -该值取自属性。如果属性不包含值,屋顶材质取自material屋顶设置相应的类型。
  • Random — the roof material is assigned as set for the corresponding roof type.Random 屋顶材质被指定为对应的屋顶类型的集合。
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 fine-tune the look of the basement, visibility of buildings, and splitting of the Buildings object into sectors.通用参数调整的地下室,可见性的建筑,建筑对象的分割成行业。

Underground Basement Height (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 Height (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要显示如果您不需要它。
最新更新: 2024-12-13
Build: ()