I try, but I can't... I explain: I create a 256x256 point torus. I apply a rank 2 subdivision to it. I delete half to keep a C. I remove the top half to keep an open C. (It's the interior that will interest me.) I apply a displace of a cloud texture with weight paint to apply the deformation a little randomly and more or less strong. I return my normals
What I want now is to apply a texture with a rainbow color ramp to highlight the healthy areas and the heavily degraded areas.
I created a reference curve, having the shape of C and placed as necessary to be equidistant from the mesh without deformation.
I can't seem to get my reference curve to radiate and color the deformed mesh in relation to the distance (which changes with the strength of the deformation I applied)... In the other direction, I also cannot calculate the shortest distance between the points of the mesh and the reference curve to apply the gradient corresponding to the distance...
Do you think it's possible to do something like that? If yes, can you help me ?
For exemple, see my workbench of my torus with the reference curve