I am attempting to create a chainlink surface using 2 textures. The first texture is a standard map that gives the metal links a metallic appearance against a white background (diffuse):
The second texture is an alpha map:
My attempt to apply both textures to a MeshBasicMaterial
has not been successful:
var chainlinkMask = THREE.ImageUtils.loadTexture('textures/chainlink_Large-Panels_mask.png');
chainlinkMask.wrapS = THREE.RepeatWrapping;
chainlinkMask.wrapT = THREE.RepeatWrapping;
chainlinkMask.repeat.set( 2, 2 );
var chainlinkDiffuse = THREE.ImageUtils.loadTexture('textures/chainlink_Large-Panels_Diffuse.png');
chainlinkDiffuse.wrapS = THREE.RepeatWrapping;
chainlinkDiffuse.wrapT = THREE.RepeatWrapping;
chainlinkDiffuse.repeat.set( 2, 2 );
material.map = chainlinkMask;
material.alphaMap = chainlinkDiffuse;
material.transparency = true;
material.side = THREE.DoubleSide;
However, the result looks like this:
It's evident that the alpha map is not being applied. Why could this be happening?
I would appreciate any assistance on this matter.