Raycast selects the correct mesh but highlights unrelated meshes as well

Excellent, this line;

child.material = child.material.clone();

did the trick! I guess it’s not documented anywhere?

The next place I am stuck is applying texture to the selected faces (If I apply a color/image it applies to all the mesh part that is selected/highlighted). I have referred to below links already.

If you create the object with primitives selecting faces seems straight forward. But in my case how should I approach to tackle the problem?

My customizable objects is ALWAYS square shapes and no exceptions. So, after raycasting and highlighting the object if i do;

console.log(intersects[0].faceIndex); it returns a null. But in other samples this seems to return an index.

Should I consider anything special at modelling time (in blender) so that I can achieve face selecting?