David Luebke 1 12/2/2015 CS 551/651: Advanced Computer Graphics Advanced Ray Tracing Radiosity.

Slides:



Advertisements
Similar presentations
SI31 Advanced Computer Graphics AGR
Advertisements

Computer graphics & visualization Global Illumination Effects.
David Luebke 1 4/28/2015 Aliasing & Antialiasing.
Computer Graphics In4/MSc Computer Graphics Lecture Notes #15 Illumination III View Independent Rendering.
Radiosity Mel Slater Department of Computer Science University College London
David Luebke1/19/99 CS 551/651: Antialiasing David Luebke
Advanced Computer Graphics
Illumination Models Radiosity Chapter 14 Section 14.7 Some of the material in these slides may have been adapted from University of Virginia, MIT, Colby.
Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity.
Aliasing & Antialiasing
David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke
1. What is Lighting? 2 Example 1. Find the cubic polynomial or that passes through the four points and satisfies 1.As a photon Metal Insulator.
CSCE 641: Photon Mapping Jinxiang Chai. Outline Rendering equation Photon mapping.
Radiosity A Fascinating Presentation by Alex Danilevky.
Interreflections and Radiosity : The Forward Problem Lecture #11 Thanks to Kavita Bala, Pat Hanrahan, Doug James, Ledah Casburn.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 10: Global Illumination Ravi Ramamoorthi Some images courtesy.
Everything on Global Illumination Xavier Granier - IMAGER/UBC.
1 7M836 Animation & Rendering Global illumination, radiosity Arjan Kok
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
6.1 Vis_04 Data Visualization Lecture 6 - A Rough Guide to Rendering.
The Radiosity Method Donald Fong February 10, 2004.
Paper by Alexander Keller
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
CSCE 441 Computer Graphics: Radiosity Jinxiang Chai.
CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination.
CS 445 / 645: Introductory Computer Graphics
CS 431/636 Advanced Rendering Techniques
David Luebke 1 9/4/2015 CS 551/651: Advanced Computer Graphics Antialiasing Continued: Prefiltering and Supersampling.
Computer Graphics Inf4/MSc Computer Graphics Lecture 9 Antialiasing, Texture Mapping.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Today More raytracing stuff –Soft shadows and anti-aliasing More rendering methods –The text book is good on this –I’ll be using images from the CDROM.
-Global Illumination Techniques
CS 376 Introduction to Computer Graphics 04 / 16 / 2007 Instructor: Michael Eckmann.
David Luebke 1 10/12/2015 CS 551/651: Advanced Computer Graphics Advanced Ray Tracing Radiosity.
02/16/05© 2005 University of Wisconsin Last Time Re-using paths –Irradiance Caching –Photon Mapping.
CS447/ Realistic Rendering -- Radiosity Methods-- Introduction to 2D and 3D Computer Graphics.
David Luebke 1 10/26/2015 Lighting CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
Graphics Lecture 13: Slide 1 Interactive Computer Graphics Lecture 13: Radiosity - Principles.
Introduction to Radiosity Geometry Group Discussion Session Jiajian (John) Chen 9/10/2007.
111/17/ :21 Graphics II Global Rendering and Radiosity Session 9.
Radiosity Jian Huang, CS594, Fall 2002 This set of slides reference the text book and slides used at Ohio State.
DPL11/27/2015 CS 551/651: Radiosity David Luebke
CPSC 641 Computer Graphics: Radiosity Jinxiang Chai.
04/30/02(c) 2002 University of Wisconsin Last Time Subdivision techniques for modeling We are now all done with modeling, the standard hardware pipeline.
Global Illumination: Radiosity, Photon Mapping & Path Tracing Rama Hoetzlein, 2009 Lecture Notes Cornell University.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
CS 445 / 645 Introduction to Computer Graphics Lecture 15 Shading Shading.
Pure Path Tracing: the Good and the Bad Path tracing concentrates on important paths only –Those that hit the eye –Those from bright emitters/reflectors.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
In the name of God Computer Graphics. Last Time Some techniques for modeling Today Global illumination and raytracing.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Path Tracing Algorithms K. H. Ko School of Mechatronics Gwangju.
CS 445 / 645 Introduction to Computer Graphics Lecture 16 Radiosity Radiosity.
02/07/03© 2003 University of Wisconsin Last Time Finite element approach Two-pass approaches.
Global Illumination (3) Path Tracing. Overview Light Transport Notation Path Tracing Photon Mapping.
David Luebke3/12/2016 Advanced Computer Graphics Lecture 3: More Ray Tracing David Luebke
David Luebke3/16/2016 CS 551 / 645: Introductory Computer Graphics David Luebke
David Luebke 3/17/2016 Advanced Computer Graphics Antialiasing David Luebke
Distributed Ray Tracing. Can you get this with ray tracing?
Graphics Lecture 14: Slide 1 Interactive Computer Graphics Lecture 14: Radiosity - Computational Issues.
Distributed Ray Tracing. Can you get this with ray tracing?
11/29/01CS 559, Fall 2001 Today Photorealistic rendering Algorithms for producing high-quality images Ways of deciding which algorithm for use.
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
Advanced Computer Graphics
The Rendering Equation
(c) 2002 University of Wisconsin
CSCE 441 Computer Graphics: Radiosity
(c) 2002 University of Wisconsin
Advanced Computer Graphics: Radiosity
CSC418 Computer Graphics Raytracing Shadows Global Illumination.
Presentation transcript:

David Luebke 1 12/2/2015 CS 551/651: Advanced Computer Graphics Advanced Ray Tracing Radiosity

David Luebke 2 12/2/2015 Administrivia l My penance: Ray tracing homeworks very slow to grade n Many people didn’t include READMEs n Many (most) people didn’t include workspace/project files or Makefiles n Some people’s don’t work n Nobody’s works perfectly l Quiz 1: Tuesday, Feb 20

David Luebke 3 12/2/2015 Recap: Stochastic Sampling l Sampling theory tells us that with a regular sampling grid, frequencies higher than the Nyquist limit will alias l Q: What about irregular sampling? l A: High frequencies appear as noise, not aliases l This turns out to bother our visual system less!

David Luebke 4 12/2/2015 Recap: Stochastic Sampling l Poisson distribution: n Completely random n Add points at random until area is full. n Uniform distribution: some neighboring samples close together, some distant

David Luebke 5 12/2/2015 Recap: Stochastic Sampling l Poisson disc distribution: n Poisson distribution, with minimum-distance constraint between samples n Add points at random, removing again if they are too close to any previous points l Jittered distribution n Start with regular grid of samples n Perturb each sample slightly in a random direction n More “clumpy” or granular in appearance

David Luebke 6 12/2/2015 Recap: Stochastic Sampling l Spectral characteristics of these distributions: n Poisson: completely uniform (white noise). High and low frequencies equally present n Poisson disc: Pulse at origin (DC component of image), surrounded by empty ring (no low frequencies), surrounded by white noise n Jitter: Approximates Poisson disc spectrum, but with a smaller empty disc.

David Luebke 7 12/2/2015 Recap: Nonuniform Supersampling l To be correct, need to modify filtering step:

David Luebke 8 12/2/2015 Recap: Nonuniform Supersampling l Approximate answer: weighted average filter l Correct answer: multistage filtering l Real-world answer: ignore the problem   I(i, j) h(x-i, y-j)   h(x-i, y-j) I’(x,y) =

David Luebke 9 12/2/2015 Recap: Antialiasing and Texture Mapping l Texture mapping is uniquely harder n Potential for infinite frequencies l Texture mapping is uniquely easier n Textures can be prefiltered

David Luebke 10 12/2/2015 Recap: Antialiasing and Texture Mapping l Issue in prefiltering texture is how much texture a pixel filter covers l Simplest prefiltering scheme: MIP-mapping n Idea: approximate filter size, ignore filter shape n Create a pyramid of texture maps n Each level doubles filter size

David Luebke 11 12/2/2015 Recap: Mip-Mapping l Tri-linear mip-mapping n Pixel size  depth d n Linearly interpolate colors within 2 levels closest to d n Linearly interpolate color between levels according to d

David Luebke 12 12/2/2015 Distributed Ray Tracing l Distributed ray tracing is an elegant technique that tackles many problems at once n Stochastic ray tracing: distribute rays stochastically across pixel n Distributed ray tracing: distribute rays stochastically across everything

David Luebke 13 12/2/2015 Distributed Ray Tracing l Distribute rays stochastically across: n Pixel for antialiasing n Light source for soft shadows n Reflection function for soft (glossy) reflections n Time for motion blur n Lens for depth of field l Cook: 16 rays suffice for all of these n I done told you wrong: 4x4, not 8x8

David Luebke 14 12/2/2015 Distributed Ray Tracing l Distributed ray tracing is basically a Monte Carlo estimation technique l Practical details: n Use lookup tables (LUTs) for distributing rays across functions n See W&W Figure p 263

David Luebke 15 12/2/2015 Backwards Ray Tracing l Traditional ray tracing traces rays from the eye, through the pixel, off of objects, to the light source l Backwards ray tracing traces rays from the light source, into the scene, into the eye l Why might this be better?

David Luebke 16 12/2/2015 Backwards Ray Tracing l Backwards ray tracing can capture: n Indirect illumination n Color bleeding n Caustics u Remember what a caustic is? u Give some examples u Remember where caustics get the name?

David Luebke 17 12/2/2015 Backwards Ray Tracing l Usually implies two passes: n Rays are cast from light into scene n Rays are cast from the eye into scene, picking up illumination showered on the scene from the first pass

David Luebke 18 12/2/2015 Backwards Ray Tracing l Q: How might these two passes “meet in the middle?”

David Luebke 19 12/2/2015 Backwards Ray Tracing l Arvo: illumination maps tile surfaces with regular grids, like texture maps n Shoot rays outward from lights n Every ray hit deposits some of its energy into surface’s illumination map u Ignore first generation hits that directly illuminate surface (Why?) n Eye rays look up indirect illumination using bilinear interpolation

David Luebke 20 12/2/2015 Backwards Ray Tracing l Watt & Watt, Plate 34 n Illustrates Arvo’s method of backwards ray tracing using illumination maps n Illustrates a scene with caustics l Related idea: photon maps

David Luebke 21 12/2/2015 Advanced Ray Tracing Wrapup l Backwards ray tracing accounts for indirect illumination by considering more general paths from light to eye l Distributed ray tracing uses a Monte Carlo sampling approach to solve many ray-tracing aliasing problems

David Luebke 22 12/2/2015 Next Up: Radiosity l Ray tracing: n Models specular reflection easily n Diffuse lighting is more difficult l Radiosity methods explicitly model light as an energy-transfer problem n Models diffuse interreflection easily n Shiny, specular surfaces more difficult

David Luebke 23 12/2/2015 Radiosity Introduction l First lighting model: Phong n Still used in interactive graphics n Major shortcoming: local illumination! l After Phong, two major approaches: n Ray tracing n Radiosity

David Luebke 24 12/2/2015 Radiosity Introduction l Ray tracing: ad hoc approach to simulating optics n Deals well with specular reflection n Trouble with diffuse illumination l Radiosity: theoretically rigorous simulation of light transfer n Very realistic images n But makes simplifying assumption: only diffuse interaction!

David Luebke 25 12/2/2015 Radiosity Introduction l Ray-tracing: n Computes a view-dependent solution n End result: a picture l Radiosity: n Models only diffuse interaction, so can compute a view-independent solution n End result: a 3-D model

David Luebke 26 12/2/2015 Radiosity l Basic idea: represent surfaces in environment as many discrete patches l A patch, or element, is a polygon over which light intensity is constant

David Luebke 27 12/2/2015 Radiosity l Model light transfer between patches as a system of linear equations l Solving this system gives the intensity at each patch l Solve for R, G, B intensities and get color at each patch l Render patches as colored polygons in OpenGL. Voila!

David Luebke 28 12/2/2015 Fundamentals l Theoretical foundation: heat transfer l Need system of equations that describes surface interreflections l Simplifying assumptions: n Environment is closed n All surfaces are Lambertian reflectors

David Luebke 29 12/2/2015 Radiosity l The radiosity of a surface is the rate at which energy leaves the surface l Radiosity = rate at which the surface emits energy + rate at which the surface reflects energy n Notice: previous methods distinguish light sources from surfaces n In radiosity all surfaces can emit light n Thus: all emitters inherently have area

David Luebke 30 12/2/2015 Radiosity l Break environment up into a finite number n of discrete patches n Patches are opaque Lambertian surfaces of finite size n Patches emit and reflect light uniformly over their entire surface l Q: What’s wrong with this model? l Q: What can we do about it?

David Luebke 31 12/2/2015 Radiosity l Then for each surface i: B i = E i +  i  B j F ji (A j / A i ) where B i, B j = radiosity of patch i, j A i, A j = area of patch i, j E i = energy/area/time emitted by i  i = reflectivity of patch i F ji = Form factor from j to i

David Luebke 32 12/2/2015 Form Factors l Form factor: fraction of energy leaving the entirety of patch i that arrives at patch j, accounting for: n The shape of both patches n The relative orientation of both patches n Occlusion by other patches

David Luebke 33 12/2/2015 Form Factors l Some examples… Form factor: nearly 100%

David Luebke 34 12/2/2015 Form Factors l Some examples… Form factor: roughly 50%

David Luebke 35 12/2/2015 Form Factors l Some examples… Form factor: roughly 10%

David Luebke 36 12/2/2015 Form Factors l Some examples… Form factor: roughly 5%

David Luebke 37 12/2/2015 Form Factors l Some examples… Form factor: roughly 30%

David Luebke 38 12/2/2015 Form Factors l Some examples… Form factor: roughly 2%

David Luebke 39 12/2/2015 Form Factors l In diffuse environments, form factors obey a simple reciprocity relationship: A i F ij = A i F ji l Which simplifies our equation: B i = E i +  i  B j F ij l Rearranging to: B i -  i  B j F ij = E i

David Luebke 40 12/2/2015 Form Factors l So…light exchange between all patches becomes a matrix: l What do the various terms mean?

David Luebke 41 12/2/2015 Form Factors 1 -  1 F 11 -  1 F 12 … -  1 F 1n B 1 E 1 -  2 F  2 F 22 … -  2 F 2n B 2 E 2.. …... - p n F n1 -  n F n2 … 1 -  n F nn B n E n l Note: E i values zero except at emitters l Note: F ii is zero for convex or planar patches l Note: sum of form factors in any row = 1 (Why?) l Note: n equations, n unknowns!

David Luebke 42 12/2/2015 Radiosity l Now “just” need to solve the matrix! n W&W: matrix is “diagonally dominant” n Thus Guass-Siedel must converge l End result: radiosities for all patches l Solve RGB radiosities separately, color each patch, and render! l Caveat: actually, color vertices, not patches (see F&vD p 795)

David Luebke 43 12/2/2015 Radiosity l Q: How many form factors must be computed? l A: O(n 2 ) l Q: What primarily limits the accuracy of the solution? l A: The number of patches

David Luebke 44 12/2/2015 Radiosity l Where we go from here: n Evaluating form factors n Progressive radiosity: viewing an approximate solution early n Hierarchical radiosity: increasing patch resolution on an as-needed basis

David Luebke 45 12/2/2015 The End