Presentation is loading. Please wait.

Presentation is loading. Please wait.

RT 08 Efficient Clustered BVH Update Algorithm for Highly-Dynamic Models Symposium on Interactive Ray Tracing 2008 Los Angeles, California Kirill Garanzha.

Similar presentations


Presentation on theme: "RT 08 Efficient Clustered BVH Update Algorithm for Highly-Dynamic Models Symposium on Interactive Ray Tracing 2008 Los Angeles, California Kirill Garanzha."— Presentation transcript:

1 RT 08 Efficient Clustered BVH Update Algorithm for Highly-Dynamic Models Symposium on Interactive Ray Tracing 2008 Los Angeles, California Kirill Garanzha Department of Software for Computers Bauman Moscow State Technical University, Russia

2 RT 08 BVH summary Advantages: Advantages: Fast refitting Fast refitting Predictable memory consumption Predictable memory consumption Fastest empty space passing for SAH trees Fastest empty space passing for SAH trees BVH is the tree that encloses scene objects Disadvantages: Disadvantages: Not ordered traversal of the ray in the space Not ordered traversal of the ray in the space Tree-quality degradation after refitting Tree-quality degradation after refitting Not very fast SAH-based build Not very fast SAH-based build

3 RT 08 Dynamic BVH related BIH [Wächter EGSR06] BIH [Wächter EGSR06] Build from hierarchy [Hunt RT07] Build from hierarchy [Hunt RT07] SAH binning [Wald RT07] SAH binning [Wald RT07] Selective restructuring [Yoon EGSR07] Selective restructuring [Yoon EGSR07] Fast BVH build assume some tree- quality degradation for ray tracing Fast BVH build assume some tree- quality degradation for ray tracing

4 RT 08 Dynamic BVH related In general these approaches apart from “Selective restructuring” produce splits for every BVH-node in every frame – brute force In general these approaches apart from “Selective restructuring” produce splits for every BVH-node in every frame – brute force Fast BVH build assume some tree- quality degradation for ray tracing Fast BVH build assume some tree- quality degradation for ray tracing

5 RT 08 How to get rid of brute force? Dynamic BVH related Lazy build Selective restructuring Avoid full reconstruction of nodes without strong dynamism under them

6 RT 08 Idea To measure cheaply the dynamism under node while refitting the BVH To measure cheaply the dynamism under node while refitting the BVH To apply the cheapest update technique for the node that saves good SAH cost: To apply the cheapest update technique for the node that saves good SAH cost: 1. 1. Leave it refitted 2. 2. Relocate BVH-cluster in proper position of the tree 3. 3. Rebuild the structure under node by exploiting SAH-binning, existing hierarchy, degree of dynamism

7 RT 08 Dynamism detection The type of dynamism is detected in the bottom-up refitting process for every affected node: Migrating node represents a BVH- cluster of coherently moving triangles Exploded node represents a cluster of strong triangle explosions and growing overlaps

8 RT 08 Detect migrating node Example: …B …A …C …D …E Nodes B and C are moving. They represent clusters of coherently moving triangles

9 RT 08 …B …A …C …D …E The SAH cost of the node (B+C) is improved. But nodes B and C should be united with others Detect migrating node Example:

10 RT 08 …B …A …C …D …E Like now… Example: Detect migrating node

11 RT 08 Formula: if then N L and N R represent migrating clusters and should be relocated N L and N R are children of N dM is the predefined threshold Detect migrating node

12 RT 08 Detect exploded node Example: … NRNRNRNR … NLNLNLNL The overlap between N L and N R is likely to grow if SAH cost of N is increasing

13 RT 08 Example: N is worth to rebuild if there is a big % of broken nodes under it Detect exploded node … NRNRNRNR … NLNLNLNL

14 RT 08 Example: Broken node – migrating or exploded. Broken count measures the dynamism under node Detect exploded node … NRNRNRNR … NLNLNLNL

15 RT 08 Formula: if then The cluster with root N should be restructured There is big overlap between N L and N R There is big % of broken nodes under N N L and N R are children of N dE is the predefined threshold Detect exploded node

16 RT 08 Refitting phase The bottom-up refitting phase: 1. Updates BVs 2. Detects the dynamism 3. Accumulates broken counts At the output it produces 2 arrays with migrating and exploded nodes

17 RT 08 How to obtain a lot of smaller exploded clusters to perform independent rebuilds on them? Independent clusters

18 RT 08 When exploded node N is detected: Lock it. N will be considered as atomic for rebuild process on a cluster above it. Unlock all exploded descendants of N that intersect the BV of the overlap between N L and N R Independent clusters

19 RT 08 Locked Locked LockedLocked NLNLNLNL NRNRNRNR Locked exploded descendants will be rebuilt independently and will be considered as atomic for some rebuild process above them Independent clusters

20 RT 08 Locked Locked Locked Locked NLNLNLNL NRNRNRNR But if some of them intersect the BV of the overlap within some ancestor N then they create obstacles in the process eliminating the overlap Independent clusters

21 RT 08 Locked Locked Locked Locked NLNLNLNL NRNRNRNR So they should be unlocked Independent clusters

22 RT 08 Independent clusters L L L … … ……… The set of independent clusters for rebuilding may form the hierarchy. Their roots are locked

23 RT 08 ……… Hierarchical rebuild L … 1. New split should be created with SAH binning 4. Locked nodes are atomic 2. Smaller-sized rows are considered while partitioning 3. In the next partition step the sub-row is refined if it has sufficient % of Broken count 5. Other cluster, independent rebuild This way saves some rebuild operations

24 RT 08 Cluster migration Migrating nodes are processed in 3 loops: 1. Unlink each node from the tree 2. Adjust the remaining tree and search reinsertion nodes 3. Insert each node back into the tree At every loop all migrating nodes are passed in the “end-begin” order – i.e. a loop starts from nodes of higher levels

25 RT 08 Cluster migration Migrating nodes are processed in 3 loops: 1. Unlink each node from the tree 2. Adjust the remaining tree and search reinsertion nodes 3. Insert each node back into the tree The formula that detects migrating nodes and these 3 loops automatically resolve the problem of the tree-thinning effect

26 RT 08 Cluster migration The insertion is a recursive process of taking decisions X XLXLXLXL XRXRXRXR N NLNLNLNL NRNRNRNR Where insert N when start from X? ? <= 2. Descend into one of the childrenX XLXLXLXL XRXRXRXRN ? <= X XLXLXLXL XRXRXRXR NLNLNLNL NRNRNRNR 3. Decompose N, ? <= 1. Unite X and NU XN The variant of decision is taken according to its SAH evaluation N is decomposed when its insertion produces severe overlap in X.

27 RT 08 Memory manager frequent updates of pointers in the proposed highly- dynamic structure result in cache- efficiency degradation. Problem: frequent updates of pointers in the proposed highly- dynamic structure result in cache- efficiency degradation. in either rebuild or insert process a new BVH-node is allocated under some parent node. Property of restructurings: in either rebuild or insert process a new BVH-node is allocated under some parent node.

28 RT 08 Memory manager Acceleration structure for pre-allocated array of BVH-nodes improves the situation: 0123456789101112131415 BVH nodes array 1111111111111111 4444 16 Selector acceleration structure It accelerates the allocation of a free BVH- node that is the nearest to the given one in the memory space (e.g. nearest to parent)

29 RT 08 This strategy tries to keep the BVH-layout of reasonable cache-efficiency Memory manager Acceleration structure for pre-allocated array of BVH-nodes improves the situation: 0123456789101112131415 BVH nodes array 1111111111111111 4444 16 Selector acceleration structure

30 RT 08 Benchmarks – Core 2 Quad 2.4 GHz (1 core utilization) BVH Updater – Core 2 Quad 2.4 GHz (1 core utilization) – GeForce 8800 GTX and CUDA, mono-ray tracer Ray Tracer – GeForce 8800 GTX and CUDA, mono-ray tracer UNC Dynamic models: Exploding dragon (252K triangles) Cloth simulation (92K triangles) Colliding balls (146K triangles)

31 RT 08 Dragon timings

32 RT 08 Cloth timings

33 RT 08 Balls timings

34 RT 08 Rebuild partitions Relative number of rebuild partitions. Model specific 100% = number of partitions for the full-rebuild (i.e. number of inner nodes)

35 RT 08 Independent clusters The number of detected independent exploded clusters

36 RT 08 Rendering performance Relative rendering performance of the BVH in comparison to the one produced by full SAH binned-rebuild

37 RT 08 Dragon video

38 RT 08 Cloth video

39 RT 08 Balls video The algorithm adapts to the rigid motion associating every ball with a separate subtree and then exploits only migrating updates

40 RT 08 Conclusions The algorithm unites advantages of several updating techniques for the BVH. The algorithm unites advantages of several updating techniques for the BVH. Cheapest update techniques are utilized when they can keep reasonable BVH quality. Cheapest update techniques are utilized when they can keep reasonable BVH quality. The algorithm is applicable to various types of dynamic models. The algorithm is applicable to various types of dynamic models. Lots of produced independent clusters for rebuild will be useful in a future parallel version. Lots of produced independent clusters for rebuild will be useful in a future parallel version.


Download ppt "RT 08 Efficient Clustered BVH Update Algorithm for Highly-Dynamic Models Symposium on Interactive Ray Tracing 2008 Los Angeles, California Kirill Garanzha."

Similar presentations


Ads by Google