GLTF model inside out glitch

I’ve tried everything, frustrum, material side, redo-normals, remade-model…
I dont think it’s related to the model. Something in the code.
I’ve never encountered this before, does anyone know what code error would cause this inside-out behavior for a loaded GLTF?

One common cause for this would be if the model has enabled alpha blending transparency (.transparent = true) on materials that should be opaque.

Try loading the model in and then running the script below in the script tab, to see if that fixes it?

for (const material of document.getRoot().listMaterials()) {

Wow that was difficult to debug. I thought it was a model issues as well. Of course, a dumb typo:

I did this: = new THREE.PerspectiveCamera( this.scene_settings.fov, window.innerWidth,window.innerHeight, 0.1,20 );

When it shuold be this: = new THREE.PerspectiveCamera( this.scene_settings.fov, window.innerWidth/window.innerHeight, 0.1,20 );

Which led to the camera just doing the wildest things.


1 Like