Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 15: Ray Tracing/Global Illumination Ravi Ramamoorthi Slides.

Slides:



Advertisements
Similar presentations
1 05/10/2014 Computer Graphics Lecture 10 Global Illumination 1: Ray Tracing and Radiosity Taku Komura.
Advertisements

Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Lecture 14 Illumination II – Global Models
Advanced Computer Graphics
Illumination Models Radiosity Chapter 14 Section 14.7 Some of the material in these slides may have been adapted from University of Virginia, MIT, Colby.
David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke
Advanced Computer Graphics (Spring 2005) COMS 4162, Lectures 18, 19: Monte Carlo Integration Ravi Ramamoorthi Acknowledgements.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Alla Sheffer Advanced Rendering Week.
CSCE 641: Photon Mapping Jinxiang Chai. Outline Rendering equation Photon mapping.
Computer Graphics (Fall 2005) COMS 4160, Lecture 16: Illumination and Shading 1
Computer Graphics (Spring 2008) COMS 4160, Lecture 20: Illumination and Shading 2
Advanced Computer Graphics (Fall 2009) CS , Lecture 1: Introduction and History Ravi Ramamoorthi Some.
Computer Graphics (Fall 2005) COMS 4160, Lecture 21: Ray Tracing
CSCE 641: Computer Graphics Ray Tracing Jinxiang Chai.
Ray Casting Ray-Surface Intersections Barycentric Coordinates Reflection and Transmission [Shirley, Ch.9] Ray Tracing Handouts Ray Casting Ray-Surface.
1/12/09 1 Introduction Computer Graphics COMP 770 (236) Spring 2009 Instructor: Dinesh Manocha.
Interreflections and Radiosity : The Forward Problem Lecture #11 Thanks to Kavita Bala, Pat Hanrahan, Doug James, Ledah Casburn.
3D Graphics Processor Architecture Victor Moya. PhD Project Research on architecture improvements for future Graphic Processor Units (GPUs). Research.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 10: Global Illumination Ravi Ramamoorthi Some images courtesy.
Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2
Global Illumination May 7, Global Effects translucent surface shadow multiple reflection.
7M836 Animation & Rendering
Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 14: Ray Tracing
1 7M836 Animation & Rendering Global illumination, ray tracing Arjan Kok
Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity
Computer Graphics (Spring 2008) COMS 4160, Lecture 22: Global Illumination
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 2: Basic Ray Tracing Ravi Ramamoorthi Some slides courtesy.
CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination.
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
COMP 175: Computer Graphics March 24, 2015
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
12/05/02(c) 2002 University of Wisconsin Last Time Subdivision techniques for modeling Very brief intro to global illumination.
-Global Illumination Techniques
CS 376 Introduction to Computer Graphics 04 / 16 / 2007 Instructor: Michael Eckmann.
Ray Tracing Chapter CAP4730: Computational Structures in Computer Graphics.
Foundations of Computer Graphics (Spring 2012) CS 184, Lectures 16, 18: Nuts and bolts of Ray Tracing Acknowledgements:
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
Real-Time High Quality Rendering CSE 291 [Winter 2015], Lecture 2 Graphics Hardware Pipeline, Reflection and Rendering Equations, Taxonomy of Methods
CS559: Computer Graphics Lecture 36: Animation Li Zhang Spring 2008 Slides from Brian Curless at U of Washington.
04/30/02(c) 2002 University of Wisconsin Last Time Subdivision techniques for modeling We are now all done with modeling, the standard hardware pipeline.
Global Illumination: Radiosity, Photon Mapping & Path Tracing Rama Hoetzlein, 2009 Lecture Notes Cornell University.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
Global Illumination. Local Illumination  the GPU pipeline is designed for local illumination  only the surface data at the visible point is needed to.
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.
CS559: Computer Graphics Lecture 28: Ray Tracing Li Zhang Spring 2010 Slides are from Ravi Ramamoorthi’s graphics class at Columbia U.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
CSCE 441: Computer Graphics Ray Tracing
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Path Tracing Algorithms K. H. Ko School of Mechatronics Gwangju.
Global Illumination (3) Photon Mapping (1). Overview Light Transport Notation Path Tracing Photon Mapping –Photon Tracing –The Photon Map.
RENDERING : Global Illumination
CSE 681 Introduction to Ray Tracing. CSE 681 Ray Tracing Shoot a ray through each pixel; Find first object intersected by ray. Image plane Eye Compute.
Global Illumination (3) Path Tracing. Overview Light Transport Notation Path Tracing Photon Mapping.
CS559: Computer Graphics Lecture 27: Animation, Depth & Motion Blur, Ray Tracing Li Zhang Spring 2010 Slides from Brian Curless at U of Washington.
CS559: Computer Graphics Lecture 27: Animation, Depth & Motion Blur, Ray Tracing Li Zhang Spring 2010 Slides from Brian Curless at U of Washington.
CS552: Computer Graphics Lecture 33: Illumination and Shading.
CS552: Computer Graphics Lecture 36: Ray Tracing.
Computer Graphics (Fall 2004) COMS 4160, Lecture 25: Summary and Preview
Advanced Computer Graphics
Advanced Computer Graphics
Advanced Computer Graphics
Computer Graphics CSE 167 [Win 17], Lectures 16, 17:
CSE 167 [Win 17], Lecture 15: Ray Tracing Ravi Ramamoorthi
Photorealistic Rendering vs. Interactive 3D Graphics
Sampling and Reconstruction of Visual Appearance
The Rendering Equation
Foundations of Computer Graphics (Spring 2012)
OPTICS III, IV: Global Illumination
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
Presentation transcript:

Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 15: Ray Tracing/Global Illumination Ravi Ramamoorthi Slides adapted from unit 5 (lectures 21-22) of COMS 4160

To Do Enjoy spring break!!  If you want, you can work on raytracer/project during break, but this is not required

Course Outline  3D Graphics Pipeline Rendering (Creating, shading images from geometry, lighting, materials) Modeling (Creating 3D Geometry)

Course Outline  3D Graphics Pipeline Rendering (Creating, shading images from geometry, lighting, materials) Modeling (Creating 3D Geometry) Unit 1: Foundations of Signal and Image Processing Understanding the way 2D images are formed and displayed, the important concepts and algorithms, and to build an image processing utility like Photoshop Weeks 1 – 3. Assignment 1 due Feb 15 Unit 2: Meshes, Modeling Weeks 4 – 6. Ass 2 due Mar 10 Unit 3: Ray Tracing Weeks 7 – 9. Ass 3 due Apr 12

This lecture  High-level overview and summary of ray tracing / global illumination (from 4160)  After spring break: technical details of writing a ray tracer for assignment 3 and more advanced topics Chapters and 16 are useful background, although they don’t follow treatment here

Effects needed for Realism  (Soft) Shadows  Reflections (Mirrors and Glossy)  Transparency (Water, Glass)  Interreflections (Color Bleeding)  Complex Illumination (Natural, Area Light)  Realistic Materials (Velvet, Paints, Glass)  And many more

Image courtesy Paul Heckbert 1983

Outline  Ray Tracing  Global Illumination and Rendering Equation

Ray Tracing: History  Appel 68  Whitted 80 [recursive ray tracing]  Landmark in computer graphics  Lots of work on various geometric primitives  Lots of work on accelerations  Current Research  Real-Time raytracing (historically, slow technique)  Ray tracing architecture

Ray Tracing  Different Approach to Image Synthesis as compared to Hardware pipeline (OpenGL)  Pixel by Pixel instead of Object by Object  Easy to compute shadows/transparency/etc Demo applet:

Ray Casting Virtual Viewpoint Virtual ScreenObjects Ray misses all objects: Pixel colored blackRay intersects object: shade using color, lights, materialsMultiple intersections: Use closest one (as does OpenGL)

Shadows Virtual Viewpoint Virtual ScreenObjects Light Source Shadow ray to light is unblocked: object visibleShadow ray to light is blocked: object in shadow

Shadows: Numerical Issues Numerical inaccuracy may cause intersection to be below surface (effect exaggerated in figure) Causing surface to incorrectly shadow itself Move a little towards light before shooting shadow ray

Mirror Reflections/Refractions Virtual Viewpoint Virtual ScreenObjects Generate reflected ray in mirror direction, Get reflections and refractions of objects

Recursive Ray Tracing For each pixel  Trace Primary Eye Ray, find intersection  Trace Secondary Shadow Ray(s) to all light(s)  Color = Visible ? Illumination Model : 0 ;  Trace Reflected Ray  Color += reflectivity * Color of reflected ray

Problems with Recursion  Reflection rays may be traced forever  Generally, set maximum recursion depth  Same for transmitted rays (take refraction into account)

Turner Whitted 1980

Effects needed for Realism (Soft) Shadows Reflections (Mirrors and Glossy) Transparency (Water, Glass) Interreflections (Color Bleeding) Complex Illumination (Natural, Area Light) Realistic Materials (Velvet, Paints, Glass) Discussed in this lecture so far Not discussed but possible with distribution ray tracing Hard (but not impossible) with ray tracing; radiosity methods

Ray/Object Intersections  Heart of Ray Tracer  One of the main initial research areas  Optimized routines for wide variety of primitives  Various types of info  Shadow rays: Intersection/No Intersection  Primary rays: Point of intersection, material, normals  Texture coordinates  Work out examples in next lecture  Triangle, sphere, polygon, general implicit surface

Ray-Tracing Transformed Objects We have an optimized ray-sphere test  But we want to ray trace an ellipsoid… Solution: Ellipsoid transforms sphere  Apply inverse transform to ray, use ray-sphere  Allows for instancing (traffic jam of cars) Mathematical details worked out in class

Acceleration Testing each object for each ray is slow  Fewer Rays Adaptive sampling, depth control  Generalized Rays Beam tracing, cone tracing, pencil tracing etc.  Faster Intersections  Optimized Ray-Object Intersections  Fewer Intersections

Acceleration Structures Bounding boxes (possibly hierarchical) If no intersection bounding box, needn’t check objects Bounding Box Ray Spatial Hierarchies (Oct-trees, kd trees, BSP trees)

Acceleration Structures: Grids

Interactive Raytracing  Ray tracing historically slow  Now viable alternative for complex scenes  Key is sublinear complexity with acceleration; need not process all triangles in scene  Allows many effects hard in hardware  OpenRT project real-time ray tracing (

Raytracing on Graphics Hardware  Modern Programmable Hardware general streaming architecture  Can map various elements of ray tracing  Kernels like eye rays, intersect etc.  In vertex or fragment programs  Convergence between hardware, ray tracing [Purcell et al. 2002, 2003]

Outline  Ray Tracing  Global Illumination and Rendering Equation

Global Illumination Diffuse interreflection, color bleeding [Cornell Box]

Global Illumination Caustics: Focusing through specular surface Major research effort in 80s, 90s till today

Reflectance Equation (review) Reflected Light (Output Image) Emission Incident Light (from light source) BRDF Cosine of Incident angle

Reflectance Equation (review) Reflected Light (Output Image) Emission Incident Light (from light source) BRDF Cosine of Incident angle Sum over all light sources

Reflectance Equation (review) Reflected Light (Output Image) Emission Incident Light (from light source) BRDF Cosine of Incident angle Replace sum with integral

Global Illumination Reflected Light (Output Image) Emission Reflected Light (from surface) BRDF Cosine of Incident angle Surfaces (interreflection)

Rendering Equation Reflected Light (Output Image) Emission Reflected Light BRDF Cosine of Incident angle Surfaces (interreflection) UNKNOWN KNOWN

Rendering Equation (Kajiya 86)

Rendering Equation as Integral Equation Reflected Light (Output Image) Emission Reflected Light BRDF Cosine of Incident angle UNKNOWN KNOWN Is a Fredholm Integral Equation of second kind [extensively studied numerically] with canonical form Kernel of equation

Linear Operator Equation Kernel of equation Light Transport Operator Can be discretized to a simple matrix equation [or system of simultaneous linear equations] (L, E are vectors, K is the light transport matrix)

Ray Tracing and extensions –General class numerical Monte Carlo methods –Approximate set of all paths of light in scene Binomial Theorem

Ray Tracing Emission directly From light sources Direct Illumination on surfaces Global Illumination (One bounce indirect) [Mirrors, Refraction] (Two bounce indirect) [Caustics etc]

Ray Tracing Emission directly From light sources Direct Illumination on surfaces Global Illumination (One bounce indirect) [Mirrors, Refraction] (Two bounce indirect) [Caustics etc] OpenGL Shading

Rendering Equation Reflected Light (Output Image) Emission Reflected Light BRDF Cosine of Incident angle Surfaces (interreflection) UNKNOWN KNOWN

Change of Variables Integral over angles sometimes insufficient. Write integral in terms of surface radiance only (change of variables)

Change of Variables Integral over angles sometimes insufficient. Write integral in terms of surface radiance only (change of variables)

Rendering Equation: Standard Form Integral over angles sometimes insufficient. Write integral in terms of surface radiance only (change of variables) Domain integral awkward. Introduce binary visibility fn V Same as equation 2.52 Cohen Wallace. It swaps primed And unprimed, omits angular args of BRDF, - sign. Same as equation above 16.3 in Shirley, except he has no emission, slightly diff. notation