galagast Posted November 18, 2015 Share Posted November 18, 2015 I can't seem to find a function in VEX that I could use to check if a point is inside a geometry. Is there such a function? 1 Quote Link to comment Share on other sites More sharing options...
symek Posted November 18, 2015 Share Posted November 18, 2015 I don't think so. You would have to find the closest spot on any primitive with XYZDistVOP, evaluate N attribute at this point with Primitive attribute VOP and check with dot product if hit vector (from point in question to hit position) and evaluated normal have the same orientation. If they are opposite, you are outside an object, inside otherwise. 4 Quote Link to comment Share on other sites More sharing options...
sekow Posted November 18, 2015 Share Posted November 18, 2015 (edited) or volumesample() on a vdb sdf. maybe not the most straight forward solution, but one that is pretty handy. and I believe faster on high point counts. Edited November 18, 2015 by sekow 4 1 Quote Link to comment Share on other sites More sharing options...
galagast Posted November 18, 2015 Author Share Posted November 18, 2015 Awesome! Thanks guys! I got both methods working. H15 file attached below. insideObject.hipnc 5 3 Quote Link to comment Share on other sites More sharing options...
Simonvdb Posted December 22, 2019 Share Posted December 22, 2019 Hey galagast, thank you so much for posting your final scene. I learned a lot from it. Quote Link to comment Share on other sites More sharing options...
Xed Posted February 13, 2021 Share Posted February 13, 2021 Thanks for sharing @galagast, really helped. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.