hierarchical bounding volume
play

Hierarchical Bounding Volume October 11, 2005 () Hierarchical - PowerPoint PPT Presentation

Hierarchical Bounding Volume October 11, 2005 () Hierarchical Bounding Volume October 11, 2005 1 / 15 Outline Introduction to hierarchical bounding volume (HBV) Tree generation Other optimization issues () Hierarchical Bounding Volume


  1. Hierarchical Bounding Volume October 11, 2005 () Hierarchical Bounding Volume October 11, 2005 1 / 15

  2. Outline Introduction to hierarchical bounding volume (HBV) Tree generation Other optimization issues () Hierarchical Bounding Volume October 11, 2005 2 / 15

  3. Introduction to HBV A HBV is a tree structure formed by bounding volumes. In intersection testing, child nodes are tested only if their parents intersect with the ray. () Hierarchical Bounding Volume October 11, 2005 3 / 15

  4. More than one way to build the tree... () Hierarchical Bounding Volume October 11, 2005 4 / 15

  5. What is a “good tree”? (1/2) We build the tree in order to reduce intersection tests. Thus, the quality of a tree can be represented by E [ X ], where X denotes the number of intersection tests for each ray. () Hierarchical Bounding Volume October 11, 2005 5 / 15

  6. What is a “good tree”? (2/2) E [ X ] can be expressed by: � E [ X ] = a n P (ray hits n | ray hits the root) n where n denotes nodes in the tree, and a n denotes the additional intersection tests when the ray hits n . Actually, a n is the number of child of n . () Hierarchical Bounding Volume October 11, 2005 6 / 15

  7. Approximation of the Conditional Probability Assuming uniform distribution for ray directions, the probability that the ray hits a bounding box is proportional to the solid angle spanned by it. At large distances, this is approximately proportional to the surface area of the bounding box. Therefore, the conditional probability can be expressed by: surface area of n P (ray hits n | ray hits the root) = surface area of the root () Hierarchical Bounding Volume October 11, 2005 7 / 15

  8. Tree Generation Finding the optimal tree may take too much computation. However, finding an suboptimal one is acceptable. Construct the suboptimal tree by heuristic search: Initialize the tree as empty. 1 For each primitive, find a insertion point for it that the increased cost 2 ( E [ X ]) is minimalized. Repeat until all primitives are inserted. 3 () Hierarchical Bounding Volume October 11, 2005 8 / 15

  9. Finding the Best Insertion Point We don’t need to search the whole tree. For each internal node, we can prune its children which have higher insertion cost than others. Therefore, we only search nodes along a path from root to some leaf node. The time complexity is approximately O ( n log n ) () Hierarchical Bounding Volume October 11, 2005 9 / 15

  10. Example 56 30 25 47 41 34 () Hierarchical Bounding Volume October 11, 2005 10 / 15

  11. Other Optimization Issues Tree traversal optimization Intersection ray V.S. shadow ray Object cache () Hierarchical Bounding Volume October 11, 2005 11 / 15

  12. Tree Traversal Optimization In HBV algorithm, the tree is searched in a fixed order (usually DFS). A B C D E F () Hierarchical Bounding Volume October 11, 2005 12 / 15

  13. Tree Traversal Optimization In HBV algorithm, the tree is searched in a fixed order (usually DFS). A B C D E F We can pack the tree into an array with skip pointers, which reduce traversal time. A B D E F C nil () Hierarchical Bounding Volume October 11, 2005 12 / 15

  14. Intersection Ray V.S Shadow Ray We don’t care about the intersection point of shadow rays. Different acceleration structures can be used for intersection rays and shadow rays separately. In general, grids are faster for intersection rays, and HBV are faster for shadow rays. () Hierarchical Bounding Volume October 11, 2005 13 / 15

  15. Object Cache Rays often have spatial coherency, and we can cache the object hit by the previous ray. For intersection rays, the ray will still need to be check against the environment. Mailboxes are used to prevent duplicated checks. For shadow rays, we need to cache different objects for each light source. Reflected and transmitted rays are ignored in this scheme, because they are usually spatially different. () Hierarchical Bounding Volume October 11, 2005 14 / 15

  16. Thank you! () Hierarchical Bounding Volume October 11, 2005 15 / 15

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend