I am currently utilizing the mrdoob Blender Export Plugin (io_mesh_threejs) for exporting to Three JS, but I am encountering an issue where the exported .js or .dae objects do not contain any reference to the texture map files. I am wondering if there is a specific method I should be using to export the object, or if there is a special way I should be applying the map to the object in Blender 2.65 in order for the exporter to include it. If there is no specific way, is it possible to manually add the texture in the JS file?
Blender Prior to Export
Exported JSON Object (without texture reference)
{
"metadata" :
{
"formatVersion" : 3.1,
"generatedBy" : "Blender 2.65 Exporter",
"vertices" : 8,
"faces" : 6,
"normals" : 8,
"colors" : 0,
"uvs" : [4],
"materials" : 1,
"morphTargets" : 0,
"bones" : 0
},
"scale" : 1.000000,
"materials" : [ {
"DbgColor" : 15658734,
"DbgIndex" : 0,
"DbgName" : "Material",
"blending" : "NormalBlending",
"colorAmbient" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],
"colorDiffuse" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],
"colorSpecular" : [0.5, 0.5, 0.5],
"depthTest" : true,
"depthWrite" : true,
"shading" : "Lambert",
"specularCoef" : 50,
"transparency" : 1.0,
"transparent" : false,
"vertexColors" : false
}],
"vertices" : [1,-0.988938,-1,1,-0.988938,1,-1,-0.988938,1,-1,-0.988938,-1,1,1.01106,-0.999999,0.999999,1.01106,1,-1,1.01106,1,-1,1.01106,-1],
"morphTargets" : [],
"normals" : [0.577349,-0.577349,-0.577349,0.577349,-0.577349,0.577349,-0.577349,-0.577349,0.577349,-0.577349,-0.577349,-0.577349,0.577349,0.577349,-0.577349,-0.577349,0.577349,-0.577349,-0.577349,0.577349,0.577349,0.577349,0.577349,0.577349],
"colors" : [],
"uvs" : [[1,-0,1,1,0,1,-0,0]],
"faces" : [43,0,1,2,3,0,0,1,2,3,0,1,2,3,43,4,7,6,5,0,0,1,2,3,4,5,6,7,43,0,4,5,1,0,0,1,2,3,0,4,7,1,43,1,5,6,2,0,0,1,2,3,1,7,6,2,43,2,6,7,3,0,0,1,2,3,2,6,5,3,43,4,0,3,7,0,2,3,0,1,4,0,3,5],
"bones" : [],
"skinIndices" : [],
"skinWeights" : [],
"animation" : {}
}
Code For Loading JSON Object
var object;
var loader = new THREE.JSONLoader();
loader.load( "./quirk_logo.js", function(geometry, materials) {
var material = new THREE.MeshFaceMaterial(materials);
object = new THREE.Mesh(geometry, materials);
object.scale.set(1, 1, 1);
scene.add(object)
render();
});