Minecraft: An Isometric Look.

Minecraft: An Isometric Look.

Ever wanted to see how your map would look from an isometric propsective? And by map I mean Survival (both single and multi) and by perpspective I mean a clear crisp type of perspective. Well, now thanks to a new tool called mcmap programmed by Zahl, you can!

It's seriously awesome because technically, you can become a pixel artist at the same time of being a Minecraft engineer! Truly something everyone wants to be... right? Anyway, in all seriousness, this could be used as a good layout for blueprints and digitallyisometricawesome maps! Like, you would make the map in Minecraft, then render it using this program and viola you have a beautiful image -- awesomeness achieved!

Zahl writes about his program below:

Hi Folks,

this is my little Minecraft Alpha map renderer which will output your world as an isometric image.
It can currently render the terrain unlit, in day mode (with shadows), night mode and underground mode, where it will show all caves that have been explored by players. It is possible to customize the colors of blocks and you can tell it to render the terrain in given bounds.
It also supports incremental rendering, where it will not use more than a given amount of memory, and caches to disk if necessary.

So here is mcmap. The name is quite stupid and is basically just the name I gave the project's folder, but since I'm not really good at making up names, I kept it that way. ;-)

It is not as feature rich as Cartograph, AlphaVespucci or c10t since it really only does what I wanted but hey, maybe someone might find it useful too.

The simplicity at least makes mcmap quite fast.

What does it look like?
Image
(Click image to see original size)

Image
(Click image to see original size)

Image

World rendered by Donkey Kong, using custom colors.txt by NotTards.

Image
(Click for 20MiB full sized image)

________________________

This is the GUI for Windows:
Image

Download
Sourcecode
Precompiled EXE + GUI for Windows, 32bit
Precompiled EXE + GUI for Windows, 64bit
mcmap live for MacOS X by Donkey Kong -an easy to use, intuitive map viewer that uses mcmap for rendering. Intel and PowerPC.
Precompiled binary for Intel-MacOS X, 32bit NO GUI! You need to know how to use xterm ;-).. Anyone willing to create a GUI for Mac is very much encouraged to do so.)
On linux it should be trivial to compile. All you need is g++, make and zlib. (If they're missing and you're on debian or Ubuntu, try "apt-get install zlib1g-dev build-essential g++ libc6-dev".) Just cd into the directory containing the source code and type "make". "make turbo" would optimize the binary for your CPU. Makes it a few microseconds faster.

Usage
As stated above, this tool was written to be used on a server, so it does not have a graphical user interface integrated.
However, there is a seperate GUI included for Windows that takes care of launching mcmap with the proper command line options. (see screenshot above)

If you want to use the command line and need help, just run mcmap without any arguments to get information on how to use it.
If you want to render the whole world:
Windows: mcmap c:\path\to\world
Linux/MacOS: ./mcmap /path/to/world
/path/to/world or c:\path\to\world is the directory where the world is stored. It can be absolute or relative.
If you want to render a specific part of the map:
mcmap -from -5 -6 -to 8 9 c:\path\to\world
-5 and -6 would be the coordinates of the starting point (chunk coordinate). So in this example, you would start at chunk X=-5 Z=-6
8 and 9 are the coordinates of the end point: X=8 Z=9
For more options, see the help output.

Additional information
Some notes for coders/techies:
The output format is a 24bit-Bitmap, which will lead to large files. I did this because it is a very simple file format, so I could easily implement my own output routines without depending on another library. This should make porting easier too.
If anyone wants to build a GUI for this tool, you can just use platform specific libraries or another tool to convert the output to png when mcmap finished. For the Windows GUI I just used GDI+.

I successfully compiled and ran mcmap on Windows using MSVC++ (32bit, VS2008) and MinGW's gcc (4.5.0, 32 and 64 bit), on Linux using gcc, (4.3.2, 64bit and 32bit), MacOSX Leopard (gcc 32bit) and Haiku (gcc, 32bit). According to phlux, it also works on FreeBSD 7.3 and 8.0 without any changes, Donkey Kong managed to compile it for PowerPC MacOS X, so porting to any other *nix flavor should require little to no changes to the code. If you manage to compile mcmap on other platforms please let me know.

As mentioned before, I'm mainly using this to create a map history on my server, so I have this little script run every hour:

Code: Select all
#!/bin/bash

cd /path/to/mcmap/
WORLD=/path/to/minecraft/world/
################################

FILE=history-`date +%s`.png

OLD5=none
OLD6=none
if [ -e "output.day.bmp" ]; then
OLD5=`md5sum output.day.bmp | cut -b 1-32`
fi
if [ -e "output.night.bmp" ]; then
OLD6=`md5sum output.night.bmp | cut -b 1-32`
fi

CHECK=`date +%k`
if [ "$CHECK" -ge "7" ] && [ "$CHECK" -le "20" ]; then
NIGHT="-skylight"
else
NIGHT="-skylight -night"
fi
# change the values here to define the area to render
./mcmap -from -30 -30 -to 20 20 $NIGHT "$WORLD" > /dev/null
# if you want the whole world, use:
# ./mcmap "$WORLD" $NIGHT > /dev/null
RET=$?
if [ "$RET" -ne "0" ]; then
echo "Error creating image for $FILE"
exit 1;
fi

NEW5=`md5sum output.bmp | cut -b 1-32`
if [ "$OLD5" != "$NEW5" ] && [ "$OLD6" != "$NEW5" ]; then
mkdir -p history/
convert output.bmp output.png
pngcrush output.png history/$FILE > /dev/null
convert -scale 800 -depth 5 output.bmp output.png
pngcrush -brute output.png history/thumb.$FILE > /dev/null
if [ "$NIGHT" == "1" ]; then
mv output.bmp output.night.bmp
else
mv output.bmp output.day.bmp
fi
fi

It requires ImageMagick and pngcrush installed for image conversion/compression.
It will render a new image and only save it to the history when the content changed, so you will not get new images when nobody was on the server and nothing happened.
It will also create a sized down version of the map as a "thumbnail" (if 800px is a thumbnail for you :D)
Also it will decide whether or not to use night mode depending on the time of day (realtime)

Just run it using your crontab and there you go: A nice png history for your server :)

Future plans
- Some more blocks need to be rendered differently
- Optionally write an info file along with the image containing the bounds of the image, creation time and other things

Last but not least, any bugs that come up need to be fixed. :)

Enjoy!

Short url : http://crafthub.net/blog/OI/

Pingbacks are open.