Toggle a modell on and off via GUI

Hallo, i am really excited i discovered babylon. I would love to use it in a upcoming project.
But i still cant find any hint in the documentation how its possible to toggle of a modell via GUI 2021-11-19 13_28_51-Babylon.js - BoxUndRing.gltf

Like here in the
Can anybody help me?

Welcome ! Babylonjs can do it easily .:slight_smile:
pg: https://playground.babylonjs.com/#CBGEQX#685

4 Likes

I want to create a Scene in Autodesk Maya and export this with the babylon file exporter. This would create 3 nodes in my sene. I would like to toggle on & off these nodes. Can you help me?

I tried this one: but this is not shown correctly and i have to import every model for its own.
https://steffenwuenscher.de/babylon/index.html

When i use your buttons with my models it doesnt work anymore…
https://steffenwuenscher.de/babylon/index33.html

Sorry, I don’t understand what is “not shown correctly” ? .It appears to show and hide correctly. As regards the other. Your console is reporting an error. box1 are not using the correct object . A very important skill is use babylonjs-inspector . It can clearly show what you need edit. :wink:
PS: Another skill . It will be easier to get the answer by directly reproducing it in playground

1 Like

Thank you. I cant reproduce in playground because it shows an error when i want load models from my server. (cant access)

The toggle on & off works for now but the materials doesnt work :frowning:

This is how it look in the sandbox

This is how it looks in my file:
https://steffenwuenscher.de/babylon/index.html

looks like you do not have an environment texture set ?

2 Likes

:thinking:It works fine in Chrome and Edge . What browser do you use ?

1 Like

firefox & chrome. i am actually trying to set the enviroment texture.
but it doesnt work so well :slight_smile:

i try to set it like in the sandbox…

I works for me as well like @musk

1 Like

it worked for me embedding this:

var hdrTexture = new BABYLON.CubeTexture.CreateFromPrefilteredData("https://assets.babylonjs.com/environments/studio.env", scene);
		hdrTexture.gammaSpace = false;
		scene.environmentTexture = hdrTexture;

I finally reproduced your problem…You should provide a link to the problem you meet.
Using the sandbox’s studio environment file in your network environment will cause the following errors.
20211201234219
20211201233750
“https://ssl.gstatic.com/ui/v1/icons/common/x_8px.png“ (failed)net::ERR_CONNECTION_CLOSED
Is it your network environment problem? Just seems to have been fixed?
I can share with you a another similar environment @steF_fus
environment (1).zip (654.4 KB)

1 Like

Thank you. Its really cool you provide your help. That maxmize my motivation to the limit.
I finally have a solution that works for me like i posted above!!

Have a nice day/evening. :smiley:

1 Like