Hacker News new | ask | show | jobs
by skye-adaire 1965 days ago
This is a bit confused. Current RT implementations are faster at intersecting the mesh along the ray direction than sphere tracing (which require the expensive lookups or evaluations).

The distance to the surface is independent of direction, it is only a function of position (as all SDFs are).

The depth map is the distance from ray origin to intersection only, not how close that ray came to the surface at any point along it's segment.

1 comments

That's fair, my point is that if you only care about rendering something quickly then a mesh is your best bet.

Are there applications you have in mind where the distance to the nearest surface is actually useful, regardless of the surface representation? As in, when would knowing the distance to the nearest surface be helpful when you're working with meshes? It seems to me you only need to know the closest distance to a surface when you have an SDF and are trying to compute an intersection along a ray.

The nearest sort of application of this kind that I can think of is Walk on Spheres (cool recent paper https://www.cs.cmu.edu/~kmcrane/Projects/MonteCarloGeometryP...), but in that case the authors do a closest point query, not a distance to the nearest surface. There's a subtle difference here because you actually need the closest point (not just the distance) so that you can look up a boundary condition. It's not clear to me how you could make use of an SDF in this setting, although maybe there's an interesting research direction there.

>Are there applications you have in mind where the distance to the nearest surface is actually useful, regardless of the surface representation?

Distance fields are a subset of implicit functions (see wikipedia). The use of level curves (which can be interpreted as "distance" for SDFs) is broad. You can dynamically and trivially thicken or shrink objects by adding or subtracting to the distance. Functions defined on the level curves output of an SDF can be used to map a volume to another implicit function (see nTopology). With implicit functions, the non-zero level sets are really just as important, but most focus on the zero level set in rendering.

>There's a subtle difference here because you actually need the closest point (not just the distance) so that you can look up a boundary condition.

Vector to Closest Point (VCP) is subtle but different in important ways. It is unsigned, and cannot indicate whether a position is inside or outside the object. Implicit modeling is not generally concerned with parameterizing the surface, since we can use volumetric, 3D procedural textures.

Thanks for the insights! I come from a mostly rendering background, so my understanding is definitely biased from always thinking of SDFs in the context of surface rendering or reconstruction :-)