multi-hit ray traversal christiaan gribble alexis naveros ethan kerzner acm siggraph symposium on...
TRANSCRIPT
![Page 1: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/1.jpg)
Multi-Hit Ray Traversal
Christiaan GribbleAlexis NaverosEthan Kerzner
ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games15 March 2014
![Page 2: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/2.jpg)
• Raise awareness of JCGT paper– Overview– Algorithm– Performance– Examples– Wrap-up
• Generate interest
Why present at i3D?
Gribble et al., Multi-Hit Ray Traversal 2
![Page 3: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/3.jpg)
• Raise awareness of JCGT paper• Generate interest
– Applying algorithm– Improving algorithm– Exploring non-optical rendering
Looking to collaborate on interesting problems in rendering
Why present at i3D?
Gribble et al., Multi-Hit Ray Traversal 3
![Page 4: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/4.jpg)
Overview
![Page 5: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/5.jpg)
Optical rendering Non-optical rendering
Interval computation
5Gribble et al., Multi-Hit Ray Traversal
![Page 6: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/6.jpg)
Non-optical rendering Interval computation
Interval computation
6Gribble et al., Multi-Hit Ray Traversal
![Page 7: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/7.jpg)
• Difficult or impossible– Epsilon hacks– Missed/repeated intersections
• Performance impacts
7
Interval computation
Gribble et al., Multi-Hit Ray Traversal
![Page 8: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/8.jpg)
• Difficult or impossible• Performance impacts
– Traversal restart– Operational overhead
Are overlapping coplanar facets actually a problem?
8
Interval computation
Gribble et al., Multi-Hit Ray Traversal
![Page 9: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/9.jpg)
Overlapping coplanar facets
Interval computation
9Gribble et al., Multi-Hit Ray Traversal
![Page 10: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/10.jpg)
Algorithm
![Page 11: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/11.jpg)
• Which primitives are intersected?– One or more, & possibly all– Ordered by t-value along ray
• Core operation in ray engine• Critical to interval generation• Applications
11
Multi-hit ray traversal
Gribble et al., Multi-Hit Ray Traversal
![Page 12: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/12.jpg)
• Which primitives are intersected?• Core operation in ray engine
– Avoids negative epsilon hacks– Alleviates traversal restart
• Critical to interval generation• Applications
12
Multi-hit ray traversal
Gribble et al., Multi-Hit Ray Traversal
![Page 13: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/13.jpg)
• Which primitives are intersected?• Core operation in ray engine• Critical to interval generation
– Handles bad geometry gracefully– Enables early exit
• Applications
13
Multi-hit ray traversal
Gribble et al., Multi-Hit Ray Traversal
![Page 14: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/14.jpg)
• Which primitives are intersected?• Core operation in ray engine• Critical to interval generation• Applications
– Ballistic simulation– Transparent rendering– …
14
Multi-hit ray traversal
Gribble et al., Multi-Hit Ray Traversal
![Page 15: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/15.jpg)
Buffered multi-hit with early exit
15Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
![Page 16: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/16.jpg)
Initialization
16Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
ray
![Page 17: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/17.jpg)
Initialization
17Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
ray
- - -
![Page 18: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/18.jpg)
Traverse nodes
18Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
ray
- - -
![Page 19: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/19.jpg)
Traverse nodes
19Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
ray
- - -
- - - - - -
node
![Page 20: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/20.jpg)
Find some hits
20Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
node
ray
- - -
- - - - - -
F
![Page 21: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/21.jpg)
Find some hits
21Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
node
ray
- - -
- - - - - -
F
hitData
![Page 22: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/22.jpg)
Find some hits
22Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
node
ray
- -
- - - - - -
F
![Page 23: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/23.jpg)
Find some hits
23Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
node
ray
- - -
- - - - - -
F
hitData
![Page 24: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/24.jpg)
Find some hits
24Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
node
ray
- - -
- - - - - -
F
hitData
![Page 25: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/25.jpg)
Find some hits
25Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
node
ray
- - - - - -
F
![Page 26: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/26.jpg)
Find some hits
26Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
node
ray
- - - - - -
F
hitData
T
![Page 27: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/27.jpg)
Process some hits
27Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
node
ray
- - - - - -
T
-
![Page 28: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/28.jpg)
Process some hits
28Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
node
ray
- - - - -
T
- -
![Page 29: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/29.jpg)
Process some hits
29Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
node
ray
- - - -
T
- - -
![Page 30: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/30.jpg)
Find some (more) hits
30Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode T
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
node
ray
F
- - -
- - -
![Page 31: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/31.jpg)
Find some (more) hits
31Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
node
ray
F
- - -
- - -
![Page 32: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/32.jpg)
Find some (more) hits
32Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
node
ray
F
- - -
- - -
![Page 33: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/33.jpg)
Find some (more) hits
33Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
node
ray
F
hitData
- - -
- - -
![Page 34: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/34.jpg)
Find some (more) hits
34Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
node
ray
- -
F
- - -
![Page 35: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/35.jpg)
Find some (more) hits
35Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
node
ray
F
- -
- - -
![Page 36: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/36.jpg)
Find some (more) hits
36Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
node
ray
- -
F
- - -
![Page 37: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/37.jpg)
Process some (more) hits
37Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
node
ray
F
- -
- --
-
![Page 38: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/38.jpg)
Traverse (more) nodes
38Gribble et al., Multi-Hit Ray Traversal
hitMask
repeatNode
1 function Traverse(root, ray) 2 Initialize(hitList) 3 node <- root 4 while Valid(node) do 5 if !Empty(node) then 6 Initialize(hitMask) 7 repeat 8 repeatNode <- FALSE 9 for triangle in node do10 if !Contains(hitMask, tID) then11 if Intersect(triangle, ray) then12 hitData <- (t, u, v, tID, ...)13 if Full(hitList) then14 repeatNode <- TRUE15 Insert(hitList, hitData)16 for hitData in hitList do17 if !UserHit(ray, hitData) then18 return19 if repeatNode then20 Add(hitMask, hitData.tID)21 until !repeatNode22 node <- Next(node)
Buffered multi-hit ray traversal
hitList
node
ray
F
- -
- --
-
![Page 39: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/39.jpg)
Results
![Page 40: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/40.jpg)
• Find-first-intersection– First-hit v. buffered multi-hit– Isolates multi-hit overhead
• Find-all-intersections• Find-some-intersections
40
Performance – tests
Gribble et al., Multi-Hit Ray Traversal
![Page 41: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/41.jpg)
• Find-first-intersection• Find-all-intersections
– Naive v. buffered multi-hit– Bounds performance expectations
• Find-some-intersections
41
Performance – tests
Gribble et al., Multi-Hit Ray Traversal
![Page 42: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/42.jpg)
• Find-first-intersection• Find-all-intersections• Find-some-intersections
– Naive v. buffered multi-hit– Demonstrates in situ performance
42
Performance – tests
Gribble et al., Multi-Hit Ray Traversal
![Page 43: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/43.jpg)
Performance – scenes
43Gribble et al., Multi-Hit Ray Traversal
• First-hit, naive & buffered multi-hit traversal implemented in Rayforce• First-hit performance is in range of 200-800 Mrps• Images rendered at 1024x768 pixels on an NVIDIA GeForce GTX 690
sanm10M tris
tank1M tris
conf282K tris
fair174K tris
sibe80K tris
![Page 44: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/44.jpg)
Find-first-intersection
44Gribble et al., Multi-Hit Ray Traversal
sibe fair conf tank sanm0
100200300400500600700800
first-hit
buffered multi-hit
Mips
-31.69%
-30.75%
-29.08%
-31.76% -30.44%
![Page 45: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/45.jpg)
Find-all-intersections
45Gribble et al., Multi-Hit Ray Traversal
sibe fair conf tank sanm0
100
200
300
400
500
600naive multi-hit
buffered multi-hit
Mips
+8.07%
+12.30%+11.80%
+9.74%
+7.42%
![Page 46: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/46.jpg)
Find-some-intersections
46Gribble et al., Multi-Hit Ray Traversal
sibe fair conf tank sanm0
100
200
300
400
500
600naive multi-hit
buffered multi-hit
Mips
+100.52% +80.97%
+14.95%+8.38%
+15.40% Scenes of highest complexity
![Page 47: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/47.jpg)
Transparent rendering Ballistic simulation
Example applications
47Gribble et al., Multi-Hit Ray Traversal
![Page 48: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/48.jpg)
![Page 49: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/49.jpg)
Other (possible) applications
49
• Alpha textures• Thin fibers• Constructive solid geometry
Gribble et al., Multi-Hit Ray Traversal
[Wald et al. 2007]
![Page 50: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/50.jpg)
Other (possible) applications
50
• Alpha textures• Thin fibers• Constructive solid geometry
Gribble et al., Multi-Hit Ray Traversal
[Sintorn & Assarson 2008]
![Page 51: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/51.jpg)
Other (possible) applications
51
• Alpha textures• Thin fibers• Constructive solid geometry
Gribble et al., Multi-Hit Ray Traversal
Image source: Wikipedia
![Page 52: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/52.jpg)
Wrap-up
![Page 53: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/53.jpg)
• Multi-hit ray traversal– Generalizes first-hit & all-hit traversal– Handles overlapping, coplanar facets– Useful in CG & simulation
• Buffered multi-hit algorithm• Future work
Conclusions
Gribble et al., Multi-Hit Ray Traversal 53
![Page 54: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/54.jpg)
• Multi-hit ray traversal• Buffered multi-hit algorithm
– Imposes only modest overhead– Outperforms naive algorithm– Makes all-hit unnecessary
• Future work
Conclusions
Gribble et al., Multi-Hit Ray Traversal 54
![Page 55: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/55.jpg)
• Multi-hit ray traversal• Buffered multi-hit algorithm• Future work
– Add multi-hit + object-partitioning– Explore multi-hit + direction change– Apply to new problems
Conclusions
Gribble et al., Multi-Hit Ray Traversal 55
![Page 56: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/56.jpg)
SURVICE EngineeringJeff AmstutzMark ButkiewiczScott Shaw
Intel LabsCarsten BenthinIngo WaldSven Woop
US Army Research LaboratoryLee Butler
JCGTMorgan McGuireMatt PharrAnonymous reviewers
Ethan Kerzner is funded in part by the US Army Research Laboratory Cooperative Agreement: Applying GPU Computing & Computer
Graphics to Engineering Analysis & Military Applications
Acknowledgements
56Gribble et al., Multi-Hit Ray Traversal
![Page 57: Multi-Hit Ray Traversal Christiaan Gribble Alexis Naveros Ethan Kerzner ACM SIGGRAPH Symposium on Interactive 3D Graphics & Games 15 March 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062515/56649f585503460f94c7d3cd/html5/thumbnails/57.jpg)
Contact information
57
AddressApplied Technology OperationSURVICE Engineering6014 Penn AvenuePittsburgh, PA 15206
Webhttp://www.rtvtk.org/~cgribble/
Gribble et al., Multi-Hit Ray Traversal