Possible Duplicate:
Three.js not possible to load textures
I am a beignner as far as ThreeJs and blender is concerned so this may seem a silly question. I am trying to load a model using JSONLoader. I used the threejs blender export and exported the collada model to js. However I am unable to get the material directly from the file.
Upon checking I found that the attribute to the image file is missing in the js file i.e "mapDiffuse" attribute is absent. Is that an error. If so any suggestions? Or is there some other way of loading the materials?
P.S This was a collada model i downloaded, so texture images were provided with it, though blendor export did not notice it.
A part of my model js file
{
"metadata" :
{
"formatVersion" : 3.1,
"generatedBy" : "Blender 2.64 Exporter",
"vertices" : 1172,
"faces" : 2209,
"normals" : 736,
"colors" : 0,
"uvs" : [1722],
"materials" : 1,
"morphTargets" : 0,
"bones" : 0
},
"scale" : 1.000000,
"materials" : [ {
"DbgColor" : 15658734,
"DbgIndex" : 0,
"DbgName" : "material_2_81_0",
"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" : [1159.45,531.608,-1808.68,......]
"morphTargets" : [],
"normals" : [-0.101077,0,-0.994873,......]
"colors" : [],
"uvs" : [[0,0,1,0,0,1,....]
"faces" : [42,0,1,2,0,0,1,2,0,1,2,42,0...]
"bones" : [],
"skinIndices" : [],
"skinWeights" : [],
"animation" : {}
}
Thank You