Hey guys,
I was a bit hesitant to post this here as it’s such a specific, non-general addon, but I figured someone here might find it useful. =) Here’s the original post I made on the Minecraft forums:
As I’m thinking of creating a minecraft animation in Blender soon I wanted a way to quickly be able to place blocks. I therefore created a Blender add-on that allows you to do just that.
After you select the block category you can choose what kind of block you want it to be. In the case of wood or leaves it will also display an optional setting for the type (birch, spruce, oak or jungle). Also, for leaves and grass it will show two sliders (humidity and temperature) for determining the correct color based on the foliagecolor image. For Jack-O-Lanterns and glowstone lamps there’s an on/off toggle and finally, it also offers a slider for the amount of cracks you get from breaking a block.
All of these values are fully animatable.
Some restrictions however include not being able to see cracks and tint layers (i.e. grass tufts on top of dirt) without being in the slower ‘shaded’ mode in GLSL shading (alt+z), as well as not all blocks being added yet. Some notable absentees are [since added] and anything not on terrain.png (chests, etc). I plan to add these ASAP as well. One other very nasty, and seemingly unovercomable bug due to how Blender stencil textures work, grass blocks can only be cracked on the top side of the block.
That said, while it’s not 100% complete I’d love for some people to try it out and give me some feedback. =)
For those of you willing to give it a whirl, here’s a quick “getting started”:
- Download the latest Blender version, 2.64.
- Install the add-on by copying the entire folder into your add-ons folder[1].
- Open Blender.
- Go to your User Preferences (file -> user preferences or cmd+, on Mac).
- Go to the Add-ons tab.
- Search for “minecraft” or locate “Minecraft Block Creator” under the “Mesh” tab on the left.
- Enable the add-on.
- Delete the default cube (this is a Blender bug; the default cube has weird polygon indices).
- Add a new one by pressing shift+a and selecting Mesh -> Cube.
- With your mouse in the 3D viewport, press ‘N’ to open the Properties panel.
- At the bottom press “Make Minecraft block!”.
Congratulations, you now have a dirt block!
You are now free to change it’s type, destruction level, etc. to your heart’s content.
Due to some limitations in Blenders viewport, here are a few other how-tos:
-
To view the cracks and tint layers, press alt+z to change the shading mode to textured (or do so at the footer of the 3D viewport). Warning: This mode is slower than the regular one, especially when changing the block type or tinting colors.
-
When tinting leaves or grass the color will unfortunately -not- display in the viewport. To see the current color, go to the Textures tab and select the tint layer [2]. You can see the color in the Preview screen there.
-
To animate properties, hover over the property and press ‘i’. It behaves just like any other property in Blender. Just be aware block category and type don’t automatically get synced, so this may lead to some unexpected jumps in block type.
Another thing to keep in mind is for the blocks to diplay properly you need to have Mipmaps off in the User Preferences and the shading mode set to GLSL, Textured Solid. Currently the add-on does this on activation (even though I really shouldn’t do this…), so if you’re wondering why any of those settings changed, now you know.
Alright, that’s about it! Looking forward to your feedback! =)
Cheers,
Patrick
Download link: https://dl.dropbox.c…raft_blocks.zip
[1] Windows 7: C:\Users%username%\AppData\Roaming\Blender Foundation\Blender\2.64\scripts\addons
Windows XP: C:\Documents and Settings%username%\Application Data\Blender Foundation\Blender\2.64\scripts\addons
OSX: blender.app/Contents/MacOS/2.64scripts/addons
Linux: /home/$user/.config/blender/$version/scripts/addons
[2]
Update Version 0.2:
Added slabs, water and lava blocks. For water I added “Size X, Size Y and Size Z” parameters to control it’s size similar to how an array modifier does. The reason for this is it solves inner-faces, and actually optimizes a bunch as it doesn’t process or create the “inner” cubes. Be warned though, it’s still quite slow at high amounts.
So there you have it! Please don’t pay too much attention to the actual code; it’s made to “just work” and I haven’t spent much time cleaning it all up. =P
Hope somebody else will find this useful.
Cheers,
Patrick