Glb exported from Maya looks ok in sandbox but normals inverted when loaded in React

I have a glb model - glb - Google Drive. When loaded in playground it looks ok - Babylon.js Playground.

But when i load it in my code it looks like this.

If I try to add an environment map myself.

Both of them look very wrong and I don’t know what I am doing wrong. I am working in an React environment using “@babylonjs/loaders/glTF”.

Hello and welcome to the Babylon community! Can you share your code for loading the model? Preferably in Code Sandbox

Your model displayed in the sandbox (https://sandbox.babylonjs.com/):

So, it’s either a problem with your device or with the code. The code in Babylon.js Playground seems ok (apart for pointing to a local file), so it would seem it’s a problem with your device. Are you testing on a mobile / on desktop?

1 Like

If anyone is facing something similar it turned out that running it React strict mode was the problem. The double loading that strict mode does for some reason causes these weird bugs. Not sure why but disabling it fixed it.

2 Likes