Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

mcmap (isometric renders, SSP/SMP, Minecraft 1.3.1 support)

mcmap isometric map renderer cartograph

  • Please log in to reply
936 replies to this topic

#1

Zahl
    Zahl

    Zombie Killer

  • Members
  • 154 posts

Posted 23 September 2010 - 03:21 PM


mcmap hasn't been updated by me in over a year. However, WRIM has taken over development, new and up to date mcmap versions are available from his website: http://wrim.pl/mcmap/
You can still discuss mcmap in this thread though, he seems to be active here.

Below are the old download links and instructions, which are way out of date.




Hi Folks,

mcmap is a map renderer for Minecraft Alpha/Beta. It will create images of your world from an isometric perspective. This will not create deep zooms, but rather images that could be considered pixel art. Still, if your world is huge, it might create large files.

What does it look like?
Posted Image

Posted Image

Posted Image
(Click image to see original size)


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

Posted Image
(Click for 20MiB full sized image)


________________________

This is the GUI for Windows:
Posted Image



Download

Pure mcmap:
Pre-compiled EXE + GUI for Windows, 32bit (Use this on WinXP or if you're not sure whether you're on 32 or 64 bit Windows)
Pre-compiled EXE + GUI for Windows, 64bit (Should be a bit faster but only works on 64 bit Windows)
Source code (Should compile on Win/Linux/OSX/BSD; if you don't know what source code means you don't want this)
(Obsolete as of 1.2: Pre-compiled EXE + GUI for Windows, for MCR ymod/fishtaco worlds 256-4096 blocks height!)

Tools using/based on mcmap:
MCMap Live for MacOS X by Donkey Kong - an easy to use, interactive map viewer that uses mcmap for rendering. Intel and PowerPC.
Minemapper by Pup05 is a clone of MCMap Live for Windows.
MCMapGui.Net - a Windows tool for server administrators that can do timed renders of your map, keeps a history of images to a definable extent and has other neat features.
mcmapDZ - a Windows tool by NotTarts that splits up the output and creates an html view where you can scroll and zoom

If you want to apply biome colors, you need to run Donkey Kong's biome extractor first.

On Linux/BSD it should be trivial to compile. All you need is g++, make, zlib and libpng. (If they're missing and you're on debian or Ubuntu, try "apt-get install zlib1g-dev build-essential g++ libc6-dev libpng-dev", on CentOS you need to do "yum install libpng-devel zlib-devel gcc-c++")
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.
And for all you crazy githubbers: http://github.com/Zahl/mcmap
The version there might not always be the most stable one, but I try my best to only commit working stuff.

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 separate 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 as a png file:
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
I successfully compiled and ran mcmap on Windows using MSVC++ (32bit, VS2008. Its a bit tricky to get libpng to work) 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:
#!/bin/bash

## full path to mcmap binary
cd /home/minecraft/mcmap/
## path to your world
WORLD=/home/minecraft/world/
## path to write output image to
OUTPUT="/var/www/minecraft/maps"
## see below to change the area to render (lines that start with ##)
################################

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

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

CHECK=`date +%k`
if [ $CHECK -ge "7" ] && [ $CHECK -le "20" ]; then
	NIGHT="-skylight"
	NIGHTSTATUS="0"
else
	NIGHT="-skylight -night"
	NIGHTSTATUS="1"
fi

## change the values here to define the area to render
./mcmap -png $NIGHT -from -40 -60 -to 20 20 "$WORLD" > /dev/null
## if you want the whole world, use:
# ./mcmap -png "$WORLD" $NIGHT > /dev/null
RET=$?
if [ "$RET" -ne "0" ]; then
	echo "Error creating image for $FILE"
	exit 1;
fi

NEW5=`md5sum output.png | cut -b 1-32`
if [ "$OLD5" != "$NEW5" ] && [ "$OLD6" != "$NEW5" ]; then
	mkdir -p $OUTPUT/history/
	pngcrush output.png $OUTPUT/history/$FILE > /dev/null
	convert -scale 600 -depth 5 output.png thumb.png
	pngcrush -brute thumb.png $OUTPUT/history/thumb.$FILE > /dev/null
	if [ "$NIGHTSTATUS" -eq "1" ]; then
		mv output.png $OUTPUT/output.night.png
		mv thumb.png $OUTPUT/thumb.night.png
	else
		mv output.png $OUTPUT/output.day.png
		mv thumb.png $OUTPUT/thumb.day.png
	fi
fi
It requires ImageMagick for thumbnail generation and pngcrush installed for further image compression.
It will render a new image and only save it to the history when the content changed, so you won't 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 ;-))
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/ideas
- multi threading

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

Enjoy!

Register or log in to remove.

#2

nd4spd
    nd4spd

    Stone Miner

  • Members
  • 86 posts
  • Location: Australia

Posted 24 September 2010 - 10:49 AM

Judging from the screenshot this looks nicer than map viewers i've seen.
I don't think i'll be using this without a GUI though, I can't be bothered with the hassle of command lines.
I think this may become very handy for server admins looking for a nice timelapse solution though.

ianfitz100 said:

Why were you getting your hopes up? Set a low bar, and you won't be disappointed.

jon99977 said:

FUCK THE PEOPLE WHO INVENTED OBFUSCATION. FUCK THEM WITH KNIVES.

TheAvelon said:

How do I shot mod?

#3

KevinJ
    KevinJ

    Forum/Wiki Sponsor

  • Members
  • 211 posts

Posted 24 September 2010 - 04:39 PM

Woah! That was almost instant map generation.
What would I enter to make it render the entire world?
Love Love Love it!

#4

Zahl
    Zahl

    Zombie Killer

  • Members
  • 154 posts

Posted 24 September 2010 - 08:08 PM

nd4spd said:

I don't think i'll be using this without a GUI though, I can't be bothered with the hassle of command lines.
Yeah thinking about it, this really isn't to comfortable for most users.
So I spent the evening creating a little GUI that hopefully makes using it easier.
Didn't have much time to test it though, currently all I know is that it works on my computer. Hopyfully, it's not the only one. :-D

Posted Image

KevinJ said:

Woah! That was almost instant map generation.
What would I enter to make it render the entire world?
Love Love Love it!
Good news for you :-)
Like I mentioned in my first post, the next thing to work on was a way to render the whole map. Well, I also finished that today.
Just re-download the windows version linked in the first post and try it. It includes afore mentioned GUI now, so everything should be easy to set up.

The GUI also does conversion to PNG, so you save a lot of space for big maps.

Another new feature is the underground/cave mode, which isn't perfect yet, but works ok I think :-)
The difference to Cartograph here is that it only shows caves and tunnels that players have explored.


I tested the "whole map" feature with a world that is as large as 98x176 chunks (= 1568x2816 blocks), the program requires about 660MB of free memory to render that one (910MB for night and cave mode), just so you have an idea of whats possible and what's not.. :cobblestone:

The new features + GUI were about 7 hours of work, including making sure it still compiles and works on Windows and Linux, so I'm sorry if I messed anything up when packing and uploading all the files now.
Please report any bugs you find.

#5

Zahl
    Zahl

    Zombie Killer

  • Members
  • 154 posts

Posted 26 September 2010 - 01:05 PM

I hope bumping is ok after two days.

Maybe nobody cares about this tool, but I made some more changes:
- Fix lightning in night mode
- Double y-offset to make map look less flat
- Add fences

Please report any problems, bugs and errors you encounter :-)

__________
Here is a little gif showing the evolution of a map using mcmap. The gif was created by dope250.

#6

THEMUSCLE

Posted 27 September 2010 - 05:55 AM

Thanks for making this, I've been using coordinates to render smaller sections of a 350MB map in order to avoid crashes/massive file sizes.

I gave myself a headache trying to correlate server north with the renders and the coordinate system though.  Am I right to say that the coordinates are oriented as if you are looking from the below the map rather than above?  Or is this not supposed to be your standard x,y system? lol

*though maybe thats just the default coordinate system used for minecraft, I dunno, I'm kinda new.

#7

Zahl
    Zahl

    Zombie Killer

  • Members
  • 154 posts

Posted 27 September 2010 - 10:21 AM

To be honest, I had my issues with directions, too.
I basically just made it rotate the map so the output would have the same orientation as the oblique-angeled maps created by Cartograph, because I just assumed it to do things right. :-)
I heard people talk about "North" and "South" in that thread, but actually I have no idea how they can tell which is which ingame. The compass just points to the spawn point, so it doesn't help here. Currently, the directions in mcmap work like this:
Posted Image

But I might have accidentally swapped X and Z in mcmap. (Can anyone confirm this?) The image above at least relates to the X and Z arguments for mcmap's command line. So if you want to extend the rendered part to the top right image-wise, increase the third parameter to mcmap. (e.g.: ./mcmap -10 -10 20 10 128 world1)
Extending to bottom left would be decreasing the first value.

Anyways, nice to hear mcmap seems useful to you :-)

#8

schnuersenkel

Posted 27 September 2010 - 10:53 AM

Wow! Thank you so much for making this tool! *w* I got completely lost underground and this was the only tool generating a map that was accurate and easy to read!! :Skeleton:

#9

pilif
    pilif

    Out of the Water

  • Members
  • 3 posts

Posted 27 September 2010 - 01:54 PM

this is amazingly cool. I managed to compile it for 64bit Linux (Ubuntu Maverick Beta)  after including in helper.h

It's way faster than cartographer, the command line parsing is sane (cartographer linux doesn't parse the command-line) and the output is correct (no strange gray space between tiles like cartographer does under Linux).

And the code reads very, very nicely.

Have you considered putting this on github so people can easily contribute?

Personally, I'd love to look into reducing the memory consumption, maybe by incrementally parsing/rendering, but I fear my C skills are a bit lacking - but who knows.

#10

pilif
    pilif

    Out of the Water

  • Members
  • 3 posts

Posted 27 September 2010 - 02:23 PM

also special thanks for your awesome script. This makes creating incremental shots incredibly easy.

Perfect for our little in-company mining operation we are running :-)

Here's the world we are working on as rendered by mcmap:

Posted Image

I built that road and the bridge - 4x144 tiles of cobblestone, 144 tiles of smooth stone, 2x144 tiles of half-stones - and I'm still not done as it needs some lighting plus a little house in the middle, I think. A coworker built a water-road to use with a boat and the third coworker is going crazy underground - unfortunately you can't see that in the picture

Building that bridge caused the world to grow from 5MB to 30 MB :-)

#11

Zahl
    Zahl

    Zombie Killer

  • Members
  • 154 posts

Posted 27 September 2010 - 04:17 PM

pilif said:

this is amazingly cool. I managed to compile it for 64bit Linux (Ubuntu Maverick Beta)  after including in helper.h
Hmm that's odd, I only needed to explicitly include that with Visual C++, for gcc, unistd.h was sufficient. But I guess it won't hurt including it in general, so I'll change that.


Quote

And the code reads very, very nicely.
Good to hear :-)
I was wondering what people would say about my too-Cish-C++ style. Its definitely a bit hacky at some points for speed reasons, but I hope still readable. No assembler at least ;-)

Quote

Have you considered putting this on github so people can easily contribute?
I was considering to do something like that, but to be honest, I don't quite get all this git stuff yet. It currently feels like a complicated version of SVN. Yeah, I'm a bit old fashioned here. But I'll give it a try.

Quote

Personally, I'd love to look into reducing the memory consumption, maybe by incrementally parsing/rendering, but I fear my C skills are a bit lacking - but who knows.
At least when it comes to just sequentially loading, rendering and discarding the chunks it shouldn't be too hard, but if you process them one by one you can't really make as much use of block culling anymore. Cause that really gives a great speed increase when rendering.
Splitting the output image into chunks and then merging is a bigger challenge though because of the isometric perspective.
Right now, it is at least very easy to calc the required amount of memory before actually allocating it, so it would be easy to add an option to not try to render if the required mem exceeds X Megs. Just so trying to render the whole world doesn't give you swapping nightmares if it is too big.
Which brings me to my next point: I think mcmap really needs a better command line format, since having a static order of arguments really becomes a pita when you add more and more options.

Nice map you have there btw., but still plenty of space to fill with creations. :-)

#12

THEMUSCLE

Posted 27 September 2010 - 07:12 PM

AHHH ok so you enter x,z that makes sense now.  I was just thinking in a 2d plane since you only enter two coordinates, and thinking in x,y made it look like it was mirrored. My bad.

I don't know if compass mods just arbitrarily choose the cardinal directions of a map, but our world's north is the -x value lol.

*now I see you mention x,z in the command line info.  Wish I had read that first.  As usual, I prefer to learn by bashing my head against things rather than reading the instructions.

#13

udoprog
    udoprog

    Forum/Wiki Sponsor

  • Curse Premium
  • 238 posts

Posted 27 September 2010 - 07:54 PM

Zahl said:

Right now, it is at least very easy to calc the required amount of memory before actually allocating it, so it would be easy to add an option to not try to render if the required mem exceeds X Megs. Just so trying to render the whole world doesn't give you swapping nightmares if it is too big.
Which brings me to my next point: I think mcmap really needs a better command line format, since having a static order of arguments really becomes a pita when you add more and more options.

Love your analysis, brings up some of the problems I've had to encounter, the partial rendering culling i solved by using an image which accumulates the operations (buffer_image) and then applies them to the image during compositing.

I also have huge problems with swapping, since I don't want to change the image interface or too much program logic, the compositing happens against a linear buffer which flushes to file. This at least makes the blending a bit faster, since they usually accumulate on the same coordinates, where use a lazy hash ((x + y * width) & buffer_size) for determining where the (x, y) coordinate is cached in memory.
Basically the more memory you throw at the problem, the swapping to file will be less noticeable : ).
c10t (forum) - fast, reliable and cross-platform cartography tool

#14

DopeGhoti

Posted 27 September 2010 - 08:35 PM

This is absolutely brilliant! I was having some problems getting Cartograph working in Linux, and someone in IRC pointed me here.  Works like a charm- thanks tons for this!

#15

WCG
    WCG

    Tree Puncher

  • Members
  • 10 posts
  • Location: Lincoln, NE

Posted 28 September 2010 - 01:05 PM

Hey, thanks for this! I'm a newbie, who just got completely lost, and I used mcmap to figure out where I was. (It turns out I wasn't even on the right continent!)

#16

phlux
    phlux

    Out of the Water

  • Members
  • 2 posts

Posted 29 September 2010 - 03:23 AM

I have successfully compiled this with no problems on FreeBSD 7.3 and 8.0. I did have to use gmake instead of make, however.

Also, the OS X binary works well.

#17

edwardloveall

Posted 29 September 2010 - 04:53 AM

Works on Mac great! Can't thank you enough for making a version that actually works for us!

#18

iplop1
    iplop1

    Zombie Killer

  • Members
  • 222 posts

Posted 29 September 2010 - 08:59 PM

Amazing program!
I ran it on my server's old map --Looks awesome!
http://www.mediafire...ie747u4x7jnr377
(You'll have to dl the image to see the full res version. = / )

Its fast too!

#19

dorino1
    dorino1

    Zombie Killer

  • Members
  • 175 posts

Posted 29 September 2010 - 09:03 PM

Reccomendation: External file containing block color information, so we could tweak it to look more like our texture packs.

#20

iplop1
    iplop1

    Zombie Killer

  • Members
  • 222 posts

Posted 29 September 2010 - 09:49 PM

Very odd O.o
For some reason the GUI version failed to render my current server's map.  After it loads the chunks a Windows box pops up saying: "mcmap.exe has stopped working."

The command line version will run without freezing but the output is strange.

Could the world's size be the cause?  It's 160-ish MB. (file size, not size on disk)
Is the program not memory swapping correctly? (I have 4gb of ram O.o)
Posted Image