Minecraft – an online multiplayer game has 2 modes – survival and creative. In the creative mode you don’t have to worry about monsters coming out when the sun goes down and totally focus on building. The idea is simple – create 3D constructions block by block.
Why bother and not just use a 3D application such as SketchUp or 3ds max?
Because despite interacting with other players Minecraft allows you to really ‘be in the scene’, walk in the builds you create, knock off blocks and placing new ones as in a Lego-like experience, too.
To treat this 1964 Roy Lichtenstein’s piece “Ohhh…Alright…” with a less vintage 3D pixels I had to cheat a bit. I meant get creative ;-) refresh old memories about programming what was my passion as a kid.
A typical player’s map in Classic on Aeries one-and-only server has the size of 128 x 128 x 64 blocks. As you are ‘in the scene’ it may seem massive (takes a good few seconds to walk from one end to another), but in pixel dimensions it is not much bigger than an iPhone app icon. Still, one block thick surface contains 16.384 blocks – an awful lot if you want to place them all manually.
How I did this?
- Resized a chosen image to desired pixel dimension and converted to indexed colour (first created a custom colour palette based on blocks available in the game) with 28 colours plus alpha channel for transparency.
In this scene the image had to be mirrored as it is being viewed from the bottom.
- Wrote a script (in PHP) that converts created bitmap to polar coordinates (x, y, z) with the colour attribute (specified as block name e. g. stone for gray, sand for pale yellow, etc.); then puts together a command line that Minecraft understands – e. g. black pixel at the top left corner of the image will become as a string: /place obsidian 0 0 0, a red pixel next to it will result in the string: /place red 1 0 0 etc.
- Used AppleScript editor to automate sending nearly 50.000 lines of code to Java Applet loader that run the game :-)
- Had fun watching the image building-up in the scene as in old 8-bit computers – line by line.
Download the source files
and create your own 3d vintage pixel art: Image-to-Mincraft.zip.
Classic has been discontinued , but a browser-based remake came out in 2019. Source: Wikipedia