Abstract
In order to speed up the intersection calculation in ray-tracing programs, people have implemented divide-and-conquer strategies such as hierarchical bounding volumes and octrees. Uniform subdivision has also been used to speed up that calculation. Uniform subdivision is undesirable for applications where the objects may be unevenly distributed in space. This is because the amount of memory needed for uniform subdivision is proportional to the highest density of objects, rather than the total number. Hierarchical-bounding volumes can be difficult to implement effectively but can be used to good effect. Hierarchical space subdivision techniques do not suffer the memory problems of uniform subdivision and are also relatively easy to implement. This chapter discusses the best overall hierarchical subdivision technique currently known. There are two basic modules in a BSP tree intersection code. The first module builds the tree by recursively cutting the bounding box of all objects along a median spatial plane. The second module tracks a ray through the leaf nodes of the BSP tree checking for intersections. The BSP tree is built by InitBinTree( ) and Subdivide( ). RayTreeIntersect( ) is the actual tree walking traversal of the BSP tree following a ray.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.