CS348B Lecture 2 Pat Hanrahan, Spring Greeks: Do light rays proceed from the eye to the light, or from the light to the eye?

Similar documents
Ray Tracing I: Basics

Computer Graphics. - Ray Tracing I - Marcus Magnor Philipp Slusallek. Computer Graphics WS05/06 Ray Tracing I

Intro to Ray-Tracing & Ray-Surface Acceleration

Computer Graphics. - Introduction to Ray Tracing - Philipp Slusallek

CS770/870 Spring 2017 Ray Tracing Implementation

Questions??? Announcements Assignment 3 due today

1999, Denis Zorin. Ray tracing

Ray Tracing. Foley & Van Dam, Chapters 15 and 16

Ray Tracing Foley & Van Dam, Chapters 15 and 16

Ray scene intersections

Reading. Ray Tracing. Eye vs. light ray tracing. Geometric optics. Required: Watt, sections , (handout) Further reading:

Robust Ray Intersection with Interval Arithmetic

Ray casting. Ray casting/ray tracing

Ray Tracing I. Internet Raytracing Competition

Supplement to Lecture 16

Ray Tracing. Shandong University

Ray Tracing I. History

Curve and Surface Basics

Surfaces. Ron Goldman Department of Computer Science Rice University

Reading. Ray Tracing. Eye vs. light ray tracing. Geometric optics. Required:

Accelerating Ray-Tracing

Sung-Eui Yoon ( 윤성의 )

Robust Ray Intersection with Interval Arithmetic. Don P. Mitchell. AT &T Bell Laboratories Murray Hill, NJ 07974

Ray Tracing. Outline. Ray Tracing: History

Ray Tracing Basics I. Computer Graphics as Virtual Photography. camera (captures light) real scene. photo. Photographic print. Photography: processing

Geometric Queries for Ray Tracing

Introduction Ray tracing basics Advanced topics (shading) Advanced topics (geometry) Graphics 2010/2011, 4th quarter. Lecture 11: Ray tracing

Ray tracing. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/19/07 1

Effects needed for Realism. Ray Tracing. Ray Tracing: History. Outline. Foundations of Computer Graphics (Spring 2012)

Curves and Surfaces Computer Graphics I Lecture 10

CS354 Computer Graphics Ray Tracing. Qixing Huang Januray 24th 2017

Computer Graphics and Image Processing Ray Tracing I

Lecture 11. More Ray Casting/Tracing

Lecture 11: Ray tracing (cont.)

Implicit Surfaces & Solid Representations COS 426

Outline The Refraction of Light Forming Images with a Plane Mirror 26-3 Spherical Mirror 26-4 Ray Tracing and the Mirror Equation

Curves and Surfaces Computer Graphics I Lecture 9

Geometric optics. The University of Texas at Austin CS384G Computer Graphics Don Fussell

Motivation. Sampling and Reconstruction of Visual Appearance. Effects needed for Realism. Ray Tracing. Outline

Ray Tracing. CS334 Fall Daniel G. Aliaga Department of Computer Science Purdue University

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Ray Tracing. CPSC 453 Fall 2018 Sonny Chan

SUMMARY. CS380: Introduction to Computer Graphics Ray tracing Chapter 20. Min H. Kim KAIST School of Computing 18/05/29. Modeling

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

Lecture 25: Bezier Subdivision. And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10

Advanced 3D-Data Structures

COMP 175 COMPUTER GRAPHICS. Ray Casting. COMP 175: Computer Graphics April 26, Erik Anderson 09 Ray Casting

3D Rendering and Ray Casting

CPSC GLOBAL ILLUMINATION

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

Last week. Machiraju/Zhang/Möller

AP CALCULUS BC 2014 SCORING GUIDELINES

Ray Tracing. Brian Curless CSEP 557 Fall 2016

Recursive Ray Tracing. Ron Goldman Department of Computer Science Rice University

CSG obj. oper3. obj1 obj2 obj3. obj5. obj4

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project

CS 563 Advanced Topics in Computer Graphics. by Emmanuel Agu

From curves to surfaces. Parametric surfaces and solid modeling. Extrusions. Surfaces of revolution. So far have discussed spline curves in 2D

Chapter 23. Geometrical Optics (lecture 1: mirrors) Dr. Armen Kocharian

9. Three Dimensional Object Representations

Shading, Advanced Rendering. Week 7, Wed Feb 28

COMPUTER AIDED ENGINEERING DESIGN (BFF2612)

INFOGR Computer Graphics. Jacco Bikker - April-July Lecture 3: Ray Tracing (Introduction) Welcome!

Computer Graphics. Si Lu. Fall uter_graphics.htm 11/22/2017

3D Rendering and Ray Casting

8.1 Geometric Queries for Ray Tracing

Ray Intersection Acceleration

Computer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15

521493S Computer Graphics Exercise 2 Solution (Chapters 4-5)

CS 563 Advanced Topics in Computer Graphics Lecture 2: Bare-Bones Raytracer. by Emmanuel Agu

Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura

Illumination Models III: Ray Tracing (View Dependent Global Illumination)

MIT Ray Tracing Ray Tracing

Three Applications of Interval Analysis in Computer Graphics

COMPUTER GRAPHICS COURSE. Ray Tracing

So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources.

Ray Tracing. Last Time? Reading for Today. Reading for Today

True/False. MATH 1C: SAMPLE EXAM 1 c Jeffrey A. Anderson ANSWER KEY

INF3320 Computer Graphics and Discrete Geometry

Introduction to Computer Graphics. Ray Tracing Review

Computer Graphics Ray Casting. Matthias Teschner

Graphics and Interaction Transformation geometry and homogeneous coordinates

Curves and Surfaces 1

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

CS 4620 Final Exam. (a) Is a circle C 0 continuous?

ME-430 Introduction to CAD Lecture Notes- Part 3

Effects needed for Realism. Computer Graphics (Fall 2008) Ray Tracing. Ray Tracing: History. Outline

Intersecting Simple Surfaces. Dr. Scott Schaefer

Input Nodes. Surface Input. Surface Input Nodal Motion Nodal Displacement Instance Generator Light Flocking

MATHEMATICS FOR ENGINEERING TUTORIAL 5 COORDINATE SYSTEMS

Analytic Spherical Geometry:

CSC418 / CSCD18 / CSC2504

Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Last lecture: finishing up Chapter 22

Computer Graphics CS 543 Lecture 13a Curves, Tesselation/Geometry Shaders & Level of Detail

Chapter 34. Images. In this chapter we define and classify images, and then classify several basic ways in which they can be produced.

Lecture 10: Ray tracing

CS384G Midterm Examination Spring 2008

Light: Geometric Optics

A Method to Generate Exact Contour Files for Solid Freeform Fabrication

Transcription:

Page 1 Ray Tracing Today Basic algorithms Overview of pbrt Ray-surface intersection for single surface Next lecture Acceleration techniques for ray tracing large numbers of geometric primitives Classic Ray Tracing Greeks: Do light rays proceed from the eye to the light, or from the light to the eye? Gauss: Rays through lenses Three ideas about light 1. Light rays travel in straight lines 2. Light rays do not interfere with each other if they cross 3. Light rays travel from the light sources to the eye (but the physics is invariant under path reversal - reciprocity).

Page 2 Ray Tracing in Computer Graphics Appel 1968 - Ray casting 1. Generate an image by sending one ray per pixel 2. Check for shadows by sending a ray to the light Ray Tracing in Computer Graphics Whitted 1979 Recursive ray tracing (reflection and refraction)

Page 3 Ray Tracing Video Spheres-over-plane.pbrt (g/m 10)

Page 4 Spheres-over-plane.pbrt (mirror 0) Spheres-over-plane.pbrt (mirror 1)

Page 5 Spheres-over-plane.pbrt (mirror 2) Spheres-over-plane.pbrt (mirror 5)

Page 6 Spheres-over-plane.pbrt (mirror 10) Spheres-over-plane.pbrt (glass 0)

Page 7 Spheres-over-plane.pbrt (glass 1) Spheres-over-plane.pbrt (glass 2)

Page 8 Spheres-over-plane.pbrt (glass 5) Spheres-over-plane.pbrt (glass 10)

Page 9 Spheres-over-plane.pbrt (glass 10)

Page 10 PBRT Architecture PBRT Architecture

Page 11 Ray-Surface Intersection Ray-Plane Intersection Ray: P = O+t D 0 t < O t D P N Plane: ( P P ) N= 0 ax + by + cz + d = 0 P Solve for intersection Substitute ray equation into plane equation ( P P ) N= ( O+ td P ) N= 0 ( O P ) N t = D N

Page 12 Ray-Polyhedra Ray-Slab Note: Procedural geometry t 1 t 2 Ray-Box Ray-Convex Polyhedra Ray-Triangle Intersection 1 s 2 P P 3 s1 s 3 P 1 s = area( PP P ) 1 2 3 s = area( PP P ) 2 3 1 s = area( PP P ) 3 1 2 P 2 Barycentric coordinates P = sp + s P + s P 1 1 2 2 3 3 Inside triangle criteria 0 s1 1 0 s2 1 0 s3 1 s + s + s = 1 1 2 3

Page 13 2D Homogeneous Coordinates x bc 1 2 cb 1 2 y P= = L L = ca ac 1 2 1 2 1 2 z ab 1 2 ba 1 2 a y1z2 z1y2 c L= = P P = z x x z 1 2 1 2 1 2 c x1y2 y1x 2 L P= ax + by + cz 2D Homogeneous Coordinates P P P = x y z 1 1 1 x y z 1 2 3 2 2 2 x y z 3 3 3 area( PPP ) x y z 1 1 1 x y z 1 2 3 2 2 2 x y z 3 3 3

Page 14 Ray-Triangle Intersection 2 P= s P + s P + s P 1 1 2 2 3 3 s1 = s 3 [ P1 P2 P3] s2 [ P] s1 P2 P3 s = P P P 2 3 1 s 3 P 1 P2 [ ] Ray-Triangle Intersection 3 s 2 3 2 3 1 2 3 P1 P2 P3 s s P P P P P = = P = P P P P P P P P = = P = P P P 1 3 3 1 2 3 1 P1 P2 P3 P P P P P = = P = P P P 1 2 1 2 3 1 2 P1 P2 P3 s1 P2 P3 s = P P P 2 3 1 s 3 P 1 P2 [ ]

Page 15 Ray-Polygon Intersection 1. Find intersection with plane of support 2. Test whether point is inside 3D polygon a. Project onto xy plane b. Test whether point is inside 2D polygon Point in Polygon inside(vert v[], int n, float x, float y) { int cross=0; float x0, y0, x1, y1; } x0 = v[n-1].x - x; y0 = v[n-1].y - y; while( n-- ) { x1 = v->x - x; y1 = v->y - y; if( y0 > 0 ) { if( y1 <= 0 ) if( x1*y0 > y1*x0 ) cross++; } else { if( y1 > 0 ) if( x0*y1 > y0*x1 ) cross++; } x0 = x1; y0 = y1; v++; } return cross & 1;

Page 16 Ray-Sphere Intersection O P D C Ray: P = O+ td P C R = 0 Sphere: ( ) 2 2 + = 0 ( ) 2 2 O td C R t = ± 2 b b 4ac 2a 2 at bt c 2 a = D + + = 0 b = 2( O C) D 2 2 c = ( O C) R Geometric Methods Methods N Find normal and tangents Find surface parameters e.g. Sphere Normal N = P C P, uv, S T Parameters x = sinθ cosφ y = sinθ sinφ z = cosθ φ = θ = cos 1 tan (, ) 1 x y z

Page 17 Ray-Implicit Surface Intersection f( x, y, z ) = 0 f * () t = 0 x = x0 + x1t y = y0 + y1t z = z + z t 0 1 1. Substitute ray equation 2. Find positive, real roots Univariate root finding Newton s method Regula-falsi Interval methods Heuristics Ray-Algebraic Surface Intersection p (,, ) 0 n x y z = p * n() t = 0 x = x0 + x1t y = y0 + y1t z = z + z t 0 1 Degree n Linear: Plane Quadric: Spheres, Quartic: Tori Polynomial root finding Quadratic, cubic, quartic Bezier/Bernoulli basis Descartes rule of signs Sturm sequences

Page 18 History Polygons Appel 68 Quadrics, CSG Goldstein & Nagel 71 Tori Roth 82 Bicubic patches Whitted 80, Kajiya 82 Superquadrics Edwards & Barr 83 Algebraic surfaces Hanrahan 82 Swept surfaces Kajiya 83, van Wijk 84 Fractals Kajiya 83 Height fields Coquillart & Gangnet 84, Musgrave 88 Deformations Barr 86 Subdivision surfs. Kobbelt, Daubert, Siedel, 98 P. Hanrahan, A survey of ray-surface intersection algorithms