I successfully exported an object from Blender to .json format for use with three.js. I manually added all the maps to the exported file, which were not included by the exporter but could easily be manually added after mapping correctly in Blender.
model.json:
"materials":[{
"DbgColor":15658734,
"DbgIndex":0,
"DbgName":"FrontCol",
"blending":"NormalBlending",
"shading":"phong",
"colorDiffuse":[1.0,1.0,1.0],
"mapDiffuse" : "model_d.png",
"mapDiffuseWrap" : ["repeat", "repeat"],
"colorSpecular":[0.8,0.4,0.0],
"mapSpecular" : "model_s.jpg",
"mapBump" : "model_b.jpg",
"mapBumpScale" : 4
}
I am now looking to add an environment map for better reflections, a process that is usually straightforward with three.js.
index.html:
var material = new THREE.MeshPhongMaterial( {
envMap: mapEnvironment
} );
Is it possible to achieve this? If so, how can it be done?