Closed MarcoWang1 closed 1 year ago
If the grid that you have is a level-set/Signed Distance Function (SDF), you can compute the normal corresponding to the SDF and store it in as, say, a Vec3S grid. The closest point in the surface is given by the point_position - sdf * normal
value at your query location.
how to compute the normal corresponding to the sdf?
This the normal of an SDF is the negative gradient of its values e.g. https://shaderfun.com/2018/07/23/signed-distance-fields-part-8-gradients-bevels-and-noise/
If I have an openvdb grid, can I do closest point query ?(calculate the closest point in the 0 isosurface of a random point in the narrow band level set )