COMP371 COMPUTER GRAPHICS

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

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

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

Photorealism: Ray Tracing

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

Global Illumination. COMP 575/770 Spring 2013

Lighting and Shading

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

Raytracing. COSC 4328/5327 Scott A. King

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

Supplement to Lecture 16

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

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

Global Illumination. CSCI 420 Computer Graphics Lecture 18. BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch

A Brief Overview of. Global Illumination. Thomas Larsson, Afshin Ameri Mälardalen University

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

Illumination Algorithms

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

Ray Tracing. Kjetil Babington

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

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

Sung-Eui Yoon ( 윤성의 )

Indirect Illumination

Indirect Illumination

COMPLETION OF Z-buffer Graphics Pipeline

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

CS 325 Computer Graphics

Lecture 18: Primer on Ray Tracing Techniques

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

Shading, Advanced Rendering. Week 7, Wed Feb 28

COMPUTER GRAPHICS AND INTERACTION

Advanced Graphics. Path Tracing and Photon Mapping Part 2. Path Tracing and Photon Mapping

Ray Tracer Due date: April 27, 2011

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

Ray tracing. EECS 487 March 19,

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

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

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.

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

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

Global Illumination. Why Global Illumination. Pros/Cons and Applications. What s Global Illumination

Raytracing & Epsilon. Today. Last Time? Forward Ray Tracing. Does Ray Tracing Simulate Physics? Local Illumination

Implementation Issues

Global Illumination The Game of Light Transport. Jian Huang

Intro to Ray-Tracing & Ray-Surface Acceleration

SAMPLING AND NOISE. Increasing the number of samples per pixel gives an anti-aliased image which better represents the actual scene.

Review for Ray-tracing Algorithm and Hardware

Introduction to Visualization and Computer Graphics

Movie: For The Birds. Announcements. Ray Tracing 1. Programming 2 Recap. Programming 3 Info Test data for part 1 (Lines) is available

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

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

Lecture 10: Ray tracing

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

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

Chapter 5 Mirror and Lenses

Computer Graphics Lecture 11

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

The Rendering Equation and Path Tracing

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

Ray-Tracing. Misha Kazhdan

The Rendering Equation. Computer Graphics CMU /15-662

Assignment 6: Ray Tracing

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

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

Raycast Rendering Maya 2013

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

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

EDAN30 Photorealistic Computer Graphics. Ray tracing. Michael Doggett Department of Computer Science Lund university. Copyright 2011 Michael Doggett

Questions??? Announcements Assignment 3 due today

Shading, lighting, & BRDF Theory. Cliff Lindsay, PHD

Photon Mapping. Due: 3/24/05, 11:59 PM

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

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

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

MITOCW MIT6_172_F10_lec18_300k-mp4

COMP environment mapping Mar. 12, r = 2n(n v) v

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

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

Reflection and Shading

Illumination. Courtesy of Adam Finkelstein, Princeton University

Complex Shading Algorithms

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

COMP30019 Graphics and Interaction Ray Tracing

Assignment 2 Ray Tracing

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

Chapter 7 - Light, Materials, Appearance

Ray Tracing. Outline. Ray Tracing: History

CS 4204 Computer Graphics

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

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

Recursion and Data Structures in Computer Graphics. Ray Tracing

CPSC GLOBAL ILLUMINATION

Other Rendering Techniques CSE 872 Fall Intro You have seen Scanline converter (+z-buffer) Painter s algorithm Radiosity CSE 872 Fall

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

03 RENDERING PART TWO

Image-based Lighting

Part I The Basic Algorithm. Principles of Photon Mapping. A two-pass global illumination method Pass I Computing the photon map

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University

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

Transcription:

COMP371 COMPUTER GRAPHICS SESSION 15 RAY TRACING 1

Announcements Programming Assignment 3 out today - overview @ end of the class Ray Tracing 2

Lecture Overview Review of last class Ray Tracing 3

Local Illumination Object illuminations are independent No light scattering between objects No real shadows, reflection, transmission OpenGL pipeline uses this 4

Global Illumination Ray tracing (highlights, reflection, transmission) Radiosity (surface interreflections) Photon mapping Precomputed Radiance Transfer (PRT) 5

Image/Object Space: Object Space Graphics pipeline: for each object, render Efficient pipeline architecture, real-time Difficulty: object interactions (shadows, reflections, etc) Image Space Ray tracing: for each pixel, determine color Pixel-level parallelism Difficulty: very intensive computation, usually off-line 6

First idea: Forward Ray Tracing Shoot (many) light rays from each light source Rays bounce off the objects Simulates paths of photons Problem: many rays will miss camera and not contribute to image This algorithm is not practical 7

Backward Ray Tracing Shoot one ray from camera through each pixel in image plane 8

Generating Rays Camera is at (0,0,0) and points in the negative z-direction Must determine coordinates of image corners in 3D 9

Generating Rays 10

Generating Rays 11

Generating Rays 12

Determining Pixel Color 1.Phong model (local as before) 2.Shadow rays 3.Specular reflection 4.Specular transmission Steps (3) and (4) require recursion 13

Shadow Rays Determine if light really hits surface point Cast shadow ray from surface point to each light If shadow ray hits opaque object, no contribution from that light This is essentially improved diffuse reflection 14

Phong Model If shadow ray can reach to the light, apply a standard Phong model 15

Where is Phong model applied in this example? Which shadow rays are blocked? 16

Reflection Rays For specular component of illumination Compute reflection ray (recall: backward) Call ray tracer recursively to determine color 17

Angle of Reflection Recall: incoming angle = outgoing angle r = 2(l.n)n-l Compute only for surfaces that are reflective 18

Reflections Example www.yafaray.org 19

Transmission Rays Calculate light transmitted through surfaces Example: water, glass Compute transmission ray Call ray tracer recursively to determine color 20

Transmitted Light Index of refraction is speed of light, relative to speed of light in vacuum Vacuum: 1.0 (per definition) Air: 1.000277 (approx. to 1.0) Water: 1.33 Glass: 1.49 Compute t using Snell s law η = index for upper material 1 η = index for lower material 2 21

Translucency Most real objects are not transparent but blur the background image Scatter light on other side of surface Use stochastic sampling (called distributed ray tracing) 22

Transmission + Translucency Example www.povray.org 23

The Ray Casting Algorithm Simple case of ray tracing For each pixel (x,y) fire a ray from COP through (x,y) For each ray & object, calculate closest intersection For closest intersection point p Calculate surface normal For each light source, fire shadow ray For each unblocked shadow ray, evaluate local Phong model for that light, and add the result to pixel color Critical operations Ray-surface intersections Illumination calculation 24

Recursive Ray Tracing Also calculate specular component Reflect ray from eye on specular surface Transmit ray from eye through transparent surface Determine color of incoming ray by recursion Trace to fixed depth Cut off if contribution below threshold 25

Ray Tracing Assessment Global illumination method Image-based Pros Relatively accurate shadows, reflections, refractions Cons Slow (per pixel parallelism, not pipeline parallelism) Aliasing Inter-object diffuse reflections require many bounces 26

Raytracing Example I www.yafaray.org 27

Raytracing Example II www.povray.org 28

Raytracing Example III www.yafaray.org 29

Raytracing Example IV www.povray.org 30

Review Ray Casting/Tracing Shadow Rays and Local Phong Model Reflection Transmission 31

Next Lecture(s) Geometric Queries 32

33

Studying Support Slides 34