Mineblend - Blender importer add-on for Minecraft worlds

It’s not working for me. I’m running Ubuntu 10.4 LTS and blender 2.61. Python came with blender. Blender won’t let me enable it and my terminal says:

misson20000@Warpcore2:~/blender-2.61-linux-glibc27-x86_64$ ./blender
connect failed: No such file or directory
ndof: spacenavd not found
AL lib: pulseaudio.c:331: PulseAudio returned minreq > tlength/2; expect break up
found bundled python: /home/misson20000/blender-2.61-linux-glibc27-x86_64/2.61/python
do_wait: drmWaitVBlank returned -1, IRQs don’t seem to be working correctly.
Try adjusting the vblank_mode configuration parameter.
/home/misson20000/.minecraft
Traceback (most recent call last):
File “/home/misson20000/blender-2.61-linux-glibc27-x86_64/2.61/scripts/modules/addon_utils.py”, line 259, in enable
mod = import(module_name)
File “/home/misson20000/blender-2.61-linux-glibc27-x86_64/2.61/scripts/addons/io_import_minecraft/init.py”, line 46, in <module>
class MinecraftWorldSelector(bpy.types.Operator):
File “/home/misson20000/blender-2.61-linux-glibc27-x86_64/2.61/scripts/addons/io_import_minecraft/init.py”, line 92, in MinecraftWorldSelector
wlist = mineregion.getWorldSelectList()
File “/home/misson20000/blender-2.61-linux-glibc27-x86_64/2.61/scripts/addons/io_import_minecraft/mineregion.py”, line 1062, in getWorldSelectList
wname = wData.value[‘Data’].value[‘LevelName’].value
KeyError: ‘LevelName’
Traceback (most recent call last):
File “/home/misson20000/blender-2.61-linux-glibc27-x86_64/2.61/scripts/modules/addon_utils.py”, line 259, in enable
mod = import(module_name)
File “/home/misson20000/blender-2.61-linux-glibc27-x86_64/2.61/scripts/addons/io_import_minecraft/init.py”, line 42, in <module>
from . import mineregion
ImportError: cannot import name mineregion

. Is there some other add-on named mineregion that I need or something?

Hi everyone, I hope you all had a good Christmas.

Leading up to the holiday I had practically no time to work on Mineblend. However, now I’ve had some relaxation time, I’m getting stuck back into the remaining list of improvements and feature requests. I’m looking forward to it, and hope to post some nice additions over the next short while.

gmmaster, I’ve just now seen your post on the 17th. Something’s stopped working in my email settings or the forum, because I stopped getting ‘new post’ notifications about this thread. Anyway, your problem will be that you need the addon .py files to be inside a folder called io_import_minecraft. It seems that the 1.3a update (on the 12th) was missing that folder. I had to re-zip it twice as the first one had a problem, and in my haste I must have zipped the wrong thing. Sorry.
I have now fixed this on the Google Site and the download should be correct now. I didn’t change the version number, but I hope this won’t confuse anyone.

One other reason for me not posting, aside from being rather busy, was that there didn’t seem to be much response to the last update, especially regarding the fix for Win64 problems, so I didn’t feel I had a lot to answer at that point. Hopefully it’ll get back into the swing of things now, though.

misson20000, thank you kindly for the console output. Always a pleasure to help!

The error here is that one or more of your Minecraft worlds has a level.dat that doesn’t contain a world name. I have never encountered this before, in any of my test data, whether single or multiplayer. The script has no error-handling for this at the moment because I didn’t know it was possible.

Were your Minecraft saves created in a strange/non-standard way, such as with a level editing tool rather than the game itself? Or perhaps a very old version of the game?
If possible, could you send me the level.dat files for all of your worlds, or make them available for download somewhere? I’d like to add a specific fix for this occurrence, but as it’s never happened in any of my saves I would really appreciate a look at yours if possible.

Thanks.

Awesome. Are Cycles textures next? ^.^

@gmmaster
Hmm, I’ve been meaning to give you an answer to this for a while.
The short answer is I have no plans to extract animation data from the Minecraft executable. There are many practical reasons why, and aside from those it doesn’t especially interest me.
I could discuss this in more depth if you like, but to keep it short I will just say this for now:

I do not think that ‘capturing the animation built into the game would be a much faster process than rigging the characters in Blender’.
The animations are inside the game, not its openly documented save format, and only a small community of specialised expert Java + Minecraft hackers know how to unpick this, and even then it’s a very complex task that would take a lot of time and effort. This is also somewhat true of creating a Minecraft mod to record animation data.

It would be vastly simpler to create models based on the texture sheets, rig them yourself, and animate them by hand. If a nice, kind person made such work available for everyone by a common license, then it would only need to be done once.

I’m not saying that animating all the mobs and characters isn’t a lot of work in itself. It’s just a lot, lot simpler than trying to extract the game’s animations. The first and only question that springs to mind with this is “WHY do you want to extract the animations?”

All the Minecraft movies I’ve seen online are done by screen capture/machinima of the game itself. I’m sure there are helpful multiplayer server mods / add-ons that help with machinima. I’m not sure what you want to get the animations for, but if this kind of game-movie is your goal then you really don’t need them.

I hope this is helpful somehow - I’m not trying to put you off!

All the best.

Since you asked about them, yes. Straight to the top of the pile. :wink:

Hooray!

Would you know how to extract them and then multiply the resolution or turn off interpolation?

Or you could take the data(if someone made teh mod) and just make an importer? Basically wait for someone else to make it; then intergrate it.

I should start a separate thread, but this one’s so closely related I thought I’d begin here, especially since I need your help and want to know what’s best for Blender.

I’ve created a program called Mineways, a free, open source program to export 3D models from Minecraft worlds. Watch the video on that page for an intro (I’d include the link, but the forum software says I’m including too many URLs). The disadvantage of Mineways compared to Mineblend is no direct import via .blend - OBJ import works, but the data’s not nicely structured. Mineways’ advantages include: easy and precise interactive selection of parts of your world to export, solid color or textured output, and control over color and block export (any block can be removed using color schemes in the program).

The program’s focused on 3D printing, but I’ve got a separate dialog for export to renderers. Blender is, in fact, my target renderer, since it’s free. But, my knowledge of Blender’s ins and outs is pretty low, so I hope you guys can help give me feedback on how I can improve the Wavefront OBJ output. Or, possibly, I might add a .blend output option, if the .blend file format is well-documented somewhere (please point me at it). I see a fair bit of info on the Blender Wikipedia page, but am not sure what’s best: really, C or C++ code to write out .blend files would be ideal.

Anyway, so far I’ve figured out the following:

  • The basic OBJ exporter from Mineways works OK with Blender.
  • It fails on a few things, though: “billboard” torches, flowers, etc. (Turn off the option “export all block types”)
  • The billboard problems seem to stem from Blender apparently not using the alpha channel in the texture PNG. There is also some material * texture color problem.
  • The “no materials preview” variant of OBJ output doesn’t work well with Blender, e.g. trees look bad when using it.
  • Blender’s WRL importer doesn’t work on this file for some reason (a texture path problem, maybe?).

Here’s my weaksauce first rendering. You guys can do a lot better, I’m sure:

http://img337.imageshack.us/img337/3742/minewaysblender.jpg

Can’t wait for v1.4!!!
And for the Cycle textures :smiley:

Also, how do we change the position of the Minecraft world that you import into Blender??
I really want to start exploring different parts of my worlds :stuck_out_tongue:

All righty everyone, I’ve updated on the google site now. Linkage.

Please have a quick look at the update notes (‘revision log’) and by all means do shout out if anything isn’t right or you really want particular stuff fixed.

My next two priorities are to answer gmmaster’s question and to finish the Cycles texture nodes for colour-overlay transparent and non-transparent objects (that is, green grass and trees). I physically can’t do that tonight, but hopefully tomorrow or Saturday for that.

I made an extra utility script that will make any future material nodes editing hugely faster and simpler - I doubt I’d have finished this update yet if I hadn’t done that.

Anyway, enjoy!

Ummm. Well… the short answer is ‘no’, alas. I didn’t find a way to do that (yet). There’s a resample() function but I’m not sure if that is what’s required. Does anyone know if Blender has some nice 2D image-manipulation hidden in the Python somewhere? I found the excellent image.pixels array notation, but nothing for scaling an image in-place. :\

@gmmaster

Also, how do I choose where in the minecraft world to get the chunks… I can’t figure
out how to choose what chunks of the game I load.

I tried changing the spawn point in MCedit and I’ve tried saving the game
after moving to a different point… neither of those worked.

It sounds like you must be enabling “Load at 3D Cursor”. That’s my first guess - so, I’ll explain what that does. If this isn’t it, something very strange is going on and we’ll need to investigate.

What should happen with loading is this:

By default Mineblend loads an N by N chunk area centred at the saved position of the player, where N/2 is the “load radius” on the Select World dialogue. For example, if you put load radius up to 10, it loads everything within 10 chunks across the land of where you are standing, resulting in a 20-by-20 chunk area loading. Actually, it would be a 21-by-21 area, since it includes the chunk you are in, then adds 10 north, south, east and west.
(I’m not sure I’m happy with this option in its current form - it doesn’t feel very intuitive. Is anyone kind of confused by what load radius’ number really means?)

When using ‘Load Nether’, if you’re not saved IN the Nether, it will load at the Nether’s origin point (0,0). But if you ARE in the Nether it will load around where you saved.
The same is the case for The End.

Finally there’s “load at 3D cursor” which I’ve now renamed to “Use 3D cursor as player”.
This takes the 3D cursor’s position, and pretends that’s where you saved. So if the 3D cursor is sitting on 0,0,0 when you load, you’ll only ever load at (0,0) in your Minecraft world. Despite any scaling down the world for easier rendering, it doesn’t account for any scale factor currently with the 3D cursor load, so it can have to be moved very, very far away to get specific parts you want.

Eventually, if I can solve a little problem I had with appending vast quantities of vertices to existing meshes (can’t be done directly with the fast Python load function), the 3D cursor option could allow really nice step-by-step loading of parts of the world - so if you hadn’t loaded quite enough, you could move the cursor to where you want to add more, and then run the import again on the same file. This is on the to-do list, and I now have some ideas about how to do it.
That would also allow loading bits of different worlds in to the same space, which is weird and not at all useful, I think.

Anyway, gmmaster I hope the 3D cursor thing is what was wrong for you, give it a shot without that and see how you get on.

This is an incredible tool!

Shhh, that’s our little secret… you’re the first to make the connection, as far as I know. Honestly, thanks for the kind words.

Yeah, having fire missing in particular is a real headache. If they had just put a reasonable default fire texture tile in (the water and lava defaults aren’t so bad), this problem could have been ameliorated a bit.

Anyway, it’s great to see that you’re updating this plugin - ultimately, Mineways is focused on 3D printing, not rendering, as there’s just a ton of additional stuff to do if you really want to make a scene look right. Have you looked at mc2obj and seen what’s there that you could draw upon or improve? They do a good job on water (all the various angled bits when it flows) and on adding true geometry for torches, signs, etc., but have some weaknesses elsewhere (like redstone).

Thanks for the ludicrously detailed reply a few pages back, it’s nice to see somebody who takes feedback seriously :slight_smile:

I love the changes you’ve made so far, things are much smoother than before. The different models for things like torches are already proving handy. I finally upgraded my computer over Christmas (it’s now a veritable beast) so have been toying around with cycles a lot. So far I’m loving the interface, even if there are still a few things missing here and there.

One issue that I’ve run into for me is that water doesn’t render properly in cycles because it’s all composed from individual cubes. This creates a large number of cube boundaries that are visible in the render. Perhaps one method of fixing this would be to have an option that combines connected water blocks? I say an option because I’m aware that this wouldn’t suit everybody’s usage naturally.

Loving the progress though, really this script is becoming quite remarkable.

Edit: Also I can’t seem to get stone to import. At first I thought it was because I had omit stone turned on, but switching it off didn’t seem to change anything?

I second what extra guy said about the stone…
I tried loading in a HUGE scene and the stone wasn’t showing…
I thought it was just because it was huge scene and all… ha (also stone omit was not checked)

And acro…
Thank you thank you thank you!!
For your super clearand detailed responce about the “load at 3D cursor” option…
My problem was just me checking the load at 3D cursor option… I agree that
“Use 3D cursor as player” more accurately describes what it does. :slight_smile:
I had always checked it because if I didn’t my scene would load somewhere far
far away, And it would always be really hard to get it back to the center… :stuck_out_tongue:

But thankyou for clearing it up and everything…
If you ever figure out a way to always have the scene load in the center of the
grid… I think that would be more convenient.

Also one more thing…
That problem that extra guy is having with the water boundaries showing…
I am also having that problem in cycles… but with the whole scene…
All of the cubes boundaries are visible to me, and it looks weird…
But I’m still working on it… I’ll let you know it I get it fixed :slight_smile:

edit: wow, weird… If I change the wood block to one of the textures I have it will get arid of the borders around the wood blocks… But only if I use that one texture… And does not work for anything
else :stuck_out_tongue:

I second what extra guy said about the stone…
I tried loading in a HUGE scene and the stone wasn’t showing…
I thought it was just because it was huge scene and all… ha (also stone omit was not checked)

And acro…
Thank you thank you thank you!!
For your super clearand detailed responce about the “load at 3D cursor” option…
My problem was just me checking the load at 3D cursor option… I agree that
“Use 3D cursor as player” more accurately describes what it does. :slight_smile:
I had always checked it because if I didn’t my scene would load somewhere far
far away, And it would always be really hard to get it back to the center… :stuck_out_tongue:

But thankyou for clearing it up and everything…
If you ever figure out a way to always have the scene load in the center of the
grid… I think that would be more convenient.

Also one more thing…
That problem that extra guy is having with the water boundaries showing…
I am also having that problem in cycles… but with the whole scene…
All of the cubes boundaries are visible to me, and it looks weird…
But I’m still working on it… I’ll let you know it I get it to work :slight_smile:

Nope… :stuck_out_tongue: Here is an example of what it looks like…


Yeah same issue here for the other textures too. I’ve also been having some issues with selecting the area I want to import. Seems no matter what option I choose, I get the same area importing. Perhaps a dedicated ui with an overhead map option could be experimented with? There are plenty of programs out there which can render a birds eye view of an MC world, most of which are very efficient too. I wonder if it would be possible to implement a similar system so you could easily choose the chunk coordinates? This would probably also really help with importing colossal files into blender as you would be able to import separate “chunks” of the file, instead of doing it all at once.

Here’s a pic of the water issue:

Sorry I can’t help make this, despite being a blender user for 5 years I never delved into the coding side of things; something I hope to rectify this year.

Its with the Interpolation thingy. *Sigh, can’t wait 'till Cycles texture settings are updated. >_<

@Acro:

Thanks for updating! :smiley: