It feels good to be coding again. Minecraft quickly turned into an addiction, which I have curbed by turning it into a project. I'm writing a Python script that converts Minecraft's world save data into Maya scenes.
When I was looking for Minecraft wallpaper for my desktop, I discovered an image where someone had taken Minecraft's level data and exported it to a different game engine, then used the game engine to export an OBJ to Blender. The final render looks like this:
I was blown away, but I quickly discovered that their method was quite specific to their software and, more importantly, Mac-only.
My script is still in the rough stages, but much of the basic functionality is there. It can open the .DAT files in which Minecraft stores its world chunks, strip out the section about what kind of blocks make up the chunk, then use that data to re-create the chunk inside of Maya. The end result looks like this:
It's an ugly pile of dirt, but it's a start. The blurry stuff on the top is water, and the various colored blocks are the different materials that make up the chunk. In the end, the script should create a set of geometry like this, as well as a proxy model, save to a file, then reference all the completed chunks into a central map scene.
I also have a list of features I'd like to add:
1) A shell mode where blocks that cannot be seen will not be created. Each chunk is 16 blocks wide, 16 blocks deep, and 128 blocks tall. That comes out to 32768 blocks per chunk...
2) A way to generate better water geometry. In the end, this may just have to be put in manually using planes.
3) UV layout and assignment to use the in-game textures.
4) Automatic lighting creation and placement for things like torches, lava, glowstone, etc.
I'm having a lot of fun with this. It's the biggest technical challenge I've had to tackle, and it's been a rewarding experience.
1 comment:
Hey man, have you continued on this project of exporting minecraft scenes into maya? Cause I would like to use this for a school project and don't want to make each block.
email me at enzo_josh@live.com if you are able to help me.
Cheers,
Josh
Post a Comment