Currently in the process of transferring a mesh from Maya to three.js. After converting the Maya file to .obj format and loading it onto the page, I noticed that Materials with image textures (1024x1024 .tga files) appear black, while Materials with solid colors display correctly. Refer to the image:
https://i.sstatic.net/BVq4g.png
The spheres are cyan (solid color Materials) while the rest is black (textures attached to Materials).
Below is the code snippet for loading the mesh/textures:
var loader = new THREE.JSONLoader();
loader.load(
'RoboticArm2.js',
function (geometry, materials) {
var material = new THREE.MeshFaceMaterial(materials);
var object = new THREE.Mesh(geometry, material);
scene.add(object);
}
);
Upon checking the console, all texture files are loading without errors. The RoboticArm2.js file specifies the correct values for "mapDiffuse" corresponding to the .tga texture files.
After reading a similar issue on stackoverflow suggesting the colorAmbient and colorDiffuse values in the .js file exported from Maya might be [0, 0, 0], I changed them to [0.8, 0.8, 0.8] as advised, but still no change in appearance.
If more information or code is needed, feel free to ask. Thank you!