Building Generator

Building Generator

Building Generator

Building Generator is a blueprint-based building generator which can be used to quickly generate buildings. It only requires meshes and then the spline-based algorithm will take care of the rest. Because it is based on splines you have full control over the primary shape of the building. The blueprint is also capable of generating several buildings at once which are based on a grid making it possible to create entire blocks or cities quickly. Floors and stairs can now be generated as well! Generate the buildings at runtime or bake them using Unreal's merge tool.

The buildings are generated from the ground up during each cycle based on the properties given. The generation method is deterministic (seed based) meaning that the exact generation can be regenerated given the same seed and properties. Building length, width and height can be determined prior to generation whilst adding random values. Likewise, the properties of each building can be altered. These properties include, but are not limited to, roof, cornice, curb, gutter, entrances, signs etc. Both Lumen and Nanite are compatible, and collision can either be simple or complex. Generation during runtime is possible. The buildings are game ready in terms of draw calls as they are utilizing Unreal's HISM (Hierarchical Instanced Static Mesh) which also support LODs. The roofs, curbs, sidewalks and cornices are all generated using procedural meshes.

Features:
All meshes are interchangeable (note, not the procedural meshes - curbs, cornices and roofs).
Single or multiple building generation.
Easy to control spline system that dynamically adjusts to the terrain.
Adjust building height, width and length.
Four procedural roof types, gable, hip, shed and flat roofs.
Courtyards.
Terraced buildings.
Spawn as BP option for certain meshes.
Free-form mode allowing for control over each individual spline point allowing for a custom building footprint.
Simple interior support - Floors and Stairs.
Async generation during runtime.
Automatically scale meshes to fit perfectly or utilize the non-scale circle-circle intersection method for non-scaled building meshes.
Custom data on building meshes, signs and socket meshes.
Slanted or flat procedural mesh roofs.
Curb and cornice custom profiles using curves.
Spawn meshes per building mesh based on sockets.
Balconies, gutters, roof meshes, curbs, signs, trees, street meshes and more.
Per building procedural meshes allow for variance in materials.
Bake buildings down to static meshes using Unreal's merge tool.
Automatic forward axis on building meshes.

Limitations:
Tri-planar texturing is advised on the procedural meshes due to the UV-unwrapping method (per face).
Roofs are procedurally generated meaning that you cannot use your own mesh. The types of roofs are as follows: Gable, Hip, Flat, and Shed.
Roofs do not support smooth shading or beveled edges.
Procedural meshes do not support Mesh Distance Field Generation and can produce non-optimal Lumen results when inside a building.
Roof tile generation is yet an experimental feature and can produce some wacky results if the buildings angles are not right.

Noteworthy:
When generating large cities, it can be required to increase the "Maximum Loop Iteration Count" in the project settings.
The included meshes are meant as placeholders and are low poly.

Update history:
V13
Added Terraced building bool in properties.
Added SpawnAsActor for most mesh types. Useful for spawning actors like chimneys or doors which require logic or movement.
Added CorniceMesh? which allows you to specify a mesh instead of procedurally generating the cornice. Separate cornices for bot, mid and top are available.
Added Seperate meshes for corner pillars, bot, mid and top.
Added a blueprint (BP_SpawnBuildingGeneratorExample) which showcases how you can spawn a building generator from an external blueprint.
Added "Styles" - Data assets which you add only the meshes you want in the style. Then drag and drop the Style on the building generator and it will convert its meshes to those of the Style.
Fixed issue when baking where collision was not working (all meshes are required to be complex as simple in order to use complex collision).
Fixed bug where the hip roof height was not seeded.
Fixed Z-fighting on building meshes, in the corners.
Fixed issue where warnings would appear if a mesh array was left empty.
Fixed so that corner pillars do not overlap building meshes (only works in auto scale).
Replaced CorniceScale and CorniceScaleRandom with a single variable.
Removed CornerPillarOffsetZ (no longer compatible with new formula).

V12A
Fixed the procedural mesh component not being visible.
Fixed persistent buildings causing a lag spike when selecting them.

V12 Video
Added new roof type, "hip roof".
Added new roof type, "shed roof".
Added courtyards.
Added free-form single building allowing you to freely decide the footprint of the building using spline points, experimental feature.
Added "Async?" and "AsyncFast?" which reduces lag when generating during runtime.
Persistent buildings now have persistent procedural meshes.
"PerBuildingProceduralMeshes" is now deprecated, all buildings are now their own entities, ie they have there own HISMs and procedural mesh components.
Random building width, height and roof slanted height are now condensed into one variable each.
Added option "AutoAlignSplinePoints" which turns on or off the automatic terrain adjustment.
Reworked the roof tile formula, should be a lot cleaner now (still not perfect).
Added "RoofTileAngle" which allows you to fine tune the angle of tiles.
Added "RoofTileApexZOffset" which allows you to offset the apex tiles up and down.
Added intermediate apex tiles for the gable roof.
Added "RoofTileCastShadow" which switches on or off shadow casting for roof tiles.
Fixed bug causing random sidewalk material to not work.
Fixed bug causing streetlights not spawning when "RemoveSomeStreetLights" was active.
Fixed bug causing corner pillars to not reach the ground when building on a slope.

Features:
Spline based building generation.
Deterministic (seed based generation).
Modular (add your own meshes).
HISM (LODs and few draw calls).
Procedural Mesh generation for roofs, cornices, sidewalks and curbs.
Export buildings using Unreal Engine's Merge/Export.

Number of Blueprints: 1
Number of Meshes: 55
Number of Materials: 3
Network Replicated: No
Supported Development Platforms: All platforms should be supported (only Windows has been tested).

https://www.unrealengine.com/marketplace/en-US/product/procedural-building-generator-01

File Hosting: Mega.nz

You need to Register Or Login to see the Download link.
Register
To report this post you need to login first.

Leave a Comment

 

Post You Might Like