I am using three.js GLTFLoader to load the corridor created with the blender. but when it is rendering in the browser it seems materials are a bit odd. the shiny floor does not render properly and shadows are also not working.
this is the model created from the blender.
this is the three js result.
optional to the blender model I place rectLight at the end of the corridor and renderer’s clear color to white.
here is the gift loader code.
loader.load("./blender/coridor5.gltf", function (gltf) {
gltf.scene.userData['appId'] = "cor"
gltf.scene.children = gltf.scene.children.map(function (child) {
child.traverse(n =>{
if(n.isMesh) {
n.castShadow = true;
n.receiveShadow = true;
}
})
return child;
})
scene_coridor.add(gltf.scene);
});
traverse is added to try for shadows. even without traverse result is same.
Please help me to solve this issue.