Wave Function Collapse for Image Files
A helper for wfc to simplify generating images based on image files, using the image crate.
Examples
Most of the sample images are taken from mxgmn/WaveFunctionCollapse.
Simple
This example generates an output image which is similar to the input image.
->
->
Flowers
It's also possible to manually restrict the output to encode specific properties. In this example:
- The bottom row of patterns is set to be ground.
- A sprout pattern is placed in a random position along the bottom of the output.
- Ground patterns are forbidden from being automatically chosen.
- The flower pattern is forbidden to appear in the bottom few rows of output, to enforce a minimum height of flowers.
->
Pass the flag --animate
to view a realtime animation of the image being generated:
Animate
This is a general tool for displaying in realtime, the generation of an image from a specified image file.
->
->
->