You are previewing Advanced Global Illumination, 2nd Edition.
O'Reilly logo
Advanced Global Illumination, 2nd Edition

Book Description

This book provides a fundamental understanding of global illumination algorithms. It discusses a broad class of algorithms for realistic image synthesis and introduces a theoretical basis for the algorithms presented. Topics include: physics of light transport, Monte Carlo methods, general strategies for solving the rendering equation, stochastic path-tracing algorithms such as ray tracing and light tracing, stochastic radiosity including photon density estimation and hierarchical Monte Carlo radiosity, hybrid algorithms, metropolis light transport, irradiance caching, photon mapping and instant radiosity, beyond the rendering equation, image display and human perception. If you want to design and implement a global illumination rendering system or need to use and modify an existing system for your specific purpose, this book will give you the tools and the understanding to do so.

Table of Contents

  1. Foreword
  2. Preface
  3. Preface to the Second Edition
  4. Chapter 1 Introduction
    1. 1.1 What Is Realistic Image Synthesis?
      1. 1.1.1 The Importance of Realistic Image Synthesis
        1. Film and Visual Effects
        2. Architecture
        3. Ergonomic Design of Buildings and Offices
        4. Computer Games
        5. Lighting Engineering
        6. Predictive Simulations
        7. Flight and Car Simulators
        8. Advertising
      2. 1.1.2 History of Photorealistic Rendering
        1. Photorealism in the Precomputer Age
        2. Primitive Shading Algorithms
        3. Ray Tracing
        4. Radiosity
        5. The Rendering Equation
        6. Multipass Methods
        7. Current Developments
      3. 1.1.3 A Framework for Global Illumination Algorithms
        1. Measurement and Acquisition
        2. Light Transport
        3. Visual Display
    2. 1.2 Structure of this Book
    3. 1.3 How to Use this Book
  5. Chapter 2 The Physics of Light Transport
    1. 2.1 Brief History
    2. 2.2 Models of Light
      1. 2.2.1 Quantum Optics
      2. 2.2.2 Wave Model
      3. 2.2.3 Geometric Optics
    3. 2.3 Radiometry
      1. 2.3.1 Radiometric Quantities
        1. Radiant Power or Flux
        2. Irradiance
        3. Radiant Exitance or Radiosity
        4. Radiance
        5. Transport Theory
      2. 2.3.2 Relationships between Radiometric Quantities
        1. Wavelength Dependency
      3. 2.3.3 Properties of Radiance
        1. Property 1: Radiance is invariant along straight paths.
        2. Property 2: Sensors, such as cameras and the human eye, are sensitive to radiance.
      4. 2.3.4 Examples
        1. Example (Diffuse Emitter)
        2. Example (Nondiffuse Emitter)
        3. Example (Sun, Earth, Mars)
        4. Example (Plate)
    4. 2.4 Light Emission
    5. 2.5 Interaction of Light with Surfaces
      1. 2.5.1 BRDF
      2. 2.5.2 Properties of the BRDF
      3. 2.5.3 BRDF Examples
        1. Diffuse Surfaces
        2. Specular Surfaces
        3. Glossy Surfaces
      4. 2.5.4 Shading Models
        1. Physically Based Shading Models
        2. Empirical Models
    6. 2.6 Rendering Equation
      1. 2.6.1 Hemispherical Formulation
      2. 2.6.2 Area Formulation
      3. 2.6.3 Direct and Indirect Illumination Formulation
    7. 2.7 Importance
    8. 2.8 The Measurement Equation
    9. 2.9 Summary
    10. 2.10 Exercises
      1. Figure 2.1
      2. Figure 2.2
      3. Figure 2.3
      4. Figure 2.4
      5. Figure 2.5
      6. Figure 2.6
      7. Figure 2.7
      8. Figure 2.8
      9. Figure 2.9
      10. Figure 2.10
      11. Figure 2.11
  6. Chapter 3 Monte Carlo Methods
    1. 3.1 Brief History
    2. 3.2 Why Are Monte Carlo Techniques Useful?
    3. 3.3 Review of Probability Theory
      1. 3.3.1 Discrete Random Variables
        1. Expected Value
        2. Variance and Standard Deviation
        3. Functions of Random Variables
        4. Example (Binomial Distribution)
      2. 3.3.2 Continuous Random Variables
        1. Probability Distribution Function and Cumulative Distribution Function
        2. Expected Value
        3. Variance and Standard Deviation
        4. Example (Uniform Probability Distribution)
      3. 3.3.3 Conditional and Marginal Probabilities
    4. 3.4 Monte Carlo Integration
      1. 3.4.1 Weighted Sum of Random Variables
      2. 3.4.2 Estimator
        1. Example (Monte Carlo Summation)
        2. Example (Simple MC Integration)
      3. 3.4.3 Bias
      4. 3.4.4 Accuracy
      5. 3.4.5 Estimating the Variance
      6. 3.4.6 Deterministic Quadrature versus Monte Carlo
      7. 3.4.7 Multidimensional Monte Carlo Integration
        1. Example (Integration over a Hemisphere)
      8. 3.4.8 Summary of Monte Carlo
    5. 3.5 Sampling Random Variables
      1. 3.5.1 Inverse Cumulative Distribution Function
        1. Discrete Random Variables
        2. Continuous Random Variables
        3. Example (Cosine Lobe)
      2. 3.5.2 Rejection Sampling
      3. 3.5.3 Look-Up Table
    6. 3.6 Variance Reduction
      1. 3.6.1 Importance Sampling
      2. 3.6.2 Stratified Sampling
      3. 3.6.3 N-Rooks or Latin Hypercube Algorithm
      4. 3.6.4 Combining Stratified Sampling and Importance Sampling
        1. Example (Stratified Sampling of Discrete Sums)
      5. 3.6.5 Combining Estimators of Different Distributions
        1. Using Variance
        2. Multiple Importance Sampling
      6. 3.6.6 Control Variates
      7. 3.6.7 Quasi-Monte Carlo
        1. Why Quasi–Monte Carlo?
    7. 3.7 Summary
    8. 3.8 Exercises
      1. Figure 3.1
      2. Figure 3.2
      3. Figure 3.3
      4. Figure 3.4
      5. Figure 3.5
      6. Figure 3.6
      7. Figure 3.7
      8. Figure 3.8
      9. Figure 3.9
      1. Table 3.1
  7. Chapter 4 Strategies for Computing Light Transport
    1. 4.1 Formulation of the Rendering Equation
      1. 4.1.1 Exitant Radiance, Integration over the Hemisphere
      2. 4.1.2 Exitant Radiance, Integration over Surfaces
      3. 4.1.3 Incident Radiance, Integration over the Hemisphere
      4. 4.1.4 Incident Radiance, Integration over Surfaces
      5. 4.1.5 Radiant Flux
    2. 4.2 The Importance Function
      1. 4.2.1 Definition
      2. 4.2.2 Incident and Exitant Importance
      3. 4.2.3 Flux
    3. 4.3 Adjoint Equations
      1. 4.3.1 Linear Transport Operators
      2. 4.3.2 Inner Product of Functions
      3. 4.3.3 Adjoint Operators
    4. 4.4 Global Reflectance Distribution Function
      1. 4.4.1 Description
      2. 4.4.2 Properties of the GRDF
        1. Transport Equations
        2. Transforming Arguments
        3. Flux
      3. 4.4.3 Significance of the GRDF
    5. 4.5 Classification of Global Illumination Algorithms
      1. 4.5.1 Incident and Exitant Representations
      2. 4.5.2 Series Expansion
      3. 4.5.3 Physical Interpretation
      4. 4.5.4 Taxonomy
    6. 4.6 Path Formulation
    7. 4.7 Summary
    8. 4.8 Exercises
      1. Figure 4.1
      2. Figure 4.2
      3. Figure 4.3
      4. Figure 4.4
      5. Figure 4.5
      6. Figure 4.6
      7. Figure 4.7
      8. Figure 4.8
      9. Figure 4.9
      10. Figure 4.10
      11. Figure 4.11
      12. Figure 4.12
  8. Chapter 5 Stochastic Path-Tracing Algorithms
    1. 5.1 Brief History
    2. 5.2 Ray-Tracing Set-Up
    3. 5.3 Simple Stochastic Ray Tracing
      1. 5.3.1 Truly Random Paths
      2. 5.3.2 Russian Roulette
    4. 5.4 Direct Illumination
      1. 5.4.1 Direct and Indirect Illumination
      2. 5.4.2 Single Light Source Illumination
      3. 5.4.3 Multiple Light Source Illumination
      4. 5.4.4 Alternative Shadow Ray Sampling
      5. 5.4.5 Further Optimizations
    5. 5.5 Environment Map Illumination
      1. 5.5.1 Capturing Environment Maps
        1. Light Probe
        2. Fisheye Lens
      2. 5.5.2 Parameterizations
      3. 5.5.3 Sampling Environment Maps
    6. 5.6 Indirect Illumination
      1. 5.6.1 Uniform Sampling for Indirect Illumination
      2. 5.6.2 Importance Sampling for Indirect Illumination
        1. Cosine Sampling
        2. BRDF Sampling
        3. Incident Radiance Field Sampling
      3. 5.6.3 Area Sampling
      4. 5.6.4 Putting It All Together
      5. 5.6.5 Classic Ray Tracing
    7. 5.7 Light Tracing
      1. 5.7.1 Light-Tracing Algorithm
      2. 5.7.2 Light Tracing versus Ray Tracing
      3. 5.7.3 Related Techniques and Optimizations
    8. 5.8 Summary
    9. 5.9 Exercises
      1. Figure 5.1
      2. Figure 5.2
      3. Figure 5.3
      4. Figure 5.4
      5. Figure 5.5
      6. Figure 5.6
      7. Figure 5.7
      8. Figure 5.8
      9. Figure 5.9
      10. Figure 5.10
      11. Figure 5.11
      12. Figure 5.12
      13. Figure 5.13
      14. Figure 5.14
      15. Figure 5.15
      16. Figure 5.16
      17. Figure 5.17
      18. Figure 5.18
      19. Figure 5.19
      20. Figure 5.20
      21. Figure 5.21
  9. Chapter 6 Stochastic Radiosity
    1. 6.1 Classic Radiosity
      1. 6.1.1 Outline
      2. 6.1.2 Mathematical Problem Description
        1. The General Rendering Equation
        2. The Radiosity Integral Equation
        3. The Radiosity System of Linear Equations
      3. 6.1.3 The Classic Radiosity Method
      4. 6.1.4 Problems
    2. 6.2 The Form Factors
      1. 6.2.1 Properties of the Form Factors
      2. 6.2.2 Interpretation of Form Factors
      3. 6.2.3 Form Factor Sampling Using Local Lines
      4. 6.2.4 Form Factor Sampling Using Global Lines
    3. 6.3 Stochastic Relaxation Radiosity
      1. 6.3.1 The Jacobi Iterative Method for Radiosity
        1. The Basic Idea
        2. Regular Gathering of Radiosity
        3. Regular Shooting of Power
        4. Incremental Shooting of Power
        5. Discussion
      2. 6.3.2 Stochastic Jacobi Radiosity
        1. Stochastic Incremental Shooting of Power
        2. Stochastic Regular Shooting of Power
        3. Stochastic Regular Gathering of Radiosity
      3. 6.3.3 Discussion
        1. Incremental Shooting
        2. Regular Shooting
        3. Regular Gathering
        4. Other Stochastic Relaxation Methods for Radiosity
    4. 6.4 Discrete Random Walk Methods for Radiosity
      1. 6.4.1 Random Walks in a Discrete State Space
      2. 6.4.2 Shooting Random Walk Methods for Radiosity
        1. Collision Estimation
        2. Absorption Estimation
      3. 6.4.3 Adjoint Systems, Importance or Potential, and Gathering Random Walk Methods for Radiosity
      4. 6.4.4 Discussion
        1. Shooting versus Gathering
        2. Absorption, Survival, or Collision?
        3. Discrete Collision Shooting Random Walks versus Stochastic Jacobi Relaxation
    5. 6.5 Photon Density Estimation Methods
      1. 6.5.1 Photon Transport Simulation and Radiosity
      2. 6.5.2 Histogram Methods
      3. 6.5.3 Orthogonal Series Estimation
      4. 6.5.4 Kernel Methods
      5. 6.5.5 Nearest Neighbor Methods
      6. 6.5.6 Instant Radiosity
      7. 6.5.7 Discussion
        1. Continuous Gathering Random Walks
        2. Variance
        3. Bias
        4. Continuous versus Discrete Random Walks
      8. 6.5.8 Stochastic Iteration Variants of Density Estimation Algorithms
    6. 6.6 Variance Reduction and Low-Discrepancy Sampling
      1. 6.6.1 View-Importance-Driven Shooting
        1. View Importance
        2. View-Importance-Driven Shooting Random Walks
        3. View-Importance-Driven Stochastic Relaxation Radiosity
      2. 6.6.2 Control Variates
        1. Control Variates for Linear Systems
        2. Constant Control Variates in Random Walk Radiosity
        3. Constant Control Variates in Stochastic Relaxation Radiosity
      3. 6.6.3 Gathering for Free
        1. Combining Gathering and Shooting in Discrete Random Walk Radiosity
        2. Combining Gathering and Shooting in Stochastic Jacobi Radiosity
      4. 6.6.4 Weighted Importance Sampling
      5. 6.6.5 Low-Discrepancy Sampling
    7. 6.7 Hierarchical Refinement and Clustering
    8. 6.8 Exercises
      1. Figure 6.1
      2. Figure 6.2
      3. Figure 6.3
      4. Figure 6.4
      5. Figure 6.5
      6. Figure 6.6
      7. Figure 6.7
      8. Figure 6.8
      9. Figure 6.9
      10. Figure 6.10
      11. Figure 6.11
      12. Figure 6.12
      13. Figure 6.13
      14. Figure 6.14
      15. Figure 6.15
      16. Figure 6.16
      17. Figure 6.17
      18. Figure 6.18
      19. Figure 6.19
      20. Figure 6.20
      21. Figure 6.21
      22. Figure 6.22
      23. Figure 6.23
      24. Figure 6.24
      25. Figure 6.25
      26. Figure 6.26
      27. Figure 6.27
      28. Figure 6.28
      29. Figure 6.29
      30. Figure 6.30
      31. Figure 6.31
      1. Table 6.1
      2. Table 6.2
  10. Chapter 7 Hybrid Algorithms
    1. 7.1 Final Gathering
      1. 7.1.1 Simple Hemisphere Sampling
      2. 7.1.2 Importance Sampling
      3. 7.1.3 Results
    2. 7.2 Multipass Methods
      1. 7.2.1 Regular Expressions
      2. 7.2.2 Construction of a Multipass Algorithm
      3. 7.2.3 Weighted Multipass Algorithms
    3. 7.3 Bidirectional Tracing
    4. 7.4 Metropolis Light Transport
        1. Detailed Balance
        2. The Algorithm
        3. Discussion
    5. 7.5 Irradiance Caching
        1. Interpolation
        2. The Irradiance Cache
    6. 7.6 Photon Mapping
        1. Tracing Photons: Pass 1
        2. Reflected Radiance using Photon Maps
        3. Computing Images: Pass 2
    7. 7.7 Instant Radiosity
    8. 7.8 Lightcuts and Multidimensional Lightcuts
      1. 7.8.1 Lightcuts
        1. Using the Cut
        2. Finding the Cut
      2. 7.8.2 Multidimensional Lightcuts
        1. Summary
    9. 7.9 Exercises
      1. Figure 7.1
      2. Figure 7.2
      3. Figure 7.3
      4. Figure 7.4
      5. Figure 7.5
      6. Figure 7.6
      7. Figure 7.7
      8. Figure 7.8
      9. Figure 7.9
      10. Figure 7.10
      11. Figure 7.11
      12. Figure 7.12
      13. Figure 7.13
      14. Figure 7.14
      15. Figure 7.15
      16. Figure 7.16
      17. Figure 7.17
      18. Figure 7.18
      19. Figure 7.19
      20. Figure 7.20
      21. Figure 7.21
  11. Chapter 8 The Quest for Ultimate Realism and Speed
    1. 8.1 Beyond the Rendering Equation
      1. 8.1.1 Participating Media
      2. 8.1.2 Volume Emission
      3. 8.1.3 Absorption
      4. 8.1.4 Out-Scattering, Extinction Coefficient, and Albedo
      5. 8.1.5 In-Scattering, Field-and Volume-Radiance, and the Phase Function
        1. Examples of Phase Functions
      6. 8.1.6 The Rendering Equation in the Presence of Participating Media
        1. Spatial Formulation
      7. 8.1.7 Global Illumination Algorithms for Participating Media
      8. 8.1.8 Tracing Photon Trajectories in Participating Media
      9. 8.1.9 Volume Photon Density Estimation
        1. Viewing Precomputed Illumination in Participating Media
      10. 8.1.10 Light Transport as a Diffusion Process
      11. 8.1.11 Subsurface Scattering
      12. 8.1.12 Polarization, Interference, Diffraction, Fluorescence, Phosphorescence and Nonconstant Media
        1. Nonconstant Media: Mirages and Twinkling Stars and Such
        2. Fluorescence and Phosphorescence: Reflection at a Different Wavelength and a Different Time
        3. Interference: Soap Bubbles and Such
        4. Diffraction: Compact Discs and Brushed Metals
        5. Polarization
    2. 8.2 Image Display and Human Perception
      1. 8.2.1 Tone Mapping
      2. 8.2.2 Perception-Based Acceleration Techniques
        1. Visual Difference Predictor
        2. Maximum Likelihood Difference Scaling
        3. Perceptually Based Global Illumination Algorithms
    3. 8.3 Fast Global Illumination
      1. 8.3.1 Sparse Sampling: Exploiting Coherence
        1. Image Space
        2. World Space
        3. Line Space
      2. 8.3.2 Dynamic Scenes
      3. 8.3.3 Fast Ray Tracing
      4. 8.3.4 Graphics Hardware and Precomputed Radiance Transfer
      5. 8.3.5 Ambient Occlusion
      6. 8.3.6 Precomputed Radiance Transfer
        1. Diffuse PRT
        2. All-Frequency PRT
        3. Summary of PRT
      1. Figure 8.1
      2. Figure 8.2
      3. Figure 8.3
      4. Figure 8.4
      5. Figure 8.5
      6. Figure 8.6
      7. Figure 8.7
      8. Figure 8.8
      9. Figure 8.9
      10. Figure 8.10
      11. Figure 8.11
      12. Figure 8.12
      13. Figure 8.13
      14. Figure 8.14
      15. Figure 8.15
      16. Figure 8.16
      17. Figure 8.17
      18. Figure 8.18
      19. Figure 8.19
      20. Figure 8.20
  12. Chapter 9 Conclusion
    1. 9.1 Achievements of Photorealistic Rendering
    2. 9.2 Unresolved Issues in Photorealistic Rendering
    3. 9.3 Concluding Remarks
  13. Appendix A A Class Library for Global Illumination
    1. A.1 Path Node Classes
      1. A.1.1 Overview
      2. A.1.2 Common Interface: The <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="code">PathNode</span> Base Class Base Class
      3. A.1.3 Pixel Filtering and Sampling: The <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="code">EyeNode</span> Class Class
      4. A.1.4 Light Emission: The <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="code">EmissionNode</span> Classes Classes
      5. A.1.5 Light and Potential Scattering: The <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="code">ScatteringNode</span> Classes Classes
        1. Surface Scattering: <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="code">SurfaceNode</span> Class Class
        2. Paths Disappearing into the Background: <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="code">BackgroundNode</span> Class Class
    2. A.2 Light Source Sampling Classes
      1. A.2.1 Surface Emission Sampling: The <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="code">SurfaceEmissionSampler</span> and and <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="code">WeightedSurfaceEmissionSampler</span> Classes Classes
        1. Weighted Surface Emission Sampling
      2. A.2.2 Background Emission Sampling: The <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="code">BackgroundEmissionSampler</span> Class Class
      3. A.2.3 The <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="code">EmissionSampler</span> Wrapper Class Wrapper Class
    3. A.3 Support Classes
      1. A.3.1 A Pinhole Camera Virtual Screen Abstraction: The <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="code">ScreenBuffer</span> Class Class
      2. A.3.2 Converting High to Low Dynamic Range Color Values: The <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="code">ToneMapper</span> Classes Classes
      3. A.3.3 Integration into an Application: The Browser and Tracer Classes
        1. The <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="code">Browser</span> Classes Classes
        2. The <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="code">Tracer</span> Classes Classes
    4. A.4 Example Code Fragments
      1. A.4.1 A Light Tracer
      2. A.4.2 A Path Tracer
      3. A.4.3 Multiple Importance Light Source Sampling
      4. A.4.4 A Bidirectional Path Tracer
      1. Figure A.1
      2. Figure A.2
  14. Appendix B Hemispherical Coordinates
    1. B.1 Hemispherical Coordinates
    2. B.2 Solid Angle
    3. B.3 Integrating over the Hemisphere
    4. B.4 Hemisphere-Area Transformation
      1. Figure B.1
      2. Figure B.2
      3. Figure B.3
      4. Figure B.4
      5. Figure B.5
  15. Appendix C Theoretical Analysis of Stochastic Relaxation Radiosity
  16. Bibliography