1. A concise explanation of the problem you're experiencing.
I have a glTF model made up of several meshes and I would like to set the emissiveFactor on a single mesh. However this mesh shares a material with other meshes. I would like to make a copy of this material or assign a temporary material to the mesh to "highlight" it. Is there a way to do this?
2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
var mat = primitive.getMaterial(primitive.getMesh(node.mesh).materials.name);
mat.setValue("emissiveFactor", new Cesium.Cartesian3(1, 0, 0));
Here the problem is that the material is shared across multiple meshes so changing the emissive factor affects all of them instead of just the mesh I want. How can I properly duplicate the material?
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I want to color a single node/mesh so that each portion of the model doesn't have to be a separate glTF
4. The Cesium version you're using, your operating system and browser.