[Solved] Is it possible to use nodeboxes in entities
-
- Member
- Posts: 190
- Joined: Mon Jan 02, 2017 21:00
- GitHub: Sires0
- IRC: Sires
- In-game: Sires Sores Siri Seris or anything ppl call me
- Location: :noitacoL
[Solved] Is it possible to use nodeboxes in entities
And dats my question.
I tried doing it by setting a nodebox parameter but I dunno, the nodebox seems like "So buggy like depending in the direction you look you may see some sides or not or you see a hollow cube instead of an solid one"
Edit: I want to know where do I put the nodebox in the entity defenition to make it use a nodebox as the model
Edit2: I guess I found it and it's a complete code kludge(uuh, *Insert english is not my native language response here*), I saw that ppl register a node with the nodebox you want and then register an entity with visual wielditem of that block, that made me cry while I was reading it T-T Anyway, a bit offtopic but have anyone ever requested the feature of the "nodebox" visual?
I tried doing it by setting a nodebox parameter but I dunno, the nodebox seems like "So buggy like depending in the direction you look you may see some sides or not or you see a hollow cube instead of an solid one"
Edit: I want to know where do I put the nodebox in the entity defenition to make it use a nodebox as the model
Edit2: I guess I found it and it's a complete code kludge(uuh, *Insert english is not my native language response here*), I saw that ppl register a node with the nodebox you want and then register an entity with visual wielditem of that block, that made me cry while I was reading it T-T Anyway, a bit offtopic but have anyone ever requested the feature of the "nodebox" visual?
Last edited by Sires on Thu Jan 04, 2018 01:34, edited 4 times in total.
I don't have anything important to say.
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: Hello, is it possible to use nodeboxes asmodels for enti
Like this? viewtopic.php?f=9&t=16557
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
-
- Member
- Posts: 190
- Joined: Mon Jan 02, 2017 21:00
- GitHub: Sires0
- IRC: Sires
- In-game: Sires Sores Siri Seris or anything ppl call me
- Location: :noitacoL
Re: Hello, is it possible to use nodeboxes asmodels for enti
I read this code but it's too confusing, I didn't get it
I don't have anything important to say.
-
- Member
- Posts: 190
- Joined: Mon Jan 02, 2017 21:00
- GitHub: Sires0
- IRC: Sires
- In-game: Sires Sores Siri Seris or anything ppl call me
- Location: :noitacoL
Re: Hello, is it possible to use nodeboxes asmodels for enti
Can you make me a "sample" code plz? so I can understand
I don't have anything important to say.
-
- Member
- Posts: 190
- Joined: Mon Jan 02, 2017 21:00
- GitHub: Sires0
- IRC: Sires
- In-game: Sires Sores Siri Seris or anything ppl call me
- Location: :noitacoL
Re: Hello, is it possible to use nodeboxes asmodels for enti
But yeah, basicly I just want to be able to use nodeboxes like in this mod
I don't have anything important to say.
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: Hello, is it possible to use nodeboxes asmodels for enti
First of all, please consider editing your posts instead of creating a new one. This is a forum, not a chat.
Here some help if you can't find the edit button:
I couldn't find an API reference there, so I suggest looking at the already existing mods, like this lion. If you create a new mod, ensure you add a "depends.txt" file with the line "nmobs" inside, so you can use the API functions.
For further questions or help, try asking in the mod thread.
Here some help if you can't find the edit button:
I couldn't find an API reference there, so I suggest looking at the already existing mods, like this lion. If you create a new mod, ensure you add a "depends.txt" file with the line "nmobs" inside, so you can use the API functions.
For further questions or help, try asking in the mod thread.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
-
- Member
- Posts: 190
- Joined: Mon Jan 02, 2017 21:00
- GitHub: Sires0
- IRC: Sires
- In-game: Sires Sores Siri Seris or anything ppl call me
- Location: :noitacoL
Re: Hello, is it possible to use nodeboxes asmodels for enti
Ok...
Edit: But anyways this still uses the api, look first post to see more details of my question :P
Second edit: solved -_-
Edit: But anyways this still uses the api, look first post to see more details of my question :P
Second edit: solved -_-
I don't have anything important to say.
- stu
- Member
- Posts: 923
- Joined: Sat Feb 02, 2013 02:51
- GitHub: stujones11
- Location: United Kingdom
Re: [Solved, I guess] Is it possible to use nodeboxes in ent
It is possible in a round-about kinda way. First you need to register a regular node for your nodebox then create an entity with the `wielditem` visual type and use the item name-string in the `textures` table.Sires wrote:And dats my question.
example:
Code: Select all
minetest.register_entity("your_mod_name:nodebox_entity", {
visual = "wielditem",
textures = {"your_mod_name:nodebox_node"},
})
Note: some moderator might correct the title of this issue, it seems to have become somehow self-depleting.
-
- Member
- Posts: 190
- Joined: Mon Jan 02, 2017 21:00
- GitHub: Sires0
- IRC: Sires
- In-game: Sires Sores Siri Seris or anything ppl call me
- Location: :noitacoL
Re: [Solved, I guess] Is it possible to use nodeboxes in ent
The solved I guess because I found it myself, I wrote your solution in the Edit2, but I think it's too hacky, but anyways workstu wrote:It is possible in a round-about kinda way. First you need to register a regular node for your nodebox then create an entity with the `wielditem` visual type and use the item name-string in the `textures` table.Sires wrote:And dats my question.
example:You may also need to adjust the scale, I don't remember :)Code: Select all
minetest.register_entity("your_mod_name:nodebox_entity", { visual = "wielditem", textures = {"your_mod_name:nodebox_node"}, })
Note: some moderator might correct the title of this issue, it seems to have become somehow self-depleting.
I don't have anything important to say.
- stu
- Member
- Posts: 923
- Joined: Sat Feb 02, 2013 02:51
- GitHub: stujones11
- Location: United Kingdom
Re: [Solved, I guess] Is it possible to use nodeboxes in ent
Sorry, I didn't read that, guess we must have cross-posted :)Sires wrote:The solved I guess because I found it myself, I wrote your solution in the Edit2, but I think it's too hacky, but anyways work
I would expect a `nodebox` visual wouldn't be too hard to implement given that nodeboxes are converted to meshes anyway, iirc. I am not sure how involved it would be code-wise or whether the developers would even consider this worthwhile.
Meshes are way more versatile and efficient, however, there does seem to be a demand for this seeing the number of mods that currently (ab)use this method. I guess it's because many people are afraid of 3d editors, esp. blender. Does Rubenwardy's NBE app not have a feature to export as .obj or something?
-
- Member
- Posts: 190
- Joined: Mon Jan 02, 2017 21:00
- GitHub: Sires0
- IRC: Sires
- In-game: Sires Sores Siri Seris or anything ppl call me
- Location: :noitacoL
Re: [Solved, I guess] Is it possible to use nodeboxes in ent
Maybe I'm dumb and I'm implementing the .obj wrong but the obj is the description of what happens when I try to use the nodebox parameter(I was using a mesh parameter at the same time so the mesh is pretty buggy), buy anyway, It's real buggy the thing that results from the .obj for mestu wrote:Sorry, I didn't read that, guess we must have cross-posted :)Sires wrote:The solved I guess because I found it myself, I wrote your solution in the Edit2, but I think it's too hacky, but anyways work
I would expect a `nodebox` visual wouldn't be too hard to implement given that nodeboxes are converted to meshes anyway, iirc. I am not sure how involved it would be code-wise or whether the developers would even consider this worthwhile.
Meshes are way more versatile and efficient, however, there does seem to be a demand for this seeing the number of mods that currently (ab)use this method. I guess it's because many people are afraid of 3d editors, esp. blender. Does Rubenwardy's NBE app not have a feature to export as .obj or something?
Also I said many times, blender is too complicated for my brain ;-; if there was a simpler 3d editor that is just like rubenwardy's NBE I would love it
I don't have anything important to say.
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: [Solved, I guess] Is it possible to use nodeboxes in ent
NBE can export to .obj, but it's unoptimised. It's better to use node boxes in most cases.Sires wrote:Also I said many times, blender is too complicated for my brain ;-; if there was a simpler 3d editor that is just like rubenwardy's NBE I would love it
- stu
- Member
- Posts: 923
- Joined: Sat Feb 02, 2013 02:51
- GitHub: stujones11
- Location: United Kingdom
Re: [Solved, I guess] Is it possible to use nodeboxes in ent
I am pretty sure the meshes generated by the `wielditem` visual are also sub-optimal, otherwise you could just borrow the code from there, right?rubenwardy wrote:NBE can export to .obj, but it's unoptimised. It's better to use node boxes in most cases.Sires wrote:Also I said many times, blender is too complicated for my brain ;-; if there was a simpler 3d editor that is just like rubenwardy's NBE I would love it
For nodes however, I agree, nodeboxes still very much have their place.
-
- Member
- Posts: 119
- Joined: Tue Sep 23, 2014 11:37
Re: [Solved] Is it possible to use nodeboxes in entities
So what you both are saying is that nodebox mobs are more ressource hungry than similar Blender/Wings3D meshes (without animation of course), because the nodeboxes have to be converted to meshes by the engine?
Can I somehow get those converted meshes and save minetest this step?
Can I somehow get those converted meshes and save minetest this step?
- stu
- Member
- Posts: 923
- Joined: Sat Feb 02, 2013 02:51
- GitHub: stujones11
- Location: United Kingdom
Re: [Solved] Is it possible to use nodeboxes in entities
The meshes generated by the engine may have a few unnecessary faces as compared to a well designed mesh. Unless you spawn hundreds of entities in a very small area you are unlikely to see any tangible performance improvement. The biggest advantage of meshes IMO is that you have much greater control over the texturing.Rochambeau wrote:So what you both are saying is that nodebox mobs are more ressource hungry than similar Blender/Wings3D meshes (without animation of course), because the nodeboxes have to be converted to meshes by the engine?
Can I somehow get those converted meshes and save minetest this step?
- Tcll
- Member
- Posts: 87
- Joined: Thu Jul 25, 2019 21:43
- GitHub: Tcll
- IRC: Tcll Tcll5850 DarkPikachu
- In-game: Tcll
- Location: The Gates of Darkness.
Re: [Solved] Is it possible to use nodeboxes in entities
is this possible in 5.3.0 yet??
or is it still broken??
(there's no documentation on it which leads me to assume it's still broken)
reason I need this is because emissive maps aren't a thing yet...
so I can put an emissive nodebox entity inside a primary nodebox node to work around the lack of support.
yeah it's a bit smelly, I know...
it'll be cleaned up when emissive maps are a thing.
EDIT: just to clarify, by "possible", I mean this:
this way, devs won't be forced to write an obnoxious amount of code just to make the engine work for them.
EDIT2: well, this won't work for me even if entity visuals could do "nodebox"
I was hoping the connect functionality would work for more performance, but it looks like the C++ engine doesn't even support this...
looks like I'm better off re-inventing the wheel with a basic mesh-node and numerous mesh-entities just to get the functionality I need...
that's a shame...
or is it still broken??
(there's no documentation on it which leads me to assume it's still broken)
reason I need this is because emissive maps aren't a thing yet...
so I can put an emissive nodebox entity inside a primary nodebox node to work around the lack of support.
yeah it's a bit smelly, I know...
it'll be cleaned up when emissive maps are a thing.
EDIT: just to clarify, by "possible", I mean this:
Code: Select all
minetest.register_entity(name, {
visual = "nodebox",
node_box = { ... },
})
EDIT2: well, this won't work for me even if entity visuals could do "nodebox"
I was hoping the connect functionality would work for more performance, but it looks like the C++ engine doesn't even support this...
looks like I'm better off re-inventing the wheel with a basic mesh-node and numerous mesh-entities just to get the functionality I need...
that's a shame...
Who is online
Users browsing this forum: No registered users and 10 guests