[SOLVED] Easy way for converting nodeboxes to models?
- rudzik8
- Member
- Posts: 204
- Joined: Wed Jun 02, 2021 04:13
- GitHub: rudzik8
- In-game: db75c and rudzik8
- Location: Siberia
[SOLVED] Easy way for converting nodeboxes to models?
In my mod I have a nodebox for table lamp (link). To texture all this properly it uses one texture per side, which is very painful T_T
Recreating that in Blender is a whole mess for me, especially when trying to scale texture up perfectly (pixel to pixel), but it may be just my experience :P
Question: is there any easy way for converting nodeboxes to models? I need that to increase performance of my mod and make blocks use more material types instead of just one. Something like a script, or a program (maybe a Blender alternative that is more gentle with voxel models)?
Thanks.
Recreating that in Blender is a whole mess for me, especially when trying to scale texture up perfectly (pixel to pixel), but it may be just my experience :P
Question: is there any easy way for converting nodeboxes to models? I need that to increase performance of my mod and make blocks use more material types instead of just one. Something like a script, or a program (maybe a Blender alternative that is more gentle with voxel models)?
Thanks.
Last edited by rudzik8 on Sat Oct 01, 2022 09:26, edited 1 time in total.
- LMD
- Member
- Posts: 1396
- Joined: Sat Apr 08, 2017 08:16
- GitHub: appgurueu
- IRC: appguru[eu]
- In-game: LMD
- Location: Germany
- Contact:
Re: Easy way for converting nodeboxes to models?
Have you actually verified that the models are more performant? On the one hand, Minetest can do some culling on nodeboxes that isn't done as easily for models. On the other hand, you could remove some faces you know won't be visible.rudzik8 wrote: ↑Fri Sep 30, 2022 03:25In my mod I have a nodebox for table lamp (link). To texture all this properly it uses one texture per side, which is very painful T_T
Recreating that in Blender is a whole mess for me, especially when trying to scale texture up perfectly (pixel to pixel), but it may be just my experience :P
Question: is there any easy way for converting nodeboxes to models? I need that to increase performance of my mod and make blocks use more material types instead of just one. Something like a script, or a program (maybe a Blender alternative that is more gentle with voxel models)?
Thanks.
- Nathan.S
- Member
- Posts: 1147
- Joined: Wed Sep 24, 2014 17:47
- GitHub: NathanSalapat
- IRC: NathanS21
- In-game: NathanS21
- Location: Bigsby Texas
- Contact:
Re: Easy way for converting nodeboxes to models?
I believe Rubenwardy's nodebox editor can export to obj. Although it's depreciated, and I'm not sure how easily you can import nodeboxes into it. Last time I used it I had to manually enter all the coordinates for the nodeboxes.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
Check out my website, and brand new Minetest Modding Course
- rudzik8
- Member
- Posts: 204
- Joined: Wed Jun 02, 2021 04:13
- GitHub: rudzik8
- In-game: db75c and rudzik8
- Location: Siberia
Re: Easy way for converting nodeboxes to models?
Hmm... maybe, but NodeBoxEditor crashes at some basic things like saving projects, so I'm aware exporting it might end up like that. There are some forks of NBE that may work better, may check later.
I didn't verify that, but benchmarks from others are telling that models are faster. Even if performance is same, texturing objects like table lamp in nodeboxes is VERY difficult. There's a screenshot of this table lamp:
As you can see, I've used wool for both parts of it just because I can't do otherwise (like make that steel look like if it was made from iron (equivalent to MTG's steel)) so it's looking weird. If I've used model, I could use normal UV-mapping and make the stand steel without making the top part steel as well (which is very ugly and totally unsuitable).
I may keep other blocks in my mod nodeboxed (like armchairs which don't have any problems with texturing), but things like table lamp are painful to look at. Oh, and if you'll put it on glass or barrier and look from bottom you'll see that bottom part of it's stand is actually containing a lamp inside (*sigh*)
- Desour
- Member
- Posts: 1472
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- In-game: DS
- Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
Re: Easy way for converting nodeboxes to models?
Minetest map rendering speed is mostly bottlenecked through the amount of drawcalls. And there's always one meshbuffer per mapblock per tile type. So, if you use the same tile on every node face (e.g. cobble stairs), meshes probably won't be faster. But if you have something like your lamp and only use one tile (and hence only one material in the mesh), it will probably be faster. But to be sure, you should try it out and do benchmarks (i.e. place many lamps with worldedit and compare fps).
Creating meshes isn't that hard.
I've made a small script for fun to convert a nodebox to an obj wavefront mesh:
<https://gist.github.com/Desour/91111d08 ... 11b30d027f>
The winding order should be correct, according to blender. But the texture coordinates are wrong.
Also, there's only one material.
Creating meshes isn't that hard.
I've made a small script for fun to convert a nodebox to an obj wavefront mesh:
<https://gist.github.com/Desour/91111d08 ... 11b30d027f>
The winding order should be correct, according to blender. But the texture coordinates are wrong.
Also, there's only one material.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
- rudzik8
- Member
- Posts: 204
- Joined: Wed Jun 02, 2021 04:13
- GitHub: rudzik8
- In-game: db75c and rudzik8
- Location: Siberia
Re: Easy way for converting nodeboxes to models?
Sure, probably will that after creating mesh.DS-minetest wrote: ↑Fri Sep 30, 2022 17:10Minetest map rendering speed is mostly bottlenecked through the amount of drawcalls. And there's always one meshbuffer per mapblock per tile type. So, if you use the same tile on every node face (e.g. cobble stairs), meshes probably won't be faster. But if you have something like your lamp and only use one tile (and hence only one material in the mesh), it will probably be faster. But to be sure, you should try it out and do benchmarks (i.e. place many lamps with worldedit and compare fps).
Doesn't seem like a go-to solution to me with texture coords being broken (but may be useful for future modders going there for answers)DS-minetest wrote: ↑Fri Sep 30, 2022 17:10I've made a small script for fun to convert a nodebox to an obj wavefront mesh:
<https://gist.github.com/Desour/91111d08 ... 11b30d027f>
The winding order should be correct, according to blender. But the texture coordinates are wrong.
Also, there's only one material.
Will try to redo that in good old Blender once again and reply here.
- Blockhead
- Member
- Posts: 1678
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Re: Easy way for converting nodeboxes to models?
A good tool that would complete the texture coordinates (you mean UVs right?) correctly and apply all the right materials would be nice. Thanks for at least spinning something up quickly Desour.
rudzik: There are also alternatives to Blender that are easier to start with like BlockBench in case you don't already have Blender experience. Blockbench is pretty decent for voxel engine models.
rudzik: There are also alternatives to Blender that are easier to start with like BlockBench in case you don't already have Blender experience. Blockbench is pretty decent for voxel engine models.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
- rudzik8
- Member
- Posts: 204
- Joined: Wed Jun 02, 2021 04:13
- GitHub: rudzik8
- In-game: db75c and rudzik8
- Location: Siberia
Re: Easy way for converting nodeboxes to models?
I already have some experience with Blender, but will give a try for Blockbench too, thanks!Blockhead wrote: ↑Sat Oct 01, 2022 02:34rudzik: There are also alternatives to Blender that are easier to start with like BlockBench in case you don't already have Blender experience. Blockbench is pretty decent for voxel engine models.
- rudzik8
- Member
- Posts: 204
- Joined: Wed Jun 02, 2021 04:13
- GitHub: rudzik8
- In-game: db75c and rudzik8
- Location: Siberia
Re: Easy way for converting nodeboxes to models?
And did. Performance is mostly same, but texturing is much easier now and I finally have some normal mesh experience!rudzik8 wrote: ↑Sat Oct 01, 2022 02:26Sure, probably will that after creating mesh.DS-minetest wrote: ↑Fri Sep 30, 2022 17:10Minetest map rendering speed is mostly bottlenecked through the amount of drawcalls. And there's always one meshbuffer per mapblock per tile type. So, if you use the same tile on every node face (e.g. cobble stairs), meshes probably won't be faster. But if you have something like your lamp and only use one tile (and hence only one material in the mesh), it will probably be faster. But to be sure, you should try it out and do benchmarks (i.e. place many lamps with worldedit and compare fps).
- Desour
- Member
- Posts: 1472
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- In-game: DS
- Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
Re: Easy way for converting nodeboxes to models?
I have to correct myself in how one would benchmark this.rudzik8 wrote: ↑Sat Oct 01, 2022 09:16And did. Performance is mostly same, but texturing is much easier now and I finally have some normal mesh experience!rudzik8 wrote: ↑Sat Oct 01, 2022 02:26Sure, probably will that after creating mesh.DS-minetest wrote: ↑Fri Sep 30, 2022 17:10Minetest map rendering speed is mostly bottlenecked through the amount of drawcalls. And there's always one meshbuffer per mapblock per tile type. So, if you use the same tile on every node face (e.g. cobble stairs), meshes probably won't be faster. But if you have something like your lamp and only use one tile (and hence only one material in the mesh), it will probably be faster. But to be sure, you should try it out and do benchmarks (i.e. place many lamps with worldedit and compare fps).
Having more than one of the node in a mapblock doesn't increase the tile type count per mapblock. You could however have many mapblocks that have each one of your node and are otherwise filled with air.
Anyway, if it's an artificial, sparsely used node, you shouldn't have to worry too much about performance.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
Who is online
Users browsing this forum: No registered users and 9 guests