Global Illumination. Direct Illumination vs. Global Illumination reflected, scattered and focused light (not discreet). physical-based light transport.

Slides:



Advertisements
Similar presentations
Computer Graphics In4/MSc Computer Graphics Lecture Notes #15 Illumination III View Independent Rendering.
Advertisements

Radiosity Mel Slater Department of Computer Science University College London
Advanced Computer Graphics
Photorealistic Rendering. Ray tracing v. photorealistic rendering What illumination effects are not captured by ray tracing? What illumination effects.
The Radiance Equation Mel Slater. Outline Introduction Light Simplifying Assumptions Radiance Reflectance The Radiance Equation Traditional Rendering.
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.
CSCE 641: Photon Mapping Jinxiang Chai. Outline Rendering equation Photon mapping.
Photon Tracing with Arbitrary Materials Patrick Yau.
Advanced Computer Graphics (Fall 2009) CS 294, Rendering Lecture 5: Monte Carlo Path Tracing Ravi Ramamoorthi
Radiosity A Fascinating Presentation by Alex Danilevky.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 10: Global Illumination Ravi Ramamoorthi Some images courtesy.
Everything on Global Illumination Xavier Granier - IMAGER/UBC.
Global Illumination May 7, Global Effects translucent surface shadow multiple reflection.
1 7M836 Animation & Rendering Global illumination, radiosity Arjan Kok
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 20: Monte Carlo Path Tracing Ravi Ramamoorthi Acknowledgements.
The Radiosity Method Donald Fong February 10, 2004.
Paper by Alexander Keller
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
CSCE 441 Computer Graphics: Radiosity Jinxiang Chai.
Computer Graphics (Spring 2008) COMS 4160, Lecture 22: Global Illumination
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Hybrid Algorithms K. H. Ko School of Mechatronics Gwangju Institute.
Global Illumination Jian Huang, CS 594, Fall 2002 This set of slides reference text book and the course note of Dutre et. al on SIGGRAPH 2001.
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.
12/05/02(c) 2002 University of Wisconsin Last Time Subdivision techniques for modeling Very brief intro to global illumination.
-Global Illumination Techniques
01/29/03© 2003 University of Wisconsin Last Time 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.
Computer Graphics Global Illumination: Photon Mapping, Participating Media Lecture 12 Taku Komura.
Global Illumination CMSC 435/634. Global Illumination Local Illumination – light – surface – eye – Throw everything else into ambient Global Illumination.
Towards a Taxonomy of Global Illumination Algorithms Philip Dutré Program of Computer Graphics Cornell University.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Radiosity K. H. Ko School of Mechatronics Gwangju Institute.
Graphics Lecture 13: Slide 1 Interactive Computer Graphics Lecture 13: Radiosity - Principles.
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.
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.
Real-Time High Quality Rendering
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002.
Monte-Carlo Ray Tracing and
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Hybrid Algorithms K. H. Ko School of Mechatronics Gwangju Institute.
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.
02/12/03© 2003 University of Wisconsin Last Time Intro to Monte-Carlo methods Probability.
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.
Slide 1Lastra, 2/14/2016 Monte-Carlo Methods. Slide 2Lastra, 2/14/2016 Topics Kajiya’s paper –Showed that existing rendering methods are approximations.
Global Illumination (3) Photon Mapping (1). Overview Light Transport Notation Path Tracing Photon Mapping –Photon Tracing –The Photon Map.
Global Illumination (2) Radiosity (3). Classic Radiosity Algorithm Mesh Surfaces into Elements Compute Form Factors Between Elements Solve Linear System.
Global Illumination (3) Path Tracing. Overview Light Transport Notation Path Tracing Photon Mapping.
01/27/03© 2002 University of Wisconsin Last Time Radiometry A lot of confusion about Irradiance and BRDFs –Clarrified (I hope) today Radiance.
Distributed Ray Tracing. Can you get this with ray tracing?
Graphics Lecture 14: Slide 1 Interactive Computer Graphics Lecture 14: Radiosity - Computational Issues.
CS552: Computer Graphics Lecture 33: Illumination and Shading.
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)
Computer graphics III – Rendering equation and its solution
Advanced Computer Graphics
Advanced Computer Graphics
Shading Revisited Some applications are intended to produce pictures that look photorealistic, or close to it The image should look like a photograph A.
Sampling and Reconstruction of Visual Appearance
The Rendering Equation
© 2005 University of Wisconsin
(c) 2002 University of Wisconsin
Path Tracing (some material from University of Wisconsin)
CSCE 441 Computer Graphics: Radiosity
(c) 2002 University of Wisconsin
Foundations of Computer Graphics (Spring 2012)
OPTICS III, IV: Global Illumination
Monte Carlo Path Tracing and Caching Illumination
Presentation transcript:

Global Illumination

Direct Illumination vs. Global Illumination reflected, scattered and focused light (not discreet). physical-based light transport calculations modeled around bidirectional reflective distribution functions (BRDFs). discreet light source. efficient lighting calculations based on light and surface vectors (i.e. fast cheats).

Indirect Illumination Color Bleeding

Contact Shadows Notice the surface just under the sphere. The shadow gets much darker where the direct illumination as well as most of the indirect illumination is occluded. That dark contact shadow helps enormously in “sitting” the sphere in scene. Contact shadows are difficult to fake, even with area lights.

Caustics Focused and reflected light, or caustics, are another feature of the real world that we lack in direct illumination.

Global illumination rendered images Caustics are a striking and unique feature of Global Illumination.

BRDF BRDF really just means “the way light bounces off of something.” Specular reflection: some of the light bounces right off of the surface along the angle of reflection without really changing color much. Diffuse reflection: some of the light gets refracted into the plastic and bounced around between red particles of pigment. Most of the green and the blue light is absorbed and only the red light makes it’s way back out of the surface. The red light bounced back is scattered every which way with fairly equal probability.

Rendering Equation  L is the radiance from a point on a surface in a given direction ω  E is the emitted radiance from a point: E is non-zero only if x’ is emissive  V is the visibility term: 1 when the surfaces are unobstructed along the direction ω, 0 otherwise  G is the geometry term, which depends on the geometric relationship between the two surfaces x and x’  It includes contributions from light bounded many times off surfaces  f is the BRDF

Light Emitted from a Surface Radiance (L): Power per unit area per unit solid angle Measured in W/m 2 sr dA is projected area – perpendicular to given direction Radiosity (B): Radiance integrated over all directions Power from per unit area, measured in W/m 2

Radiosity Concept Radiosity of each surface depends on radiosity of all other surfaces Treat global illumination as a linear system Need constant BRDF (diffuse) Solve rendering equation as a matrix problem Process Mesh into patches Calculate form factors Solve radiosity Display patches Cornell Program of Computer Graphics

Radiosity Equation Assume only diffuse reflection Convert to radiosity

Radiosity Approximations Discretize the surface into patches The form factor Fii = 0 (patches are flat) Fij = 0 if occluded Fij is dimensionless

Radiosity Matrix Such an equation exists for each patch, and in a closed environment, a set of n Simultaneous equations in n unknown B i values is obtained: A solution yields a single radiosity value Bi for each patch in the environment – a view-independent solution. The Bi values can be used in a standard renderer and a particular view of the environment constructed from the radiosity solution.

Intuition

Form Factor Intuition

Hemicube Compute form factor with image-space precision Render scene from centroid of Ai Use z-buffer to determine visibility of other surfaces Count “pixels” to determine projected areas

Monte Carlo Sampling Compute form factor by random sampling Select random points on elements Intersect line segment to evaluate V ij Evaluate F ij by Monte Carlo integration

Solving the Radiosity Equations Solution methods: Invert the matrix – O(n3) Iterative methods – O(n2) Hierarchical methods – O(n)

Examples Museum simulation. Program of Computer Graphics, Cornell University. 50,000 patches. Note indirect lighting from ceiling.

Gauss-Siedel Iteration method 1. For all i Bi = Ei 2. While not converged For each i in turn 3. Display the image using B i as the intensity of patch i

Interpretation of Iteration Iteratively gather radiosity to elements

Progressive Radiosity

Interpretation: Iteratively shoot “unshot” radiosity from elements Select shooters in order of unshot radiosity

Progressive Radiosity

Adaptive Meshing Refine mesh in areas of large errors

Adaptive Meshing Uniform MeshingAdaptive Meshing

Hierarchical Radiosity Refine elements hierarchically: Compute energy exchange at different element granularity satisfying a user- specified error tolerance

Hierarchical Radiosity

Displaying Radiosity Usually Gouraud Shading Computed Rendered

Radiosity Constrained by the resolution of your subdivision patches. Have to calculate all of the geometry before you rendered an image. No reflections or specular component.

Path Types OpenGL L(D|S)E Ray Tracing LDS*E Radiosity LD*E Path Tracing attempts to trace “all rays” in a scene

Ray Tracing LDS*E Paths Rays cast from eye into scene Why? Because most rays cast from light wouldn’t reach eye Shadow rays cast at each intersection Why? Because most rays wouldn’t reach the light source Workload badly distributed Why? Because # of rays grows exponentially, and their result becomes less influential objectslights

Tough Cases Caustics Light focuses through a specular surface onto a diffuse surface LSDE Which direction should secondary rays be cast to detect caustic? Bleeding Color of diffuse surface reflected in another diffuse surface LDDE Which direction should secondary rays be cast to detect bleeding?

Path Tracing Kajiya, SIGGRAPH 86 Diffuse reflection spawns infinite rays Pick one ray at random Cuts a path through the dense ray tree Still cast an extra shadow ray toward light source at each step in path Trace > 40 paths per pixel objectslights

Monte Carlo Path Tracing Integrate radiance for each pixel by sampling paths randomly

Basic Monte Carlo Path Tracer 1. Choose a ray (x, y), t; weight = 1 2. race ray to find intersection with nearest surface 3. Randomly decide whether to compute emitted or reflected light 1. Step 3a: If emitted, return weight * Le 1. Step 3b: If reflected, weight *= reflectance Generate ray in random direction Go to step 2

Bi-directional Path Tracing Role of source and receiver can be switched, flux does not change

Bi-directional Path Tracing

Tracing from eye

Tracing from light

Monte Carlo Path Tracing Advantages Any type of geometry (procedural, curved,...) Any type of BRDF (specular, glossy, diffuse,...) Samples all types of paths (L(SD)*E) Accurate control at pixel level Low memory consumption Disadvantages Slow convergence Noise in the final image

Monte Carlo path tracing 1000 path / pixel

Monte Carlo Ray Tracing It’s worse when you have small light sources (e.g. the sun) or lots of light and dark variation (i.e. high-frequency) in your environment.

Monte Carlo Integration That’s why you always see “overcast” lighting like this.

Noise Filtering van Jensen, Stanford Unfiltered filtered

Photon Mapping Monte Carlo path tracing relies on lots of camera rays to “find” the bright areas in a scene. Small bright areas can be a real problem. (Hence the typical “overcast” lighting). Why not start from the light sources themselves, scatter light into the environment, and keep track of where the light goes?

Photon Mapping Jensen EGRW 95, 96 Simulates the transport of individual photons Photons emitted from source Photons deposited on diffuse surfaces Photons reflected from surfaces to other surfaces Photons collected by rendering

What is a Photon? A photon p is a particle of light that carries flux  p (x p,  p ) Power:  p – magnitude (in Watts) and color of the flux it carries, stored as an RGB triple Position: x p – location of the photon Direction:  p – the incident direction  i used to compute irradiance Photons vs. rays Photons propagate flux Rays gather radiance pp  p xpxp

Sources Point source Photons emitted uniformly in all directions Power of source (W) distributed evenly among photons Flux of each photon equal to source power divided by total # of photons For example, a 60W light bulb would send out a total of 100K photons, each carrying a flux  of 0.6 mW Photons sent out once per simulation, not continuously as in radiosity

Russian Roulette Arvo & Kirk, Particle Transport and Image Synthesis, SIGGRAPH 90, pp Reflected flux only a fraction of incident flux After several reflections, spending a lot of time keeping track of very little flux Instead, absorb some photons and reflect the rest at full power Spend time tracing fewer full power photons Probability of reflectance is the reflectance  Probability of absorption is 1 – . ?

Mixed Surfaces Surfaces have specular and diffuse components  d – diffuse reflectance  s – specular reflectance  d +  s < 1 (conservation of energy) Let  be a uniform random value from 0 to 1 If  <  d then reflect diffuse Else if  <  d +  s then reflect specular Otherwise absorb

Photon Mapping Direct illumination Photon Map

Rendering Photons in photon map are collected by eye rays cast by a distributed ray tracer Multiple photon maps Indirect irradiance map Caustic map Rays use the radiance constructed from reflected flux density from nearest neighbor photons

Photon Mapping Rendering Ray Tracing At each hit: Ray trace further if the contribution > threshold (more accurate) Use photon map approximation otherwise Caustics rendered directly  A =  r 2

Caustic photon map The caustics photon map is used only to store photons corresponding to caustics. It is created by emitting photons towards the specular objects in the scene and storing these as they hit diffuse surfaces.

Caustic illumination

Global Photon Map The global photon map is used as a rough approximation of the light/flux within the scene It is created by emitting photons towards all objects. It is not visualized directly and therefore it does not require the same precision as the caustics photon map.

Indirect Illumination

Example 224,316 caustic photons, 3095 global photons

Example

Readings Textbook Distribution Ray Tracing: Theory and Practice Shirley and Wang. Proceedings of the 3rd Eurographics Rendering Workshop 1992 Distribution Ray Tracing: Theory and Practice Global Illumination using Photon Maps Henrik Wann Jensen, Rendering Techniques '96 Global Illumination using Photon Maps