I'd like to be able to display a textured mesh as a HUD element for better control over how an item displays (i.e. blank wield_image, HUD element displayed instead when held). This would be particularly useful for things like 3D modelled guns, tools, etc. as they don't need to move much but would benefit greatly from a proper 3D HUD display.
If this isn't already possible, how hard would it be to implement? Is it likely to ever be a feature?
Textured mesh as a HUD element?
- PolySaken
- Member
- Posts: 817
- Joined: Thu Nov 09, 2017 05:18
- GitHub: PolySaken-I-Am
- In-game: PolySaken
- Location: Wānaka, Aotearoa
- Contact:
Textured mesh as a HUD element?
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.
- Wuzzy
- Member
- Posts: 4804
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: Textured mesh as a HUD element?
The feature you're asking for does exist natively.
But the closest thing you can to a 3D rendering is with hud_elem_type="inventory" and then use it to display a single slot from a detached inventory in which you placed an item which has an inventory rendering that you like. You could create a fake node of mesh drawtype so you get the mesh. It's hacky, but it would work. Just make sure that players can never place that node
But the closest thing you can to a 3D rendering is with hud_elem_type="inventory" and then use it to display a single slot from a detached inventory in which you placed an item which has an inventory rendering that you like. You could create a fake node of mesh drawtype so you get the mesh. It's hacky, but it would work. Just make sure that players can never place that node
- PolySaken
- Member
- Posts: 817
- Joined: Thu Nov 09, 2017 05:18
- GitHub: PolySaken-I-Am
- In-game: PolySaken
- Location: Wānaka, Aotearoa
- Contact:
Re: Textured mesh as a HUD element?
That's an interesting idea, but i could just as easily take a screenshot of a 3d model and achieve the same effect, so not particularly useful unfortunately. The make or break feature of a 3d mesh drawtype would be the ability to set the rotation, so it'll have to be added to the engine if enough people want it.
I can imagine there is a large justification for adding this feature as it would make a lot of things possible that are not otherwise.
Perhaps the code for displaying models in formspecs could be reused somewhat.
I can imagine there is a large justification for adding this feature as it would make a lot of things possible that are not otherwise.
Perhaps the code for displaying models in formspecs could be reused somewhat.
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.
- SaKeL
- Member
- Posts: 743
- Joined: Tue Apr 14, 2015 18:39
- GitHub: JurajVajda
- IRC: SaKeL
- In-game: SaKeL
Re: Textured mesh as a HUD element?
Hi Wuzzy, would you have an example somewhere on how to show detached inventory in hud_elem_type="inventory" ? Something I am struggling with at the moment and it seems like its not possible.Wuzzy wrote: ↑Tue Aug 03, 2021 17:35The feature you're asking for does exist natively.
But the closest thing you can to a 3D rendering is with hud_elem_type="inventory" and then use it to display a single slot from a detached inventory in which you placed an item which has an inventory rendering that you like. You could create a fake node of mesh drawtype so you get the mesh. It's hacky, but it would work. Just make sure that players can never place that node
Who is online
Users browsing this forum: No registered users and 8 guests