Jump to content
galagast

VEX: Is Point Inside Geometry

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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. 

  • Like 3

Share this post


Link to post
Share on other sites

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 by sekow
  • Like 3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×