1 Ray Tracing with Existing Graphics Systems Jeremy Sugerman, FLASHG 31 January 2006.

Slides:



Advertisements
Similar presentations
The OpenRT Application Programming Interface - Towards a Common API for Interactive Ray Tracing – OpenSG 2003 Darmstadt, Germany Andreas Dietrich Ingo.
Advertisements

Sven Woop Computer Graphics Lab Saarland University
Christian Lauterbach COMP 770, 2/16/2009. Overview  Acceleration structures  Spatial hierarchies  Object hierarchies  Interactive Ray Tracing techniques.
COMPUTER GRAPHICS CS 482 – FALL 2014 NOVEMBER 10, 2014 GRAPHICS HARDWARE GRAPHICS PROCESSING UNITS PARALLELISM.
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
The Art and Technology Behind Bioshock’s Special Effects
Two Methods for Fast Ray-Cast Ambient Occlusion Samuli Laine and Tero Karras NVIDIA Research.
1Notes  Assignment 1 is out, due October 12  Inverse Kinematics  Evaluating Catmull-Rom splines for motion curves  Wednesday: may be late (will get.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
CS 325 Introduction to Computer Graphics 04 / 09 / 2010 Instructor: Michael Eckmann.
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
(conventional Cartesian reference system)
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.
IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.
Many-Core Programming with GRAMPS Jeremy Sugerman Kayvon Fatahalian Solomon Boulos Kurt Akeley Pat Hanrahan.
GPUGI: Global Illumination Effects on the GPU
Z-Buffer Optimizations Patrick Cozzi Analytical Graphics, Inc.
Ray Tracing Outline For each pixel { Shoot ray r from eye to center of pixel with trace( r ) } function trace( r ) For each object { Find object with closest.
Some Things Jeremy Sugerman 22 February Jeremy Sugerman, FLASHG 22 February 2005 Topics Quick GPU Topics Conditional Execution GPU Ray Tracing.
CIS 310: Visual Programming, Spring 2006 Western State College 310: Visual Programming Ray Tracing.
Interactive k-D Tree GPU Raytracing Daniel Reiter Horn, Jeremy Sugerman, Mike Houston and Pat Hanrahan.
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
Shadow No, not the Hank Marvin kind!. Go to: ows.html ows.html.
Interactive Ray Tracing: From bad joke to old news David Luebke University of Virginia.
Ray Tracing and Photon Mapping on GPUs Tim PurcellStanford / NVIDIA.
COMP 175: Computer Graphics March 24, 2015
Computer graphics & visualization REYES Render Everything Your Eyes Ever Saw.
Realtime Caustics using Distributed Photon Mapping Johannes Günther Ingo Wald * Philipp Slusallek Computer Graphics Group Saarland University ( * now at.
Mapping Computational Concepts to GPUs Mark Harris NVIDIA Developer Technology.
Lecture 3 : Direct Volume Rendering Bong-Soo Sohn School of Computer Science and Engineering Chung-Ang University Acknowledgement : Han-Wei Shen Lecture.
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.
-Global Illumination Techniques
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
Cg Programming Mapping Computational Concepts to GPUs.
Week 2 - Friday.  What did we talk about last time?  Graphics rendering pipeline  Geometry Stage.
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,
Raytracing and Global Illumination Intro. to Computer Graphics, CS180, Fall 2008 UC Santa Barbara.
CS447/ Realistic Rendering -- Radiosity Methods-- Introduction to 2D and 3D Computer Graphics.
Computer graphics & visualization Photon Mapping.
Shadow Mapping Chun-Fa Chang National Taiwan Normal University.
Gene Au-yeung, Daniel Quach, Jeffrey Su, Albert Wang, Jessica Wang, David Woo.
Saarland University, Germany B-KD Trees for Hardware Accelerated Ray Tracing of Dynamic Scenes Sven Woop Gerd Marmitt Philipp Slusallek.
Interactive Rendering With Coherent Ray Tracing Eurogaphics 2001 Wald, Slusallek, Benthin, Wagner Comp 238, UNC-CH, September 10, 2001 Joshua Stough.
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
09/16/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Environment mapping Light mapping Project Goals for Stage 1.
- Laboratoire d'InfoRmatique en Image et Systèmes d'information
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
Monte-Carlo Ray Tracing and
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.
GPUs – Graphics Processing Units Applications in Graphics Processing and Beyond COSC 3P93 – Parallel ComputingMatt Peskett.
Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba.
From Turing Machine to Global Illumination Chun-Fa Chang National Taiwan Normal University.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Ray Tracing using Programmable Graphics Hardware
Ray Tracing by GPU Ming Ouhyoung. Outline Introduction Graphics Hardware Streaming Ray Tracing Discussion.
Global Illumination (3) Path Tracing. Overview Light Transport Notation Path Tracing Photon Mapping.
Postmortem: Deferred Shading in Tabula Rasa Rusty Koonce NCsoft September 15, 2008.
Image Fusion In Real-time, on a PC. Goals Interactive display of volume data in 3D –Allow more than one data set –Allow fusion of different modalities.
- Introduction - Graphics Pipeline
Photorealistic Rendering vs. Interactive 3D Graphics
Graphics Processing Unit
Real-Time Ray Tracing Stefan Popov.
Hybrid Ray Tracing of Massive Models
© University of Wisconsin, CS559 Fall 2004
Ray Tracing on Programmable Graphics Hardware
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
Presentation transcript:

1 Ray Tracing with Existing Graphics Systems Jeremy Sugerman, FLASHG 31 January 2006

2 Why Consider Tracing Rays? Some techniques are hard to mimic with rasterization. Shadows (arbitrary view visibility) Reflection, Refraction effects Global, Indirect Illumination

3 Why Now? Raytracing is getting fast enough to use interactively. New architectures seem potentially suited or not too far from being suited.

4 “Interactive”, Really? Intel MLTRA (SIGGRAPH 2005)  fps (20-36 MRays/sec) on one 3.2 GHz  Without MLTRA, still 7-12 fps / MRays/sec My toy SSE raytracer  About 2 MRays/sec (primary rays) ‘Quick Hack’ Cell system at SIGGRAPH  Claims fps / MRays/sec (unreviewed)

5 What about Rasterization? 60+ fps over 1024x768 on $99 GPUs Ray tracing would need 50+ MRays/sec casting primary rays alone. GPUs are getting faster at a phenomenal rate. Ray tracing is DOOMED!

6 It’s Not About Rasterization The vast majority of render time is actually shading in most 3D apps. True for offline rendering too. Whether fragments are rasterized or ray traced, shading is the same… To the extent the fragments are the same

7 And Who Traces Primary Rays? We want ray tracing for shadows, reflection/refraction, and indirect illumination. Those are all applications of secondary rays. The rasterizer already produces (x, y, z), normals, etc. from primary hits. Might as well rasterize them if you have a fast existing mechanism. It doesn’t matter.

8 Synthesis (Thesis + Antithesis) Bolt a ray tracer onto a conventional rasterization based system. Add a bit of ray tracer friendliness to a GPU. Or, wire together a Cell and a GPU (don’t tell Sony). Window systems (2D), text are rasterization tasks fundamentally (plus optional compositing)

9 “Ray Tracer Friendliness”? Ray tracing strongly favours threaded architectures over SIMD. Packet tracing leverages bandwidth at the cost of very simple horizontal communication. Being able to use queues / write buffers seems critical.

10 How Would It Work? Operate on ‘hits’  Analogous to fragments, plus weights Each hit feeds any of three (independent) shading choices  Gather rays  Shadowing and local lighting contribution  Secondary rays Each produces a colour and a weight which are accumulated into a final pixel colour

11 Shadowing And Local Lighting Effectively runs: Interpolate shading data (BRDF, Normal, etc.) Generate as many shadow rays as are desired Foreach shadow ray { If (shadow ray hits light) { Compute local light contribution from the light } Fits in the same per-fragment storage Shadow computations are indepedent

12 Gather and Secondary Rays Gather rays just perform a weighted lookup in a data structure (e.g. photon map) Secondary rays are generated based on the surface shading information (BRDF, Normal, …)  Hits are fed back into the same pipeline  Once generated, independent of parent

13 Kinda Like a GPU (If you squint) GPU shading just does the weighted local lighting calculation. But a fragment program can generate and trace shadow rays to mask local lighting And a fragment program can generate rays for final gathers. All this formulation does is expose parallelism and offer natural places to optimize hardware

14 I Saw You Palm That Card! Secondary rays are a bit harder to cram into a fragment program.  No variable output buffers  No recursion Once generated, secondary rays are completely independent.  Only need an unordered write buffer  No state, so recursion becomes iteration So start with only shadow and gather rays  Exact same system supports them, though

15 What About Coherence? Rasterization lie: Rasterization systems exploit coherence vastly better than ray tracing. Really means shading coherence  Coherence between fragments in texture lookups  Can bind a single material shader and rasterize only relevant geometry  Can perform (expensive!) shading math at a different resolution than visibility math.

16 Ray Tracing Is Coherent Too Packet tracing is useful because of visibility coherence. The same coherence is also somewhat relevant for local shading and lighting. Even, render only objects with the same material in each pass and z-cull.  Just as coherent as rasterization

17 Ray Tracing Is Coherent Too Packet tracing literature demonstrates ray coherence helps visibility most, but also shadow / secondary rays and shading. Rasterization systems save overdraw by rendering a depth-only pass before material shading with z-culling. The same technique works with rays!

18 Global Effects Are Incoherent Nearly by definition, indirect and inter- object shading effects are incoherent.  In rasterization or ray-traced systems! Packet tracing literature indicates secondary rays retain some coherence. Geometry level of detail can regain coherence.

19 Coherence: Bottom Line Without secondary rays, ray tracing shares the coherence characteristics of rasterization (modulo implementation). With secondary rays, ray tracing offers natural mechanisms for effects that are only awkwardly kludged via rasterization. Let the developer / director pick the tradeoff.

20 What Needs To Be Done? Persuade Pat to get a PS3 dev kit? Get a good ray tracer running on Cell and/or a GPU. Simulate various extensions  Cram code in fragment programs  Readback to the CPU for now  Readback to a Cell  Talk to the Smart Memories folks?  Talk to GPU vendors (unlikely, they’re busy folks)

21 What’s Behind the Curtain? K-d tree building and updates  But, Rasterization systems do this today K-d tree storage and bandwidth needs Hardware changes for traversing k-d trees or intersecting triangles  Unclear if it’s even necessary initially Level of detail with secondary rays Decoupling visibility and shading resolutions

22 Contributions and Inspirations Tim, Pat Gordon Stoll Bill Mark Phil Slusallek and the Saarland crew Tim Purcell, John Nickolls (NVIDIA)

23 Rasterization Lies Rasterization has coherence Ray tracing lacks. The rasterization argument goes: rasterize all the geometry of a given material and there’s excellent coherence of shading samples. Without secondary rays, ray tracing is the same. With secondary rays, you get better pictures. The programmer gets to choose.