So I'm trying to render a 3D avatar on my website in which a user can place a texture on the character. I want to allow the user to make a transparent texture so they could see the model underneath. Currently, transparency makes the entire front of the torso invisible. Any tips or tricks?
Code for rendering the torso:
onProgress, onError );
loader.load( 'Models/<?php echo "$Item";?>', function ( object ) {
object.traverse( function ( child ) {
if ( child instanceof THREE.Mesh ) {
child.material.map = texture;
child.material.side = THREE.DoubleSide;
child.material.alphaTest = 0.5;
child.material.transparent = true;
}
} );
object.position.y = 50;
object.scale.set(15,15,15);
scene.add( object );
},
Currently what my output looks like:
Thanks for any and all help!