How does the behavior of the sphere intersection program in the Backwell architecture work?

In the programming guide, I learned that the built-in sphere intersection program of the Blackwell architecture, like the built-in triangle program, also achieves hardware acceleration. However, I have doubts about the timing of when this built-in intersection program will perform the intersection operation.

The doc states that the intersector reports the point of intersection between the ray and the front surface of the sphere. However, if the ray origin point is inside the sphere, will it still report the intersection point? Even in the extreme case where the length of the ray is extremely short and becomes a approximate point ray, will it still report the intersection point?

Hi @hkkzzxz24, welcome!

The built-in OptiX sphere intersections will currently only report the “enter” or “front” hit of the sphere regardless of where the ray starts. This does mean that rays starting inside of a sphere will not hit that sphere, but might hit other spheres. If a ray is very short and approximates a point, it will only hit the sphere in the case that the ray origin is outside the sphere and the ray length is long enough for the ray to cross through the surface from the outside to the inside, modulo any rounding and precision issues with your ray and geometry. In practical terms, this means the short ray would need to be more or less sitting on the sphere surface. Short rays that start and end inside or outside of a sphere without going from inside to outside will not register any hits.

–
David.

1 Like

Thank you for such a detailed response. I understand now.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.