Here I have the mesh with texture applied, part of that texture is transparent.
However, instead of rendering the transparent part of the texture AS transparent, it needs to be rendered as a color set in three.js.
I did try this:
objLoader.load(
"../../assets/left_arm.obj",
function (geometry) {
var textureLoader = new THREE.TextureLoader();
var texture = textureLoader.load('../../assets/shirt_test.png?1');
var material = new THREE.MeshLambertMaterial({
//transparent: true,
map: texture,
});
texture.minFilter = THREE.LinearFilter;
texture.wrapS = texture.wrapT = THREE.ClampToEdgeWrapping;
geometry.traverse(function (child) {
if (child instanceof THREE.Mesh) {
child.material = material;
child.material.color.setHex(0x<?php echo $color; ?>);
}
});
geometry.rotation.y = 3.14159;
geometry.position.x = 1.5;
geometry.scale.set(1.0002,1.0002,1.0002);
scene.add(geometry);
});
However that just colored the texture.
Thanks for any help