Minecraft pixelart explained
- January 4th, 2016, 10:43 PM
- Posted in gallery . gaming . graphics . rants . technology
- Write comment
I’ve had so many people ask me if these pixelart images I’ve made are “legit” or really made block by block, or what have you. So to save myself from having to type in this explanation yet another time, I’ll put it all down here in one place to set the record straight.
Instead of getting into what is “legit” or not, I’ll just explain what I do, and let you be the judge for yourself.
When I first started experimenting with this at all, it was in the fairly early days of minecraft, and the “palette” of available colors/blocks was very limited. But it was about as legit as it gets. I placed block by clock on an area I had flattened out by hand. My method at the time was to take my source image (Escher’s “Drawing Hands”), and using a paint program to lower the palette to just the available colors I had available in minecraft. I had spent some time taking screenshots of blocks to get them all into a custom palette in PSP, and mapped the palette to the image “best fit”. I did some experimentation with having two “layers” in the minecraft side, since having a block ‘lower” (at ground level) would inherently make it one shade darker as well, but that really wasn’t very effective. I only did one image using this method. Shown below:
You can definitely see the traces of the “grid markers” on the edges of the image. I had mapped out a 10×10 grid on the map and on my image via overlay so that I could more easily keep track of where I was, and it reduced my errors pretty dramatically. You can also see where I had experimented with a 1 pixel “depth”, and how that didn’t really work. Ah well, the learning process. The other big mistake I made at this stage was using materials that were flammable. After a time, lightning would ignite and destroy those blocks (principally, wool) and the image itself deteriorated over time.
The next stage was several years later when the game itself had now included MANY more materials, and thus, the palette was MUCH, much better. Suddenly it didn’t seem unreasonable to do full color images. So I set out using the previous method again. Spend the time to make my palette, find a good source image, create the grid, and material by material, lay in the blocks one at a time. I think I still have at least one or two of those “videos” around. Let me find one. Yeah, here is the resultant image:
Not bad if I do say so myself. The video “proof” of the construction was made using a second character, positioned very high above the field, that took screenshots after every material was laid down, and then I made an animation that did some morphing from one screenshot to the next for filler frames. Set it to music, and poof, video. You can find that here:
Ok, so I did probably 3 or 4 more images using that method, and they would each take me about a month. At some point, that got really boring, as you might imagine. I think the one Lara Croft pixelart was the last one I did using this method. Laying down 54,000 bricks, one by one, is a pain in the butt. So thats where you get to what I’ll call “stage 3” where I tried to find a way to automate some portions of this. I spent more time playing with various texture packs to find one that had a really rich set of blocks/colors, and made a new palette. Though I’ve done some tweaking since then, it has remained largely the same since (I got to add some more greens in when they did the underwater temples, etc). As an example, here’s the drawing hands picture again using the new, refined method and palette. Quite an improvement, I’d say!
However, where I really did a lot more work was in how they got translated into the game. Around that same time (I forget which patch), they added the ability do place down bricks using a command in game (/fill). With that command, suddenly a world of automation possibilities became much more real.
So next I needed to find a way to translate an image into a series of 54,000 commands. Each command would instead execute a /fill command to place a single block. If I could somehow script the execution of those commands in game, I’d be golden. I wrote a custom script in php that would take the source image, use an image library to analyze each pixel. Map that to my palette, and output the /fill command into a file. I found a tool called “AutoHotkey” that can take a text file and read it one line at a time, and put that text into your game world. I suspect this tool is used for far more nefarious purposes in other games where modding/botting is banned, but for my purposes, it worked out perfectly. a 290×180 image would now take about one full day to magically manifest in game. Unfortunately, I never made video of that process. Its pretty boring to watch. I normally just fired off the script when I went to bed and let it run until morning.
All I’ve done since then is make modifications to the script to optimize the commands it runs. For example, Instead of placing every pixel, what if the majority of the pixels were one color? If I just made that my “background” color with one big fill at the beginning (manually), I could save myself having to execute a HUGE number of /fill commands in the script! Another big gain. Next change was … well, what if you have many pixels in a row that are all one color? Instead of 20 /fill commands, it becomes 1! Another huge gain.
I fully intend on putting that scripts code up on github at some point. If I weren’t in the middle of getting my machine back up and running right now, I’d probably go do that right now to give out access to its source for anyone else to use. I’ll get around to it eventually.
In closing, I’ll just post another video capture I did of the world where I did the majority of the pixelarts. Its a flyover style video where I just zoom around in the world so you can see all of them laid out next to each other.
Hopefully, this has provided some clarity in what I’ve done. I certainly don’t claim “artist” credit to any of the original artworks. They are all decidedly own by their original artists (with one notable exception, where I was also the artist in question). I guess I can claim some “art” in either the process or the script, but otherwise, this is just me finding a novel technical solution to a problem. Is that legit? I leave that up to you to decide.