CSCE 641: Computer Graphics Ray Tracing Jinxiang Chai.

Slides:



Advertisements
Similar presentations
GR2 Advanced Computer Graphics AGR
Advertisements

13.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 13 An Introduction to Ray Tracing.
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Lecture 14 Illumination II – Global Models
Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity.
Light Issues in Computer Graphics Presented by Saleema Amershi.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
Course Website: Computer Graphics 18: Ray-tracing.
Christian Lauterbach COMP 770, 2/11/2009
CS 325 Introduction to Computer Graphics 04 / 09 / 2010 Instructor: Michael Eckmann.
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 21: Ray Tracing
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.
Parallelizing Raytracing Gillian Smith CMPE 220 February 19 th, 2008.
Global Illumination May 7, Global Effects translucent surface shadow multiple reflection.
Photorealism Reflection, Refraction Bump maps
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 14: Ray Tracing
Ray Tracing Jerry Sui Adam Conner. Part I – Introduction to Ray Tracing Final Product.
1 7M836 Animation & Rendering Global illumination, ray tracing Arjan Kok
CS 376 Introduction to Computer Graphics 04 / 04 / 2007 Instructor: Michael Eckmann.
Ray Tracing 1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009.
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
Lecture 8 Advanced Rendering – Ray Tracing, Radiosity & NPR.
CSCE 441 Computer Graphics: Radiosity Jinxiang Chai.
Real-Time Ray Tracing 3D Modeling of the Future Marissa Hollingsworth Spring 2009.
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination.
Cornell CS465 Fall 2004 Lecture 3© 2004 Steve Marschner 1 Ray Tracing CS 465 Lecture 3.
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.
Reflections Specular reflection is the perfect reflection of light from a surface. The law a reflection states that the direction of the incoming ray and.
Project Raytracing. Content Goals Idea of Raytracing Ray Casting – Therory – Practice Raytracing – Theory – Light model – Practice Output images Conclusion.
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.
David Luebke10/9/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
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.
1 Dr. Scott Schaefer Ray Tracing. 2/42 Ray Tracing Provides rendering method with  Refraction/Transparent surfaces  Reflective surfaces  Shadows.
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
Computer graphics & visualization Photon Mapping.
I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam, John Alex October 28, 2003 Raytracing 1/42 Raytracing Basics Part 2 of 2.
1 Ray-Tracing ©Anthony Steed Overview n Recursive Ray Tracing n Shadow Feelers n Snell’s Law for Refraction n When to stop!

Recursion and Data Structures in Computer Graphics Ray Tracing 1.
Basic Ray Tracing CMSC 435/634.
CS380: Computer Graphics Distributed Ray Tracing TA Course URL:
Ray-tracing.
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
CS 445 / 645 Introduction to Computer Graphics Lecture 16 Lighting Lighting.
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
CS 325 Introduction to Computer Graphics 04 / 07 / 2010 Instructor: Michael Eckmann.
CSL 859: Advanced Computer Graphics Dept of Computer Sc. & Engg. IIT Delhi.
CS552: Computer Graphics Lecture 36: Ray Tracing.
Introduction to Ray Tracing Dr. B. Raghu Professor /CSE Sri Ramanujar Engineering College.
Basic Ray Tracing CMSC 435/634.
Photorealistic Rendering vs. Interactive 3D Graphics
Ray Tracing Dr. Scott Schaefer.
© University of Wisconsin, CS559 Fall 2004
CSCE 441 Computer Graphics: Radiosity
CS5500 Computer Graphics May 29, 2006
CSCE 441: Computer Graphics Ray Tracing
GR2 Advanced Computer Graphics AGR
Presentation transcript:

CSCE 641: Computer Graphics Ray Tracing Jinxiang Chai

Ray Tracing Provides rendering method with Refraction/Transparent surfaces Reflective surfaces Shadows Image taken from

Ray Tracing Provides rendering method with Refraction/Transparent surfaces Reflective surfaces Shadows Image taken from Any difference for rendering three pixels?

Local Illumination vs. Ray Tracing

Ray Tracing Results Click herehere

Overview Ray Tracing Algorithm Shadows, Reflection, Refraction Surface Intersection Infinite planes, spheres, polygons Optimizations

Essential Information for Ray Tracing Eye point Screen position/orientation Objects Material properties Reflection/Refraction coefficients Index of refraction Light sources

Ray Tracing Assumption The illumination of a point is determined by - illumination/shadow ray (direct lighting from light sources)

Ray Tracing Assumption The illumination of a point is determined by - illumination/shadow ray (direct lighting from light sources)

Ray Tracing Assumption The illumination of a point is determined by - illumination/shadow ray (direct lighting from light sources) - reflection ray (light reflected by an object)

Ray Tracing Assumption The illumination of a point is determined by - illumination/shadow ray (direct lighting from light sources) - reflection ray (light reflected by an object) - transparent ray (light passing through an object)

Ray Tracing Assumption The illumination of a point is determined by - illumination/shadow ray (direct lighting from light sources) - reflection ray (light reflected by an object) - transparent ray (light passing through an object)

Ray Tracing Assumption The illumination of a point is determined by - illumination/shadow ray (direct lighting from light sources) - reflection ray (light reflected by an object) - transparent ray (light passing through an object)

Illumination / Shadow Rays A ray is cast from an object’s surface towards a light. If the light is not occluded, then the light contributes to the object’s surface color. If the light is occluded, then the light does not contribute to the object’s surface color. If ray hits a semi-transparent object, scale the contribution of that light and continue to look for intersections Occluder Pixels

Reflected Rays A ray is cast from the surface of an object based on its material properties. The contribution results in the specular reflection.

Transparency/transmission/refracted Rays Some objects are transparent or translucent. The transmitted light also contributes to the surface color, called specular transmission. The ray can be refracted based on the object’s composition.

Recursive Ray Tracing L1 L2

Recursive Ray Tracing L1 L2

Recursive Ray Tracing L1 L2

Recursive Ray Tracing L1 L2

Recursive Ray Tracing L1 L2

Recursive Ray Tracing L1 L2

Recursive Ray Tracing L1 L2

Recursive Ray Tracing L1 L2

Recursive Ray Tracing L1 L2

Recursive Ray Tracing L1 L2 What are real light paths?

Recursive Ray Tracing and Light path L1 L2 Ray tracing paths just reverses real light paths!

Recursive Ray Tracing and Light path L1 L2 Ray tracing paths just reverses real light paths!

Recursive Ray Tracing and Light path L1 L2 Ray tracing paths just reverses real light paths!

Recursive Ray Tracing and Light path L1 L2 Ray tracing paths just reverses real light paths!

Recursive Ray Tracing and Light path L1 L2 Ray tracing paths just reverses real light paths!

Recursive Ray Tracing and Light path L1 L2 Ray tracing paths just reverses real light paths!

Ray Tree Object 1L2 Shadow of Obj 4 Object 3 Reflection L2 L1 Object 2 Transmission Reflection L2 L1 Eye

Recursive Ray Tracing For each pixel Intersect ray from eye through pixel with all objects in scene Find closest (positive) intersection to eye Compute lighting at intersection point Recur for reflected and refracted rays (if necessary)

Recursive Ray Tracing

Termination Criterion 1. The ray intersects no surfaces 2. The ray intersects a light source that is not a reflecting surface 3. The tree has been generated to its maximum allowable depth.

Three Issues Ray-object intersection - hidden surface removal Reflection direction - mirror direction Refraction direction - Snell’s law

Ray-object Intersection eye screen Similar to ray casting!

Ray-object Intersection eye screen Similar to ray casting! But how to determine the intersection point between a ray and an object such as sphere or triangle?

Ray Casting Implementation - Parameterize each ray as - Each object O k returns t k >0 such that first intersection with o k occurs at r(t k ) - Q: given the set {t k }, what is the first intersection point?

Ray-Sphere Intersection

Ray-Triangle Intersection First, intersection ray with plane Then, check if point is in triangle

Ray-Plane Intersection

Ray-Triangle Intersection Check if point is inside triangle algebraically For each side of triangle 0 0

Reflection Mirror-like/Shiny objects Surface

Refraction Bending of light caused by different speeds of light in different medium Each (semi-)transparent object has an index of refraction n i Use Snell’s law to find refracted vector Image taken from

Snell’s Law Surface

How to compute Transmission Ray? Surface n1n1 n2n2

Snell’s Law Surface

Snell’s Law Surface

Snell’s Law Surface

Snell’s Law Surface

Snell’s Law Surface

Snell’s Law Surface

Snell’s Law Surface

Snell’s Law Surface

Snell’s Law Surface

Snell’s Law Surface

Snell’s Law Surface

Recursive Ray Tracing Recur for reflective/transparent objects

Recursive Ray Tracing Recur for reflective/transparent objects

Optimizations Lots of rays to cast! Ray-Surface intersections are expensive Associate with each object Bounding box in 3-space If ray doesn’t intersect box, then ray doesn’t intersect object

Parallel Processing Ray tracing is a trivially parallel algorithm! Cast rays in parallel Cast reflection, refraction, shadow rays in parallel Calculate ray/surface intersections independently in parallel

Ray Tracing Results: Special Effects Copyright Newline Cinema

Ray Tracing Results: Video Games

Ray Tracing Results: Massive Models

Pros and Cons of Ray Tracing Advantages of ray tracing All the advantages of the local illumination model Also handles shadows, reflection, and refraction Disadvantages of ray tracing Computational expense No diffuse inter-reflection between surfaces (i.e., color bleeding) Not physically accurate Other techniques exist to handle these shortcomings, at even greater expense!

Ray Tracing References Peter Shirley, “Realistic Ray Tracing”, ISBN Andrew Glassner, “An Introduction to Ray Tracing”, ISBN Steve Pettifer ( Anselmo Lastra ( Paul Rademacher ( Mark Harris ( Kenny Hoff ( POV-Ray (