Mineblend - Blender importer add-on for Minecraft worlds

I am still challenged with even saving a level from the Free game.

Does anyone have any tip on how to actually export a level from the GAME?

Atom, I may be mistaken, but you may not even be able to use a save from the free version. It is a very old build, and the game has changed pretty radically since then, including the save format changing several times.

Just took a look and it appears that save is disabled in the free version. It used to save a .mine file, but I don’t see anything now. Sorry that is not too helpful.

@Atom you could get a saved file from http://www.minecraftworldshare.com/ for instance and mimic the folder structure… put each world in its own folder inside %AppData%.minecraft\saves\

also download the jar file here and put inside %AppData%.minecraft\bin\ (I had to use total commander to create the .minecraft folder)

@acro yep I started to play with textures but my pc is way too old… it was not fun anymore :stuck_out_tongue: thanks for this anyway!

Thanks for this! I just got blender the other day and was pleasantly surprised to see a minecraft addon waiting for me on the front page. :slight_smile:

I’m also on Ubuntu and have the same problem enabling it because of the path issue. I was going to give details but it looks like you already have them, so I eagerly await that update, and I look forward to seeing how this addon turns out.

This didn’t work for me on blender 2.60a. I had to change the code to the following:
MCPATH = os.path.join(os.environ[‘HOME’], ‘Library/Application Support/minecraft/’) # ‘C:/users/adam/AppData/Roaming/.minecraft/’
MCSAVEPATH = os.path.join(MCPATH, ‘saves/’)

Then MCPATH was set correctly. The os.path.join has weird behavior in that if a following section starts with a slash the preceding stuff is ignored. For example try this code from a python console:
>>> import os
>>> mypath=os.path.join(“/pathstart”,“/anothersection”)
>>> mypath
‘/anothersection’
>>>

And then the backslash was giving me problems, but removing it solved those.

Green

hi everyone, I’ve updated the script’s page with a new version (1.1a), please update your addons accordingly.
I’m working on the layer exclusions just now and hope to follow up soon with another update in a couple of hours, but for now this fixes save paths on Mac OSX and Linux. I have fully tested the Linux one, and corrected the OSX line based on Sciman’s feedback.

Build 42295 (WIn 7 x64) still does not activate unfortunately - chance to correct under Win…??

Yup, works beautifully here. Great script :D. I’m going to have a lot of fun with this. Looking forward to layer exclusion!!

bluecd, it sounds like you’re having something similar to Maphrox - did your blender console output have an error about ‘cannot import name mineregion’? Unfortunately I’ve been unable to reproduce this error so far, and the entire dev of this script was done on my Win 7 64 bit desktop pc. I will try the build you mentioned and get back to you.

Strange…Previously( script rel. 1.0) i noticed what you metioned w/Maphrox, now i can see: ’ 1 groups found’ but still cant activate addon ((

:smiley:

Works now acro.
Thanks dude!

@liero: Thanks for the links. I tried a few of those levels/scenes but none of the ones I pulled down work with this script.

Can someone post a level that can be used to test with?

Layer limiting is now in. The new version is on the google page (https://sites.google.com/site/mineblend/) - please update your copy!
Notes:
In Minecraft, the height limit (top of the sky) is 128. The lowest layer of bedrock is 0. You can see this height number in game if you press F3 and look at your coordinates.
If you want to load only the top, above sea level, set the low limit to 62. (Sea level is 64, its index will therefore be 63, so you need to load up to 62. Don’t ask.).

I’ve done some tests with cycles materials, too - will post that later. This script update wasn’t posted last night because my laptop went into meltdown, so this post brought to you by hard drive data recovery.

Lastly - Windows 7 users, I have a theory about why your python path isn’t resolving. For the moment, try copying the io_import_minecraft folder into your Blender scripts/addons directory (inside the Blender install) rather than the generic add-ons in your roaming/user profile folder. This may fix things, or it may not. I’m still looking into this.

thanks for the new feature! works way faster now

Ok, I got a little further. I pulled down script version 1.2 and then went to the http://www.minecraftworldshare.com/ site again. I did not pick one of the recent maps, but jumped to page ten and picked “survival island v2” an older map. I went to my .minecraft/saves folder and deleted all previous data. Then I pasted the new map into the folder and it showed up in the dialog box. I think there could be a bug when that dialog drop down box is populated if the script encounters an error, no entries at all appear.

When I clicked Ok the script ran for a bit and I wondered if anything happened. I checked the outliner and sure enough there were objects and they were all colored cubes at world origin. But this map does not work either.


I tried another map with similar results. Here is a link to the Spleefing Arena if you want to track down the error in the script.

Minecraft data beyond script data. Unknown block ID encountered:

Has anybody else had problems with the minecraft default textures invading the scene? I’m used to using mcobj but it has some really annoying limitations such as no texture loading and converting all the geometry into one plane, regardless of material. Aside from efficiency issues (I’ll mention those at the end) the main problem I seem to have is accessing the material slots for the block types. As a result the blocks all have the default MC textures and I can’t change them without just making a new channel above, sort of defeating the object of having textures there in the first place. The biggest problem with this though is that minecraft uses a grey texture for leaves and grass which is multiplied with a colour from the biome colour chart. This means in blender the grass and leaves textures just appear grey:

http://i.imgur.com/Cp3uE.png

Does anybody know how to access these texture/material channels? I can’t for the life of me see what’s going on. There don’t seem to be ANY materials assigned at all according to the material manager.

Some potential options I would recommend for this script:

Since the script can clearly read the default MC textures, maybe add an option to choose another texture pack? Not sure how simple/difficult that would be, maybe just have it so you can navigate to a terrain.png file?

A join mesh option would be nice too. Although I love having the different cubes all able to be moved/edited without causing problems, the number of cubes really blasts your system. Even with small scenes with radius 3 I lag like hell in the viewport. Using mcobj I could have scenes 40x40 chunks before big lag set in. A good portion of this could be removed by adding an option to merge vertices of the same type of material. This would drop a lot of the internal verts adding to the lag whilst keeping the separate materials. It is possible to do this after importing I know but it becomes increasingly difficult with larger scenes thanks to the lag and demanding viewport.

Here’s a render I made yesterday using mcobj and yafaray:

http://img197.imageshack.us/img197/9533/awholenewworldrender2.jpg

Basically this plugin would be perfect for adding tall grass (if I use an alpha map you’ll see through the ground) and for removing objects like torches/redstone/lilypads etc. If anybody knows of a fix or workaround to any of these issues I will be very grateful.

Thanks

Yep doesn’t let me enable either. Win 7 64 bit. it is in the folder:
C:\Program Files\Blender Foundation\Blender\2.60\scripts\addons\io_import_minecraft

Neither mine:

http://img189.imageshack.us/img189/1677/screenshot5xe.th.jpg

I can get the AddOn version 1.2 to enable under Windows XP x64 but I can not get any of the publicly posted level/maps to work.

So really, no one can post a working level for us to test with…?:frowning:

Thanks for the detail on these issues.
First, the “Minecraft data beyond script data” is nothing to worry about, it’s a poorly worded info message for “I’m listing any block types I didn’t recognise in the line below”. Currently, there will never be any because I’ve included all current Minecraft block IDs.
I notice Huge Mushroom amongst the blocktypes loaded in your screenshot - this means the map must be at least v1.8, which is a couple of months old (i.e. pretty new).

Second - I’m pretty sure your load actually worked. You may need to put the viewport into top view (numpad 7) and it can also help to use orthographic while orientating yourself - then zoom out and out and out until you see some world geometry. The scale is very, very big, and the blocks at 0,0 are the master ‘template’ material blocks that are dupliverted onto the vertex mesh for the geometry. The actual world surface data may be quite far away, depending on what’s in the level and where it was saved.
If I can figure out a way to control the viewport from Python, I think I’ll try to position it at the load centre, as this seems to have thrown a fair number of people.

I will post my block-type test world if you think that would be useful, but really I think it’s more fun and rewarding to render things you’ve personally built or seen in the game. That’s not a sales pitch, I’m just sayin’!

hope this helps.