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

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

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

10/29/2010. Rendering techniques. Global Illumination. Local Illumination methods. Today : Global Illumination Modules and Methods

03 RENDERING PART TWO

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

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

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

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

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

Global Illumination. COMP 575/770 Spring 2013

CS 488. More Shading and Illumination. Luc RENAMBOT

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

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

Sung-Eui Yoon ( 윤성의 )

Lecture 18: Primer on Ray Tracing Techniques

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

CPSC GLOBAL ILLUMINATION

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

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

Lecture 10: Ray tracing

Advanced Graphics. Global Illumination. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

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

Illumination Algorithms

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

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

Lighting and Shading

Ray-Tracing. Misha Kazhdan

COMP371 COMPUTER GRAPHICS

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

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

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

Intro to Ray-Tracing & Ray-Surface Acceleration

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

Supplement to Lecture 16

Ray Tracing. Kjetil Babington

Local vs. Global Illumination & Radiosity

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)

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

Computer Graphics. Shadows

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

The Rendering Equation & Monte Carlo Ray Tracing

Shading, Advanced Rendering. Week 7, Wed Feb 28

Reflection and Shading

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

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

MIT Monte-Carlo Ray Tracing. MIT EECS 6.837, Cutler and Durand 1

Questions??? Announcements Assignment 3 due today

Photorealism: Ray Tracing

Graphics for VEs. Ruth Aylett

Photorealistic 3D Rendering for VW in Mobile Devices

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

Ray Tracing. Outline. Ray Tracing: History

Computer Graphics 10 - Shadows

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

Lecture 11: Ray tracing (cont.)

CS5620 Intro to Computer Graphics

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

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

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

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

Computer Graphics. Lecture 9 Environment mapping, Mirroring

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

Computer Graphics Global Illumination

CS 325 Computer Graphics

CS354R: Computer Game Technology

Ray tracing. EECS 487 March 19,

6. Illumination, Lighting

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

Ray Tracing Foley & Van Dam, Chapters 15 and 16

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

Computer Graphics Global Illumination

Final Project: Real-Time Global Illumination with Radiance Regression Functions

A Little Background. Motivation. Motivation

Review for Ray-tracing Algorithm and Hardware

The Rendering Equation and Path Tracing

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

Today s class. Simple shadows Shading Lighting in OpenGL. Informationsteknologi. Wednesday, November 21, 2007 Computer Graphics - Class 10 1

GLOBAL ILLUMINATION. Christopher Peters INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION

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

Volume Illumination. Visualisation Lecture 11. Taku Komura. Institute for Perception, Action & Behaviour School of Informatics

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

Today. Anti-aliasing Surface Parametrization Soft Shadows Global Illumination. Exercise 2. Path Tracing Radiosity

Rendering and Radiosity. Introduction to Design Media Lecture 4 John Lee

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

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

11/2/2010. In the last lecture. Monte-Carlo Ray Tracing : Path Tracing. Today. Shadow ray towards the light at each vertex. Path Tracing : algorithm

Schedule. MIT Monte-Carlo Ray Tracing. Radiosity. Review of last week? Limitations of radiosity. Radiosity

Anti-aliasing. Images and Aliasing

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

CS-184: Computer Graphics. Today. Lecture #16: Global Illumination. Sunday, November 8, 2009

Chapter 7 - Light, Materials, Appearance

Photorealism CS 460/560. Shadows Ray Tracing Texture Mapping Radiosity. Computer Graphics. Binghamton University. EngiNet. Thomas J.

Assignment 6: Ray Tracing

CS 563 Advanced Topics in Computer Graphics Irradiance Caching and Particle Tracing. by Stephen Kazmierczak

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

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

Rendering. Mike Bailey. Rendering.pptx. The Rendering Equation

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

Indirect Illumination

Transcription:

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

Rendering techniques Can be classified as Local Illumination techniques Global Illumination techniques

Local Illumination methods Considers light sources and surface properties only. Phong Illumination, Phong shading, Gouraud Shading Using techniques like Shadow maps, shadow volume, shadow texture for producing shadows Using techniques like mirroring and environment mapping for simulating reflections Very fast Used for real-time applications such as 3D computer games

Global Illumination Methods that simulate not only the direct illuminations but also the indirect illuminations Monte-Carlo ray tracing Radiosity, Photon Mapping Global illuminations can handle Reflection (one object in another) Refraction (Snell s Law) Shadows Colour bleeding under the same framework Requires more computation and is slow 4

Today : Global Illumination Modules and Methods Ray Tracing Radiosity 5

Ray Tracing [Appel 68] Ray tracing is one of the most popular methods used in 3D computer graphics to render an image Good at simulating specular effects Tracing the path taken by a ray of light through the scene Rays are cast to each pixel. They are reflected, refracted, or absorbed whenever they intersect objects Can produce shadows 6

If the ray misses objects, the pixel is coloured by the background colour 7

sometimes the ray will hit an object: 8

Shadow If the ray hits an object, we want to know if that point on the object is in a shadow. So, when the ray hits an object, a secondary ray, called a "shadow" ray, is shot towards the light sources 9

Shadow (2) If this shadow ray hits another object before it hits a light source, then the first intersection point is in the shadow of the second object. We only apply the ambient term for that light source. Otherwise do the local Phong Illumination and expand the Ray Tree 10

Shadow (3) First Intersection point in the shadow of the second object 11

Reflected Ray Also, when a ray hits an object, a reflected ray is generated which is tested against all of the objects in the scene. 12

Contribution from the reflected ray If the reflected ray hits an object then a local illumination model is applied at the point of intersection and the result is carried back to the first intersection point. 13

Transmitted Ray If the intersected object is transparent, then a transmitted ray is generated and tested against all the objects in the scene 14

Contribution from the transmitted ray As with the reflected ray, if the transmitted ray hits an object then a local illumination model is applied at the point of intersection and the result is carried back to the first intersection point. 15

Ray Tree [Whitted 80] Fire off secondary rays from surface that ray intersects. Towards Light Source(s) : shadow rays. L (shadow feelers) In the reflection direction : reflection rays, R In a direction dictated by Snell s Law : transmitted rays, T N R V (Viewer direction) L θ θ T α 16

Recursive ray tree. Reflection and Transmission Rays spawn other rays. Shadow rays used to check occlusion / local illumination of diffuse surfaces Brightness recursively computed by I = Ilocal + Kr * R + Kt * T where Ilocal is the color by local illumination, R is the color by reflection, T is the color by transmission, and Kr, Kt are coefficients The complete set of rays is called a Ray Tree. L 1 T 1 L 3 Light Source ray determines colour of current object. Viewpoint R 3 L 2 R 1 T 2 R 2 17

Test Scene. Ray tree depth 1. Note only ambient shade on mirror and teapot 18

Test Scene. Ray tree depth 2. Note only ambient shade on reflection of mirror and teapot. 19

Test Scene. Ray tree depth 3. Note only ambient shade on reflection of mirror in teapot. 20

Test Scene. Ray tree depth 4. Note ambient shade on reflection of teapot in reflection of mirror in teapot. 21

Test Scene. Ray tree depth 5. 22

Test Scene. Ray tree depth 6. 23

Test Scene. Ray tree depth 7. 24

When to stop? When the a ray hits a perfectly diffusive surface For specular surface, we can define a fixed depth 25

Adaptive tree depth control. Calculate maximum contribution of a ray to a pixels final value. For example, if the surface is more diffusive, smaller influence from the reflection ray Multiply contribution of ray s ancestors down the tree. Stop when below some threshold In the case above, stop when Hall, R. A. and Greenberg D.P., "A Testbed for Realistic Image Synthesis", IEEE Computer Graphics and Applications, 3(8), Nov., 1983

Examples of Ray-traced images. 27

Ray-polygon intersection. Not so easy! 1.Determine whether ray intersects polygon s plane. 2.Determine whether intersection lies within polygon. Easiest to determine (2) with an orthographic projection onto the nearest axis and the 2D point-in-polygon test. Then calculate the barycentric coordinates http://www-graphics.stanford.edu/courses/cs348b-98/gg/intersect.html z Ray y x 28

Accelerating Ray Tracers Ray Tracing is very time-consuming because of intersection calculations Solutions: Use specialized hardware, especially parallel processors. Use perspective projection for the first ray Use a larger threshold for adaptive depth tree control Reduce the number of rays / polygon intersection check Bounding volumes 29

Reducing Ray-Object Intersections Bounding Volumes: First test for intersection with the bounding volume Then only if there is an intersection, against the objects enclosed by the volume. Enclose groups of objects in sets of hierarchical bounding volumes Octree 30

Ray Tracing : Drawbacks Can we produce soft shadows? Can we produce bleeding effects? Can we render caustics? Can we generate shadows of refractive objects? 03/11/11 31

Colour Bleeding 32

Caustics 33

Tough Cases Caustics Light focuses through a specular surface onto a diffuse surface Which direction should secondary rays be cast to detect caustic? Bleeding Color of diffuse surface reflected in another diffuse surface Which direction should secondary rays be cast to detect bleeding? What is needed for simulating these phenomena? 34

Today : Global Illumination Modules and Methods Ray Tracing Radiosity 35

The Radiosity Method (84 -) Can produce soft shadows, colour bleeding View independent the rendering calculation does not have to be done although the viewpoint is changed The basic method can only handle diffuse color need to be combined with raytracing to handle specular light

The Radiosity Model At each surface in a model the amount of energy that is given off (Radiosity) is comprised of the energy that the surface emits internally (E), plus the amount of energy that is reflected off the surface (ρh) Bj

The Radiosity Model(2) The amount of incident light hitting the surface can be found by summing for all other surfaces the amount of energy that they contribute to this surface

Form Factor (Fij) the fraction of energy that leaves surface i and lands on surface j Between differential areas, it is The overall form factor between i and j is

The Radiosity Matrix The radiosity equation now looks like this: The derived radiosity equations form a set of N linear equations in N unknowns. This leads nicely to a matrix solution:

Radiosity Steps: 1 - Generate Model 2 - Compute Form Factors 3 - Solve Radiosity Matrix 4 Render Only if the geometry of the model is changed must the system start over from step 1. If objects are moved, start over from step 2. If the lighting or reflectance parameters of the scene are modified the system may start over from step 3. If the view parameters are changed, the system must merely re-render the scene (step 4).

Radiosity Features: The faces must be subdivided into small patches to reduce the artifacts The computational cost for calculating the form factors is expensive Quadratic to the number of patches Solving for Bi is also very costly Cannot handle specular light

Recommended Reading Foley at al. Chapter 16, sections 16.11, 16.12 and 16.12.5. Introductory text Chapter 14 sections 14.6 and 14.7. An Efficient Ray-Polygon Intersection by Didier Badouel from Graphics Gems I Most graphics texts cover recursive ray tracing. 43