Help with Blender and Minetest

Biggvs_Richardvs
Member
 
Posts: 23
Joined: Mon Jul 06, 2015 00:46

Help with Blender and Minetest

by Biggvs_Richardvs » Tue Aug 18, 2015 23:09

Hello,

I would like to be able to define a structure in blender, and fill it in with blocks that can then be inserted/imported into a minetest world or subgame.

ExeterDad was kind enough to give me a few pointers, but I couldn't parlay that into a working process, plus I'm not sure he understood fully what I was asking. I don't want to map a texture over something like I was creating a mob. I want to design a structure in Blender and then have that structure populated with MT blocks.

Lets say I have a simple rectangle, or rectangular wall drawn up in blender. How would I then fill that in with actual minable blocks of whatever type (let's say simple cobblestone) and then import/inject that into an existing world? How would scale be handled? If all I have is a simple rectangle, how do I define how many blocks I want it filled in with? Is this something anyone's even done before?

Do I need to do some kind of mesh so I have a space laid out for each block? I would much rather be able to define a simple shape and then have blender or a script or something fill it in to scale with however many blocks. Is there a way to do that? How do you then import it into a world?

What I want most is to be able to create circular/spherical objects and have them translated into real blocks - it's hard to make round things block by block inside the game and have them come out looking good.

Sorry I'm so new at this, but there doesn't seem to be a lot of docs about how to do things like this, so if you'll help me, I'll write some up once I figure it out. I've read the doc(s) about using blender with minetest, but what I saw seemed oriented around building mobs and wrapping textures around them, whereas I want to fill in structures with existing block types. Also I'm really new to blender too - I can make a sphere, a square, etc, and move light sources around and that's where I'm at, but I'm willing to learn and do my homework to figure out the blender part of it.

Any hints appreciated, and thanks again to ExeterDad - I just need a little clarification.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: Help with Blender and Minetest

by Sokomine » Sat Aug 22, 2015 14:53

Perhaps this mod [Mod] Build semi-auto or BMP/3d Mesh import [growwall] might be of help to you. Most other mods afaik work the other way around and turn Minetest creations into blender models.

Biggvs_Richardvs wrote:Lets say I have a simple rectangle, or rectangular wall drawn up in blender. How would I then fill that in with actual minable blocks of whatever type (let's say simple cobblestone) and then import/inject that into an existing world? How would scale be handled? If all I have is a simple rectangle, how do I define how many blocks I want it filled in with? Is this something anyone's even done before?

Might not be what you wish to hear, but: That's up to you to decide if you write such a mod. Some parts may be more or less common algorithms (i.e. filling the mesh with blocks; although there are several approaches I guess), while others (scale) ought to be configurable anyway.

Biggvs_Richardvs wrote:What I want most is to be able to create circular/spherical objects and have them translated into real blocks - it's hard to make round things block by block inside the game and have them come out looking good.

If that is all you're after, take a look at WorldEdit. It comes with commands for spheres, boxes etc.
A list of my mods can be found here.
 

Biggvs_Richardvs
Member
 
Posts: 23
Joined: Mon Jul 06, 2015 00:46

Re: Help with Blender and Minetest

by Biggvs_Richardvs » Mon Aug 24, 2015 19:43

Ok thank you so much - that's pretty much what I was after.

Basically I would like to be able to design a fairly elaborate house or building in Blender and have that turn into "real" blocks in MT.

Do you think it would be better to build something like that as a separate tool? I'm thinking it would work like you give it some kind of blender output file, and then it converts that to whatever block types are specified (for a beta version we could just default to a single type for simplicity and then add multi-block later). Then that output would get "injected" into the world database with user supplied coodinates for location.

Isn't something similar to that going on with the function/mod (not sure if it's built in or not) that allows you to tell MT to insert an entire house at a specified location? How does that work?

Thanks again,
Rich
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: Help with Blender and Minetest

by Sokomine » Tue Aug 25, 2015 00:31

Biggvs_Richardvs wrote:Isn't something similar to that going on with the function/mod (not sure if it's built in or not) that allows you to tell MT to insert an entire house at a specified location? How does that work?

It works block by block. The files/houses you can import contain information that at position x=1,y=1,z=1, there's air, while at x=1,y=2,z=1, there's a brick block, and so on. It's a 3D array of blocks. WorldEdits save format and that of .mts differ a bit there, but that's of no relevance in this case. I'm not really familiar with blender, but such tools do work diffrently. They don't know about the blocky world. You'd need an algorithm to translate the blender "world" into MT. It's possible that there are mods out there - there have been some regarding 3d printing. I just don't remember how far it went. Might have been the other way around (MT->blender).
A list of my mods can be found here.
 

Biggvs_Richardvs
Member
 
Posts: 23
Joined: Mon Jul 06, 2015 00:46

Re: Help with Blender and Minetest

by Biggvs_Richardvs » Wed Aug 26, 2015 16:20

Thank you SO much for your help and info on this. I would consider this a very worthwhile project to take up.

Could you point me toward some resources that would help me "unravel" how MT does the "block by block" array thing with houses etc? If I can get to where I can write a lua or other script that would allow me to import some basic shapes as blocks, that would probably be enough to get me started. Or even just a single block. IF I can figure out how to get a single block of specified type to a specific location in-world, I may be able to modify an existing blender add-on/extension to just output it automagically to a world, or at least into a form that's easily importable.

This extension looks like it's about 70% of the way there:

http://blenderaddonlist.blogspot.com/20 ... ition.html

At least from the demo there you can get an idea what I'm going for, but instead of the way he's cloring his mesh, I would be filling it with MT block types and/or air (default for empty space).
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: Help with Blender and Minetest

by Sokomine » Thu Aug 27, 2015 02:12

Biggvs_Richardvs wrote:Could you point me toward some resources that would help me "unravel" how MT does the "block by block" array thing with houses etc? If I can get to where I can write a lua or other script that would allow me to import some basic shapes as blocks, that would probably be enough to get me started. Or even just a single block. IF I can figure out how to get a single block of specified type to a specific location in-world, I may be able to modify an existing blender add-on/extension to just output it automagically to a world, or at least into a form that's easily importable.

There are several ways to put blocks into a Minetest world. Individual blocks can be placed with minetest.add_node(..), but that is most likely not what you want. Setting several blocks in one go is usually done using Lua Voxelmanip. There are special formats used for exchanging schematics between worlds. WorldEdit has its own format; Minetest has its .mts schematic format (which is i.e. used to spawn decorative structures like trees at mapgen time). My handle_schematics mod can import a wide variety of these formats - even MC schematics. Perhaps you're lucky and find an exporter from Blender to MC? Else you'll have to come up with your own algorithms and turn whatever Blender gives you into a 3d array of blocks somehow. Once you got that step, actually importing will be easy.

Also take a look at lua_api.txt, which is usually a good place for new modders to get started.

There are some attempts the other way around, i.e. 3D printing for kids: modelling objects with Minetest (MT -> Blender).
A list of my mods can be found here.
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 19 guests

cron