This repo implements a simple tile block generator like the so called wave collapse function approach.
It's mainly based on this dissertation.
Input Image:
Generated Image:
You can use this tool to make your own example.
You can also go to tile-block-generator-ui and build by yourself.
You will need at least python version 3. And then install all the requirements pip install -r requirements.txt
.
For example
python tool.py --example ./examples/example.json --folder ./examples/tiles --size 15 15
This command generate an output tile blocks from an example file generate by tile-block-generator-ui.
The output layout has a size of 15 * 15. And all the tile images under folder ./examples/tiles
Check ./examples/example-json.png
to see the image of example.
python tool.py --help
and you will get the following response:
Usage: tool.py [OPTIONS]
Options:
--example TEXT example json file [required]
--size INTEGER... output size [required]
--folder TEXT tile image folder [required]
--overlap enable overlap method
--overlap-units INTEGER overlap units
--overlap-block-size INTEGER...
overlap block size
--output-prefix TEXT prefix for output file
--help Show this message and exit.
- /dev for development and test use
- /examples/tiles/ example tiles downloaded from unity store
- /examples/example.json example reference
- /generator all generator code