Transcript Slide 1

19th Eurographics Symposium on Rendering
Accelerating Ray Tracing using
Constrained Tetrahedralizations
Ares Lagae & Philip Dutré
EGSR 2008
Wednesday, June 25th
Introduction
• Acceleration structures for ray tracing
– Computer graphics
• BVH, kd-tree, grid
 Mostly practical (complexity? dynamic geometry?)
– Computational geometry
• Delaunay triangulation
 Mostly theoretical (theorems, proofs, implementations?)
 Constrained tetrahedralizations
Introduction
 Constrained tetrahedralizations
Construct constrained
tetrahedralization
as a preprocess
Use constrained
tetrahedralization
during ray traversal
Constrained Triangulation
• 2D triangulation + constraints (edges)
constraints
conforming
Delaunay
triangulation
constrained
Delaunay
triangulation
quality
Delaunay
triangulation
Constrained Tetrahedralization
• 3D tetrahedralization + constraints (faces)
constrained Delaunay
tetrahedralization
quality Delaunay
tetrahedralization
Construction
• Piecewise linear complex (PLC)
– Very general geometry representation
• Arbitrary polygons, holes, non-manifold geometry, …
– Polygons must properly intersect
• Tetrahedralizations cannot have intersecting faces
1. Triangle soup  PLC

– Eliminate all self-intersections
2. PLC  constrained tetrahedralization
– TetGen, CGAL
Ray Traversal
• Ray traversal
– Locate ray origin
– Traverse tetrahedralization one tetrahedron at a time
– Stop at constrained face
locate ray origin
traverse
triangulation
Ray Traversal
• Locate ray origin
– Potentially costly
– Accelerate
• Linear search  grid, monotone subdivision
– Avoid by exploiting ray connectivity
• Rays start at camera position or where previous ray ended
Ray Traversal
• Traverse tetrahedralization
– One tetrahedron at a time
– Given entry face, determine exit face
– Several methods
plane
intersections
half space
classification
scalar triple
products
Ray Traversal
• Example
ray hitting
scene geometry
ray just missing
scene geometry
Ray Tracing Cost
• Comparison with kd-tree
– Ray tracing cost: number of tetrahedra / nodes visited
scene
constrained Delaunay
tetrahedralization
low
quality Delaunay
tetrahedralization
high
kd-tree
Ray Tracing Cost
• Teapot-in-a-stadium problem
scene
constrained Delaunay
tetrahedralization
quality Delaunay
tetrahedralization
kd-tree
Advantages
• Deforming and dynamic geometry
– Deforming  theoretical guarantee
– Dynamic  efficient update
Advantages
• Time complexity of ray traversal
– Constrained tetrahedralization
• Linear in local geometric complexity
O( L)
– Hierarchical acceleration structures (kd-tree, bvh)
• Logarithmic at best in global geometric complexity
O(log G )
– No practical results yet
• Effect might only show up for large scenes
Advantages
• Optimal constrained tetrahedralizations
– Weight tetrahedralization = SAH for kd-trees
• Unified data structure for global illumination
– Associate data with vertices, edges, faces, tetrahedra
• Level-of-detail
– Meshes and triangulations use similar data structures
Disadvantages
• Constructing constrained tetrahedralizations
– TetGen, CGAL
• Geometry preconditioning
– Eliminating all self-intersections from triangle soup
• Absolute performance
– Limited testing, limited optimization
Conclusion & Future Work
• Conclusion
Constrained tetrahedralizations
– have a number of unique and interesting properties and
– offer several new perspectives on acceleration structures
• Future work
– Geometry preconditioning
– More elaborate testing
– Further explore advantages
Thanks!
• Questions?
Acknowledgments
Ares Lagae is a Postdoctoral Fellow of the Research Foundation Flanders (FWO)
Peter Vangorp and Jurgen Laurijssen
Jan Welkenhuyzen from Materialize
Tim Volodine
Numerical Robustness
• Construction
– Adaptive precision floating point arithmetic
– Robust geometric predicates
 Common practice in computational geometry
• Traversal
– Ignore robustness errors and degenerate cases
 Common practice in computer graphic
– Detection and correction is possible
• ray parameters of plane intersections should be increasing
• temporarily move points