Computer Graphics (Fall 2005) COMS 4160, Lecture 21: Ray Tracing

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
Computer Graphics In4/MSc Computer Graphics Lecture Notes #15 Illumination III View Independent Rendering.
Ray Tracing Ray Tracing 1 Basic algorithm Overview of pbrt Ray-surface intersection (triangles, …) Ray Tracing 2 Brute force: Acceleration data structures.
3D Graphics Rendering and Terrain Modeling
Part I: Basics of Computer Graphics
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Ray Tracing Variants Distributed ray tracing Generalized rays Cone Tracing Beam Tracing Pencil.
David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke
Christian Lauterbach COMP 770, 2/11/2009
CS 325 Introduction to Computer Graphics 04 / 09 / 2010 Instructor: Michael Eckmann.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Alla Sheffer Advanced Rendering Week.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 15: Ray Tracing/Global Illumination Ravi Ramamoorthi Slides.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Object-Order vs. Screen-Order Rendering April 24, 2003.
Computer Graphics (Fall 2005) COMS 4160, Lecture 16: Illumination and Shading 1
RAY TRACING.
(conventional Cartesian reference system)
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.
3D Graphics Processor Architecture Victor Moya. PhD Project Research on architecture improvements for future Graphic Processor Units (GPUs). Research.
Global Illumination May 7, Global Effects translucent surface shadow multiple reflection.
Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 14: Ray Tracing
1 7M836 Animation & Rendering Global illumination, ray tracing Arjan Kok
Ray Tracing 1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009.
Lecture 8 Advanced Rendering – Ray Tracing, Radiosity & NPR.
CSCE 641: Computer Graphics Ray Tracing Jinxiang Chai.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 2: Basic Ray Tracing Ravi Ramamoorthi Some slides courtesy.
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Other Rendering Techniques Types of rendering – Wireframe techniques – Scan-line conversion – Reyes.
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
Advanced Rendering University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
COMP 175: Computer Graphics March 24, 2015
Computer Graphics Panos Trahanias ΗΥ358 Spring 2009.
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.
Ray Tracing Sang Il Park SEjong University With lots of slides stolen from Jehee Lee, Doug James, Steve Seitz, Shree Nayar, Alexei Efros, Fredo Durand.
Ray Tracing Chapter CAP4730: Computational Structures in Computer Graphics.
Ray Tracing Jian Huang, CS 594, Fall, 2002 This set of slides are used at Ohio State by Prof. Roger Crawfis.
Foundations of Computer Graphics (Spring 2012) CS 184, Lectures 16, 18: Nuts and bolts of Ray Tracing Acknowledgements:
1 Dr. Scott Schaefer Ray Tracing. 2/42 Ray Tracing Provides rendering method with  Refraction/Transparent surfaces  Reflective surfaces  Shadows.
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
CS559: Computer Graphics Lecture 36: Animation Li Zhang Spring 2008 Slides from Brian Curless at U of Washington.
Global Illumination. Local Illumination  the GPU pipeline is designed for local illumination  only the surface data at the visible point is needed to.
第五课 Ray Tracing. Overview of the Section Why Ray Tracing? What is Ray Tracing? How to tracing rays? How to accelerating ray-tracing?
Monte-Carlo Ray Tracing and
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.
Advanced topics Advanced Multimedia Technology: Computer Graphics Yung-Yu Chuang 2006/01/04 with slides by Brian Curless, Zoran Popovic, Mario Costa Sousa.
CSCE 441: Computer Graphics Ray Tracing
CS559: Computer Graphics Final Review Li Zhang Spring 2010.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
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.
David Luebke3/12/2016 Advanced Computer Graphics Lecture 3: More Ray Tracing David Luebke
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 36: Ray Tracing.
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
Lecture 36: Animation Li Zhang Spring 2008
Ray Tracing Dr. Scott Schaefer.
3D Graphics Rendering PPT By Ricardo Veguilla.
© University of Wisconsin, CS559 Fall 2004
Visibility Computations
COMP 575/770 Review Session May 4, 2016.
CSCE 441: Computer Graphics Ray Tracing
Presentation transcript:

Computer Graphics (Fall 2005) COMS 4160, Lecture 21: Ray Tracing

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

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

Outline  History  Basic Ray Casting (instead of rasterization)  Comparison to hardware scan conversion  Shadows / Reflections (core algorithm)  Ray-Surface Intersection  Optimizations  Current Research Section 10 in text

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

Outline  History  Basic Ray Casting (instead of rasterization)  Comparison to hardware scan conversion  Shadows / Reflections (core algorithm)  Ray-Surface Intersection  Optimizations  Current Research

Ray Casting Produce same images as with OpenGL  Visibility per pixel instead of Z-buffer  Find nearest object by shooting rays into scene  Shade it as in standard OpenGL Section in text (we show visually, omitting math)

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)

Comparison to hardware scan-line  Per-pixel evaluation, per-pixel rays (not scan-convert each object). On face of it, costly  But good for walkthroughs of extremely large models (amortize preprocessing, low complexity)  More complex shading, lighting effects possible

Outline  History  Basic Ray Casting (instead of rasterization)  Comparison to hardware scan conversion  Shadows / Reflections (core algorithm)  Ray-Surface Intersection  Optimizations  Current Research

Shadows Virtual Viewpoint Virtual ScreenObjects 10.5 in textbook 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 10.6 in textbook 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 Also see section 10.4 in text

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 Not discussed but possible with distribution ray tracing (10.11) Hard (but not impossible) with ray tracing; radiosity methods

Outline  History  Basic Ray Casting (instead of rasterization)  Comparison to hardware scan conversion  Shadows / Reflections (core algorithm)  Ray-Surface Intersection  Optimizations  Current Research

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  Triangle, sphere, polygon, general implicit surface Section 10.3

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 Section 10.8 of text

Outline  History  Basic Ray Casting (instead of rasterization)  Comparison to hardware scan conversion  Shadows / Reflections (core algorithm)  Ray-Surface Intersection  Optimizations  Current Research

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 Section 10.9 goes into more detail, we just discuss some approaches at high level

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

Outline  History  Basic Ray Casting (instead of rasterization)  Comparison to hardware scan conversion  Shadows / Reflections (core algorithm)  Ray-Surface Intersection  Optimizations  Current Research

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]