After conducting some research, I successfully exported an obj file to a .js file that can be imported by the JSON model of Three.js. However, I am now faced with the challenge of animating this model. Specifically, I have a bird model in .js format that I want to animate to flap its wings. Additionally, I encountered an issue when trying to import the obj file, which also contains texture images, into Blender 3D. Even though the texture image locations are correctly specified within the obj file, Blender 3D fails to load the textures. The same problem persists when I convert the file to .js format and try to load the model in WebGL using JSON Model.
I am seeking guidance on how to address these issues and would greatly appreciate it if someone could provide assistance. If anyone has immediate solutions or resources to help me overcome these challenges, please do share them. I am in urgent need of assistance from the community.
Here is an excerpt of the Js model file code:
{
"metadata" :
{
"formatVersion" : 3,
"generatedBy" : "Blender 2.66 Exporter",
"vertices" : 2652,
"faces" : 4798,
"normals" : 2652,
"colors" : 0,
"uvs" : [1202],
"materials" : 4,
"morphTargets" : 0,
"bones" : 0
},
"scale" : 1.000000,
"materials" : [ {
"DbgColor" : 15658734,
"DbgIndex" : 0,
"DbgName" : "_5___Default0",
"blending" : "NormalBlending",
"colorAmbient" : [0.800000011920929, 0.800000011920929, 0.800000011920929],
"colorDiffuse" : [0.800000011920929, 0.800000011920929, 0.800000011920929],
"colorSpecular" : [0.8999999761581421, 0.8999999761581421, 0.8999999761581421],
"depthTest" : true,
"depthWrite" : true,
"mapDiffuse" : "n-201.bmp",
"mapDiffuseWrap" : ["repeat", "repeat"],
"shading" : "Lambert",
"specularCoef" : 2,
"transparency" : 1.0,
"transparent" : false,
"vertexColors" : false
},
... (remaining content of materials) ...
],