I am trying to add a transparency map to an OBJ imported to my three.js scene but it is not working (it shows the model and the other materials but without the transparency map). I already played with the D value. Is it even possible to achieve what I want?
This is the JS code used to import the materials and the OBJ:
new THREE.MTLLoader()
.setPath( 'assets/models/' )
.setMaterialOptions({side: THREE.DoubleSide})
.load( '10_negro2.mtl', function ( materials ) {
materials.preload();
new THREE.OBJLoader()
.setMaterials( materials )
.setPath( 'assets/models/' )
.load( '10_negro2.obj', function ( object ) {
object.position.y = -30;
object.name = "vestido1";
scene.add( object );
}, onProgress, onError );
} );
And this are the material values:
newmtl lambert3SG
illum 4
Kd 0.80 0.80 0.80
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ks 0 0 0
d 0.500
map_d 10_Negro_Encaje_con_Flores_1920_ALPHA.jpg
map_Kd 10_Negro_Encaje_con_Flores_1920_TXT.jpg
bump 10_Negro_Encaje_con_Flores_1920_NM.jpg -bm 1
Ni 1.00
Hope someone can explain me about this a little bit. I'm new to this. Thanks.