Metallic GLB model looks black in my scene

Hello, I’m working on game using this model
https://notwise.b-cdn.net/models/Owl_Gold.glb

But it shows like this in the scene.
image

Here is my code which is could be reason of issue…

// Renderer

this._renderer = SceneSetup.renderer({ antialias: true, alpha: true });
this._renderer.setSize(aspectWidth, aspectHeight);
this._renderer.setPixelRatio(window.devicePixelRatio);
(this._renderer as any).outputEncoding = RENDERER_PROPS.outputEncoding;
this._renderer.toneMapping = RENDERER_PROPS.toneMapping;
this._renderer.toneMappingExposure = 1;

// Lights

export const HemiLight = () => {
const hemiLight = new THREE.HemisphereLight(0xffffff, 0x437e49, 2);
hemiLight.color.setHex(0xffffff);
hemiLight.groundColor.setHex(0xffffff);
return hemiLight;
};

export const SpotLight = () => {
const spotLight = new THREE.SpotLight(0xffffff, 130);
spotLight.position.set(10, 50, 20);
spotLight.angle = Math.PI / 5;
spotLight.penumbra = 1;
spotLight.decay = 1;
spotLight.distance = 150;

spotLight.castShadow = false;
spotLight.shadow.mapSize.width = 512;
spotLight.shadow.mapSize.height = 512;
spotLight.shadow.camera.near = 10;
spotLight.shadow.camera.far = 200;
spotLight.shadow.bias = -0.001;
spotLight.shadow.focus = 1;

return spotLight;
};

I just use GLTF loader for model loading.

import { GLTFLoader } from “three/examples/jsm/loaders/GLTFLoader.js”;

Please get me some idea.

Model looks good here.

You have to set scene.environment to some texture (either HDR, EXR, or UltraHDR.) Otherwise metallic surfaces have nothing to reflect and reflect black color instead.

2 Likes

Thanks for your help, it works exactly