Image to .shem converter
4 bit Monochrome Dithering Display for Minecraft
If you new to dithering, I recommend reading this amazing article by Surma.
So I implemented real time Bayer 4x4 dithering in Minecraft. Pixel size is classical 2x2 blocks, here is one module (full 4x4 Bayer matix). You can download 4 bit monochrome display.nbt from this repository to test it ingame.
As input each pixel takes signal strength 0-15, equivalent to brightness 0-255 and later module does the math. In theory all dithering methods can be implemented in Minecraft and if you have them stored in a memory somewhere you can even switch between methods, but I didn't implement that for now.
So this python script uses mcschematic library from Sloimayyy to generate .shem file (for MC 1.13+) and it will place redstone blocks and dust depending on the input image pixel brightness (works with colored images too).
The above image had this as input into converter.py
Simulated look using my lamp display emulator:
Example resulting display image:
To convert .shem to 1.13- .schematic use this tool by PureGero.
How to run
for Windows:
- install git and python...
- create a folder somewhere and go inside.
- right click while holding shift and select Open PowerShell window here
- now follow commands
# clone this repository with this command
git clone git@github.com:KK-mp4/ImgBrightness-to-Shem.git
# now run the program
python converter.py
By the way if you want to modify this script I recommend NBT Viewer.
License
This program is licensed under the GPL-3.0 License. Please read the License file to know about the usage terms and conditions.