You can set the palette size (16 default), tile size (8 default), and number of tiles (64 default, but you'll often want to change that).
There are two scripts:
- quantize_image - doesn't reduce palette size. Use this if you want to post process.
- quantize_3bp - this reduces palette, dithers, and selects colours from the Mega Drive hardware palette. The output is basically good to go
Git hub link - https://github.com/seanbouk/quantizeMD/tree/main - installation instructions on there
Example 1 - forest canopy from above. No tiling in input image
Input -
Output showing 64 tiles -
Example 2 - forest floor showing mud paths and huts from above:
Input -
Output preserves repeating tiles -
Example 3 - Render of 3D character
Input -
Output showing 1024 tiles -
NB - it doesn't make use of flipping tiles. It would probably work better if it did, but I couldn't get it working! Maybe a solution will come to me at some point.