Jump to content

Visualizing mesh thickness


Recommended Posts

Hi,

Does anyone know how I can visualize mesh thickness? For example I need to find areas in a model that are less than 2mm thick. Or at the very least find the thinnest areas of a model (without specifying a minimum threshold in mm)

I found this SOP called Calculate Thickness but after going through the documentation and trying to fiddle with the settings I can't get it to work quite how I wanted. For example it is only giving me a grayscale image instead of a full gradient and it doesn't seem to be identifying the thin areas of a mesh in the expected fashion. 

The image below shows what I hope to achieve.

Many thanks,

powerful-analysis-tool-2.png

Link to comment
Share on other sites

4 hours ago, MENOZ said:

isn't this the same as inverse occlusion? or at least very similar..

Yes pretty much. I posted an example on sidefx, but posting here for completeness:

You can do an approximation using the Mask by Ambient Occlusion SOP. You have to edit the code to shoot the rays from the inside of the geometry by the inverted normal direction (Line 106):

ao = vop_bias(raytest(v@P - aorayoffset * nml, -nml, aomaxraydist, aosamples, aoseed, pt_id, aoconeangle), aobias);

The resolution of the mesh matters so you can add additional detail using the Divide SOP.

Z9wJ17l.png

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Hi @animatrix and @paranoidx thanks for the answers.

I was hoping there was an easier solution.. like a ready made sop that just gives you mesh thickness. 

I'm not 100% sure inverse occlusion is the same as mesh thickness.. from my rendering days ambient occlusion has to with how close and tall the surrounding features may be on a mesh to determine the light scattering. It has nothing to do with thickness of said features.. maybe I'm missing something? 

I need something that gives me real world measurement between two points on a mesh (two directly opposing points on either side of a mesh) ie. what is commonly understood as the thickness of something in the real world. 

Thanks for the help in any case. 

Link to comment
Share on other sites

On 3/14/2023 at 12:10 PM, ikatz001 said:

Hi @animatrix and @paranoidx thanks for the answers.

I was hoping there was an easier solution.. like a ready made sop that just gives you mesh thickness. 

I'm not 100% sure inverse occlusion is the same as mesh thickness.. from my rendering days ambient occlusion has to with how close and tall the surrounding features may be on a mesh to determine the light scattering. It has nothing to do with thickness of said features.. maybe I'm missing something? 

I need something that gives me real world measurement between two points on a mesh (two directly opposing points on either side of a mesh) ie. what is commonly understood as the thickness of something in the real world. 

Thanks for the help in any case. 

It can be used to emulate it in this case. It's just shooting rays inside the geometry. So if you want directly opposing points, you can adjust the angles to be 0 and shoot only 1 ray for example.

@konstantin magnus's example is simpler and works in a similar way I described above. You have more control with the method I mentioned as you can control the cone angle and number of rays, etc which can help you approximate the thickness better, as the surface normals you have might not be what you expect intuitively for example.

Edited by animatrix
Link to comment
Share on other sites

Hey I just tumble across the Houdini Artist and found that you also can do this with Lab Calculate Thickness tool

Or

float u;
float v;
vector p;
int i;
float maxdist = 999;
//assumes point normal exists
i = intersect(0, v@P-(v@N*0.001), -v@N*maxdist, p, u, v);
//get depth and copy to attribute
f@d = length(v@P - p);

Here is the post and its comment may relate to your solution: https://www.facebook.com/groups/371132239669253/search/?q=edge fracture

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...