Intersection test for ray tracing

AI Thread Summary
Intersection tests in ray tracing can be complicated by the limitations of hierarchical bounding volumes, which may indicate an intersection without confirming it with the actual object. This discrepancy is less critical in game hit detection but poses challenges in scenarios requiring high precision, such as scientific simulations. To address these challenges, the "ray-primitive intersection" algorithm is often employed, which tests rays against individual scene primitives rather than relying solely on bounding volumes. This method utilizes a bounding volume hierarchy (BVH) to organize primitives, allowing for efficient traversal and maintaining logarithmic time complexity. Additionally, specific techniques like "ray-box" and "ray-triangle" intersection methods can be optimized for different primitive types and combined with BVHs for enhanced performance. Overall, while hierarchical bounding volumes serve well in gaming contexts, they may not suffice for applications demanding precise intersection testing.
Negatron
Messages
73
Reaction score
0
I know that intersection tests can typically (for hit detection in games) be computed in log n time with reasonable accuracy, but there is a problem that I see with using hierarchical bounding volumes in ray tracing.

For example, a ray may intersect a bounding volume however due to the shape of the contained object it may turn out that the object has not been intersected. For hit detection in games this typically doesn't matter and a hit can be assumed, but a ray needs to actually intersect a low level primitive to draw a pixel.

When the test is performed in a bounding volume and it turns out no intersection took place the algorithm would have to back-track, and I'm not sure this complication would still retain log n properties.

So how are intersection tests performed where such precision is required and is log n still achieved? I know I have to do my own homework on the implementation but I'm just interested in the vague idea and maybe the name of the algorithm, thanks.
 
Technology news on Phys.org

Thank you for bringing up this interesting point about using hierarchical bounding volumes in ray tracing. You are correct in your observation that there can be cases where a ray may intersect a bounding volume, but not the actual object contained within it. This can lead to complications in the algorithm and potentially affect its overall efficiency.

In cases where precision is required, such as in scientific simulations or medical imaging, a different approach is often used for intersection tests. One commonly used method is called the "ray-primitive intersection" algorithm, which involves testing the ray against each individual primitive in the scene rather than just the bounding volumes.

This approach does not rely on hierarchical bounding volumes, but instead uses a data structure known as a bounding volume hierarchy (BVH) to organize the primitives in the scene. This data structure allows for efficient traversal and testing of the ray against the individual primitives, while still achieving a logarithmic time complexity.

There are also other algorithms and techniques used for intersection testing, such as the "ray-box intersection" and "ray-triangle intersection" methods, which are optimized for specific types of primitives. These can also be combined with BVHs for even better performance.

In summary, while hierarchical bounding volumes are a useful tool for hit detection in games, they may not be suitable for cases where precision is crucial. In these situations, other algorithms and data structures are used to ensure accurate and efficient intersection testing. I hope this helps answer your question and provides some insight into the broader topic of intersection testing.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top