0
votes

I exported some meshes from Blender with the JSON plugin exporter. I exported all of the scene, so I have to use ObjectLoader in three.js to load it.

If I look into the .json file, the materials seems to be there.

I'm loading it like this :

var loader = new THREE.ObjectLoader(); 
loadMesh(); 
loader.load("path_to.json", addModelToScene);
function addModelToScene(model) {   
  obj =   scene.add(model); 
}

Only the color is applied to each mesh. Is there a way to export material to three.js defined in the cycle render mode?

1

1 Answers

2
votes

Cycles materials use a node based system which uses code within blender to generate the material for the object and it doesn't export to other applications.

What you need to do is convert the material to one that is compatible with other applications. For simple materials, it can be easier to create a new Blender Render material that will export to most other applications. For more complex materials, you can often bake the cycles material to an image, which can then be used in other applications.