I'm working on three.js and I'm trying to import a .obj file with its corresponding mtl file. The textures the mtl file was referencing were .bmp so I tweaked the mtl file to point to all .dds files and converted all my assests to dds. Problem is that its just rendering white texture. I'm not sure its related but it said that PVRTC compressed textures are not supported. Here is the code I used for the obj/mtl loader:
var onProgress = function(xhr) {
if (xhr.lengthComputable) {
var percentComplete = xhr.loaded / xhr.total * 100;
console.log(Math.round(percentComplete, 2) + '% downloaded');
}
};
var onError = function(xhr) {};
THREE.Loader.Handlers.add(/\.dds$/i, new THREE.DDSLoader());
var loader = new THREE.OBJMTLLoader();
loader.load('assets/FirstPersonExampleMap.obj', 'assets/FirstPersonExampleMap.mtl', function(object) {
object.position.y = 0;
scene.add(object);
}, onProgress, onError);
And here is an example of my tweaked .mtl file:
newmtl assets/M_WhiteEditQuarter_M_WhiteEditQuarter
map_Kd M_WhiteEditQuarter_M_WhiteEditQuarter_D.dds
map_Ks M_WhiteEditQuarter_M_WhiteEditQuarter_S.dds
bump M_WhiteEditQuarter_M_WhiteEditQuarter_N.dds