GLB - Backface culling

Hi all,

I created a cylinder in blender and removed the top face. Then I exported it as *.glb.

When I load this file in babylonjs and set backface culling to false I would expect to see the inside of the faces but I don’t.
Here is a playground example of the described “issue”: https://www.babylonjs-playground.com/#E2ABWS#1

Am I missing something?
Looking forward to you answers.

Best regards,
mfeu

I think this is better:
https://www.babylonjs-playground.com/#E2ABWS#4

You glb contains a root node:
image

3 Likes

Hi mfeu,

Welcome to Babylon! I think the issue is that your actual cylinder mesh isn’t on the root node loaded by your GLB, but on a child of it. I tried a very naive version of just grabbing the root’s first child and changing the backface culling on that, and it seems to have worked.

https://www.babylonjs-playground.com/#E2ABWS#3

If you’re interested, you can use the Inspector to look at your scene live and determine more about the structure. (That’s what Deltakosh is using in the answer he just beat me to. :upside_down_face:) Best of luck!

5 Likes

Hi everyone.

Thank you for your analysis.
You were right and we were able to fix this by disabling the backend culling on the actual child mesh.

Thank you for spotting the core of this issue so quickly and explaining it to us. It’s much appreciated and we’re grateful for this nice community :heart:

2 Likes

Also a big thanks from my side! That was incredibly fast and helpful :smile: :ok_hand:

1 Like