Building#
Drag a Building actor into your level, adjust the spline to draw the floor outline of a building, and click on Generate Building.
In the Building Configuration section of your building, you can change:
materials, number of floors, floor size, windows sizes, distance between windows, windows meshes, roof parameters, etc.
If you want a curved building, make sure that your spline has curves (select all spline points, and select Curve as a point type),
and increase the number of Wall Divisions in the Building Configuration.
Building Configuration#
The building is built from a Building Configuration which defines its structure. The configuration is organized into several sections:
Structure: Choose between Building Without Inside (a simple solid block, best for performance) and
Building With Floors And Empty Inside (a hollow building with separate floors and internal walls).
You can set the wall thicknesses, the number of floors (or let it be auto-computed from OSM data),
and add extra wall height above and below the floors.
Levels: A building is composed of a sequence of levels (floors), each with its own height and thickness.
You define the available levels in the Levels Map (a dictionary of LevelDescription objects),
then specify their order and repetition with the Levels Expression. See below for the grammar.
Wall Segments: Within each level, the walls are composed of wall segments that are placed along the building spline.
Wall segments can be solid walls or holes (for windows and doors). You define the available wall segments
in the Wall Segments Map of each level, then specify their order along the spline with the
Wall Segments Expression. By default, wall segments repeat for each segment between corners;
set bResetWallSegmentsOnCorners to false to apply the same pattern to the whole building.
Material Expressions: Materials are referenced by name using expressions.
For instance, {Brick:3, Stone:1} will choose Brick 75% of the time
and Stone 25% of the time. Wall segments can also override materials per face (interior/exterior, above/below holes).
Roof: Choose from None, Flat, Point, Inner Spline, Hip, or Gable roofs.
Hip and Gable roofs are computed using a straight skeleton algorithm, which automatically creates
complex roof shapes from the building footprint.
Level Expression Grammar#
The Levels Expression and Wall Segments Expression use a simple grammar:
Space-separated names are concatenated in order.
*repeats the preceding element zero or more times.+repeats the preceding element one or more times.{A:n, B:m}randomly chooses between A and B with relative weights (here, A appears n/(n+m) of the time).Name:Nrepeats the element exactly N times.
Example: GroundLevel OtherLevel* means one ground floor followed by zero or more OtherLevel floors.
Example: {LevelA:4, LevelB:1} randomly picks LevelA (80%) or LevelB (20%) for each occurrence.
Example: GroundLevel {LevelA:3, LevelB:1}+ means one ground floor followed by one or more
randomly chosen LevelA or LevelB levels.
Building Configuration Settings#
Building > Structure
Building Geometry (
EBuildingGeometry, defaultBuilding Without Inside): Choose whether you want geometry inside your building, and holes for windowsBuilding Without Inside: Simple block without any geometry inside (best performance)Building With Floors And Empty Inside: Simple block with an empty inside
External Wall Thickness (
double, default10): The thickness of the external wallsInternal Wall Thickness (
double, default1): The thickness of the internal wallsBuild Floor Tiles (
bool, defaulttrue): Build floor tiles.Auto Compute Num Floors (
bool, defaulttrue): If true (this takes precedence over NumFloors or UseRandomNumFloors) and if the Asset User Data contains a levels value, the number of floors is set to this value. If it contains a height value, the number of floors is set to the height in meters divided by 3 meters.Levels Tag (
FString, default"building_levels")Height Tag (
FString, default"height")Use Random Num Floors (
bool, defaultfalse): Random number of floorsNum Floors (
int, default5): The number of floors (including ground level)Min Num Floors (
int, default4): Minimum number of floorsMax Num Floors (
int, default8): Maximum number of floorsWall Subdivisions (
int, default0): The number of subdivisions in a wall (increase it if you want round buildings)Auto Pad Wall Bottom (
bool, defaulttrue): If true, then the next time the Building is generated, ExtraWallBottom is set to the difference between the maximum and minimum Z coordinates of the splines points, to which we add PadBottom.Extra Wall Bottom (
int, default0): Wall height below the first floorPad Bottom (
int, default0): Wall height below the first floorExtra Wall Top (
int, default20): Wall height above the last floorAuto Generate U Vs Floors (
bool, defaulttrue): Compute UVs using box projection for floorsAuto Generate X Atlas Mesh U Vs (
bool, defaultfalse): Recompute UVs using AutoGenerateXAtlasMeshUVs for full building (slow operation)Enable Complex Collision (
bool, defaultfalse)
Building > Materials
Materials (
TMap<FString, TObjectPtr<UMaterialInterface>>)Interior Material Expr (
FString)Exterior Material Expr (
FString)
Building > Levels
Cache Levels Within Building (
bool, defaulttrue): if false, then the same level can be generated in different ways due to randomization in the wall segments if true, then all occurrences of a given level in the building will be identicalLevels Map (
TMap<FString, TObjectPtr<ULevelDescription>>)Levels Expression (
FString, default"GroundLevel OtherLevel*"): an expression using the level names above, with space for concatenation, star (*) for repetition {A:2, B:3, C:5} for random choice
Building > Roof
Roof Kind (
ERoofKind, defaultFlat): Build roofNoneFlatPointInner SplineHipGable
Outer Roof Distance (
double, default100): The length of the roof that goes outside the building (overhang)Inner Roof Distance (
double, default50): The distance from the walls to the inner/top part of the roofRoof Thickness (
double, default5): Roof thicknessRoof Height (
double, default250): The distance from the top of the walls to the top of the roofRoof Angle (
double, default30): The angle of roof faces in °, 0° means fully horizontal, and 90° fully verticalRoof Material Expr (
FString)Under Roof Material Expr (
FString)Gable Material Expr (
FString)
Building > Push Out Of Collision
Attempt To Push Out Of Collision (
bool, defaulttrue): Will attempt to push the building in 8 horizontal directions for a number of steps to prevent collisions.Push Max Steps (
int, default10)Push Step Size (
int, default200)Pusher Tag (
FName, default"can-push-buildings")Show Push Debug (
bool, defaultfalse)Reproject Spline On Landscape After Push (
bool, defaultfalse)Reprojection Actor Selection (
FActorSelection)
Building > Conversions
Convert To Static Mesh (
bool, defaultfalse): Convert to static mesh after the building is generated.Enable Nanite (
bool, defaulttrue): Enable Nanite when converting building to static mesh.Building Receive Decals (
bool, defaultfalse): Whether the generated building can receive decals.Convert To Volume (
bool, defaultfalse): Convert to volume after the building is generated.
Building Settings#
Building
Spawned Actors Path (
FName): Folder used to spawn the volume. This setting is unused when generating from a combination or from blueprints.Generate When Modified (
bool, defaultfalse): Automatically regenerate the building when a property is modified.Building Configuration (
UBuildingConfiguration)Spline Component (
USplineComponent)Empty Scene Component (
USceneComponent)Static Mesh Component (
UStaticMeshComponent)Dynamic Mesh Component (
UDynamicMeshComponent)Base Clockwise Spline Component (
USplineComponent): same as SplineComponent, but all points have the same Z coordinate as the lowest point, and there are subdivisions (depending on the WallSubdivions property of the BuildingConfiguration) and the points are clockwise (when seen from above in Unreal, which isn’t the same as clockwise in TPolygon2 because of inverted Y-axis)