Ray Tracing. Announcements: Quiz. Last Time? Today. Durer s Ray Casting Machine. Ray Casting

Similar documents
Ray Tracing. Last Time? Today. Ray Casting. Durer s Ray Casting Machine. Reading for Today

Ray Tracing. Quiz Discussion. Announcements: Final Projects. Last Time? Durer s Ray Casting Machine. Today

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

Local vs. Global Illumination & Radiosity

Lecture 10: Ray tracing

Advanced Ray Tracing

Last Time: Acceleration Data Structures for Ray Tracing. Schedule. Today. Shadows & Light Sources. Shadows

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

Ray-tracing Acceleration. Acceleration Data Structures for Ray Tracing. Shadows. Shadows & Light Sources. Antialiasing Supersampling.

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

Today. Acceleration Data Structures for Ray Tracing. Cool results from Assignment 2. Last Week: Questions? Schedule

Last Time? Ray Casting. Administrivia: Lab & Office Hours. Notes on Assignments. Ray Casting. Overview of Today

Supplement to Lecture 16

Sung-Eui Yoon ( 윤성의 )

Photorealism: Ray Tracing

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

Ray Tracing. Johns Hopkins Department of Computer Science Course : Rendering Techniques, Professor: Jonathan Cohen

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

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

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

Computer Graphics. Ray Tracing. Based on slides by Dianna Xu, Bryn Mawr College

Lecture 11: Ray tracing (cont.)

Last Time. Correct Transparent Shadow. Does Ray Tracing Simulate Physics? Does Ray Tracing Simulate Physics? Refraction and the Lifeguard Problem

Announcements. Written Assignment 2 out (due March 8) Computer Graphics

I have a meeting with Peter Lee and Bob Cosgrove on Wednesday to discuss the future of the cluster. Computer Graphics

Ø Sampling Theory" Ø Fourier Analysis Ø Anti-aliasing Ø Supersampling Strategies" Ø The Hall illumination model. Ø Original ray tracing paper

Implementation Issues

CS 428: Fall Introduction to. Raytracing. Andrew Nealen, Rutgers, /18/2009 1

Ray-Tracing. Misha Kazhdan

COMP 175 COMPUTER GRAPHICS. Lecture 11: Recursive Ray Tracer. COMP 175: Computer Graphics April 9, Erik Anderson 11 Recursive Ray Tracer

CS-184: Computer Graphics. Administrative

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

Lecture 17: Recursive Ray Tracing. Where is the way where light dwelleth? Job 38:19

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

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

Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects

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

CS5620 Intro to Computer Graphics

Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007

Shading, Advanced Rendering. Week 7, Wed Feb 28

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows

Ray Tracing. Local Illumination. Object Space: Global Illumination. Image Space: Backward Ray Tracing. First idea: Forward Ray Tracing

Ray Tracing. Outline. Ray Tracing: History

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye

Distributed Ray Tracing

Ray tracing Tutorial. Lukas Herzberger

Ray Casting. Outline. Similar to glulookat derivation. Foundations of Computer Graphics

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

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

Parallelization. Memory coherency helps when distributing rays to various threads/processors

3D Rendering and Ray Casting

Questions from Last Week? Extra rays needed for these effects. Shadows Motivation

CS 431/636 Advanced Rendering Techniques

Computer Graphics. Ray Tracing. Copyright Gotsman, Elber, Barequet, Karni, Sheffer. Page 1. Ray-Tracing. Illumination Models

MIT Ray Tracing Ray Tracing

3D Rendering and Ray Casting

Ray casting. Ray casting/ray tracing

Logistics. CS 586/480 Computer Graphics II. Questions from Last Week? Slide Credits

Ray Casting. Outline in Code. Outline. Finding Ray Direction. Heckbert s Business Card Ray Tracer. Foundations of Computer Graphics (Fall 2012)

Visual cues to 3D geometry. Light Reflection and Advanced Shading. Shading. Recognizing materials. size (perspective) occlusion shading

Today. The Graphics Pipeline: Projective Transformations. Last Week: Schedule. XForms Forms Library. Questions?

Lighting and Reflectance COS 426

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

Ray Tracing. CSCI 420 Computer Graphics Lecture 15. Ray Casting Shadow Rays Reflection and Transmission [Ch ]

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

Computer Graphics. Shi-Min Hu. Tsinghua University

Lighting and Shading

Anti-aliasing and Monte Carlo Path Tracing. Brian Curless CSE 457 Autumn 2017

COMP371 COMPUTER GRAPHICS

Intro to Ray-Tracing & Ray-Surface Acceleration

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

CS580: Ray Tracing. Sung-Eui Yoon ( 윤성의 ) Course URL:

Graphics 2009/2010, period 1. Lecture 8: ray tracing

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

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

CSCI-4530/6530 Advanced Computer Graphics

Distribution Ray Tracing

Specular reflection. Lighting II. Snell s Law. Refraction at boundary of media

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome!

Anti-aliasing and Monte Carlo Path Tracing

CPSC GLOBAL ILLUMINATION

CS5620 Intro to Computer Graphics

Indirect Illumination

Lecture 19: All Together with Refraction

Lecture 18: Primer on Ray Tracing Techniques

Homework 3: Shading, Raytracing, and Image Processing

COMPUTER GRAPHICS AND INTERACTION

CS 6620 Shading. Steve Parker Peter Shirley

Anti-aliasing and Monte Carlo Path Tracing. Brian Curless CSE 557 Autumn 2017

Illumination. Thomas Funkhouser Princeton University C0S 426, Fall 2000

Raytracing. COSC 4328/5327 Scott A. King

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

Ray Casting. To Do. Outline. Outline in Code. Foundations of Computer Graphics (Spring 2012) Heckbert s Business Card Ray Tracer

Lighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch

Lecture 11. More Ray Casting/Tracing

Local Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

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

Ray Tracing. Kjetil Babington

A Little Background. Motivation. Motivation

Transcription:

nnouncements: Qui a Tracing On Frida (3/4), in class One 8.511 sheet of notes allowed Sample qui (from last ear) is posted online Focus on reading comprehension and material for Homeworks 0, 1, & 2 Last Time? Toda igid Bod Finite Element Method a Casting Stress/Strain Fracture Deformation Level of Detail Haptics a-plane Intersection a-sphere Intersection Point in Polgon a Tracing ecursive a Tracing Distribution a Tracing Durer s a Casting Machine a Casting lbrecht Durer, 16th centur For ever piel Construct a ra from the ee For ever object in the scene Finding the intersection and normal is the central part of ra casting Find intersection with the ra Keep if closest Shade depending on light and normal vector 1

ote on Local Shading a epresentation? Surface/Scene Characteristics: surface normal direction to light viewpoint Material Properties Diffuse (matte) Specular (shin) More later! L V Two vectors: Origin Direction (normalied is better) Parametric line (eplicit representation) P(t) = origin + t * direction P(t) direction origin Diffuse sphere Specular spheres 3D Plane epresentation? Plane defined b P o = (,,) n = (,B,C) Implicit plane equation H(P) = +B+C+D = 0 = n P + D = 0 Point-Plane distance? If n is normalied, distance to plane, d = H(P) d is the signed distance! H(p) = d > 0 P normal P o H P' H(p) = d < 0 Eplicit vs. Implicit? a equation is eplicit P(t) = o + t * d Parametric Generates points Harder to verif that a point is on the ra Plane equation is implicit H(P) = n P + D = 0 Solution of an equation Does not generate points Verifies that a point is on the plane a-plane Intersection dditional Housekeeping Intersection means both are satisfied So, insert eplicit equation of ra into implicit equation of plane & solve for t P(t) P(t) = o + t * d H(P) = n P + D = 0 n ( o + t * d ) + D = 0 t = -(D + n o ) / n d Verif that intersection is closer than previous P(t) < t current Verif that it is not out of range (behind ee) P(t) > t min P(t) 2

ormal eeded for shading diffuse: dot product between light and normal ormal of a plane is constant! normal a-triangle Intersection Use barcentric coordinates: P(α, β, γ) = αa + βb + γc with α + β + γ =1 If 0 < α < 1 & 0 < β < 1 & 0 < γ < 1 then the point is inside the triangle! c P d o a b How Do We Compute α, β, γ? atio of opposite sub-triangle area to total area α = a / β = b / γ = c / Use signed areas for points outside the triangle a P α > 0 c a b a But how do I know if the point is outside the triangle? That s what I was tring to determine! P α < 0 c b a Using Cramer s ule Used to solve for one variable at a time in sstem of equations β = t = o o o d d d γ = o o o o o o denotes the determinant Can be copied mechanicall into code d d d Sphere epresentation? Implicit sphere equation ssume centered at origin (eas to translate) H(P) = P P - r 2 = 0 a-sphere Intersection Insert eplicit equation of ra into implicit equation of sphere & solve for t P(t) = o + t* d H(P) = P P - r 2 = 0 ( o + t d ) ( o + t d ) - r 2 = 0 d d t 2 + 2 d o t + o o - r 2 = 0 d o d o 3

a-sphere Intersection Quadratic: at 2 + bt + c = 0 a = 1 (remember, d = 1) b = 2 d o c = o o r 2 Questions? with discriminant and solutions What does it mean if there are no solutions, 1 solution, or 2 solutions? depth normals local shading Toda a Casting a Tracing Shadows eflection efraction ecursive a Tracing Distribution a Tracing How Can We dd Shadows? Find the point to be shaded For ever light, Construct ra from point to light For ever object find intersection of ra with object If no objects between point and light dd contribution from light Mirror eflection eflection Cast ra smmetric with respect to the normal Multipl b reflection coefficient (color) eflection angle = view angle = V 2 (V ) V θ V θ V V V 4

Transparenc Qualitative efraction Cast ra in refracted direction Multipl b transparenc coefficient (color) From Color and Light in ature b Lnch and Livingston efraction efraction & the Sidedness of Objects η i η T I = cos Ө i M sin Ө i Make sure ou know whether ou re entering or leaving M sin Ө M = ( cos Ө i I) / sin Ө i i I Ө i - cos Ө i Ө T T Snell-Descartes Law: η i sin Ө i = η T sin Ө T sin Ө T η = i = ηr sin Ө i η T M T = cos Ө T + M sin Ө T = cos Ө T + ( cos Ө i I) sin Ө T / sin Ө i = cos Ө T + ( cos Ө i I) η r = [ η r cos Ө i cos Ө T ] η r I = [ η r cos Ө i 1 sin 2 Ө T ] η r I = [ η r cos Ө i 1 η r 2 sin 2 Ө i ] η r I = [ η r cos Ө i 1 η r 2 (1 cos 2 Ө i ) ] η r I = [ η r ( I) 1 η r 2 (1 ( I) 2 ) ] η r I Total internal reflection when the square root is imaginar Don t forget to normalie! the transmissive material: I η i =1 η T = material inde T η i = material inde η T = 1 What about intersecting transparent objects? I T Total Internal eflection Questions? From Color and Light in ature b Lnch and Livingston 5

eadings for Toda: (read both) Toda "n improved illumination model for shaded displa" Turner Whitted, 1980. "Distributed a Tracing", Cook, Porter, & Carpenter, SIGGPH 1984. a Casting a Tracing ecursive a Tracing Distribution a Tracing a Tracing The a Tree trace ra Intersect all objects color = ambient term For ever light cast shadow ra color += local shading term If mirror color += color refl * trace reflected ra If transparent color += color trans * trace transmitted ra Does it ever end? Stopping criteria: ecursion depth Stop after a number of bounces a contribution Stop if reflected / transmitted contribution becomes too small T 3 2 2 T 1 3 1 3 L 2 1 L 3 L 1 i surface normal i reflected ra L i shadow ra Ee T i transmitted (refracted) ra 2 Ee L 1 1 T 1 L 2 3 Compleit? T 3 L 3 a Debugging Toda Visualie the ra tree for single image piel incoming reflected ra shadow ra transmitted (refracted) ra a Casting a Tracing ecursive a Tracing Distribution a Tracing Soft shadows ntialiasing (getting rid of jaggies) Gloss reflection Motion blur Depth of field (focus) 6

Shadows Shadows & Light Sources one shadow ra per intersection per point light source no shadow ras http://www.davidfa.com/inde.php one shadow ra http://3media.initialied.org/photos/2000-10-18/inde_gall.htm clear bulb frosted bulb http://www.pa.uk.edu/~sciworks/light/preview/bulb2.htm Soft Shadows ntialiasing Supersampling multiple shadow ras to sample area light source multiple ras per piel jaggies w/ antialiasing one shadow ra point light lots of shadow ras area light eflection one reflection ra per intersection Gloss eflection multiple reflection ras Justin Legakis θ θ perfect mirror θ θ polished surface 7

Motion Blur Sample objects temporall Depth of Field multiple ras per piel ob Cook film focal length Justin Legakis a Tracing lgorithm nalsis eading for Tuesda 3/8: a casting Lots of primitives ecursive Distributed a Tracing Effects Soft shadows nti-aliasing Gloss reflection Motion blur Depth of field cost height * width * num primitives * intersection cost * sie of recursive ra tree * num shadow ras * num supersamples * num gloss ras * num temporal samples * num focal samples *... can we reduce this? these can serve double dut Goral, Torrance, Greenberg & Battaile Modeling the Interaction of Light Between Diffuse Surfaces, SIGGPH '84 Post a comment or question on the LMS discussion b 10am on Frida 2/29 8