A script that generates a colorful "low-voxel" (like low-poly but for voxels) city. It produces a .vox
file that can be rendered with MagicaVoxel. It also produces a .png
floorplan image of the city.
Running requires Python 3, as well as the Pillow Python library (for writing the PNG).
Then simply run with (where my python
references python3
):
python voxel_city.py
Note that this takes about 70 seconds to execute (on my machine). When executed with assertions disabled, it runs in about 55 seconds. This is done as follows:
python -O voxel_city.py
Note that I use Python's type annotations, where I use mypy to perform the type checking (mypy voxel_city.py
).
The .vox file can be rendered with MagicaVoxel. (It runs with Wine - for *nix users)
Before rendering, I adjusted the first 3 colors in the color-palette (used for the building windows) to be emissive.
BSD-3 - See the LICENSE
file