I was wondering if there are any techniques for calculating the intersection point/s between two or more distance fields.

  • $\begingroup$ Numerical root finders. Analytically you cannot hope for much for anything more complex than very simple objects. $\endgroup$ – lightxbulb Sep 17 '19 at 9:24
  • $\begingroup$ thanks for the reply @lightxbulb. I was hoping for some kind of smart raymarching algorithm for finding the roots probably using some kind of gradient descent for realtime applications. $\endgroup$ – Alexandros Mourtziapis Sep 17 '19 at 9:57
  • 1
    $\begingroup$ An intersection point of two surfaces described by sdfs $f$ and $g$ is simply $x : f(x) = g(x) = 0$. Provided that $f$ and $g$ are not simplistic, then the roots of that system of equations cannot be found analytically, that is why I mentioned numerical root finding. Under additional constraints you can use gradient or subgradient descent, since then you can try to minimize an energy of the form: $\alpha|f(x)|^p + \beta|g(x)|^q$, which is minimized for $f(x) = g(x) = 0$. If the surfaces do not intersect, it will still be a closest point in some sense. $\endgroup$ – lightxbulb Sep 17 '19 at 10:05
  • $\begingroup$ I want to ask one more thing. What would you say about precalculating and storing offline a set of points X1n & X2n where f(X1n)=0 g(X2n)=0 respectively and then using that information and I guess some kind of acceleration structure find at least some kind of approximation of the intersection points? Would it work? Could it be done in a better more efficient way? Thanks $\endgroup$ – Alexandros Mourtziapis Sep 17 '19 at 10:25
  • $\begingroup$ A lot of things may be done. Storing points is not ideal however, since all the points you pick may turn out to not correspond to the intersection. One possibility is to discretize your sdf, and then check all voxels within some threshold, and extract voxels for which both sdfs are close to 0. Another possibility is triangulating the surface and then intersecting the triangles from both surfaces. There are many possible solutions beyond these two examples too. $\endgroup$ – lightxbulb Sep 17 '19 at 10:35

Your Answer

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

Browse other questions tagged or ask your own question.