I'm having trouble importing a model exported from blender using the THREEJS exporter. The model loads correctly in my scene with the materials applied, such as the car appearing yellow and the glass being transparent as intended.
However, I am facing an issue with applying textures to the car that are saved in .tga format.
If I don't include the textures in the server directory where the model is stored, I receive the following error:
http://novsstudio.com/race/model//wheel.tga 404 (Not Found)
Note the double slashes after 'model'. I'm unsure if this is causing the problem or how to resolve it.
When I upload the textures to /race/model/, all textures are downloaded according to the Network tab in Chrome but are not applied to the model. I suspect that Three.js may be unable to locate them because it's searching in /race/model//?
Here is the code snippet for importing the model:
var jsonLoader = new THREE.JSONLoader();
jsonLoader.load( "model/car.js", addModelToScene );
// addModelToScene function is triggered once the model is loaded
var ambientLight = new THREE.AmbientLight(0xFFFFFF);
scene.add(ambientLight);
ambientLight.position.set(0, 500, 200);
function addModelToScene( geometry, materials ) {
var material = new THREE.MeshFaceMaterial( materials );
android = new THREE.Mesh( geometry, material );
android.scale.set(10,10,10);
scene.add( android );
}
To see the current state of the model, visit . You can also access the source code and browse directories at .
Thank you for your assistance, please let me know if more information is needed.
Note: On my website, you can move the camera by clicking and dragging to view the entire model.