I think a general solution here would be to keep a separate highlight material around, swap it out when you want to mark something. Vertex color would also work, requires uploading a few bytes per vertex to the GPU so a bit slower than setting a uniform on a material, and assumes you’re not also sharing geometries with another mesh.
When highlighting, I check if the material was used elsewhere. If it is a shared material, I set the highlighted material to material.clone().
something like this
if ( isMaterialUsedElsewhere( material ) ) object.material = material.clone();
Easier options is to just make a yellow meshBasicMaterial or meshStandardMaterial with yellow emission (animate the color/strength for fanciness) and just apply this material when you want to highlight something and restore the original material on exitHighlight/timeout
I agree, that is quite an elegant solution I hadn’t thought of. The only benefit I can think of with cloning the material is that is preserves other properties of the material (e.g. texture maps), which you might lose if you created a generic material.