Hi,
I’m new to the Three.js community - I must start by saying how blown away I am by how good Three.js and the peripheral libraries are. I was a user of Papervision3D 10 years (damn that makes me feel old). It’s a dream to see this stuff rendering natively in the browser.
Anyway, my question/issue:
I have a glb file exported from Blender with a material applied to it. This glb file loads great with gltf viewer. However when I load it myself via GLTFLoader I’m seeing some strange blackouts in the top face/material.
gltf viewer:
Mine:
I’m loading the glb very much like gltf viewer does (I followed its codebase), except I’m using react-three-fiber and useLoader.
const gltf = useLoader(GLTFLoader, "/file.glb", loader => {
const dracoLoader = new DRACOLoader();
dracoLoader.setDecoderPath('https://www.gstatic.com/draco/v1/decoders/');
loader.setDRACOLoader(dracoLoader)
});
return gltf ? <primitive object={gltf.scene} /> : null;
Any help/suggests would be greatly appreciated!
Thanks,
Adem