Timeline for BVH uses aabb for a sphere in Ray Tracing: The Next Week
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 19, 2020 at 9:48 | comment | added | Simon F | Perhaps I wasn't clear enough. Most of the scene testing is rejecting potential hits against geometry. You don't need the sqrt for that part. The OP was asking why use the AABB of the sphere for a reject test, rather than the sphere itself, and the reject test for a sphere, to my knowledge, doesn't need a sqrt. (For example, see "An Introduction to Ray Tracing, 1989, Ed: Andrew Glassner). | |
Nov 16, 2020 at 20:02 | comment | added | AnnoyinC | @SimonF because of the math to work out an intersection between a line and a sphere, you need to solve a quadratic equation which involves a root. We're not just checking distance, we're generating intersection points. There is also another method but even that requires taking a root. I recommend reading this: scratchapixel.com/lessons/3d-basic-rendering/… You'll see there's even more math than I mentioned. Here is the math for a ray-AABB intersection: tavianator.com/2011/ray_box.html | |
Nov 16, 2020 at 13:26 | comment | added | Simon F | "and you need to then take the square root," Why do you need to take the sqrt? If you are comparing the perpendicular distance from centre to ray against the radius, surely one just compares against the square of both values? | |
Nov 16, 2020 at 8:53 | history | answered | AnnoyinC | CC BY-SA 4.0 |