IP Library › Granted Patent US 10,331,632
Granted Patent B2
US 10,331,632 · App. 13/970,547 · Granted Jun 25, 2019

Bounding volume hierarchies through treelet restructuring

Inventors: Tero Tapani Karras (Helsinki, FI); Timo Oskari Aila (Tuusula, FI)
Assignee: NVIDIA Corporation
G06F16/211G06F16/13G06F16/185G06F16/2246
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,331,632
App. No.
13/970,547
Granted
Jun 25, 2019
Kind
B2
Abstract

A system, method, and computer program product are provided for modifying a hierarchical tree data structure. An initial hierarchical tree data structure is received and treelets of node neighborhoods in the initial hierarchical tree data structure are formed. Each treelet includes n leaf nodes and n−1 internal nodes. The treelets are restructured, by a processor, to produce an optimized hierarchical tree data structure.

Claims (51)

1. A method, comprising:

receiving, by a parallel processing unit that is configured to execute threads in a group of threads in parallel, an initial hierarchical tree data structure;

forming, by the parallel processing unit executing the threads in parallel, a first treelet of a node neighborhood in the initial hierarchical tree data structure, the first treelet including at least 5 treelet leaf nodes, and a first set of one or more treelet internal nodes;

constructing, by the parallel processing unit executing the threads in parallel, a second treelet that includes the at least 5 treelet leaf nodes included in the first treelet and a second set of one or more treelet internal nodes, wherein none of the treelet internal nodes included in the second set of one or more treelet internal nodes are included in the first set of one or more treelet internal nodes;

evaluating, by the parallel processing unit executing the threads in parallel, a cost function for the second treelet to produce a second cost value, wherein the second cost value is lower than a first cost value for the first treelet;

restructuring, by the parallel processing unit executing the threads in parallel, the initial hierarchical tree data structure representing the plurality of primitives by replacing the first set of one or more treelet internal nodes with the second set of one or more treelet internal nodes to produce an optimized hierarchical tree data structure; and

performing, by the parallel processing unit executing the threads in parallel, ray tracing using the optimized hierarchical tree data structure to create image data.

2. The method of claim 1 , further comprising evaluating the cost function for the first treelet to produce the first cost value.

3. The method of claim 1 , wherein the cost function is Surface Area Heuristic (SAH) cost.

4. The method of claim 1 , wherein the restructuring comprises minimizing the cost function.

5. The method of claim 4 , wherein minimizing the cost function comprises performing an exhaustive search of all possible topologies for the first treelet.

6. The method of claim 1 , wherein the constructing of the second treelet and at least a third treelet is performed in parallel by allocating one group of the threads to each treelet.

7. The method of claim 1 , wherein a first order in which the at least 5 treelet leaf nodes are stored in a first portion of a shared memory for the first treelet is different than a second order in which the at least 5 treelet leaf nodes are stored in a second portion of the shared memory for the second treelet.

8. The method of claim 1 , further comprising constructing the initial hierarchical tree data structure using a construction technique that produces an initial hierarchical tree data structure having three or more nodes.

9. The method of claim 1 , wherein the restructuring comprises using a dynamic programming algorithm, comprising:

breaking the restructuring into subproblems; and

utilizing solutions of subproblems that have already been solved to arrive at solutions to remaining subproblems.

10. The method of claim 9 , wherein one or more subproblems correspond to subsets of the at least 5 treelet leaf nodes.

11. A computer system comprising:

a memory storing a initial hierarchical tree data structure; and

a parallel processing unit that is configured to execute threads in a group of threads in parallel that is coupled to the memory and configured to:

receive an initial hierarchical tree data structure;

form, by executing the threads in parallel, a first treelet of a node neighborhood in the initial hierarchical tree data structure, the first treelet including at least 5 treelet leaf nodes, and a first set of one or more treelet internal nodes;

construct, by executing the threads in parallel, a second treelet that includes the at least 5 treelet leaf nodes included in the first treelet and a second set of one or more treelet internal nodes, wherein none of the treelet internal nodes included in the second set of one or more treelet internal nodes are included in the first set of one or more treelet internal nodes;

evaluate, by executing the threads in parallel, a cost function for the second treelet to produce a second cost value, wherein the second cost value is lower than a first cost value for the first treelet;

restructure, by executing the threads in parallel, the initial hierarchical tree data structure by replacing the first set of one or more treelet internal nodes with the second set of one or more treelet internal nodes to produce an optimized hierarchical tree data structure; and

perform ray tracing using the optimized hierarchical tree data structure to create image data.

12. A non-transitory computer-readable storage medium storing instructions that, when executed by a parallel processing unit of a computer system, cause the processor to perform a method, comprising:

receiving, by the parallel processing unit that is configured to execute threads in a group of threads in parallel, an initial hierarchical tree data structure;

forming, by the parallel processing unit executing the threads in parallel, a first treelet of a node neighborhood in the initial hierarchical tree data structure, the first treelet including at least 5 treelet leaf nodes, and a first set of one or more treelet internal nodes;

constructing, by the parallel processing unit executing the threads in parallel, a second treelet that includes the at least 5 treelet leaf nodes included in the first treelet and a second set of one or more treelet internal nodes, wherein none of the treelet internal nodes included in the second set of one or more treelet internal nodes are included in the first set of one or more treelet internal nodes;

evaluating, by the parallel processing unit executing the threads in parallel, a cost function for the second treelet to produce a second cost value, wherein the second cost value is lower than a first cost value for the first treelet;

restructuring, by the parallel processing unit executing the threads in parallel, the initial hierarchical tree data structure by replacing the first set of one or more treelet internal nodes with the second set of one or more treelet internal nodes to produce an optimized hierarchical tree data structure; and

performing, by the parallel processing unit executing the threads in parallel, ray tracing using the optimized hierarchical tree data structure to create image data.

13. The method of claim 1 , further comprising:

using the optimized hierarchical tree data structure to perform intersection tests;

forming a third treelet; and

restructuring the third treelet.

14. The method of claim 1 , wherein each treelet leaf node is capable of having its own sub-tree outside of the first treelet but within the initial hierarchical tree data structure, and wherein the treelet leaf nodes with associated subtrees are kept intact during the restructuring.

15. The method of claim 1 , wherein the initial hierarchical tree data structure is a bounding volume hierarchy (BVH) tree data structure.

16. The method of claim 1 , wherein the constructing of the second treelet comprises:

selecting a first treelet leaf node in the first treelet with the largest surface area; and

converting the first treelet leaf node to a treelet internal node in the second set of one or more treelet internal nodes.

17. The computer system of claim 11 , wherein the initial hierarchical tree data structure is a bounding volume hierarchy (BVH) tree data structure.

18. The computer system of claim 11 , wherein the parallel processing unit is further configured to:

select a first treelet leaf node in the first treelet with the largest surface area; and

convert the first treelet leaf node to a treelet internal node in the second set of one or more treelet internal nodes.

19. The non-transitory computer-readable storage medium of claim 12 , wherein the initial hierarchical tree data structure is a bounding volume hierarchy (BVH) tree data structure.

20. The non-transitory computer-readable storage medium of claim 12 , wherein the constructing of the second treelet comprises:

selecting a first treelet leaf node in the first treelet with the largest surface area; and

converting the first treelet leaf node to a treelet internal node in the second set of one or more treelet internal nodes.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 22, 2013
From: KARRAS, TERO TAPANI; AILA, TIMO OSKARI
To: NVIDIA CORPORATION
Reel/Frame 031456/0799 →
Continuity (2)
Provisional Application 61833410 · Jun 10, 2013
Related Publication 20140365532A1 · Dec 11, 2014
Cited By (1)
US 12,198,256