Skip to content

Latest commit

 

History

History
39 lines (24 loc) · 1.42 KB

README.md

File metadata and controls

39 lines (24 loc) · 1.42 KB

voxel-city

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.

Blog Post

Rendered City 1

Running

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).

Rendering

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.

Rendered City - Night

Rendered City - Day

Rendered City - Top View Perspective

Rendered City - Top View Orthographic

License

BSD-3 - See the LICENSE file