[Mod] Build semi-auto or BMP/3d Mesh import [growwall]
[Mod] Build semi-auto or BMP/3d Mesh import [growwall]
Download: https://github.com/dgm3333/growwall (if you request pulls, then put a note in this forum)
https://github.com/dgm3333/growwall/archive/master.zip
This is a mod which started with the objective of building a wall. Using it you can semi-automatically create a wall (or other structure) from a line created on the ground, a bmp file, a wide variety of 3D mesh types (voxelised in binvox format) or just by walking where you wish your wall to be.
All you do is edit the lua to set the node you want to place (eg default:sandstonebrick), and the wall height (globals are at the top). You can also enter marker nodes, bmp and or binvox files, and offsets if you wish them. (don't be fooled by the scale option it currently doesn't work well)
Punch Functions:
To grow a single column of nodes punch any node other than the markernode and everything above it will be converted to the node of your choice to the height you want. To enable/disable the punch functions enter the chat command '/growwall'
To use a marker (eg to mark out a wall) place the marker (wool:red is default) where you wish the wall to go. Then punch any marker and all nearby marker nodes and the air/nodes above will be converted to the node of your choice. The conversion is iterative, so the conversion will extend as far as you have placed nodes, but each node must be within x+-1, z+-1, y+-3 of another marker.
BMP Import:
To place a bmp in the world enter the chat command '/growbmp'. By default this will be placed with bottom left at 0,0,0. However this can be modified with offsets, and scaled (but note upscaling will result in somewhat random gaps between blocks, and downscaling will set a block if it would have been set by any nodes - no averaging or smoothing is applied.
The bmp must be saved as 24bit format and uncompressed. The height of the wall is set from the darkness of the pixel - white is 0, black is maximum height. (Technically though the only channel used is the red channel, so it would be simple to also define varying node types using blue or green channels if you wanted to).
As always cavegen makes a nuisance of itself and randomly punches holes in the walls which were imported into ungenerated areas (ie with mapgen). The easiest way to fix this is to explore the structure entirely so mapgen has been completed then reimport it and the holes will be filled in...
3D Mesh Import:
To place a converted 3D mesh in the world enter the chat command '/growbnv'. Offsets and scaling work as above for bmps, and note the cavegen problems.
You will have to initially convert the mesh using the command-line tool binvox. binvox can import either mesh faces alone ("walls"), or solid objects with internal nodes filled. Limitations of binvox I've yet to fully explore are:-
* speed (very slow on my system, although apparently better with a new graphics card - mine is nearly 10yrs old),
* binvox conversion doesn't support multiple materials.
* resolution is limited by memory, but has max of 4096 nodes (='voxels') in any dimension (256x256 is approx footprint of a medium sized building). binvox crashes on my system with 8GB ram if attempting a 2048 point cubic grid.
BUGS with my code (not binvox) - put here to remind me to fix them when I get a mo:-
I'm not importing the grid dimensions correctly, so you need to set them manually
Walking Wall:
To enable/disable the walking wall function enter the chat command '/growwalk'. Then just walk where you want the wall to do - it will be placed when you move to the next x or z location, so going up or down won't cause nodes to be placed. You'll probably need to turn rapid move off (j key) or the wall will have gaps in it.
Hope it's useful (it took only me a few seconds to create a wall approx 1000 nodes long and 5 high on top of a pre-existing single node marker line).
It could be extended with more sophisticated wall types, or ability to place the bmp around as needed.
Licence: WTFPL v2 (NB binvox is a separate download and isn't included under this license)
https://github.com/dgm3333/growwall/archive/master.zip
This is a mod which started with the objective of building a wall. Using it you can semi-automatically create a wall (or other structure) from a line created on the ground, a bmp file, a wide variety of 3D mesh types (voxelised in binvox format) or just by walking where you wish your wall to be.
All you do is edit the lua to set the node you want to place (eg default:sandstonebrick), and the wall height (globals are at the top). You can also enter marker nodes, bmp and or binvox files, and offsets if you wish them. (don't be fooled by the scale option it currently doesn't work well)
Punch Functions:
To grow a single column of nodes punch any node other than the markernode and everything above it will be converted to the node of your choice to the height you want. To enable/disable the punch functions enter the chat command '/growwall'
To use a marker (eg to mark out a wall) place the marker (wool:red is default) where you wish the wall to go. Then punch any marker and all nearby marker nodes and the air/nodes above will be converted to the node of your choice. The conversion is iterative, so the conversion will extend as far as you have placed nodes, but each node must be within x+-1, z+-1, y+-3 of another marker.
BMP Import:
To place a bmp in the world enter the chat command '/growbmp'. By default this will be placed with bottom left at 0,0,0. However this can be modified with offsets, and scaled (but note upscaling will result in somewhat random gaps between blocks, and downscaling will set a block if it would have been set by any nodes - no averaging or smoothing is applied.
The bmp must be saved as 24bit format and uncompressed. The height of the wall is set from the darkness of the pixel - white is 0, black is maximum height. (Technically though the only channel used is the red channel, so it would be simple to also define varying node types using blue or green channels if you wanted to).
As always cavegen makes a nuisance of itself and randomly punches holes in the walls which were imported into ungenerated areas (ie with mapgen). The easiest way to fix this is to explore the structure entirely so mapgen has been completed then reimport it and the holes will be filled in...
3D Mesh Import:
To place a converted 3D mesh in the world enter the chat command '/growbnv'. Offsets and scaling work as above for bmps, and note the cavegen problems.
You will have to initially convert the mesh using the command-line tool binvox. binvox can import either mesh faces alone ("walls"), or solid objects with internal nodes filled. Limitations of binvox I've yet to fully explore are:-
* speed (very slow on my system, although apparently better with a new graphics card - mine is nearly 10yrs old),
* binvox conversion doesn't support multiple materials.
* resolution is limited by memory, but has max of 4096 nodes (='voxels') in any dimension (256x256 is approx footprint of a medium sized building). binvox crashes on my system with 8GB ram if attempting a 2048 point cubic grid.
BUGS with my code (not binvox) - put here to remind me to fix them when I get a mo:-
I'm not importing the grid dimensions correctly, so you need to set them manually
Walking Wall:
To enable/disable the walking wall function enter the chat command '/growwalk'. Then just walk where you want the wall to do - it will be placed when you move to the next x or z location, so going up or down won't cause nodes to be placed. You'll probably need to turn rapid move off (j key) or the wall will have gaps in it.
Hope it's useful (it took only me a few seconds to create a wall approx 1000 nodes long and 5 high on top of a pre-existing single node marker line).
It could be extended with more sophisticated wall types, or ability to place the bmp around as needed.
Licence: WTFPL v2 (NB binvox is a separate download and isn't included under this license)
Last edited by dgm5555 on Sat Mar 28, 2015 11:28, edited 17 times in total.
- Napiophelios
- Member
- Posts: 1035
- Joined: Mon Jul 07, 2014 01:14
- GitHub: Napiophelios
- IRC: Nappi
- In-game: Nappi
Re: Build Wall semi-automatically
Wow thats pretty cool.
works with all patterns I have thrown at it;
makes for an easy way to build a quick structure
works with all patterns I have thrown at it;
makes for an easy way to build a quick structure
Re: Build Wall semi-automatically
I've extended it a bit, so it can now read a bmp file in and build a wall (or any other shape) from that.
At the moment it reads the red channel as height, with black being highest, and white being ground level.
(the easiest way to do this is draw in gray so each channel will be the same value)
It doesn't load into areas which haven't been generated.
I've moved it to a git repo, as lots of mods are possible (see the top post for this)
At the moment it reads the red channel as height, with black being highest, and white being ground level.
(the easiest way to do this is draw in gray so each channel will be the same value)
It doesn't load into areas which haven't been generated.
I've moved it to a git repo, as lots of mods are possible (see the top post for this)
Re: Build semi-auto or BMP/3d Mesh import [growwall][mod]
I've now extended it a bit more so 3D meshes can also be imported. it uses binvox for the initial conversion, which means it can (currently) convert will Wavefront OBJ, Geomview OFF, Autocad DXF, PLY and STL, if they contain polygons only, and VRML 1.0.
apparently Unigrafix UG, VTK, XGL, PovRay POV, BREP, and JOT support are temporarily disabled
apparently Unigrafix UG, VTK, XGL, PovRay POV, BREP, and JOT support are temporarily disabled
- Hybrid Dog
- Member
- Posts: 2836
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: Build semi-auto or BMP/3d Mesh import [growwall][mod]
Can you also generate mesh files from buildings in minetest?
Re: Build semi-auto or BMP/3d Mesh import [growwall][mod]
My script only imports meshes, but prestidigitator's made an export script:-Hybrid Dog wrote:Can you also generate mesh files from buildings in minetest?
viewtopic.php?f=9&t=9948
Re: [Mod] Build semi-auto or BMP/3d Mesh import [growwall]
I installed this plugin and did /growwall , it says that its invalid command.
- jogag
- Member
- Posts: 106
- Joined: Wed Aug 12, 2015 18:32
- GitHub: jogag
- IRC: jogag
- In-game: jogag
- Location: Online
Re: Build semi-auto or BMP/3d Mesh import [growwall][mod]
Wow! I can now 3D-print my things in Minetest!!!dgm5555 wrote:I've now extended it a bit more so 3D meshes can also be imported. it uses binvox for the initial conversion, which means it can (currently) convert will Wavefront OBJ, Geomview OFF, Autocad DXF, PLY and STL, if they contain polygons only, and VRML 1.0.
To do that, I extended the mod command with the import parameters (mesh file, block to use) and I used my own digiline-controlled command block, along with a luacontroller and a keyboard from my (WIP) Digiline Stuff pack.
Great work!
- benrob0329
- Member
- Posts: 1341
- Joined: Thu Aug 06, 2015 22:39
- GitHub: Benrob0329
- IRC: benrob0329
- In-game: benrob03
- Location: Michigan
- Contact:
Re: [Mod] Build semi-auto or BMP/3d Mesh import [growwall]
The link in your signature is broken, I'd like to use that digilines mod, it sounds awesome!
- Evergreen
- Member
- Posts: 2135
- Joined: Sun Jan 06, 2013 01:22
- GitHub: 4Evergreen4
- IRC: EvergreenTree
- In-game: Evergreen
- Location: A forest in the midwest
- Contact:
Re: [Mod] Build semi-auto or BMP/3d Mesh import [growwall]
Diglines is available here: viewtopic.php?t=5263benrob0329 wrote:The link in your signature is broken, I'd like to use that digilines mod, it sounds awesome!
Back from the dead!
- benrob0329
- Member
- Posts: 1341
- Joined: Thu Aug 06, 2015 22:39
- GitHub: Benrob0329
- IRC: benrob0329
- In-game: benrob03
- Location: Michigan
- Contact:
Re: [Mod] Build semi-auto or BMP/3d Mesh import [growwall]
I'm talking about the Digiline Stuff Modpack...
- jogag
- Member
- Posts: 106
- Joined: Wed Aug 12, 2015 18:32
- GitHub: jogag
- IRC: jogag
- In-game: jogag
- Location: Online
Re: [Mod] Build semi-auto or BMP/3d Mesh import [growwall]
I'm working on that, it has a digiline printer, an IoT router, wireless, and SD cards...benrob0329 wrote:I'm talking about the Digiline Stuff Modpack...
Currently coding the most interesting mod: the Internet of Things mod, which adds a router with Wi-Fi capability...
EDIT: here's the link to the topic
Who is online
Users browsing this forum: No registered users and 36 guests