Import a 3D model as blocks

Post Reply
Theanine
New member
Posts: 1
Joined: Tue Jan 08, 2019 10:33

Import a 3D model as blocks

by Theanine » Post

Is there a way to convert a 3D model into blocks/voxels that can then be imported into Minetest?

For example, let's say I wanted to make a building shaped like an apple. So I convert a 3D model of an apple into blocks, and then import that into Minetest somehow, saving me the time from having to build it manually block by block.

Is this possible? And if so, with what tools?

Note that I don't need the reverse of this - I don't need to export the models out of Minetest. I just want to get models IN to it.

User avatar
GreenXenith
Member
Posts: 1356
Joined: Wed Oct 28, 2015 01:26
GitHub: GreenXenith
Location: UTC-8:00
Contact:

Re: Import a 3D model as blocks

by GreenXenith » Post

This is possible, but as far as I know, has not been created.
You could write a python script for Blender to read a model and export node data to a .we (WorldEdit) or .mst (Minetest Schematic) file based on the mesh data. I've never seen this done but it should be very possible.
Actually, you could probably do the same for something like an .obj file too (though I think it might be easier in Blender because it has an API to work with).
YouTube | Mods | Patreon | Minetest Discord @greenxenith

You should not be able to read this message.

AllanWindmill
New member
Posts: 7
Joined: Thu Jan 07, 2021 19:29
GitHub: chaojian-zhang
IRC: Allan Windmill
In-game: Kernel Killer

Re: Import a 3D model as blocks

by AllanWindmill » Post

I haven't tested those solutions but I would just like to add for reference purpose:

I believe tools like Magica Voxel and Block Bench allows you to import .obj models and convert them directly into Minecraft schematic formats or simple form serialization formats, which will be much easier to import to Minetest compared with having to do all the voxelization yourself.

bzt
Member
Posts: 217
Joined: Tue Sep 24, 2019 14:26

Re: Import a 3D model as blocks

by bzt » Post

Hi,

To export .b3d format from Blender, you'll need this plugin. Then you can load a single model in .b3d as one block or mob into Minetest.

If you meant several blocks per model, then I would recommend mtsedit, which is a simple command line converter (with an optional GUI) that can create .mts files from almost every voxel formats (Minecraft, Sponge, MagicaVoxel, Qubicle, Goxel, Tiled etc. etc. etc. see doc). You can load .mts files into Minetest worlds with Worldedit, Handle Schematics, Schematic Editor, etc., but mtsedit also provides a simple and easy to use mod which can do that. With Handle Schematics you can directly import Minecraft schematics (but not Sponge schematics, which is the newer format).

Cheers,
bzt

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: Import a 3D model as blocks

by Hybrid Dog » Post


‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests