0
\$\begingroup\$

I have a 3D signed distance field that is voxelized into a grid, surrounding an object. However, I would like to query the signed distance field to determine the shortest possible distance between points outside of the signed distance field grid, and the mesh itself. Is there any way to determine this distance without increasing the size of the signed distance field? Thank you!

\$\endgroup\$
1
\$\begingroup\$

You can form an upper bound by finding the closest sample in your grid to your query point, and summing the distance in that grid cell plus the distance of that grid cell from your query point.

By the triangle inequality, this will be greater than or equal to the actual shortest distance to the level set (since there might be an elbow in the resulting path, between the first and second leg of the trip).

If you can afford some extra storage, you can store in each cell not just the shortest distance to the level set, but also the closest point on the level set. Then you can improve your earlier bent-line distance to a straight-line distance, by computing the distance from the query point to the stored closest point.

This can still overestimate the distance (the closest point to the closest grid cell might not be the closest point to your query, though it usually won't be far off)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.