1 / 25

FAST AND SIMPLE AGGLOMERATIVE LBVH CONSTRUCTION

FAST AND SIMPLE AGGLOMERATIVE LBVH CONSTRUCTION. Ciprian Apetrei Computer Graphics & Visual Computing (CGVC) 2014. Introduction. Hierarchies What are they for?. Introduction. Hierarchies What are they for? Fast Construction or Better Quality ?. Introduction. Hierarchies

Download Presentation

FAST AND SIMPLE AGGLOMERATIVE LBVH CONSTRUCTION

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. FAST AND SIMPLE AGGLOMERATIVE LBVH CONSTRUCTION Ciprian Apetrei Computer Graphics & Visual Computing (CGVC) 2014

  2. Introduction • Hierarchies • What are they for?

  3. Introduction • Hierarchies • What are they for? • Fast Construction or Better Quality?

  4. Introduction • Hierarchies • What are they for? • Fast Construction or Better Quality? • When do we prefer speed? • View-frustum culling • Collision detection • Particle simulation • Voxel-based global illumination

  5. Background • Previous GPU methods constructed the hierarchy in 4 steps: • Morton code calculation • Sorting the primitives • Hierarchy generation • Bottom-ul traversal to fit bounding-boxes

  6. Binary radix tree • The binary representations of each key are in lexicographical order. • The keys are partitioned according to their first differing bit. • Because the keys are ordered, each node covers a linear range of keys. • A radix tree with n keys has n-1 internal nodes.

  7. Binary radix tree • The binary representations of each key are in lexicographical order. • The keys are partitioned according to their first differing bit. • Because the keys are ordered, each node covers a linear range of keys. • A radix tree with n keys has n-1 internal nodes. • The parent of a node splits the hierarchy immediately before the first key of its right child and after the last keyof its left child.

  8. Binary radix tree 3 4 7 0 1 2 5 6 0 0 1 0 0 0 1 1 01 0 0 0 1 0 1 1 0 0 0 1 1 0 0 1101 1111

  9. Algorithm Overview • Define a numbering scheme for the nodes • Establish a connection with the keys • Gain some knowledge about the parent

  10. Algorithm Overview • Define a numbering scheme for the nodes • Establish a connection with the keys • Gain some knowledge about the parent • Each internal node i splits the hierarchy between keys i and i + 1 i i i+1

  11. Algorithm Overview • We can find the parent of a node by knowing the range of keys covered by it. • The parent splits the hierarchy either immediately before the first key or after the last key. i i i+1 Last key of the left child First key of the right child

  12. Algorithm Overview • To determine the parent we have to analyze the split point of the two nodes. The one that splits the hierarchy between two more similar subtrees is the direct parent. i i i+1 The metric distance between two keys indicates the dissimilarity between the left child and the right child of node i.

  13. Algorithm Overview • Algorithm steps: • Start from each leaf node.

  14. Algorithm Overview • Algorithm steps: • Start from each leaf node. • Choose the parent between the two internal nodes that split the hierarchy at the ends of the range of keys covered by the current node. • Pass the range of keys to the parent.

  15. Algorithm Overview • Algorithm steps: • Start from each leaf node. • Choose the parent between the two internal nodes that split the hierarchy at the ends of the range of keys covered by the current node. • Pass the range of keys to the parent. • Calculate the bounding box of the node. • Advance towards the root. • Only process a node if it has both its children set.

  16. Binary Radix Tree Construction 0 1 2 3 4 6 5 3 4 7 0 1 2 5 6 7 0 0 1 1 2 2 3 3 5 5 6 6 7 4 4 0 0 1 0 0 0 1 1 01 0 0 0 1 0 1 1 0 0 0 1 1 0 0 1101 1111 0 3 5 6 1 2 4 7

  17. Binary Radix Tree Construction 4 4 6 7 0 2 5 0 1 3 5 6 2 1 3 3 4 7 0 1 2 5 6 7 7 0 0 1 1 2 2 3 3 5 5 6 6 4 4 0 0 1 0 0 0 1 1 01 0 0 0 1 0 1 1 0 0 0 1 1 0 0 1101 1111 0 3 5 6 1 2 4 7

  18. Binary Radix Tree Construction 1 4 4 0 3 6 5 7 0 2 5 0 1 3 5 6 2 3 3 4 7 0 1 2 5 6 7 7 0 0 1 1 2 2 3 3 5 5 6 6 4 4 0 0 1 0 0 0 1 1 01 0 0 0 1 0 1 1 0 0 0 1 1 0 0 1101 1111 0 3 5 6 1 2 4 7

  19. Binary Radix Tree Construction 3 0 1 4 4 7 0 3 6 5 7 0 2 5 0 1 3 5 6 2 3 4 7 0 1 2 5 6 7 7 0 0 1 1 2 2 3 3 5 5 6 6 4 4 0 0 1 0 0 0 1 1 01 0 0 0 1 0 1 1 0 0 0 1 1 0 0 1101 1111 0 3 5 6 1 2 4 7

  20. Binary Radix Tree Construction 3 7 0 1 4 4 7 0 3 6 5 7 0 2 5 0 1 3 5 6 2 3 4 7 0 1 2 5 6 7 7 0 0 1 1 2 2 3 3 5 5 6 6 4 4 0 0 1 0 0 0 1 1 01 0 0 0 1 0 1 1 0 0 0 1 1 0 0 1101 1111 0 3 5 6 1 2 4 7

  21. Pseudocode • Pseudocode for choosing the parent: 1: defChooseParent(Left, Right, currentNode) 2: If ( Left = 0 or ( Right != nand δ(Right) < δ(Left-1) ) ) 3: then 4: parent ÃRight 5: InternalNodesparent.childAÃcurrentNode 6: RangeOfKeysparent.leftÃLeft 7: else 8: parent ÃLeft - 1 9: InternalNodesparent.childBÃcurrentNode 10: RangeOfKeysparent.rightÃRight

  22. Outline • General aspects about our algorithm: • Bottom-up construction • Finds the parent at each step • O(n) time complexity • Simple to implement • Can be used for constructing different types of trees • Allows an user-defined distance metric for choosing the parent.

  23. Results • We used the bottom-up reduction algorithm presented by Karras[2012] for implementation. • Compare against Karras binary radix tree construction and bounding-box calculation. • Evaluate performance on GeForce GT 745M • CUDA, 30-bit Morton Codes • Used Thrust library radix sort

  24. Results

  25. Thank You • Questions

More Related