Generates bitmaps and tilemaps that are locally similar to a single input example, using a constraint-solving algorithm inspired by quantum mechanics.
WaveFunctionCollapse is a procedural content generation algorithm that creates new images, tilemaps, or 3D voxel models from a single input example. It analyzes local patterns in the source and generates outputs that are 'locally similar,' ensuring stylistic consistency. The algorithm solves a constraint satisfaction problem, making it popular for generating game levels, textures, and architectural layouts without manual design.
Game developers, pixel artists, and procedural content creators who need to generate coherent, stylistically consistent assets like levels, textures, or environments from example data.
Developers choose WFC for its ability to produce high-quality, locally consistent outputs from minimal input, its flexibility across 2D and 3D domains, and its strong integration into game engines like Unity, Unreal, and Godot. Its deterministic, constraint-based approach offers more control than purely random methods.
Bitmap & tilemap generation from a single example with the help of ideas from quantum mechanics
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Outputs strictly contain only NxN patterns from the input, ensuring stylistic consistency as per condition (C1) in the README, which is ideal for preserving artistic style in pixel art or textures.
Supports both tiled models with adjacency rules and overlapping models from bitmaps, allowing adaptation to various domains like 2D level design or 3D voxel generation, as shown in the examples.
Can autocomplete partially designed levels or combine with other algorithms like ConvChain, enabling guided synthesis and hybrid procedural generation workflows.
Has numerous ports to languages like C++, Python, and Rust, plus integrations into Unity, Unreal, and Godot, making it accessible for game developers and creators.
Performance degrades significantly with larger outputs or higher dimensions, as noted in the README, making real-time use challenging without optimizations or limited scope.
The algorithm can run into dead-ends and fail to produce output, requiring restarts or manual tweaks, since the problem is NP-hard and not always solvable quickly.
Defining adjacency rules and symmetry for tiled models is tedious and error-prone, especially for non-Wang tilesets like Circuit or Summer, which require careful manual configuration.