0
$\begingroup$

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 enter image description here

$\endgroup$

1 Answer 1

0
$\begingroup$

If it can possibly fit into your workflow, it would be a great deal easier to create the surface from a curve, than to fit a curve down the middle of an existing surface.

While you're at it, you may as well do the whole thing in Geometry Nodes..

enter image description here

Here, Geometry Proximity is used to find the distance from the surface to the curve which originally created it. That's arguably a bit expensive.. the distance could be calculated directly from the radius and texture.. but it's easier to think about.

The distances are normalized (Min, Max -> 0,1) to make them easier to work with in a shader. The 'disp' attribute is stored on vertices:

enter image description here

with this kind of result..

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ Thanks Robin! Very smart ! But I need my reference curve, because the mesh can be different like elbow, pipe or I don't know what else... And the mesh have some displacement but it's not artificial it's real degradation. ... It's hard $\endgroup$ Commented Apr 12 at 21:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .