This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
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
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Buildings Customization

Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Engineering / Sim SDK edition to use it.

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.
  • The Basement height is defined by the Basement Height value and is 0.7 meter high above terrain by default.
  • The Ground Floor height is defined by the Row Size value and is 3 meters high by default.
  • 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.

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.

Notice
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.
  • 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.

    Texture for Underground Basement and Basement
  • 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.

    Texture with windows for Ground Floor
    Solid texture for Ground Floor
  • For Upper Floors, a single texture for a wall with windows is applied.

    Texture with windows for Upper Floors
    Solid texture for Upper 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 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#

Notice
Each material should be inherited from mesh_base.

For materials to be correctly applied by Sandworm to the generated buildings, follow these rules:

  • 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.
    • *_ground_sw — material for the Ground Floor wall without doors and windows
    • *_ground_windows_sw — material for the Ground Floor wall with doors and windows
    • *_upper_sw — materials for the Upper Floors wall with doors and windows
    • *_upper_windows_sw — materials for the Upper Floors wall without doors and windows
    • *_roof_sw — material for Roof
    • *_ridge_face_sw — material for the Roof ridges connecting the roof sections

The basic set of building materials is available in the /core/materials/buildings/ folder.

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:

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:

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:

Base Parameters:

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.
  • Random — materials are applied randomly from the materials that Random Material List contains.
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.
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.
  • Random — number of floors is assigned randomly from 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.
Roof Parameters:

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.
  • Random — the roof type is assigned randomly from the available 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.

Notice
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.
  • Random — the roof height is assigned randomly from the available height range for the corresponding roof type.
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.

Notice
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.
  • Random — the roof material is assigned as set for the corresponding roof type.
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.
Notice
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.

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.
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.

See Also#

Last update: 2022-04-20
Build: ()