Interactive Rendering With Coherent Ray Tracing Eurogaphics 2001 Wald, Slusallek, Benthin, Wagner Comp 238, UNC-CH, September 10, 2001 Joshua Stough.

Slides:



Advertisements
Similar presentations
An Optimized Soft Shadow Volume Algorithm with Real-Time Performance Ulf Assarsson 1, Michael Dougherty 2, Michael Mounier 2, and Tomas Akenine-Möller.
Advertisements

Sven Woop Computer Graphics Lab Saarland University
† Saarland University, Germany ‡ University of Utah, USA Estimating Performance of a Ray-Tracing ASIC Design Sven Woop † Erik Brunvand ‡ Philipp Slusallek.
Christian Lauterbach COMP 770, 2/16/2009. Overview  Acceleration structures  Spatial hierarchies  Object hierarchies  Interactive Ray Tracing techniques.
CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
CSE 681 Bounding Volumes. CSE 681 Bounding Volumes Use simple volume enclose object(s) tradeoff for rays where there is extra intersection test for object.
Ray Tracing Ray Tracing 1 Basic algorithm Overview of pbrt Ray-surface intersection (triangles, …) Ray Tracing 2 Brute force: Acceleration data structures.
Ray Tracing CMSC 635. Basic idea How many intersections?  Pixels  ~10 3 to ~10 7  Rays per Pixel  1 to ~10  Primitives  ~10 to ~10 7  Every ray.
A Coherent Grid Traversal Algorithm for Volume Rendering Ioannis Makris Supervisors: Philipp Slusallek*, Céline Loscos *Computer Graphics Lab, Universität.
Introduction to Massive Model Visualization Patrick Cozzi Analytical Graphics, Inc.
David Luebke5/11/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
Two Methods for Fast Ray-Cast Ambient Occlusion Samuli Laine and Tero Karras NVIDIA Research.
Visibility Culling. Back face culling View-frustrum culling Detail culling Occlusion culling.
I3D Fast Non-Linear Projections using Graphics Hardware Jean-Dominique Gascuel, Nicolas Holzschuch, Gabriel Fournier, Bernard Péroche I3D 2008.
Experiences with Streaming Construction of SAH KD Trees Stefan Popov, Johannes Günther, Hans-Peter Seidel, Philipp Slusallek.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Clipping II, Hidden Surfaces.
Afrigraph 2004 Interactive Ray-Tracing of Free-Form Surfaces Carsten Benthin Ingo Wald Philipp Slusallek Computer Graphics Lab Saarland University, Germany.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University
1 Dr. Scott Schaefer Hidden Surfaces. 2/62 Hidden Surfaces.
Tomas Mőller © 2000 Speeding up your game The scene graph Culling techniques Level-of-detail rendering (LODs) Collision detection Resources and pointers.
3D Graphics Processor Architecture Victor Moya. PhD Project Research on architecture improvements for future Graphic Processor Units (GPUs). Research.
Memory Efficient Acceleration Structures and Techniques for CPU-based Volume Raycasting of Large Data S. Grimm, S. Bruckner, A. Kanitsar and E. Gröller.
Bounding Volume Hierarchies and Spatial Partitioning Kenneth E. Hoff III COMP-236 lecture Spring 2000.
Vertices and Fragments III Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Spatial Data Structure: Quadtree, Octree,and BSP tree Mengxia Zhu Fall 2007.
Real-Time Ray Tracing 3D Modeling of the Future Marissa Hollingsworth Spring 2009.
RT08, August ‘08 Large Ray Packets for Real-time Whitted Ray Tracing Ryan Overbeck Columbia University Ravi Ramamoorthi Columbia University William R.
Hidden Surface Removal
Interactive Ray Tracing: From bad joke to old news David Luebke University of Virginia.
Ray Tracing and Photon Mapping on GPUs Tim PurcellStanford / NVIDIA.
Computer graphics & visualization REYES Render Everything Your Eyes Ever Saw.
1 Speeding Up Ray Tracing Images from Virtual Light Field Project ©Slides Anthony Steed 1999 & Mel Slater 2004.
The Visibility Problem In many environments, most of the primitives (triangles) are not visible most of the time –Architectural walkthroughs, Urban environments.
CSE 381 – Advanced Game Programming Quickhull and GJK.
Matrices from HELL Paul Taylor Basic Required Matrices PROJECTION WORLD VIEW.
Stefan PopovHigh Performance GPU Ray Tracing Real-time Ray Tracing on GPU with BVH-based Packet Traversal Stefan Popov, Johannes Günther, Hans- Peter Seidel,
On a Few Ray Tracing like Algorithms and Structures. -Ravi Prakash Kammaje -Swansea University.
Real-Time Rendering SPEEDING UP RENDERING Lecture 04 Marina Gavrilova.
Visible-Surface Detection Jehee Lee Seoul National University.
Stream Processing Main References: “Comparing Reyes and OpenGL on a Stream Architecture”, 2002 “Polygon Rendering on a Stream Architecture”, 2000 Department.
Chapter 8 CPU and Memory: Design, Implementation, and Enhancement The Architecture of Computer Hardware and Systems Software: An Information Technology.
Saarland University, Germany B-KD Trees for Hardware Accelerated Ray Tracing of Dynamic Scenes Sven Woop Gerd Marmitt Philipp Slusallek.
Fast BVH Construction on GPUs (Eurographics 2009) Park, Soonchan KAIST (Korea Advanced Institute of Science and Technology)
1Computer Graphics Implementation II Lecture 16 John Shearer Culture Lab – space 2
Implementation II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Binary Space Partitioning Trees Ray Casting Depth Buffering
Implementation II.
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
Hierarchical Penumbra Casting Samuli Laine Timo Aila Helsinki University of Technology Hybrid Graphics, Ltd.
Memory Management and Parallelization Paul Arthur Navrátil The University of Texas at Austin.
Computer Graphics I, Fall 2010 Implementation II.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Virtual Light Field Group University College London Ray Tracing with the VLF (VLF-RT) Jesper Mortensen
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
Computer Graphics Inf4/MSc 1 Computer Graphics Lecture 5 Hidden Surface Removal and Rasterization Taku Komura.
Ray Tracing Optimizations
David Luebke 3/5/2016 Advanced Computer Graphics Lecture 4: Faster Ray Tracing David Luebke
Path/Ray Tracing Examples. Path/Ray Tracing Rendering algorithms that trace photon rays Trace from eye – Where does this photon come from? Trace from.
Cache memory. Cache memory Overview CPU Cache Main memory Transfer of words Transfer of blocks of words.
Computer Graphics Implementation II
Bounding Volume Hierarchies and Spatial Partitioning
Bounding Volume Hierarchies and Spatial Partitioning
Real-Time Ray Tracing Stefan Popov.
Implementation II Ed Angel Professor Emeritus of Computer Science
COMP 575/770 Review Session May 4, 2016.
Introduction to Computer Graphics with WebGL
Implementation II Ed Angel Professor Emeritus of Computer Science
Presentation transcript:

Interactive Rendering With Coherent Ray Tracing Eurogaphics 2001 Wald, Slusallek, Benthin, Wagner Comp 238, UNC-CH, September 10, 2001 Joshua Stough

The Gist The authors present “ a highly optimized implementation of a ray tracer that improves performance by more than an order of magnitude compared to currently available ray tracers…makes better use of computational resources…and better exploits image and object space coherence.”

Organization Why Ray Tracing over Rasterization? An Optimized Ray Tracing Implementation –Code structure, Caching, Coherence –Intersections –Volume Traversal (Memory Layout, Overhead) Performance of the Ray Tracing Engine

Why Ray Tracing Over Raster? Automatic Occlusion Culling Logarithmic Complexity in number of scene primitives Flexible sampling – allows for more effective use of time Efficient Shading – “avoids computation for invisible geometry” Shader Programming – direct use verses pipeline model More Correct Physically – and can use the same approximations “Trivially Parallel” – though initial resources required are higher Coherence

“Coherence is the key to efficiency.” Basic (Recursive Tree) Ray Tracer lacks concern for: –Modern CPU design – pipeline execution –Caching to hide low bandwidth and high latency on main memory Instead, “pay particular attention to:” –Caching – efficient/aligned data structures, traversing mechanisms –Pipelining –Parallel execution possibilities “We show that even today the performance of a software ray tracer on a single PC can challenge dedicated rasterization hardware for complex environments.”

An Optimized Ray Tracing Implementation Reducing Code Complexity Optimizing cache usage Reducing memory bandwidth Prefetching Data And with SIMD/SSE: –Ray intersections –Scene traversal –Shading

Code Complexity Few conditionals, Tight Inner loops Axis aligned BSP Tree – iterative algorithm possible Triangles only – reduces branches Shading less important – once verses traversals 5-10 intersections

Caching Performance bound by bandwidth, not CPU speed –BSP traversal, low computation to bandwidth ratio Fetching on entire cache line Carefully lay out data –Data together only if used together (geometry vs. shading) –Separate read-only (preprocessing) data from read-write (mailboxes) Hide latency with prefetching

Ray-Triangle Intersection Compute distance to plane (defined by triangle) along ray If distance is within current interval for testing (via BSP) Compute hit point Project into an axis-aligned plane (largest angle to normal) Barycentric coordinates of the hit point in 2d Data alignment – 2 2D edge equations, plane equation for distance, tag for projection axis = 9 floats + tag. Padded to 48 bytes (memory tradeoff).

CPU Cost of Ray-Triangle Test Bary.PleuckerBarySpeed- C CodeSSESSEUp Min Max ** -41 cycles ~ 20M ray-triangle intersections/sec -SSE requires bundling four rays at a time.

The Bundling of Four Rays at Once Better than four Triangles/One Ray Requires new Traversal algorithm Potential Overhead Primary rays verses shadow rays

BSP Traversal Before, 2x-3x more time spent than on intersections Axis Aligned BSP Tree –Only 2 binary decisions – efficient in parallel –Any ray traverses a child node => All four traverse in parallel Algorithm –Maintain current ray segment [near, far] –Calculate distance to splitting plane –Three cases –Update segments and traverse children if necessary

BSP Tree Memory Layout Caching and Prefetching in mind 1 children node pointer, node type flag, split coordinate –= 8 bytes/node = 4 nodes/cache line. –Aligned children –Memory bandwidth reduced by 4x. Possible Overhead –Incoherent rays = high overhead –Worst case = no worse than normal

Performance of the Ray Tracer

Considerations 11-15x Performance Increase! RTRT on 256MB RAM, others on 1GB! BUT Difference in features Others not limited to triangles Others did not target performance

Comparison With Raster Hardware

Miscellaneous Reflections/Shadows –Coherence less likely –Hot spots, but same hacks as in raster (environment maps). Linear scaling for rasterization vs. Logarithmic for ray tracing => higher complexity in favor of ray tracing