When importing OBJs from Google Blocks, I have noticed that some faces are missing. Despite applying smooth shading, the missing faces refuse to show up. Any suggestions on how to make them appear? Below is my current template:
mtlLoader.load(mtlUrl, (materialLoader) => {
materialLoader.preload();
for (let material in materialLoader.materials) {
materialLoader.materials[material].side = THREE.DoubleSide;
}
let objLoader = new THREE.OBJLoader();
objLoader.setMaterials(materialLoader);
let onSuccess = function (object) {
var mesh = object.children[0];
mesh.geometry = new THREE.Geometry().fromBufferGeometry(mesh.geometry);
mesh.geometry.computeFaceNormals();
mesh.geometry.mergeVertices();
mesh.geometry.computeVertexNormals();
mesh.geometry.center();
this.group.add(object);
};
let onProgress = function (event) {
if (event.lengthComputable) {
let percentComplete = event.loaded / event.total * 100;
let output = 'Download of Object: ' + Math.round(percentComplete) + '%';
}
};
let onError = function (event) {
let output = 'Error of type "' + event.type + '" occurred when trying to load: ' + event.src;
};
objLoader.load(objUrl, onSuccess, onProgress, onError);
});
Reference images:
https://i.sstatic.net/2IWD5.png
Desired outcome: