1 Ray-Tracing ©Anthony Steed 2001-2003. 2 Overview n Recursive Ray Tracing n Shadow Feelers n Snell’s Law for Refraction n When to stop!

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
Advanced Effects CMSC 435/634. General Approach Ray Tracing – Shoot more rays Rasterization – Render more images.
Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity.
May Visible Surface Detection Shmuel Wimer Bar Ilan Univ., Eng. Faculty Technion, EE Faculty.
Advanced Ray Tracing CMSC 435/634. Basic Ray Tracing For each pixel – Compute ray direction – Find closest surface – For each light Compute direct illumination.
David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke
Light Issues in Computer Graphics Presented by Saleema Amershi.
1. What is Lighting? 2 Example 1. Find the cubic polynomial or that passes through the four points and satisfies 1.As a photon Metal Insulator.
Illumination Model & Surface-rendering Method 박 경 와.
Course Website: Computer Graphics 18: Ray-tracing.
Ray Tracing Tutorial. Ray Casting One type of visibility algorithm.
CS 325 Introduction to Computer Graphics 04 / 09 / 2010 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 04 / 09 / 2007 Instructor: Michael Eckmann.
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.
1 Lecture 9 Lighting Light Sources Reflectance Camera Models.
Ray Tracing Jerry Sui Adam Conner. Part I – Introduction to Ray Tracing Final Product.
Ray Tracing CS Nov. 19, Turner Whitted.
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 Ray Tracing Jinxiang Chai.
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.
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
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 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.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Ray Tracing.
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 PROJECT ON CUSTOM RAY TRACING ENGINE InterLight3D by Mehshan Mustafa ( ) Muhammad Zaki Shaheen ( )
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.
Basic Ray Tracing CMSC 435/634.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
Ray-tracing.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
In the name of God Computer Graphics. Last Time Some techniques for modeling Today Global illumination and raytracing.
Project 3 Help Session: Ray Tracing. Getting Started Download the starter pack. 1.sample_ray.exe 2.ray-skel directory 3.scenes directory Look at the Road.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Path Tracing Algorithms K. H. Ko School of Mechatronics Gwangju.
CS 445 / 645 Introduction to Computer Graphics Lecture 16 Radiosity Radiosity.
1. Ray Casting Surface intersection Visible surface detection Ray Tracing Bounce the ray Collecting intensity Technique for global reflection and transmission.
Global Illumination (3) Path Tracing. Overview Light Transport Notation Path Tracing Photon Mapping.
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 33: Illumination and Shading.
Light. Intensity calculation = wavelength I( ) = wavelength intensity of light reaching eye I( ) = I diff ( ) + I spec ( ) + I refl ( ) + I trans ( )
CS552: Computer Graphics Lecture 36: Ray Tracing.
Review Ray Tracing III Review. Pseudo codes RayCast-1  Plain ray caster (direct illumination) RayCast-2  RayCast-1 + shadow rays RayTrace-1  Recursive.
Computer Graphics: Illumination
Basic Ray Tracing CMSC 435/634.
RAY TRACING.
© University of Wisconsin, CS559 Fall 2004
Ray Tracing.
Lighting.
Reflection and Refraction
Image synthesis using classical optics
CS5500 Computer Graphics May 29, 2006
Advanced Computer Graphics
CSCE 441: Computer Graphics Ray Tracing
GR2 Advanced Computer Graphics AGR
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
Reflection and Refraction
Reflection and Refraction
Presentation transcript:

1 Ray-Tracing ©Anthony Steed

2 Overview n Recursive Ray Tracing n Shadow Feelers n Snell’s Law for Refraction n When to stop!

3 Recap: Light Transport

4 Recap: Local Illumination n Ambient, diffuse & specular components n The sum is over the specular and diffuse components for each light

5 Recap: Result of Ray Casting

6 Correcting for Non-Visible Lights E N H L surface

7 n Where Sj is the result of intersecting the ray L with the scene objects n Note consider your intersection points along the ray L carefully Hint – they might be beyond the light!

8 Result of Shadow Feeler

9 Recursive Ray-Tracing n We can simulate specular-specular transmission elegantly by recursing and casting secondary rays from the intersection points n We must obviously chose a termination depth to cope with multiple reflections

10 Introducing Reflection n Where E N H L surface R

11 Computing Reflectance n Where I local is computed as before n Ray r' is formed from intersection point and the direction R and is cast into the scene as before

12 Psuedo Code Color RayTrace(Point p, Vector D, int depth) { Point pd /* Intersection point */ Boolean intersection if (depth > MAX) return Black intersect(p,direction, &pd, &intersection) if (!intersection) return Background I local = k a I a + I p.v.(k d (n.l) + k s.(h.n) m ) return I local + k r *RayTrace(pd, R, depth+1) } Normally k r = k s

13 Result of Recursion

14 Perfect Specular Transmission N H L E T R α Snell’s Law η is index of refraction β

15 Using Snell’s Law n Using this law it is possible to show that: n Note that if the root is negative then total internal reflection has occurred and you just reflect the vector as normal

16 New Psuedo Code Color RayTrace(Point p, Vector D, int depth) { Point pd /* Intersection point */ Boolean intersection if (depth > MAX) return Black intersect(p,direction, &pd, &intersection) if (!intersection) return Background I local = k a I a + I p.v.(k d (n.l) + k s.(h.n) m ) return I local + k r *RayTrace(pd, R, depth+1) + k t *RayTrace(pd, T, depth+1) }

17 Direct Specular Transmission n A transparent surface can be illuminated from behind and this should be calculated in I local N H'H' L E

18 Calculating H' n Use H‘ instead of H in specular term

19 Putting Everything Together

20 Discussion – What Can’t We Simulate?

21 Summary n Recursive ray tracing is a good simulation of specular reflections n We’ve seen how the ray-casting can be extended to include shadows, reflections and transparent surfaces n However this is a very slow process and still misses some types of effect!