Dynamic Change Material for selected part


How can change material for specific selected portion.


For Ex. from this fiddle.

If I Click on Liver it should be change to set color or set material.

Now if I am click it change whole model color.

any suggest how to do it ?

You apply the same material to all parts of your model.
Try this, when you load your model, set an individual material with the same parameters to each part:

child.material = new THREE.MeshStandardMaterial({map: texture, roughness: 0, metalness:0.4, fog:true, skinning:true});


1 Like

Thanks Prisoner849,

Slowly slowly now I am getting how three.js is working :slight_smile: