how to evaluate if a point is inside a geometry

   5423   4   2
User Avatar
Member
479 posts
Joined: Dec. 2009
Offline
suppose we have a a geometry with fully enclosed surfaces, how to evaluate if a point is inside or outside this geometry?

Thanks!
User Avatar
Member
702 posts
Joined:
Offline
you can do two things:

use a group sop set to points, and bounding object

or

convert the objects to vdb and use a volumesample in a point vop, if the value returned is negative you are inside the obect
User Avatar
Member
479 posts
Joined: Dec. 2009
Offline
Thank you very much, sidenimjay!

I tried your first method, and it seems it produces strange results sometimes. For example, in the houdini file attached, there are several points which are supposed to be inside the geometry (see image 1) somehow move from their original positions to the outside of the geometry (see image 2).

I haven't figured out the 2nd method you suggested. Appreciate if you can kindly advise!

The method 1 in the houdini file is the method I'm using currently which is not so tidy and clean, and it can't deal with geometry having cantilevered parts above the grid points. Hope you can also advise on how to improve this method.

Thank you, again!

Attachments:
01.PNG (363.9 KB)
02.PNG (383.8 KB)
untitled.hipnc (140.4 KB)
03.PNG (31.1 KB)

User Avatar
Member
702 posts
Joined:
Offline
merry Christmas

Attachments:
inside_vdb.hip (125.1 KB)

User Avatar
Member
479 posts
Joined: Dec. 2009
Offline
Thank you very much, sdienimjay!

I learn a lot from your method!

Wish you and your family a Merry Christmas and a Happy New Year, too!
  • Quick Links