Example of custom developed procedural tool to generate buildings.
In the sample, a tool to generate parametric buildings was needed to improve level design workflow efficiency and reduce error from manual construction.
Procedural building generation tool
Custom editor scripting, generation algorithm definition, and tool design.
Features
Primary Features:
Allow designers to configure buildings parametrically
Supports like-modules to be batch edited after generation
“Bakes” configured assets to support dev requirements
Optimizes meshes for performance
Organizes mesh to support VFX
Applies required extra components and game object markups for systems hookups (Nav, collision, spawning systems, etc.)
Secondary Features:
Integrates into existing custom level design toolset
Designed with collection scaling in mind
Level Designer Workflow
Using the level design toolset (or manual) a building configuration prefab can be instantiated into the desired scene
Custom editor interface allows level designers to parametrically define their desired building size; one-button generation
By selecting one or more like-modules (e.g. wall modules, floor modules, etc.), custom editor interface allows for batch assignment of specific module
When design is complete, level designers can use one-button “bake” feature
Tech Art Team Upkeep Workflow
New building modules can be added to module selector prefabs
New building module collections can be added by creating new module selector prefabs
New Procedural Building Tool can be configured by modifying the in-editor references and modifying proceduralization parameters
Building Design
The Procedural Building Tool assumes that regularly sized building modules will be used to generate buildings using floor, wall, ceiling, roof, exterior wall corner, and roof overhang modules
The tool allows for the parametric definition of depth, width, and height of building by module counts
Allows for the specific definition of which floors (besides the first floor) have floors and ceilings to allow for large open structures like warehouses and factories
The foundation of the building uses a simple cube foundation with procedural concrete texture to allow for easy building placement on uneven ground
Baking Feature
All wall segments on the first floor are preserved as individual components to support cosmetic structural destruction
All upper floors’ walls are converted to combined meshes for optimization and to support view obstruction fading (VFX)
All upper floors and ceilings are converted to combined mesh for optimization and to support view obstruction fading (VFX)
Combined meshes baked to support submeshes to preserve multi-material assignments
Each new building is assigned a random serial ID and is applied to all game object names to make for easier in-editor searching
All meshes are appropriately tagged for optimized searching
All meshes are placed on appropriate layers to support game-wide collision detection policies
NavMesh components and colliders applied and configured to conform to navigation and collision conventions
Colliders and NavMesh component dimensions configured procedurally by accounting for in-game mesh size