Voxelers / mcthings

A Python framework for creating 3D scenes in Minecraft and Minetest
Apache License 2.0
58 stars 11 forks source link

Explorer Blender <-> Schematics <-> Minecraft #62

Closed acs closed 4 years ago

acs commented 4 years ago

https://blenderartists.org/t/blender-to-minecraft-workflow/1178857

acs commented 4 years ago

https://empireminecraft.com/threads/help-how-to-make-building-plans-from-mcedit-binvox-blender.48771/

acs commented 4 years ago

MC -> Blender: https://www.youtube.com/watch?v=Pvn55j8VxOM Mineways, https://github.com/scribblemaniac/MCEdit2Blender, https://sites.google.com/site/mineblend/ Blender -> MC: binvox, https://minecraft.gamepedia.com/Programs_and_editors/3D_exporters,

acs commented 4 years ago

Ok, I have now Zanabot exported to Wavefront OBJ file. Time to convert it to a Schematic.

First step: install binvox.

https://www.patrickmin.com/binvox/

Just download the executable. It is free to download and use, but no source code (it is not Open Source).

[Blender]$ binvox -t schematic zanabot_antesDeAnimar.obj
....
  writing 16777216 voxels
-rw-rw-r--. 1 adelcastillo adelcastillo   74401 May 16 05:01 zanabot_antesDeAnimar.schematic

Let's try to load it! (but 16 millions of blocks is too much!) We need to find a way to "lower the resolution".

Much better with:

[Blender]$ binvox -fit -down -down zanabot_antesDeAnimar.obj
....
VoxelFile::write_schematic
  width 64, height 31, depth 37
  writing 73408 voxels
done

and also with:

[Blender]$ binvox -fit -down zanabot_antesDeAnimar.obj -t schematic
...
VoxelFile::write_schematic
  width 128, height 62, depth 73
  writing 579328 voxels
done
acs commented 4 years ago

Screenshot from 2020-05-16 05-25-13

acs commented 4 years ago

Guau, here we go! Probably there is a way to rotate it, and let's use an "orange" block for it!

acs commented 4 years ago

Screenshot from 2020-05-16 05-36-29

[Blender]$ binvox -fit -down -down -down -rotz zanabot.obj -t schematic

-rotz did the magic :) (z in 3d is y in MC)

acs commented 4 years ago

Screenshot from 2020-05-16 06-06-01

acs commented 4 years ago

To go from schematic to obj:

https://www.jmc2obj.net/ https://github.com/FalconNL/mc2obj https://github.com/quag/mcobj

https://github.com/jmc2obj/j-mc-2-obj -> the more promising one but it is only for worlds

https://www.instructables.com/id/3d-Print-Youre-Minecraft-World/ -> hits one I have read it in the past. With Mineway you can export to OBJ regions of a world, but a schematic also? It seems so: http://www.realtimerendering.com/erich/minecraft/public/mineways/mineways.html#openworld

acs commented 4 years ago

Ok, with mineways I have imported thne pyramid schematic, exported to a OBJ and imported it in Blender. And it works in some sense :)

Screenshot from 2020-05-16 06-35-05

I need to learn more to check if we can fix the issue with the block that appears merged with our pyramid. The problem probably is because it is hollow.

acs commented 4 years ago

The pirate boat is perfect!

Screenshot from 2020-05-16 06-42-00

acs commented 4 years ago

And the chateau fairmont:

Screenshot from 2020-05-16 06-48-14

acs commented 4 years ago

Howto do it? Just open mineways with wine, open the schematic, select the region with the schematic (using the right now for defining the region) and export to render. That's all!

mineway

acs commented 4 years ago

So with the support in McThings of Schematics we can in and out with the 3D outside world. The possibilities are growing!

acs commented 4 years ago

Screenshot from 2020-05-18 08-17-16