Hello when i load my obj file with the obj loader at first i noticed i had extra vertices (like 500.000 more) added to my object, after using BufferGeometryUtils.mergeVertices the number of vertices almost went back to normal but not quite this obj im trying to load had 212.315 vertices but when i load it with OBJLoader it goes up to 218.089. Is there a way to fix this? I know the “culprit” is buffergeometry but i dont know how to fix this. I tried loading the obj with the deprecated Geometry() and the vertices were the ones that i wanted 212.315. Below is how i load my obj. Thank you for your time
var textureLoader = new THREE.TextureLoader(loadingManager);
var map = textureLoader.load('Castle.jpg');
var material = new THREE.MeshPhysicalMaterial({map: map, vertexColors: true});
loader.load( 'Castle.obj', function ( obj ) {
obj.children[0].geometry = BufferGeometryUtils.mergeVertices(obj.children[0].geometry);
obj.traverse( function ( node ) {
if ( node.isMesh )
{
node.material = material;
}
} );
// add object to scene
scene.add(obj)
}
);