I am new to both blender and threejs. I want to export and use a model developed in blender. I am using glTF2.0 to export this model. The following image is the rendered view of the model I want to use.
Following options are enabled while exporting
But when I load this model in threejs by using following code
loader.load('models/neuron.gltf',
function ( gltf ) {
scene.add( gltf.scene);
},function ( xhr ) {
console.log( ( xhr.loaded / xhr.total * 100 ) + '% loaded' );
},function ( error ) {
console.log( 'An error happened' );
}
);
An end result is a 3D object without any material

But I want my model to show materials also. Help me display models with materials from blender.


.blendfile itself, ideally? Assuming you're using the Khronos Group exporter, see https://github.com/KhronosGroup/glTF-Blender-Exporter/blob/master/docs/user.md – Don McCurdy Jul 16 '18 at 17:07