Hi folks and supporters of babylonjs,
Is it possible to hide and unhide parts from your 3D model by enabling and disabling poly-groups from a gtlf file that exists out of 1 object only? Or would I have to use separate models in that gltf file?
This is something I need to know because it might spare my time on doing many other steps.
Kind regards,
Tristan Gybels
Pinging our gltf master @bghgary
(please be a bit patient though as he will be back this monday)
1 Like
That’s great! Can’t wait ![:slight_smile: :slight_smile:](/images/emoji/win10/slight_smile.png?v=9)
If I am understanding the question correctly, you have 1 object, and that contains other groupings/collections in it? If so, it is fairly easy to do I think. Just select which nodes you are wanting to hide/unhide and you can do a setEnabled on those.
https://www.babylonjs-playground.com/#K7TJIG#3
2 Likes
What @Devin_Wright suggests seems like what you want, but if not, can you please explain what “poly-groups” mean in your scenario?
As like in OBJ formats you can group polygons, say for example you have a rigged character and you want to hide all polygons except for the chest. Considering the JSON structure for gltf it might be possible but I’m not sure so that’s why I asked it on here.
I don’t know the obj format super well, but I don’t see why it won’t work with glTF. If you can provide a concrete example (perhaps in a playground), then I can give you a more definitive answer.
I’m working with a team on a project and we haven’t reached the point of loading our characters into Babylon yet. I am not responsible for the coding but I knew this was something I might better ask the pros because I don’t want to redo the rigging/skinning, blend-shapes,… So currently I can not share a project with you. Maybe next week we have something small running.
Anyways, all your help has been really helpful to me and I will keep you up to date when we have an actual playground.
1 Like