Hi! I’ve managed to load an OBJ and MTL using OBJLoader. However, when I zoom in, I notice that the mesh faces are quite well visible. Are there options to improve the rendering, similar as the screenshot of the same OBJ in MeshLab? I was thinking of changing the three.js material type (e.g. when I load a PLY, I also see the faces when I use MeshStandardMaterial
but it resolves when I use MeshBasicMaterial
). When I use PLYLoader, I can change the material settings when loading, but when I use OBJLoader, this has to be changed afterwards. Any ideas how this can be changed?
In my code, I use the following to call the geometry:
new THREE.MTLLoader()
.setPath('models/')
.load( 'Wall.mtl' , function (materials){
materials.preload();
new THREE.OBJLoader()
.setMaterials(materials)
.setPath('models/')
.load('Wall.obj' , function (objFile){
objFile.castShadow = true;
objFile.receiveShadow = true;
scene.add( objFile );
},
function ( xhr ) { console.log( (xhr.loaded / xhr.total * 100) + '% loaded' ); },
function( err ) { console.log( 'An error happened' ); })
})
BTW, for OBJLoader, I used an older version (Jan 2019). When I switch it for the current version, it renders my OBJ quite funky (and darker)…