trying to measure thickness with rays

   2701   4   2
User Avatar
Member
11 posts
Joined: June 2016
Offline
I want to check to find any thin parts on a mesh. I figured I could do this by shooting rays in the reverse of their normals but it doesnt seem to be working right.

I tried first in vex but kept getting -1 value on hit distance. I then used a ray sop but the results look off.
https://i.imgur.com/YIHLnVP.png [i.imgur.com]
I made a group to color anything that hits under x amount red and it seems to almost work but if the results were right then the face on the other side should also be red.


I am not sure if I am going about this all wrong or if its just something simple.
User Avatar
Member
252 posts
Joined:
Offline
Any chance you could post a simple scene file? (or maybe a portion of the mesh?) I can't quite make out the kind of mesh you are working on with screenshot.
User Avatar
Member
182 posts
Joined: April 2009
Offline
You can try the following:

Create a VDB SDF from your mesh -> smooth it until the thin parts disappear -> use volumesample to mask thin parts.

Attachments:
sdf_thin.JPG (45.7 KB)
thin_check.hip (148.2 KB)

User Avatar
Member
767 posts
Joined: April 2014
Offline
Oh that is what you can use Volume Sampler, I need to look into the Volume Sampler node; what is the nuts and bolts of this node anyone care to explain ?

Breht - I assume you want to make a thin material ?
Edited by _Christopher_ - Oct. 23, 2016 13:42:23
【T】【C】【S】
User Avatar
Member
11 posts
Joined: June 2016
Offline
hey thank you all for responding.

I actually got it to work. I just needed to offset the normal.

Attachments:
thickness_surafce.hipnc (72.3 KB)

  • Quick Links