Hi, I am a newbie and have a question about mesh loading. I created a room and a door in Blender and exported them as a GLB file to load in Babylon.js. The room loads perfectly, but the door doesn’t load correctly and appears as a block mesh in the Babylon.js sandbox. Could you please help me understand how to solve this issue? Thank you.
Of course, we will all be happy to help. But you will need to share the model or a playground showing the incorrect model, of course. playground is at playground.babylonjs.com
This link may help with PG creation - Babylon.js docs
Note, common problem here is that the root node of imported glb is a transform node and doesn’t have any geometry associated.
I just have created as a test in Blender and import it to sandbox.babylon first. Could u please give me any advice? Thank you
Uploading: IMG_8611.jpeg…
Uploading: IMG_8613.jpeg…
Uploading: CA4839C7-B162-49D8-9491-D241BBC71A09.mp4…
Thank you very much. I will have a look.
Hello and welcome to babylon.js!
Post the glb
file. We will help you in no time to solve your issue with the door.
room_with_door.zip (157.7 KB)
it is the zip file of which i created as a test. could you please have a look and please help me ? thank you
may i know how did u solve for it? thanks
i have not created in the playground yet. I have tested in sandbox.babylon before i import or code with TS in babylon.js.
room_with_door.zip (157.7 KB)
here is the file which i tested. If you have time, could you please have a look ? thank you.
Hello and welcome
I had a look to your .glb and .blend, you have severals issues here :
First of all, these black artifacts show that you have a lot of faces overlapping, or doubled. You need to clean you mesh to avoid this otherwise the render will be affected in Babylon as well :
You are using a mesh for creating a hole for the door. It’s ok but it was not righly placed. It should totaly go trough if you want the hole to be ok :
As well, you need to export everything but this block. (You can select it, and hit CTRL+I to inverse selection). You need to export with selection only, and as well check the apply modifier, otherwise your hole won’t be OK in the .glb
Then exported .glb is OK in the sandbox or playground :
++
Tricotou
thank you so much for your explanation. It is really helpful.