Ray Tracing and Photon Mapping on GPUs Tim PurcellStanford / NVIDIA.

Slides:



Advertisements
Similar presentations
Exploration of advanced lighting and shading techniques
Advertisements

Sven Woop Computer Graphics Lab Saarland University
Photon Mapping on Programmable Graphics Hardware Timothy J. Purcell Mike Cammarano Pat Hanrahan Stanford University Craig Donner Henrik Wann Jensen University.
Computer graphics & visualization Global Illumination Effects.
Chunhui Yao 1 Bin Wang 1 Bin Chan 2 Junhai Yong 1 Jean-Claude Paul 3,1 1 Tsinghua University, China 2 The University of Hong Kong, China 3 INRIA, France.
GI 2006, Québec, June 9th 2006 Implementing the Render Cache and the Edge-and-Point Image on Graphics Hardware Edgar Velázquez-Armendáriz Eugene Lee Bruce.
3D Graphics Rendering and Terrain Modeling
Interactive Ray Tracing: From bad joke to old news David Luebke University of Virginia.
Paper Presentation - An Efficient GPU-based Approach for Interactive Global Illumination- Rui Wang, Rui Wang, Kun Zhou, Minghao Pan, Hujun Bao Presenter.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
CSCE 641: Photon Mapping Jinxiang Chai. Outline Rendering equation Photon mapping.
Control Flow Virtualization for General-Purpose Computation on Graphics Hardware Ghulam Lashari Ondrej Lhotak University of Waterloo.
Computer Graphics (Fall 2005) COMS 4160, Lecture 21: Ray Tracing
Rendering on the GPU Tom Fili. Agenda Global Illumination using Radiosity Ray Tracing Global Illumination using Rasterization Photon Mapping Rendering.
GH05 KD-Tree Acceleration Structures for a GPU Raytracer Tim Foley, Jeremy Sugerman Stanford University.
Skin Rendering GPU Graphics Gary J. Katz University of Pennsylvania CIS 665 Adapted from David Gosselin’s Power Point and article, Real-time skin rendering,
3D Graphics Processor Architecture Victor Moya. PhD Project Research on architecture improvements for future Graphic Processor Units (GPUs). Research.
Final Gathering on GPU Toshiya Hachisuka University of Tokyo Introduction Producing global illumination image without any noise.
Sorting and Searching Timothy J. PurcellStanford / NVIDIA Updated Gary J. Katz based on GPUTeraSort (MSR TR )U. of Pennsylvania.
Z-Buffer Optimizations Patrick Cozzi Analytical Graphics, Inc.
Some Things Jeremy Sugerman 22 February Jeremy Sugerman, FLASHG 22 February 2005 Topics Quick GPU Topics Conditional Execution GPU Ray Tracing.
Paper by Alexander Keller
Mapping Computational Concepts to GPU’s Jesper Mosegaard Based primarily on SIGGRAPH 2004 GPGPU COURSE and Visualization 2004 Course.
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
1 Single Scattering in Refractive Media with Triangle Mesh Boundaries Bruce Walter Shuang Zhao Nicolas Holzschuch Kavita Bala Cornell Univ. Grenoble Univ.
Mapping Computational Concepts to GPUs Mark Harris NVIDIA Developer Technology.
Mapping Computational Concepts to GPUs Mark Harris NVIDIA.
Chris Kerkhoff Matthew Sullivan 10/16/2009.  Shaders are simple programs that describe the traits of either a vertex or a pixel.  Shaders replace a.
Jonathan M Chye Technical Supervisor : Mr Matthew Bett 2010.
-Global Illumination Techniques
Cg Programming Mapping Computational Concepts to GPUs.
Raytracing and Global Illumination Intro. to Computer Graphics, CS180, Fall 2008 UC Santa Barbara.
Photon Mapping on Programmable Graphics Hardware
Week 10 - Wednesday.  What did we talk about last time?  Shadow volumes and shadow mapping  Ambient occlusion.
Computer graphics & visualization Photon Mapping.
Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London
1 Photon-driven Irradiance Cache J. BrouillatP. GautronK. Bouatouch INRIA RennesUniversity of Rennes1.
Shadow Mapping Chun-Fa Chang National Taiwan Normal University.
Tone Mapping on GPUs Cliff Woolley University of Virginia Slides courtesy Nolan Goodnight.
Saarland University, Germany B-KD Trees for Hardware Accelerated Ray Tracing of Dynamic Scenes Sven Woop Gerd Marmitt Philipp Slusallek.
GPU Computation Strategies & Tricks Ian Buck NVIDIA.
Interactive Rendering With Coherent Ray Tracing Eurogaphics 2001 Wald, Slusallek, Benthin, Wagner Comp 238, UNC-CH, September 10, 2001 Joshua Stough.
1 Ray Tracing with Existing Graphics Systems Jeremy Sugerman, FLASHG 31 January 2006.
Real-Time High Quality Rendering CSE 291 [Winter 2015], Lecture 2 Graphics Hardware Pipeline, Reflection and Rendering Equations, Taxonomy of Methods
M. Jędrzejewski, K.Marasek, Warsaw ICCVG, Multimedia Chair Computation of room acoustics using programable video hardware Marcin Jędrzejewski.
- Laboratoire d'InfoRmatique en Image et Systèmes d'information
Differential Instant Radiosity for Mixed Reality Martin Knecht, Christoph Traxler, Oliver Mattausch, Werner Purgathofer, Michael Wimmer Institute of Computer.
Monte-Carlo Ray Tracing and
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Hybrid Algorithms K. H. Ko School of Mechatronics Gwangju Institute.
Pure Path Tracing: the Good and the Bad Path tracing concentrates on important paths only –Those that hit the eye –Those from bright emitters/reflectors.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
VLF Rendering & Implementation Details Virtual Light Field Group University College London GR/R13685/01 Research funded by: Jesper.
From Turing Machine to Global Illumination Chun-Fa Chang National Taiwan Normal University.
Ray Tracing using Programmable Graphics Hardware
Mapping Computational Concepts to GPUs Mark Harris NVIDIA.
Real-Time Dynamic Shadow Algorithms Evan Closson CSE 528.
Ray Tracing by GPU Ming Ouhyoung. Outline Introduction Graphics Hardware Streaming Ray Tracing Discussion.
Caustics Triangles on the GPU Umenhoffer Tamás Gustavo Patow Szirmay-Kalos László.
RENDERING : Global Illumination
Radiance Cache Splatting: A GPU-Friendly Global Illumination Algorithm P. Gautron J. Křivánek K. Bouatouch S. Pattanaik.
Path/Ray Tracing Examples. Path/Ray Tracing Rendering algorithms that trace photon rays Trace from eye – Where does this photon come from? Trace from.
Graphics Processing Unit
From Turing Machine to Global Illumination
Timothy J. Purcell Stanford / NVIDIA
Understanding Theory and application of 3D
Christian Lauterbach GPGPU presentation 3/5/2007
Graphics Processing Unit
Sorting and Searching Tim Purcell NVIDIA.
Ray Tracing on Programmable Graphics Hardware
Presentation transcript:

Ray Tracing and Photon Mapping on GPUs Tim PurcellStanford / NVIDIA

Small Sampling of GI on GPUs Much more detail in the included papers Lots of other ‘global illumination on GPUs’ in the literature –The Ray Engine [Carr et al. 2002] –GPU Algorithms for Radiosity and Subsurface Scattering [Carr et al. 2003] –Radiosity on Graphics Hardware [Coombe et al. 2004] –Lots and lots of shadow papers…

Radiosity Radiosity on Graphics Hardware [Coombe et al. 2004]

Subsurface Scattering GPU Algorithms for Radiosity and Subsurface Scattering [Carr et al. 2003]

Ray Tracing

Specular Diffuse Diffuse P T T S S S Occluder Point Light R Material Material Material Camera

Implementation Options GPU as a ray-triangle intersection engine [Carr et al. 2002] –Rays and geometry streamed to GPU –Intersection calculation results read back –Acceleration structure traversal done on host CPU GPU as a ray tracing engine [Purcell et al. 2002] –Scene geometry and acceleration structure stored on GPU –GPU performs ray generation, acceleration structure traversal, intersection, and shading –Host provides camera info

Streaming Ray Tracer Generate Eye Rays Traverse Acceleration Structure Intersect Triangles Shade Hits and Generate Shading Rays Camera Grid Triangles Materials

Techniques Used Data structure navigation –Texture memory stores data structures –Dependent texture fetches walk through data Flow control –Kernel binding based on occlusion query results –Efficient selective execution of kernels using early-z occlusion culling –Difficulty in flow control disappearing with newest graphics cards PS 3.0

Texture Memory Organization xyzxyzxyzxyzxyzxyz…xyz … … xyzxyzxyzxyzxyzxyz…xyz xyzxyzxyzxyzxyzxyz…xyz Uniform Grid 3D Luminance Texture Triangle List 1D Luminance Texture Triangles 3x 1D RGB Textures vox0 vox1vox2vox3vox4vox5voxM vox0vox2 tri0 tri1tri2tri3tri4tri5triN v0 v1 v2

Efficient Selective Execution Rendering giant screen filling quad not ideal –Not all pixels need to process every rendering pass Proposed low-overhead early fragment kill –Computation mask –Controllable early-Z occlusion culling Trade computation for bandwidth

Original System Implementation ATI Radeon 9700 Pro (R300) ATI Fragment Program

Cornell Box – Ray Traced Shadows Rendered using a Radeon 9700 Pro

Teapotahedron Rendered using a Radeon 9700 Pro

Quake 3 – Ray Traced Shadows Rendered using a Radeon 9700 Pro

Quake 3 – Ray Traced Shadows Rendered using a Radeon 9700 Pro

Performance Results Radeon 9700 Pro –100M ray-triangle intersections/s –300K to 4.0M rays/s –Between 3 – x256 pixels CPU implementation –20M intersections/s P3 800 MHz [Wald et al. 2001] –800K to 7.1M ray/s 2.5 GHz P4 [Wald et al. 2003] With simple shading: 1.8M to 2.3M rays/s

Photon Mapping

Photon Mapping Algorithm Review Photon tracing –Emission, scattering, storing into k-d tree –Similar to ray tracing Rendering –Ray tracing for direct illumination –Photon map visualization Indirect bounce

Computational Challenge for GPUs #1 Constructing a irregular or sparse data structure

Computational Challenge for GPUs #2 Adaptive nearest neighbor search –Noise vs. blur

Computational Challenge for GPUs #2 Adaptive nearest neighbor search –Noise vs. blur

Scatter on the GPU Sort photons into grid cells –Grid cell is sort key Two solutions –Simulate scatter with fragment programs Bitonic merge sort followed by binary search Multiple rendering passes –Vertex program with stencil buffer Fixed number of photons per grid cell Single rendering pass

Adaptive Nearest Neighbor Search Iterative algorithm Accept or reject photons in cell visit order –No priority queue! –kNN-grid

Original System Implementation NVIDIA GeForce FX 5900 Ultra (NV35) Cg compiler 1.1 Trace Photons Build Photon Map Ray Trace Scene Compute Radiance Estimate Compute LightingRender Image

Glass Ball – Bitonic Sort 512x384, 5K photons

Glass Ball – Stencil Routing 512x384, 5K photons

Ring – Bitonic Sort 512x384, 16K photons

Ring – Stencil Routing 512x384, 16K photons

Cornell Box – Bitonic Sort 512x512, 65K photons

Cornell Box – Stencil Routing 512x512, 65K photons

Cornell Box – Increased Search Radius

Summary GPU can perform global illumination calculations –Lots of options for splitting computation between CPU and GPU Global illumination calculations require many techniques useful to GPGPU computations –Data structure navigation –Sort, search –Data dependent looping and branching