Taking the current obsession for 3D film to its illogical conclusion. I demonstrate the Redstone Clojure interface to Minecraft via pixels, voxels, obsolete image formats and coloured wool.
I gave a talk at the London Clojurians July 2014 meetup about the work I'd been doing on Blockbuster, a command-line tool for rendering images and movies in Minecraft using coloured wool blocks. This was also an opportunity to introduce Redstone, the library that handles communication with the Minecraft server.
On OS X
ffmpeg can be installed through
homebrew in the following way:
brew install imagemagick brew install ffmpeg
The following will draw movie.mov on a screen 50 blocks wide. The height will be determined by the aspect ratio of the file.
bin/blockbuster -f [path/to/movie.mov] -w 50
The application accepts the following arguments:
-f "The movie file to play" -w "The width of the screen" -p "The x,y,z coordinates of the screen" -n "Draw every n frames" -m "The number of milliseconds to wait between frames" -c "Whether space should be cleared for the screen"
How does it work?
The application uses
ffmpeg to separate movie files into sequences of
still images. Each image is then resized and interpreted as a .ppm
file using imageMagick's
convert utility. A .ppm file is a
text-based format that's easy to parse into a stream of r,g,b pixel
values. Each of these pixels is compared against the 16 available wool block
colours to find the closest match and then drawn in the
specified location using the