WaveForge is a web application, that serves as a somewhat user-friendly playground used for generating images from samples or unique tilesets, utilizing the Wave Function Collapse algorithm.
The project was created by Dávid Butyka as a university thesis.
Wave Function Collapse (WFC) is a procedural content generation algorithm inspired by quantum mechanics. Despite the fancy name, it's not that hard to understand and is mainly used for generating patterns like images or even texts by following a set of local rules — kind of like solving a puzzle one piece at a time.
Image generation with WFC works by observing the possibilities at each cell in a grid and gradually narrowing down the options until a complete, valid solution is formed. It's commonly used in games and tools for generating tile-based levels, textures, and worlds that feel natural and coherent.
Here is a very simple description of the algorithm:
Key concepts:
Wave Function Collapse (WFC) comes in two main flavors, each with its own strengths and ideal use cases.
The Overlapping model is more automatic and works by sampling a source image. It looks at small patterns (like 3x3 pixel chunks), learns how they appear next to each other, and uses that data to generate larger images that resemble the original.
This model is great when you want to:
It’s like teaching the algorithm by example — show it a pattern, and it dreams up a new one that looks similar.
The SimpleTiled model works with predefined tiles and their allowed neighboring relationships. You, the user, tell the algorithm which tiles can be placed next to each other (top, right, bottom, left), and it builds a grid by respecting those adjacency rules.
This makes it ideal for:
It's like building a mosaic where each piece must fit perfectly with its neighbors.
You can learn more about WFC in the following pages:
There are generally two methods of image generation with WFC. On WaveForge you can try both!
The Overlapping model allows for sample based image generation, meaning that you only need to upload a small sample image, play around with the algorithm parameters, and just click generate! Then the algorithm will "analyze" the sample and construct a completely random, new image that features only the valid patterns and rules shown by the sample.
There are certain generation parameters that you can change, to better describe the sample or the expected output.
Here is what they mean:
The SimpleTiled model allwos for a tileset based image generation. You need to upload a tileset and configure the adjacency rules for the available tiles. After that the algorithm will basically randomly assemble a new image according to the configuration you set. This method requires way more user effort as you need to have a good understanding of the proccess and a precise configuration, otherwise the algorithm can run into contradictions very easily. There is only one real algorithm parameter for this model, which defines wether or not the output should be periodic or not.
There are certain generation parameters that you can change, to better describe the sample or the expected output.
Here is what they mean:
Following the generations you can directly download the image, or save it to your profile if you are signed in.
You can draw your own images and use them as samples for the Overlapping model generation even without the need of downloading the sample. It is a basic pixel canvas drawing tool. You can set the width and the height of the canvas and also the cellsize, but the later only matters for the visibility during drawing.
After drawing you can download, or copy your image to the clipboard and paste it into the Overlapping model page or even back to the drawing canvas. This way you can use these images without downloading them.
With the clipboard tool you can move sample images between pages without downloading them. It works just like a normal text clipboard, you can copy images while in the application and paste it to appropriate pages.
You can only copy one image at once.
There are two locations where you can copy images from in the application and also two locations where you can paste images into. You can copy from the drawing tool or any sample image from public uploaded images, and then you can insert these into the drawing tool or the Overlapping model.
Or more simply, if you see this: you can copy, and if you see this: you can paste.