0
$\begingroup$

I am reading this document that talks about signed distance field rendering.

In that document section 6.3, on the topic of cone tracing, it says:

Cone tracing is an extension of the sphere tracing algorithm. In addition to the ray, a cone is created and expanded in the marching direction. At each sampling step, the current cone radius is compared with the minimum distance from the distance field. If the SDF value is smaller than the current radius, the cone has intersected an object [14]. This incurs very little additional cost to the normal sphere trace, while providing useful intersection information.

In particular: If the SDF value is smaller than the current radius, the cone has intersected an object.

Am I reading this wrong? there's no way that's true. Consider the following diagram:

enter image description here

From that diagram, it seems obvious that for any cone radius $R$ there exists an SDF value $\epsilon$ such that $R > \epsilon$ and the cone doesn't intersect the sphere.

Am I interpreting the document wrong?

$\endgroup$
1
$\begingroup$

It’s kind of inaccurately stated—by comparing the SDF with a linearly increasing radius, the shape that’s being traced out is a cone with a hemisphere on the end, something like this:

diagram

At any point along the horizontal center line, if the distance to the nearest surface is less than the current test radius, the cone-plus-hemisphere has intersected that surface.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Although I agree that that shape does indeed match the description, under which criteria are you saying that's what the document is talking about? I didn't see the mention of the spherical component in the thesis $\endgroup$ – Makogan Jan 24 at 4:01
  • 1
    $\begingroup$ What the document’s referring to is an approximation to the actual shape—there isn’t a good word for “the shape formed by sweeping a sphere of linearly increasing radius along a line”, but that shape looks basically like a cone and has similar characteristics, so “cone” is close enough. $\endgroup$ – Noah Witherspoon Jan 24 at 19:51
  • 1
    $\begingroup$ Well, I get the idea and I will accept this answer, however, after thinking about it a bit, it's impossible for a radius test to describe the shape you drew. since the sphere you are testing by occupies a sections of space that are outside of the cone's shape. However, you do get a sorta rough approximation of that shape using discrete steps. TL:DR, It is correct that the document is mathematically wrong, but from a computation perspective, it;s close enough. $\endgroup$ – Makogan Jan 24 at 20:19
  • $\begingroup$ Granted—two outer lines should be tangent to the circle rather than attached to its diameter. Harder to draw that, though. :) $\endgroup$ – Noah Witherspoon Jan 25 at 0:43

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.