[Mod] BlockExport [blockexport]
-
- Member
- Posts: 647
- Joined: Thu Feb 21, 2013 23:54
[Mod] BlockExport [blockexport]
This mod defines a new chat command "/exportblock" which writes 3D node data of the player's current 80x80x80 node block to a file in Wavefront OBJ format.
This thread is for announcements and discussion. For more information about the mod itself please see the wiki page: http://wiki.minetest.net/Mods/BlockExport
This thread is for announcements and discussion. For more information about the mod itself please see the wiki page: http://wiki.minetest.net/Mods/BlockExport
Last edited by prestidigitator on Mon Aug 18, 2014 02:36, edited 1 time in total.
-
- Member
- Posts: 647
- Joined: Thu Feb 21, 2013 23:54
Re: [Mod] BlockExport [blockexport]
This mod was inspired by the 3D printing for kids: modelling objects with Minetest General Discussion thread.
Re: [Mod] BlockExport [blockexport]
Moving over from the 3d print thread.
viewtopic.php?f=3&t=9923&start=25#p151515
Did you generate that pyramid from the block exporter, or did you postprocess it (booleans, etc)?
Also, viewtopic.php?f=3&t=156&start=2450#p151540 it's alive :) Hopefully people can use exporters to make renders too!
viewtopic.php?f=3&t=9923&start=25#p151515
Did you generate that pyramid from the block exporter, or did you postprocess it (booleans, etc)?
Also, viewtopic.php?f=3&t=156&start=2450#p151540 it's alive :) Hopefully people can use exporters to make renders too!
- addi
- Member
- Posts: 666
- Joined: Thu Sep 20, 2012 03:16
- GitHub: adrido
- Location: Black-Forest, Germany
Re: [Mod] BlockExport [blockexport]
am i just too stupid or does it not work
downloaded, and installed the mod,
started a game,
typed /blockexport
//noticed that the correct command is /exportblock
typed /exportblock
waitet ca. 1 minute
opened blender
imported the block 0-0-0.obj file
and saw nothing only a grey screen
(i also saw no error message)
than i saw that the file is only 2Kb big. //dont know if that is correct.
i uploaded it here maybe someone can check it.
downloaded, and installed the mod,
started a game,
typed /blockexport
//noticed that the correct command is /exportblock
typed /exportblock
waitet ca. 1 minute
opened blender
imported the block 0-0-0.obj file
and saw nothing only a grey screen
(i also saw no error message)
than i saw that the file is only 2Kb big. //dont know if that is correct.
i uploaded it here maybe someone can check it.
- Attachments
-
- block_0-0-0.zip
- (767 Bytes) Downloaded 135 times
Re: [Mod] BlockExport [blockexport]
File works just fine. It's offset from the center of the axes by 50 units or so, so the mesh is offscreen. Scroll back a good few times and you'll see it.addi wrote:am i just too stupid or does it not work
edit: offset of geometry of your object from (x;y;z) 0;0;0 is exactly 29.0814; -40.38372; 4.16278.
With object selected, from bottom menu in Blender choose: Object>Transform>Geometry To Origin. It will end up in the center.
Also, thanks for the mesh man, I can test it now!
prestidigitator:
OMFG man it exports a lightweight mesh instead of cubes! :D My question answered, this is awesome!
Has a lot of non-manifold edges, but is OK otherwise. I have to test this more, I'll give you more input later!
Will have to test it with slicers too.
edit2:
Remesh modifier makes the geometry perfect on very low settings! :D I'm hyped up about this one, very good solution for printable mesh!
Do you keep the chunk size as a variable in code? That would be perfect for the little kids, selecting stuff in worldedit is powerful, but here they could do it by themselves!
I've GOT to find time to fiddle with this later this week! Wooooo! :D
-
- Member
- Posts: 647
- Joined: Thu Feb 21, 2013 23:54
Re: [Mod] BlockExport [blockexport]
Zero post-processing. Just imported the OBJ file, switched to edit mode/face select, and turned on wireframe mode before taking the screenshot.spin wrote:Moving over from the 3d print thread.
viewtopic.php?f=3&t=9923&start=25#p151515
Did you generate that pyramid from the block exporter, or did you postprocess it (booleans, etc)?
Excellent! Yeah, with this mod I exported one block a few times with different materials (dirt, stone, sand, water) and with the addition of a few simple Cycles materials, I can get a pretty decent looking render. Fun stuff to play with.Also, viewtopic.php?f=3&t=156&start=2450#p151540 it's alive :) Hopefully people can use exporters to make renders too!
-
- Member
- Posts: 647
- Joined: Thu Feb 21, 2013 23:54
Re: [Mod] BlockExport [blockexport]
Glad it's working well. Yeah, the non-manifold edges gave me mixed feelings. On the one hand it creates rips in the mesh, but on the other it can reduce the amount of geometry a bit (as well as some of the export logic). It wouldn't be too hard to fix. How does that affect the 3D printing functionality and workflow? Maybe that should be the deciding factor, although if one simple operating in Blender can fix it perhaps that is good enough too.spin wrote:MFG man it exports a lightweight mesh instead of cubes! :D My question answered, this is awesome!
Has a lot of non-manifold edges, but is OK otherwise. I have to test this more, I'll give you more input later!
Will have to test it with slicers too.
edit2:
Remesh modifier makes the geometry perfect on very low settings! :D I'm hyped up about this one, very good solution for printable mesh!
Do you keep the chunk size as a variable in code? That would be perfect for the little kids, selecting stuff in worldedit is powerful, but here they could do it by themselves!
I've GOT to find time to fiddle with this later this week! Wooooo! :D
The chunk size isn't variable at the moment; I just chose the same algorithm Minetest uses to break up the map for map generation, database storage, and loading. However, I did write the functions so that it will be very easy to make it configurable (they just take minimum and maximum x, y, and z coordinates). I'm thinking of enhancing it to either search neighboring blocks or allow the player to specify some kind of size/location data in the chat command.
One enhancement I think would be nice is to remove the ability to configure the exported materials in the mod itself, and instead export every block in the player's hotbar when they issue the command. That way you don't even have to know the names of the blocks.
Any thoughts on those enhancements?
-
- Member
- Posts: 647
- Joined: Thu Feb 21, 2013 23:54
Re: [Mod] BlockExport [blockexport]
The mesh vertices will always be in the coordinate range [0, 80] in all three dimensions. This allows multiple blocks to be imported into Blender and aligned perfectly with each other: move each object's origin to the minimum coordinate location of the corresponding block in Minetest (multiples of 80.0 in each direction, as indicated by the exported file name). You can re-create whole sections of map this way.spin wrote:File works just fine. It's offset from the center of the axes by 50 units or so, so the mesh is offscreen. Scroll back a good few times and you'll see it.addi wrote:am i just too stupid or does it not work
edit: offset of geometry of your object from (x;y;z) 0;0;0 is exactly 29.0814; -40.38372; 4.16278.
With object selected, from bottom menu in Blender choose: Object>Transform>Geometry To Origin. It will end up in the center.
One nice way to find everything in Blender, by the way, is to select all (A) and View Selected (Numpad .). I think you can even skip the selection step just after importing, as the imported object is included in the selection (but isn't made the active object apparently).
Re: [Mod] BlockExport [blockexport]
Hmm... I think it would be neat if Minetest maps could be exported to the following game somehow:
http://tesseract.gg/
http://tesseract.gg/
[BitChute: https://www.bitchute.com/channel/fCcBQxrYQjNX/] [Rumble: https://rumble.com/user/HPoorHMagentaHChildH]
- TechNolaByte
- Member
- Posts: 465
- Joined: Wed May 10, 2017 21:00
- GitHub: TechNolaByte
Re: [Mod] BlockExport [blockexport]
Super cool!
way better than a screen shot :P
way better than a screen shot :P
The great quest of alchemy neither failed nor attained gold; programmers are those great alchemists who transmute caffeine into code.
Re: [Mod] BlockExport [blockexport]
Hello :-)prestidigitator wrote:This mod was inspired by the 3D printing for kids: modelling objects with Minetest General Discussion thread.
Thank you so much for this easy mod!
I'm sorry for the late post.
I just discovered Minetest today, and it works well on my old workshop-computers.
I'm having a 3D printing workshop with 1st-4th graders during the summer, and a few struggle with even the easier CAD tools (Tinke rcad, Mattercontrol, XYZMaker).
As many already know M*necraft, I'd love to use this approach for them to easily build houses, castles and such.
I added the other wool blocks so students can build with multiple colors, if they choose to do so.
I have a question/problem though:
While adding block types was very easy, I can't quite wrap my head around the 80 block export limit.
- Which parts of the init.lua do I have to change for a larger area?
[stroke] - Is it the nearest game chunk/area? The only way to get a fail-safe printing area for kids would be to make a saved world with markings or a 80 block grid. (Any way to make a world generator?)
- As standing at either side of a castle, it doesn't export the whole thing (despite it being smaller than 80x80).[/stroke]
//Edit: Do'h, I figured that part out. I misread that it was a 80x80x80 area around the player.
Would it be possible to have the mod export a "radius" of 40 blocks around the player? Or even an optional command such as /exportblock 100?
Or is there a mod to place, say, torches in a grid?
Otherwise this solution is nearly perfect.
I've also seen the mt2obj/M3D solutions, but I really like the one-command solution of block-export :-)
As for making it easier for students, I added a few things to the .conf file and mods;
- wool in initial stuff, fly and fast privileges, time_speed=0, preset to flat and a preset seed.
- I also installed bedrock2, using bedrock.layer=8 to basically throw them into an easy sandbox for 3D modeling with a build-plate they can't mess up (e.g. digging holes when deleting blocks, then filling them with wool, creates uneven model bottom surfaces).
Thanks for your hard work! <3
Have a nice day!
Re: [Mod] BlockExport [blockexport]
Sorry for being such a newbie :-)
I just solved it by preparing a world with markers, and the students launch a shortcut/batch-file.
This copies the draft world into a random directory, starts Minetest directly with that world, so students don't edit each other's world or mess with the settings.
EDIT: Time stamp, might ad used name / custom name entry later
I just solved it by preparing a world with markers, and the students launch a shortcut/batch-file.
This copies the draft world into a random directory, starts Minetest directly with that world, so students don't edit each other's world or mess with the settings.
Code: Select all
set nummer=%RANDOM%%RANDOM%%RANDOM%
Xcopy /E /I minetest-5.0.1-win64\__3ddraft minetest-5.0.1-win64\worlds\%nummer%
minetest-5.0.1-win64\bin\minetest.exe --go --worldname %nummer% --name Scholar
EDIT: Time stamp, might ad used name / custom name entry later
Code: Select all
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%"
set "datestamp=%YYYY%%MM%%DD%" & set "timestamp=%HH%%Min%%Sec%"
set "fullstamp=%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%"
Xcopy /E /I minetest-5.0.1-win64\__3dVorlage minetest-5.0.1-win64\worlds\%fullstamp%
start minetest-5.0.1-win64\worlds\%fullstamp%
timeout 3
minetest-5.0.1-win64\bin\minetest.exe --go --worldname %fullstamp% --name Scholar
Last edited by Marcus on Sat Sep 14, 2019 09:09, edited 1 time in total.
Re: [Mod] BlockExport [blockexport]
Well, my 3D printing workshop is over :-)
Age 7-11. We used Mattercontrol 2, xyzMaker, and some Tinkercad when I got my mobile internet hotspot set up.
...and Minetest in the second week :-) Of course they also wanted to play multiplayer, use swords and blow up stuff with TNT... So the world is now flat again ;-)
Here are a few pictures I took, some non-minetest.
The kids also printed a spaceship, block-thingy, etc., but I didn't get pictures of it all.
What I learned:
- I need a better camera and take more pictures :-)
- Minetest works slightly better on my old computers (E8500/4GB/nvs300@512GB) than Minecraft (BetterFPS, Optifine,...), at least when there are no trees and other things visible. Those computers are already "upgraded" with the NVS300 and that's the best I can get. (Payed around 30€ for each computer).
- Most kids are familiar with Minecraft on Tablets or phones these days. Especially the younger ones had more trouble than I thought (using mouse and keyboard at the same time, especially with left- and right-click). 6 Years ago, when I first used Minecraft with kids, this was no issue at all (Most people only had a computer at home, not a tablet). Changing the keys to the arrow-keys helped a bit.
- Kids always are a bit sad they can't print in colors. It would be nice if there's an easy way to export models with textured (not graphic texture, but surface texture / displacement maps texture
- Building together in multiplayer is much more fun, and easy to do. But we had a lot of kids trolling each other :-) An easy way to set zones for individual players would be nice, got to do some research. And some build zone map or markers perhaps as kids get easily disoriented.
- With bedrock2, blockexport, slightly modified conf and bat to throw them right into it, it's a great tool!
TL;DR: Thank you again for the mod!
Age 7-11. We used Mattercontrol 2, xyzMaker, and some Tinkercad when I got my mobile internet hotspot set up.
...and Minetest in the second week :-) Of course they also wanted to play multiplayer, use swords and blow up stuff with TNT... So the world is now flat again ;-)
Here are a few pictures I took, some non-minetest.
The kids also printed a spaceship, block-thingy, etc., but I didn't get pictures of it all.
What I learned:
- I need a better camera and take more pictures :-)
- Minetest works slightly better on my old computers (E8500/4GB/nvs300@512GB) than Minecraft (BetterFPS, Optifine,...), at least when there are no trees and other things visible. Those computers are already "upgraded" with the NVS300 and that's the best I can get. (Payed around 30€ for each computer).
- Most kids are familiar with Minecraft on Tablets or phones these days. Especially the younger ones had more trouble than I thought (using mouse and keyboard at the same time, especially with left- and right-click). 6 Years ago, when I first used Minecraft with kids, this was no issue at all (Most people only had a computer at home, not a tablet). Changing the keys to the arrow-keys helped a bit.
- Kids always are a bit sad they can't print in colors. It would be nice if there's an easy way to export models with textured (not graphic texture, but surface texture / displacement maps texture
- Building together in multiplayer is much more fun, and easy to do. But we had a lot of kids trolling each other :-) An easy way to set zones for individual players would be nice, got to do some research. And some build zone map or markers perhaps as kids get easily disoriented.
- With bedrock2, blockexport, slightly modified conf and bat to throw them right into it, it's a great tool!
TL;DR: Thank you again for the mod!
-
- Member
- Posts: 4290
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
Re: [Mod] BlockExport [blockexport]
There's the areas mod that works well for servers. Together with my markers mod (placable markers that mark the area that is to be protected) and my travelnet mod (phone cell to beam to other places; not only kids loose orientation in MT :-)), building on servers gets easier. In your case, the situation may be diffrent. The kids may decide to build together, but then there's no way to revert to a previous stage if the newly added player destroyed something. There's the rollback command, but that's for admins only and seldom used on servers.Marcus wrote: - Building together in multiplayer is much more fun, and easy to do. But we had a lot of kids trolling each other :-) An easy way to set zones for individual players would be nice, got to do some research. And some build zone map or markers perhaps as kids get easily disoriented.
A list of my mods can be found here.
Re: [Mod] BlockExport [blockexport]
Thank you so much for taking the time to post all that information! That sounds exactly like what I'm looking for!
I've seen the rollback-command; I haven't tried yet (workshop's over, need to do some other stuff first); So far we played locally, one or two people hosting. I might set up a server though for all computers.
I've seen the rollback-command; I haven't tried yet (workshop's over, need to do some other stuff first); So far we played locally, one or two people hosting. I might set up a server though for all computers.
-
- New member
- Posts: 8
- Joined: Wed Jun 09, 2021 13:23
- In-game: mattruffoni
Re: [Mod] BlockExport [blockexport]
Hi, I'm a teacher from Italya. I installed the mod blockexport and everything seems works fine but the file exported is empty. The name of the file is this block_m240-0-m320.obj
Who is online
Users browsing this forum: No registered users and 26 guests