CS5620 Intro to Computer Graphics

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

CPSC GLOBAL ILLUMINATION

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

Shading, Advanced Rendering. Week 7, Wed Feb 28

Illumination Models and Shading

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

Ray Tracing. Kjetil Babington

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

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

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

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

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

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

Lecture 18: Primer on Ray Tracing Techniques

Modeling Transformations

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

Photorealism: Ray Tracing

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

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

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

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

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

Modeling Transformations

Ray Tracing Foley & Van Dam, Chapters 15 and 16

Supplement to Lecture 16

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

Recursion and Data Structures in Computer Graphics. Ray Tracing

Lecture 10: Ray tracing

Lighting and Shading

CS5620 Intro to Computer Graphics

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

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

COMPLETION OF Z-buffer Graphics Pipeline

Introduction to Visualization and Computer Graphics

Ray-Tracing. Misha Kazhdan

RAYTRACING. Christopher Peters INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION. HPCViz, KTH Royal Institute of Technology, Sweden

COMP371 COMPUTER GRAPHICS

Rendering Part I (Basics & Ray tracing) Lecture 25 December 1, 2015

COMPUTER GRAPHICS AND INTERACTION

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

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

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

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

CS 325 Computer Graphics

Global Rendering. Ingela Nyström 1. Effects needed for realism. The Rendering Equation. Local vs global rendering. Light-material interaction

Lighting and Shading. Slides: Tamar Shinar, Victor Zordon

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

Review for Ray-tracing Algorithm and Hardware

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

Surface Rendering Methods

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

CS 4204 Computer Graphics

Implementation Issues

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

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics

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

CS 465 Program 5: Ray II

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

Raytracing CS148 AS3. Due :59pm PDT

Ray tracing. EECS 487 March 19,

Global Illumination. COMP 575/770 Spring 2013

Advanced Ray Tracing

Lecture 11: Ray tracing (cont.)

Lets assume each object has a defined colour. Hence our illumination model is looks unrealistic.

Lecture 15: Shading-I. CITS3003 Graphics & Animation

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

03 RENDERING PART TWO

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

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

Lecture 12: Advanced Rendering

CS559 Computer Graphics Fall 2015

Sung-Eui Yoon ( 윤성의 )

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

Virtual Reality for Human Computer Interaction

COMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y.

Illumination. Michael Kazhdan ( /657) HB Ch. 14.1, 14.2 FvDFH 16.1, 16.2

Illumination Modelling

Ray Tracing. CS116B Chris Pollett Apr 20, 2004.

Lighting. Figure 10.1

Computer Graphics Ray Casting. Matthias Teschner

The University of Calgary

What does OpenGL do?

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

Illumination Models & Shading

CHAPTER 1 Graphics Systems and Models 3

Homework #2. Shading, Ray Tracing, and Texture Mapping

Ray Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University

9. Illumination and Shading

Spatial Data Structures

Computer Graphics 1. Chapter 7 (June 17th, 2010, 2-4pm): Shading and rendering. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2010

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

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

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

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

CS 4620 Program 4: Ray II

Reflection and Shading

Spatial Data Structures

CS Computer Graphics: Introduction to Ray Tracing

CS Computer Graphics: Introduction to Ray Tracing

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

Transcription:

Ra Tracing Ra-Tracing A B C D Photorealism Objective: To generate images that are as close as possible to those perceived b the human ee. Method: Accurate simulation of optical phenomena. Copright Page 1

Ra Tracing Illumination Models Local: Depends onl on the model, the light sources and the viewer. Eas to simulate. Eamples: Diffuse and specular illumination models. Flat, Gourard and Phong shading of polhedra. Global: Depends on the entire scene, the light sources and the viewer. Comple to simulate. Eamples: Shadow algorithms, ra-tracing, radiosit methods. 7 9 11 1 Copright Page

Ra Tracing 13 14 15 16 The Phsics Basic Illumination Model Light ras are emitted from light sources and bounce (reflect) in the scene until the reach the ee 17 18 Copright Page 3

Ra Tracing Rendering Equation I (, ) g(, )[ e(, ) s(,, ) I(, ) d] Surf Bring the objects to the screen Bring the screen to the objects 19 0 Ra-Casting Algorithm A Basic Ra-Casting Algorithm Ee RaCast (r, scene) Primar Ra <obj, p> := FirstIntersection(r, scene); if (no obj) return BackgroundColor; else return Shade(p, obj); end; 1 Ra-Object Intersection Ra-Tracing Algorithm In the kernel of ever ra-tracer Ra-object intersections are computed millions of times for a single image, hence must be ver efficient Eample: Ra-Sphere intersection ra: ( t) p v t, ( t) p v t, ( t) p v t (unit) sphere: 1 Solve a quadratic equation in t : p v (,,) Ee Primar Ra Reflected Ra Reflected Ra 0 ( p v t) ( p v t) ( p v t) 1 t ( v v v ) t( p v p v p v ) ( p p p ) 1 Refracted Ra 3 4 Copright Page 4

Ra Tracing Reflection and Refraction A Basic Ra-Tracing Algorithm Snell s law sin 1 c1 sin c n n 1 RaTrace(r, scene) <obj, p> := FirstIntersection(r, scene); if (no obj) return BackgroundColor; else begin if ( Reflect(obj) ) then ReflectColor := RaTrace(ReflectRa(r, p, obj)); else ReflectColor := Black; if ( Transparent(obj) ) then RefractColor := RaTrace(RefractRa(r, p, obj)); else RefractColor := Black; return Shade(ReflectColor, RefractColor, p, obj); end; 5 6 Termination in Ra-Tracing Possible termination criteria: No intersection Contribution of secondar ra attenuated below a threshold Maimal depth 7 8 Ra-Tracing as a Sampling Process Supersampling Trace multiple primar ras per piel and average their results. Ee 1 ra/piel 16 ras/piel 64 ras/piel 30 Copright Page 5

Ra Tracing Optimied Ra-Tracing Bounding Volumes Basic algorithm is simple but VERY epensive. Optimied ra-tracing is critical Reduce number of ras traced Reduce number of ra-object intersection calculations Methods Bounding Boes Object Hierarchies Spatial Subdivision (Octrees/BSP) Tree Pruning (Randomied) Bound each scene object b a simple volume (e.g. sphere). This enables fast reject of non-intersections. More work is performed when there is an intersection (or near intersection). Since, on the average, a tpical ra will not intersect the vast majorit of the scene objects, this results in a significant speedup. The time compleit is still linear in the number of scene objects. 31 Choosing Bounding Volumes Bounding volume should be: As tight-fitting as possible As simple as possible Uniform Spatial Partition 3D space is divided into voels of identical sie. Each voel contains a list of objects it intersects. A tradeoff eists between voel sie and list length. Disadvantage: The subdivision is totall independent of the scene structure. Advantages: Simple! The voels pierced b a ra ma be accessed ver efficientl b incremental calculation. A 3D version of Bresenham's algorithm is used. A B {C} {A,B} C {} 34 Simulating Shadows Simulating Shadows Ee Reflected Ra Light Source Trace ra from each ra-object intersection point to light source(s) If no line-of-sight point is shadowed Shadow computation routine: shadow = RaTrace(LightRa(p,obj,light)); to be included in the final shading: return Shade(shadow, ReflectColor, RefractColor, p, obj); Refracted Ra 35 36 Copright Page 6

Ra Tracing 37 38 Copright Page 7