Having trouble with the OBJMTLLoader? While it successfully loads the model, the diffuse and specular maps are not loading. Below is the code snippet:
.js file
var loader = new THREE.OBJMTLLoader();
loader.load( 'models\\Stop_that_train.obj', 'models\\Stop_that_train.mtl', function ( object ) {
object.position.y = - 80;
object.rotation.y = Math.PI/3
scene.add( object );
} );
.mtl file
newmtl 19___Default
Ns 10.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.5882 0.5882 0.5882
Kd 0.5882 0.5882 0.5882
Ks 0.6390 0.6390 0.6390
Ke 0.0000 0.0000 0.0000
map_ka bts_locomotive_emd_fp7.png
map_kd bts_locomotive_emd_fp7.png
map_ks IMG_3445.png