New free content from City of Brass and The Vagrant now available

Procedural Environment Generator (WFC)

Ivan Donchevskii - Feb 3, 2020

Wave Function Collapse algorithm for procedural environment generation

  • Supported Platforms
  • Supported Engine Versions
    4.24 - 4.26
  • Download Type
    Engine Plugin
    This product contains a code plugin, complete with pre-built binaries and all its source code that integrates with Unreal Engine, which can be installed to an engine version of your choice then enabled on a per-project basis.

Generate 3D or 2D environments (game levels, buildings, etc.) with Wave Function Collapse algorithm.


Set the rectangular nodes and connection rules for them inside the Blueprint preview window and press the Generate button to automatically form a level.


Use one of many Blueprint functions like Generate Meshes Async to generate and spawn your static meshes or custom Blueprints in Runtime. You can set different constraints and append your level in runtime allowing you to create infinite levels.

Playlist with tutorials

Twitter


Buildings from the screenshots were generated with this example project, to work it requires free modular building set. The yellow stairs example could be found directly in the Content of this plugin.

Technical Details

Features:

  • Optimized 3D WFC generator with backtracking
  • Draw WFC components and their connections inside Blueprint preview window
  • Replace components with your custom Blueprints (allows to use multiple meshes for one voxel)
  • Per frame spawning of actors with static meshes in play mode
  • Show the Seed and allow to enter the custom seed to reproduce the previous generation
  • Export and Import the plugins settings
  • (Full version) Setting custom heights for different floors
  • (Full version) Auto-map components and custom Blueprints by name
  • (Full version) Generate actors at any time of the game (synchronously or asynchronously)
  • (Full version) Replication of the actors generated in game
  • (Full version) Spawn instanced static meshes instead of actors
  • (Full version) Continuously build level around the character with or without removing the old voxels
  • (Full version) Set constraints: symmetric levels (by X and/or Y axis), walkable paths, fixed components (single or range), components max count

Code Modules:

  •  WfcEnvironmentGenerator - Runtime
  • WfcEnvironmentGeneratorEditor - Editor

Number of Blueprints: 2

Number of C++ Classes: 5 UCLASS, 2 UENUM, 3 USTRUCT, 20 plain C++ classes/structs

Network Replicated: Yes

Supported Development Platforms: Win64, Win32, Linux, Mac

Supported Target Build Platforms: Win64, Win32, Linux, Mac

Documentation: Readme.md