173 41 3MB
English Pages 94
Series Series SeriesEditor: Editor: Editor:Brian Brian BrianA. A. A.Barsky, Barsky, Barsky,The The TheUniversity University Universityof of ofCalifornia, California, California,Berkeley Berkeley Berkeley
Efficient EfficientQuadrature QuadratureRules Rulesfor for Illumination IlluminationIntegrals Integrals
From From FromQuasi Quasi QuasiMonte Monte MonteCarlo Carlo Carloto to toBayesian Bayesian BayesianMonte Monte MonteCarlo Carlo Carlo
Rendering Rendering Renderingphotorealistic photorealistic photorealisticimages images imagesisisisaaacostly costly costlyprocess process processwhich which whichcan can cantake take takeup up upto to toseveral several severaldays days daysin in inthe the thecase case caseof of of high high highquality quality qualityimages. images. images.In In Inmost most mostcases, cases, cases,the the thetask task taskof of ofsampling sampling samplingthe the theincident incident incidentradiance radiance radiancefunction function functionto to toevaluate evaluate evaluate the the theillumination illumination illuminationintegral integral integralisisisresponsible responsible responsiblefor for foran an animportant important importantshare share shareof of ofthe the thecomputation computation computationtime. time. time.Therefore, Therefore, Therefore, to to toreach reach reachacceptable acceptable acceptablerendering rendering renderingtimes, times, times,the the theillumination illumination illuminationintegral integral integralmust must mustbe be beevaluated evaluated evaluatedusing using usingaaalimited limited limitedset set set of of ofsamples. samples. samples.Such Such Suchaaarestriction restriction restrictionraises raises raisesthe the thequestion question questionof of ofhow how howto to toobtain obtain obtainthe the themost most mostaccurate accurate accurateapproximation approximation approximation possible possible possiblewith with withsuch such suchaaalimited limited limitedset set setof of ofsamples. samples. samples.One One Onemust must mustthus thus thusensure ensure ensurethat that thatsampling sampling samplingproduces produces producesthe the thehighhighhighest est estamount amount amountof of ofinformation information informationpossible possible possibleby by bycarefully carefully carefullyplacing placing placingand and andweighting weighting weightingthe the thelimited limited limitedset set setof of ofsamples. samples. samples. Furthermore, Furthermore, Furthermore,the the theintegral integral integralevaluation evaluation evaluationshould should shouldtake take takeinto into intoaccount account accountnot not notonly only onlythe the theinformation information informationbrought brought broughtby by by sampling sampling samplingbut but butalso also alsopossible possible possibleinformation information informationavailable available availableprior prior priorto to tosampling, sampling, sampling,such such suchas as asthe the theintegrand integrand integrandsmoothsmoothsmoothness. ness. ness.This This Thisidea idea ideaof of ofsparse sparse sparseinformation information informationand and andthe the theneed need needto to tofully fully fullyexploit exploit exploitthe the thelittle little littleinformation information informationavailable available availableisisis present present presentthroughout throughout throughoutthis this thisbook. book. book.The The Thepresented presented presentedmethods methods methodscorrespond correspond correspondto to tothe the thestate-of-the-art state-of-the-art state-of-the-artsolutions solutions solutionsin in in computer computer computergraphics, graphics, graphics,and and andtake take takeinto into intoaccount account accountinformation information informationwhich which whichhad had hadso so sofar far farbeen been beenunderexploited underexploited underexploited(or (or (oreven even even neglected) neglected) neglected)by by bythe the theprevious previous previousapproaches. approaches. approaches.The The Theintended intended intendedaudiences audiences audiencesare are arePh.D. Ph.D. Ph.D.students students studentsand and andresearchers researchers researchers in in inthe the thefield field fieldof of ofrealistic realistic realisticimage image imagesynthesis synthesis synthesisor or orglobal global globalillumination illumination illuminationalgorithms, algorithms, algorithms,or or orany any anyperson person personwith with withaaasolid solid solid background background backgroundin in ingraphics graphics graphicsand and andnumerical numerical numericaltechniques. techniques. techniques.
EFFICIENT QUADRATURE RULES FOR ILLUMINATION INTEGRALS EFFICIENT QUADRATURE QUADRATURE RULES RULES FOR FOR ILLUMINATION ILLUMINATION INTEGRALS INTEGRALS EFFICIENT
Ricardo Ricardo RicardoMarques, Marques, Marques,Institut Institut InstitutNational National Nationalde de deRecherche Recherche Rechercheen en enInformatique Informatique InformatiqueetetetAutomatique, Automatique, Automatique,France France France Christian Christian ChristianBouville, Bouville, Bouville,Institut Institut Institutde de deRecherche Recherche Rechercheen en enInformatique Informatique InformatiqueetetetSystèmes Systèmes SystèmesAléatoires, Aléatoires, Aléatoires,France France France Luís Luís LuísPaulo Paulo PauloSantos, Santos, Santos,Centro Centro CentroAlgoritmi, Algoritmi, Algoritmi,Universidade Universidade Universidadedo do doMinho, Minho, Minho,Portugal Portugal Portugal Kadi Kadi KadiBouatouch, Bouatouch, Bouatouch,Institut Institut Institutde de deRecherche Recherche Rechercheen en enInformatique Informatique InformatiqueetetetSystèmes Systèmes SystèmesAléatoires, Aléatoires, Aléatoires,France, France, France,Université Université Universitéde de de Rennes Rennes RennesI,I,I,France France France
MARQUES BOUVILLE SANTOS BOUATOUCH MARQUES ••• BOUVILLE BOUVILLE ••• SANTOS SANTOS ••• BOUATOUCH BOUATOUCH MARQUES
SSyntheSiS yntheSiS yntheSiS L LectureS ectureS ectureS on on on c omputer omputer G GraphicS raphicS raphicS and and and a animation nimation nimation computer
Series Series SeriesISSN: ISSN: ISSN:1933-8996 1933-8996 1933-8996
ABOUT ABOUT ABOUTSYNTHESIS SYNTHESIS SYNTHESIS
MORGAN MORGAN MORGAN& CLAYPOOL CLAYPOOL PUBLISHERS PUBLISHERS PUBLISHERS & &CLAYPOOL wwwwwwwww...m m mooorrrgggaaannnccclllaaayyypppoooooolll...cccooom m m
ISBN: ISBN: ISBN: 978-1-62705-769-1 978-1-62705-769-1 978-1-62705-769-1
90000 90000 90000 999781627 781627 781627057691 057691 057691
MOR GA N & CL AY P OOL MOR GA GA N N& & CL CL AY AY P P OOL OOL MOR
This This Thisvolume volume volumeisisisaaaprinted printed printedversion version versionof of ofaaawork work workthat that thatappears appears appearsin in inthe the theSynthesis Synthesis Synthesis Digital Digital DigitalLibrary Library Libraryof ofofEngineering Engineering Engineeringand and andComputer Computer ComputerScience. Science. Science.Synthesis Synthesis SynthesisLectures Lectures Lectures provide provide provideconcise, concise, concise,original original originalpresentations presentations presentationsof of ofimportant important importantresearch research researchand and anddevelopment development development topics, topics, topics,published published publishedquickly, quickly, quickly,in in indigital digital digitaland and andprint print printformats. formats. formats.For For Formore more moreinformation information information visit visit visitwww.morganclaypool.com www.morganclaypool.com www.morganclaypool.com
MOR MOR MORG G GA A AN N N& CL CLAY AY AYPOOL POOL POOL PU PU PUBLI BLI BLISSSH H HERS ERS ERS &CL
Efficient Efficient Quadrature Quadrature Rules Rules for for Illumination Illumination Integrals Integrals From From Quasi Quasi Monte Monte Carlo Carlo to to Bayesian Bayesian Monte Monte Carlo Carlo Ricardo RicardoMarques Marques Christian ChristianBouville Bouville Luís LuísPaulo PauloSantos Santos Kadi KadiBouatouch Bouatouch SSyntheSiS yntheSiS yntheSiS L LectureS ectureS ectureS on on on computer omputer omputer G GraphicS raphicS raphicS and and and a animation nimation nimation c Brian Brian BrianA. A. A.Barsky, Barsky, Barsky,Series Series SeriesEditor Editor Editor
Efficient Quadrature Rules for Illumination Integrals From Quasi Monte Carlo to Bayesian Monte Carlo
Synthesis Lectures on Computer Graphics and Animation Editor Brian A. Barsky, University of California, Berkeley
is series will present lectures on research and development in computer graphics and geometric modeling for an audience of professional developers, researchers and advanced students. Topics of interest include Animation, Visualization, Special Effects, Game design, Image techniques, Computational Geometry, Modeling, Rendering and others of interest to the graphics system developer or researcher.
Efficient Quadrature Rules for Illumination Integrals: From Quasi Monte Carlo to Bayesian Monte Carlo Ricardo Marques, Christian Bouville, Luís Paulo Santos, and Kadi Bouatouch 2015
Numerical Methods for Linear Complementarity Problems in Physics-Based Animation Sarah Niebe and Kenny Erleben 2015
Mathematical Basics of Motion and Deformation in Computer Graphics Ken Anjyo and Hiroyuki Ochiai 2014
Mathematical Tools for Shape Analysis and Description Silvia Biasotti, Bianca Falcidieno, Daniela Giorgi, and Michela Spagnuolo 2014
Information eory Tools for Image Processing Miquel Feixas, Anton Bardera, Jaume Rigau, Qing Xu, and Mateu Sbert 2014
Gazing at Games: An Introduction to Eye Tracking Control Veronica Sundstedt 2012
iv
Rethinking Quaternions Ron Goldman 2010
Information eory Tools for Computer Graphics Mateu Sbert, Miquel Feixas, Jaume Rigau, Miguel Chover, and Ivan Viola 2009
Introductory Tiling eory for Computer Graphics Craig S.Kaplan 2009
Practical Global Illumination with Irradiance Caching Jaroslav Krivanek and Pascal Gautron 2009
Wang Tiles in Computer Graphics Ares Lagae 2009
Virtual Crowds: Methods, Simulation, and Control Nuria Pelechano, Jan M. Allbeck, and Norman I. Badler 2008
Interactive Shape Design Marie-Paule Cani, Takeo Igarashi, and Geoff Wyvill 2008
Real-Time Massive Model Rendering Sung-eui Yoon, Enrico Gobbetti, David Kasik, and Dinesh Manocha 2008
High Dynamic Range Video Karol Myszkowski, Rafal Mantiuk, and Grzegorz Krawczyk 2008
GPU-Based Techniques for Global Illumination Effects László Szirmay-Kalos, László Szécsi, and Mateu Sbert 2008
High Dynamic Range Image Reconstruction Asla M. Sá, Paulo Cezar Carvalho, and Luiz Velho 2008
High Fidelity Haptic Rendering Miguel A. Otaduy and Ming C. Lin 2006
v
A Blossoming Development of Splines Stephen Mann 2006
Copyright © 2015 by Morgan & Claypool
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means—electronic, mechanical, photocopy, recording, or any other except for brief quotations in printed reviews, without the prior permission of the publisher.
Efficient Quadrature Rules for Illumination Integrals: From Quasi Monte Carlo to Bayesian Monte Carlo Ricardo Marques, Christian Bouville, Luís Paulo Santos, and Kadi Bouatouch www.morganclaypool.com
ISBN: 9781627057691 ISBN: 9781627057707
paperback ebook
DOI 10.2200/S00649ED1V01Y201505CGR019
A Publication in the Morgan & Claypool Publishers series SYNTHESIS LECTURES ON COMPUTER GRAPHICS AND ANIMATION Lecture #19 Series Editor: Brian A. Barsky, University of California, Berkeley Series ISSN Print 1933-8996 Electronic 1933-9003
Efficient Quadrature Rules for Illumination Integrals From Quasi Monte Carlo to Bayesian Monte Carlo
Ricardo Marques Institut National de Recherche en Informatique et Automatique, France
Christian Bouville Institut de Recherche en Informatique et Systèmes Aléatoires, France
Luís Paulo Santos Centro Algoritmi, Universidade do Minho, Portugal
Kadi Bouatouch Institut de Recherche en Informatique et Systèmes Aléatoires, France Université de Rennes I, France
SYNTHESIS LECTURES ON COMPUTER GRAPHICS AND ANIMATION #19
M &C
Morgan & cLaypool publishers
ABSTRACT Rendering photorealistic images is a costly process which can take up to several days in the case of high quality images. In most cases, the task of sampling the incident radiance function to evaluate the illumination integral is responsible for an important share of the computation time. erefore, to reach acceptable rendering times, the illumination integral must be evaluated using a limited set of samples. Such a restriction raises the question of how to obtain the most accurate approximation possible with such a limited set of samples. One must thus ensure that sampling produces the highest amount of information possible by carefully placing and weighting the limited set of samples. Furthermore, the integral evaluation should take into account not only the information brought by sampling but also possible information available prior to sampling, such as the integrand smoothness. is idea of sparse information and the need to fully exploit the little information available is present throughout this book. e presented methods correspond to the state-of-the-art solutions in computer graphics, and take into account information which had so far been underexploited (or even neglected) by the previous approaches. e intended audiences are Ph.D. students and researchers in the field of realistic image synthesis or global illumination algorithms, or any person with a solid background in graphics and numerical techniques.
KEYWORDS Monte Carlo methods, Bayesian Monte Carlo, Quasi-Monte Carlo, spherical integration, spherical sampling, spherical Gaussian, global illumination, raytracing, photorealistic rendering
ix
Contents 1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 1.2 1.3 1.4
2
Spherical Fibonacci Point Sets for QMC Estimates of Illumination Integrals . . 5 2.1 2.2
2.3 2.4 2.5
2.6
3
e Global Illumination Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Illumination Integral Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Book Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2.1 QMC on the Unit Square . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2.2 QMC Rules on the Unit Sphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2.3 QMC Point Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.2.4 Hemispherical Projections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.2.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Spherical Fibonacci Point Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 QMC for Illumination Integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.5.1 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.5.2 Predicting the Estimate Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.5.3 Experimental Estimate Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Bayesian Monte Carlo for Global Illumination . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.1 3.2
3.3
Introduction and Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Representing a Function Using a Smooth Model . . . . . . . . . . . . . . . . . . . . . . . . 32 3.2.1 Linear Basis Functions Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.2.2 Bayesian Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Bayesian Monte Carlo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 3.3.1 BMC Quadrature Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 3.3.2 Reducing the Number of Hyperparameters . . . . . . . . . . . . . . . . . . . . . . . 45 3.3.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
x
3.4
3.5
3.6
A
Applying BMC to Global Illumination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 3.4.1 Spherical Gaussians for Fast Quadrature Computation . . . . . . . . . . . . . . 47 3.4.2 Prior GP: a Global Model with Local Adaptation . . . . . . . . . . . . . . . . . 49 3.4.3 Optimal Samples Set for Illumination Integrals . . . . . . . . . . . . . . . . . . . 53 3.4.4 From the Hemisphere to the Gaussian Lobe . . . . . . . . . . . . . . . . . . . . . . 55 3.4.5 Precomputations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 3.4.6 e Rendering Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 3.5.1 Experimental Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 3.5.2 Hyperparameters Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 3.5.3 Comparison: BMC vs. QMC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 3.5.4 Skipping the Learning Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Posterior Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Authors’ Biographies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
1
CHAPTER
1
Introduction 1.1
THE GLOBAL ILLUMINATION PROBLEM
One of the most challenging problems in the field of computer graphics is to synthesize physically based realistic images given an accurate model of a virtual scene. is model contains geometric information describing the shape of the objects as well as their corresponding material characteristics. It also contains a description of the light sources, and a camera specifying how the scene is “seen.” e light emitted by the light sources will then interact with the objects of the scene through multiple inter-reflections, refractions, and scattering effects. e process of synthesizing a realistic image consists in simulating these interactions and determining how much light enters the virtual camera. It has been mathematically formulated by Kajya [Kaj86], revisited by several other authors [DBBS06, PH10], and is given by the following equation: Z Lo .ωo / D Le .ωo / C Li .ωi / .ωi ; ωo / .ωi n/ d ˝.ωi / (1.1) ˝2
which is referred to as illumination integral. For a given point on a surface, Eq. (1.1) gives the outgoing radiance Lo in direction ωo . Le is the radiance due to self emission. Li .ωi / is the incident radiance from direction ωi and is the bidirectional scattering distribution function (BSDF) which models how light is scattered at the surface point. However, for the sake of simplicity, in this book we only consider surface reflection effects. In this case, models the fraction of the irradiance which is reflected at the surface in direction ωo , and is called bidirectional reflectance distribution function (BRDF). e radiance Li .ωi / arriving at a given surface point can be separated in two main components: • the direct component due to the radiance arriving at the surface point directly from the light sources; and • the indirect component which corresponds to the light arriving at the surface point after one or more bounces, i.e., not directly from the light sources. Due to computing power constraints, the first image synthesis algorithms only evaluated the direct component because it generally produces the most important part of the reflected/refracted/scattered radiance and it is the easiest to compute. Nowadays, all the realistic
2
1. INTRODUCTION
image synthesis programs allow a full evaluation of the illumination integral. is task of synthesizing an image taking into account both the direct and the indirect light components is referred to as global illumination (GI).
1.2
ILLUMINATION INTEGRAL EVALUATION
e illumination integral (Eq. (1.1)) has no analytical solution except for very particular cases in which very strong assumptions are made. Several distinct techniques have been developed to provide a solution to Eq. (1.1). Some approaches are based on a brute force extensive evaluation of the integral by resorting to classical Monte Carlo techniques [Kaj86]. Other methods are based on the observation that there exists a certain spatial coherence in the illumination, and this coherence is exploited by trading off a higher error for efficiency. But despite their differences, all these approaches require a sampling phase. Combining Samples e Monte Carlo rendering algorithms which operate in the ray paths space, such as bidirectional path tracing [VG94, LW93], rely on sampling for simulating both the eye paths and the light paths existing in the scene. As shown by Veach [Vea98], the evaluation of the direct incident radiance benefits from resorting to a combination of sampling the light sources and a hemispherical sampling of the incoming/outgoing directions arriving at/leaving the surface point with a probability proportional to the BRDF. is technique of combining two different Monte Carlo estimators is referred to as multiple importance sampling. Transferring Cost for Precomputation A different class of techiques, mainly used for evaluating the indirect radiance component, resorts to a precomputation phase. It is the case of methods such as radiance caching [WRC88], irradiance caching [KGPB05] and photon mapping [Jen96], which use the precomputation step to collect and store information in the form of an (ir)radiance cache and photon map respectively. ese techniques also heavily rely on sampling since they require, at some stage, hemispherical sampling around the surface normal at a given surface point. Other Visual Effects Sampling is also needed to produce more advanced visual effects such as motion blur and depth-of-field. Motion blur requires sampling an additional dimension (i.e., time) so as to capture the movement in the scene during the exposure time. To simulate depth-offield, the camera lens must be sampled, adding two more dimensions to the illumination integral. Oversampling of the image plane is also necessary to produce a final image free from aliasing [CPC84]. e Importance of High Quality Sampling e quality of the result of these sampling operations is strongly dependent on the samples placement and weighting. erefore, several works have focused on improving the purely random sampling used in classic Monte Carlo techniques [Kel12]. eir approach consists in using deterministic sequences which improve the uniformity of the samples distributed over the domain of integration. e resulting estimator is then called
1.3. MOTIVATION
Quasi-Monte Carlo (QMC) estimator. In this book we focus on the case of hemispherical sampling for spherical integration. We will show that the presented approaches can better exploit the available information, which is later used for careful samples placement and weighting.
1.3
MOTIVATION
e spherical sampling of the incident radiance function is a costly process which strongly impacts the rendering time (i.e., up to several days in the case of high quality images). erefore the illumination integral must be evaluated using a limited set of samples. Such a restriction raises the question of how to obtain the most accurate approximation possible with such a limited set of samples. We need to ensure that sampling produces the highest amount of information possible by carefully placing the limited set of samples. Furthermore, we want our integral evaluation to take into account not only the information brought by sampling but also possible information available prior to sampling such as the integrand smoothness. e idea of sparse information and the need to fully exploit the little information available will be present throughout this book. e presented methods correspond to the state-of-the-art solutions in computer graphics, and take into account information which had so far been underexploited (or even neglected) by the previous approaches. Examples of this type of information are the hemispherical nature of the domain of integration, the relative samples position and the integrand smoothness.
1.4
BOOK OVERVIEW
e chapters of this book can be summarized as follows. Chapter 2: Spherical Fibonacci Point Sets for QMC Estimates of Illumination Integrals e common approach in computer graphics for generating Quasi-Monte Carlo (QMC) sampling patterns for spherical integration consists in lifting low discrepancy sample sets from the unit square to the sphere using an equal area transform [KK02, GHSK06]. However, such an approach is suboptimal in terms of integration error since the low discrepancy properties of the unit square sample sets are impaired by the spherical transform. In this chapter we present a strategy for producing high-quality QMC sampling patterns for spherical integration by resorting to spherical Fibonacci point sets [Sve94, HN04]. We show that these point sets allow an improved performance when applied to the computation of the illumination integral, with respect to the existing sampling techniques [MBRC 13a]. Moreover, we introduce relevant theoretical aspects on QMC spherical integration which are not well known to the computer graphics community. Chapter 3: Bayesian Monte Carlo for Global Illumination Bayesian Monte Carlo [RG02] is a non-frequentist integration technique which has recently been successfully applied to the computation of the illumination integral [BBLC 09, MBRC 13b]. is technique, which does not resort to a probability density function (pdf ), allows a meticulous placement of the samples over the
3
4
1. INTRODUCTION
domain of integration. e samples position is chosen so as to minimize the variance of the estimate. e samples value is then averaged according to a quadrature rule where the weight of each sample depends on the sample position and on the integrand smoothness (as characterized by a covariance function). e results obtained by Brouillat et al. [BBLC 09] show that Bayesian Monte Carlo can significantly outperform importance sampling Monte Carlo thanks to a more effective use of the prior knowledge and of the information brought by the samples. But these results are strictly limited to diffuse reflections since their strategy for efficiently computing the quadrature coefficients does not apply to non-diffuse BRDFs. is chapter presents a theoretical framework which allows generalizing the application of BMC to a broad class of BRDFs [MBRC 13b].
5
CHAPTER
2
Spherical Fibonacci Point Sets for QMC Estimates of Illumination Integrals 2.1
INTRODUCTION
Quasi-Monte Carlo integration (QMC) differs from classic Monte Carlo methods (CMC) in the way samples are distributed over the integration domain. In QMC, the purely random sample sets associated with CMC are replaced by more regular deterministic sampling patterns, yielding faster convergence rates and different error characteristics. is feature has made QMC prevalent in computer graphics [SEB08, Kel12], where it is often used to estimate the value of spherical integrals such as the illumination integral (Eq (1.1)). However, in global illumination, the common approach used to generate QMC sample sets for spherical integration is suboptimal. It consists in lifting low-discrepancy sample sets from the unit square to the unit sphere through an equal-area transform [MFS04, Ost07]. e problem with this approach is that the low-discrepancy properties of the unit square sample sets are impaired by the spherical projection. Indeed, as we will see later, the estimate error is proportional to the spherical discrepancy of the used samples set, and using such a technique results in a higher estimate error. is problem could be solved by constructing point sets which directly minimize the spherical discrepancy. However, as opposed to the unit square case, no explicit construction of point sets with minimal discrepancy for spherical sampling is known. Nevertheless, the recent literature from numerical analysis on the sphere has focused on a particular point set named spherical Fibonacci [ABD12, BD11]. is point set is directly generated on the sphere, hence avoiding the impairments which stem from the lifting process. e authors have shown that these point sets are particularly well suited to sphere sampling compared to the traditional low-discrepancy point sets lifted from the unit square. In this chapter, we describe the Spherical Fibonacci (SF) points set and show how they can be applied to estimate the illumination integral. is chapter is structured as follows. We start by introducing theoretical concepts regarding spherical integration using QMC (Sec. 2.2). en, in Sec. 2.3, we give a detailed description of the Fibonacci spherical point sets. Section 2.4 focuses on how to adapt the spherical Fibonacci point sets for evaluating the illumination integral. Finally, some results and conclusions are presented.
6
2. SF POINT SETS FOR QMC ESTIMATES OF ILLUMINATION INTEGRALS
2.2
BACKGROUND
2.2.1 QMC ON THE UNIT SQUARE Before proceeding to the presentation of the QMC integration rules on the sphere, let us briefly describe the QMC integration rules on the unit square so as to make a clear distinction between integration over a unit square and over a unit sphere. Classic Monte Carlo methods are frequently used to approximate integrals of the form: I D
Z
f .x/d x;
Œ0;12
where f is a real valued function defined over Œ0; 12 . is approach consists in using a set PN D fx1 ; : : : ; xN g of N random points uniformly distributed on Œ0; 12 to estimate I . e estimate consists in averaging f .xj / [L’E09], such that: N 1 X IO D f .xj /; N j D1
where IO is the estimated value of I . e rate of convergence of such an estimator is in O.N 1=2 /, where N is the number of samples. Quasi-Monte Carlo can be seen as the deterministic counter-part of CMC, where the point set PN is constructed deterministically instead of randomly. It arises as an alternative solution which aims at achieving a better order of convergence than the O.N 1=2 / rate obtained 2 with purely random distributions. In the case of QMC integration over p the unit square Œ0; 1 the 1 best theoretical rate of convergence of the worst case error is O.N log N / (see, e.g., [BD11]). However, the real convergence rate depends on the properties of the used samples set and on the integrand smoothness. Consequently, most of the works on QMC integration focus on determining sampling patterns which approximate this optimal rate of convergence. To achieve this goal, it is common to resort to two kinds of metrics: the worst case integration error, and the star discrepancy. e worst case integration error is given by: ˇ ˇ ˇ X ˇ Z ˇ1 N ˇ ˇ sup ˇ f .xj / f .x/d xˇˇ Œ0;12 ˇ f ˇ N j D1 and, as its name suggests, quantifies the worst case integration error using a particular set of samples. As for the star discrepancy, it characterizes the uniformity of a point set distribution. Given a set of boxes B with a corner at the origin of the unit square given by: B D fŒ0; x Œ0; yg; .x; y/ 2 Œ0; 12 ;
the star discrepancy D can be defined as:
ˇ ˇ Cardfj W xj 2 C g D .PN I B/ D sup ˇˇ N
C 2B
ˇ ˇ .C /ˇˇ ;
2.2. BACKGROUND
where .C / is the area of a box C . e above equation leverages the fact that Cardfj W xj 2 C g=N can be used as an estimator of the surface area of C . e star discrepancy is thus given by the largest error of the estimate of .C / over all the boxes C 2 B . It is a special case of the general concept of discrepancy because all boxes B have a corner at the origin of the unit square. For more details on the star discrepancy and on discrepancy in general, we refer the reader to [PH10] (Ch. 7, p. 360). e star discrepancy is connected to the worst case error through the Koksma-Hlawka inequality [Nie88, BD11], which states that these quantities are directly proportional. Consequently, minimizing the star discrepancy is equivalent to minimizing the worst case integration error, hence the interest of the low discrepancy sample sets. A point set construction method is called low discrepancy if the convergence rate of the star discrepancy toward 0 is of order O.N 1 .log N /2 / or higher.
2.2.2 QMC RULES ON THE UNIT SPHERE e QMC rules for spherical integration are different from those of the unit square. To our knowledge, spherical QMC rules have never been exploited or even mentioned in the computer graphics literature. erefore, a brief overview of the spherical QMC theory will be presented in this section. Let us consider the sphere parameterization shown in Fig. 2.1, where represents the azimuthal angle and the polar angle. Let us also consider the evaluation of a spherical integral of the form: Z Z Z
2 1 1 f . .; / / d d; f .ω / d ˝.ω / D (2.1) 4 ˝ 4 0 0 where ω D .; / is a point on the sphere, f .ω / is a spherical function, and ˝ is the surface measure on S2 .
I D
Point Sets for Spherical QMC
Similarly to the unit square case, the value of the spherical integral of Eq. (2.1) can be estimated using QMC methods, such that: I IO D
N 1 X f .ωj;N /; N
(2.2)
j D1
where fω1;N ; : : : ; ωN;N g is a set of sampling directions defined as points on the unit sphere S2 . Such sets are appropriate for Quasi-Monte Carlo integration if it is asymptotically uniformly distributed, that is if Z N 1 1 X f .ωj;N / D f .ω /d ˝.ω / (2.3) lim N !1 N 4 S2 j D1
7
8
2. SF POINT SETS FOR QMC ESTIMATES OF ILLUMINATION INTEGRALS
z
θ x
φ
y
Figure 2.1: Sphere parameterization: represents the azimuthal angle and the polar angle.
is true for every function f .ω / on the sphere S2 . is is equivalent to: Cardfj W ωj;N 2 C g ˝.C / D N !1 N 4 lim
(2.4)
for every spherical cap C with area ˝.C / [KN06]. Informally speaking, Eq. (2.4) means that a spherical cap of any area has its fair share of points as N ! 1. Several spherical point set generators produce point sets compliant with the above conditions but they do not yield the same performances, hence the need for metrics to evaluate the point sets quality. To this end, it is common to resort to three metrics: the worst case integration error, the spherical cap L2 discrepancy, and the energy of the samples set which is based on the distances between all samples. In the following, we give insights into these three metrics. Worst Case Integration Error in a Sobolev Spaces Setting
e worst case integration error (w.c.e.) on the sphere is defined as: ˇ ˇ ˇ X ˇ Z ˇ1 N ˇ 1 ˇ w:c:e: WD e.Ps / D sup ˇ f .ωj;N / f .ω /d ˝.ω /ˇˇ ; N 4 S2 ˇ f 2Hs .S2 / ˇ j D1
(2.5)
where f 2 Hs .S2 / means that f is a spherical function belonging to the Sobolev space Hs , and s is the smoothness parameter of the Sobolev space. e Sobolev spaces theory allows characterizing
2.2. BACKGROUND
the integrand smoothness in both the original (e.g., in terms of continuity class) and spectral domains. It is beyond the scope of this book to provide a detailed description of Sobolev spaces. e reader should just keep in mind that the larger the value of the smoothness parameter s , the smoother the function in the original domain, and the faster the rate of decay of the Fourier coefficients of f . For more details on Sobolev spaces theory, the interested reader might refer to [BSSW12]. e w.c.e. is thus the quantity we aim at minimizing so as to find the best QMC point sets. However, directly minimizing the w.c.e. is unfeasible since, for a given coefficient s , there is an infinity of functions f 2 Hs .S2 /. erefore, it is common to resort to other metrics which can be mathematically linked to the w.c.e. and that are easier to evaluate. It is the case of the spherical cap L2 discrepancy which we will describe in the following. Spherical Cap L2 Discrepancy
Because it can be mathematically related to the w.c.e., the spherical cap L2 discrepancy is often used to evaluate the quality of QMC point sets for spherical SMC integration. It is defined as follows [BSSW12]: ! 12 ˇ Z 1Z ˇ ˇ Cardfj W ωj;N 2 C .ω ; t /g ˝.C .ω ; t // ˇ2 ˇ ˇ d˝.ω /dt L2 .Ps / D ; (2.6) ˇ ˇ N 4 1 S2 where C .ω ; t/ is a spherical cap centered at ω and containing all the points fωc 2 S2 W ωc ω tg. An example of a spherical cap is shown in red in Fig. 2.2. Equation (2.6) can be informally read as: for spherical caps of all sizes centered at all the points of the sphere S2 , verify if the spherical cap has its fair share of points. Obviously, directly computing the L2 discrepancy still involves a considerable amount of computations. However, when the integrand f .ω / is in H3=2 .S2 / (meaning that f is at least C 0 continuous) it is possible to establish a mathematical relationship between the spherical L2 discrepancy and the w.c.e. As will be seen later, this relationship is established by resorting to the Stolarky’s invariance principle. Generalized Sum of Distances
A simpler metric which can be used to evaluate the quality of a samples set for spherical integration is the generalized sum of distances between the sample directions, given by: N X N X rD1 kD1
jωr
ωk j :
e relationship between the generalized sum of distances and the w.c.e. associated with a samples set Ps (i.e., e.Ps / in Eq. (2.5)) is given by [BSSW12]: " # 12 N X N X 1 e.PN / D Vs .S2 / jωr ωk j2s 2 ; (2.7) N 2 rD1 kD1
9
10
2. SF POINT SETS FOR QMC ESTIMATES OF ILLUMINATION INTEGRALS
Figure 2.2: Spherical cap (in red) centered on the sphere surface point !c D . c ; c / D .0; 0/.
where s is the smoothness parameter of the Sobolev space Hs S2 restricted to the range 1 s 2, and Z Z ! ! 0 2s 2 d .!/d .! 0 /; (2.8) Vs .S2 / D S2
S2
where the measure d .!/ is a normalized spherical surface element d .!/ D sin. /d d . It is easy to see in Eq. (2.7) that for an integrand belonging to a certain Sobolev space Hs S2 , minimizing e.PN / is equivalent to maximizing a sum of distances criterion. Based on the above theory, s=2 the authors [HS05] have shown that the average convergence rate of the w.c.e. is in O N s 2 for a Sobolev space setting H S . Compared to the spherical cap L2 discrepancy of Eq. (2.6), this metrics has the following advantages: • it is fast to compute and • it is tightly related to the w.c.e. (not only when f 2 H3=2 S2 ).
For the above reasons, the generalized sum of distances is the method of choice when it comes to evaluating the quality of QMC sample sets for spherical integration. Stolarsky Invariance Principle
e Stolarsky’s invariance principle states that the L2 discrepancy and the sum of Euclidean distances are related as follows: N N 1 XX j N2 j D1 i D1
i
jj
C 4 .L2 .Ps //2 D
4 ; 3
where the rightmost term 4=3 is given by the value of the distance kernel integral: Z Z ! ! 0 d .!/d .! 0 /: S2
S2
(2.9)
2.2. BACKGROUND
11
Equation (2.9) actually measures the difference between the theoretical and the empirical sum of the distances between points on the sphere. e more uniform the point set distribution, the smaller the difference. e value of this difference is equal to the square of the spherical cap L2 discrepancy multiplied by a factor of 4. Equation (2.9) shows that maximizing the sum of distances P P term jND1 N ωj j is equivalent to minimizing the L2 discrepancy. iD1 jωi e Stolarsky invariance principle thus establishes a mathematical relationship between the spherical cap L2 discrepancy (Eq. (2.6)) and the sum of distances criterion. However, to be able to relate the spherical cap L2 discrepancy with the w.c.e., we need to take the particular case of integrands f 2 H3=2 S2 in Eq. (2.7), i.e., s D 3=2. In this case f is roughly C 1 continuous, and using Eq. (2.9), Eq. (2.7) can be rewritten as: e.PN / D 2L2 .Ps /;
(2.10)
yielding a direct connection between the w.c.e. and the spherical cap L2 discrepancy. Energy of the Sample Sets
In QMC integration problems there is usually a lack of accurate information regarding the characteristics of the integrand. is preempts an effective evaluation of the w.c.e. associated with a particular point set as the Sobolev coefficient s in Eq. (2.7) is not known. To overcome this problem, many authors make the assumption that the integrand f belongs to H3=2 S2 , as it corresponds to a good compromise in terms of the integrand smoothness: smooth enough so that QMC can brings an improvement over CMC (i.e., faster convergence rates than the O N 1=2 obtained when s D 1), and sharper than the C 1 continuous functions obtained when s D 2. Moreover, s D 3=2 is a particularly interesting case as it allows relating the w.c.e., the spherical cap L2 discrepancy and the sum of distances between the samples. is assumption allows defining a criterion EN to evaluate the quality of the distribution of a spherical point set, given by [SK97, BD11, BSSW12]: 0 1 12 N X N X 4 1 EN .Ps / D @ jωi ωj jA : (2.11) 3 N2 j D1 iD1 e above criterion will be referred to as energy and will be used later in this book to compare the performance of different point systems. Convergence Rates of the Different Metrics
e best theoretical convergence rate toward zero of the spherical cap L2 discrepancy is of the order O.N 3=4 /, but there are no known points systems which can achieve this theoretical performance. Nevertheless, there surely exist p point sets for which the order of convergence of the L2 discrepancy is faster than O.N 3=4 log N / [Bec84]. In such a case the point sets are called low-discrepancy sequences. We want to note that this order of convergence is lower than the O.N 1 .log N /2 / rate of low-discrepancy sequences in the Œ0; 12 unit square.
12
2. SF POINT SETS FOR QMC ESTIMATES OF ILLUMINATION INTEGRALS
In case f 2 H3=2 S2 then, given Eq. 2.10, the theoretical maximum convergence rate of the w.c.e. is also O.N 3=4 /. However, the order of convergence of the w.c.e. depends on the Sobolev space to which the integrand belongs. In case f 2 Hs S2 with s > 3=2, then the order of convergence of the w.c.e. can be higher than O.N 3=4 /. Nevertheless, reaching such a convergence rate depends on the points construction algorithm as some are more capable of taking advantage of smooth functions than others [BSSW12]. e theory presented in this section shows that the w.c.e. is directly dependent on the point set used for the integral estimate. In computer graphics, the common approach to generate point sets for estimating the value of the rendering integral using QMC is to resort to point sets defined on the unit square and lift them to the unit hemisphere. In the next two sections we present some of the most commonly used point sets in computer graphics for QMC, as well as the most relevant hemispherical projections.
2.2.3 QMC POINT SETS In this section we describe the characteristics of point sets generated using blue noise [dGBOD12], Larcher-Pillichshammer [LP01] and the Sobol (0,2)-sequence [Sob67]. e Larcher-Pillichshammer points are known for having very good (unit square) star discrepancy properties even when compared to other low discrepancy point sets [Ken13]. e Sobol .0; 2/sequence is probably the most used low discrepancy point set and is particularly well suited to adaptive sampling schemes as will be seen later. e blue noise generators allow producing high quality uniform distributions. Stemming from a very active research field, their generation uses a totally different approach from that of the Sobol and Larcher-Pillichshammer points. In Fig. 2.3, examples of different unit square point sets are shown. ey have been generated using a random distribution, blue noise, Larcher-Pillichshammer, and a Sobol sequence respectively, from left to right. Random
BNOT
L-P
Sobol
Figure 2.3: A comparison of a set of 512 points randomly generated, and three other sets of 512 points generated using blue noise (BNOT), the Larcher-Pillichshammer points, and the Sobol .0; 2/sequence.
2.2. BACKGROUND
13
Blue Noise
e blue noise point sets are distributions of points designed such that a minimum intersample distance criterion is met. Moreover, the distribution should be free from regular patterns [dGBOD12, LD08]. At first sight, it might seem that we would like the minimum inter-sample distance to be as large as possible but, as noted by Lagae and Dutré [LD08], a large minimum distance may result in regular patterns. us, the goal is to obtain regularity-free distribution with the largest average inter-sample distance. To evaluate the quality of the blue noise distributions it is common to resort to a spectral analysis. We have mentioned above that the two features which characterize a blue noise distribution are a large average inter-sample distance and no regularities. In the frequency domain, on the other hand, a blue noise spectrum is characterized by a minimal low frequency energy and by the lack of concentrated energy spikes. e power spectrum associated with a generator of point sets can be estimated by averaging periodograms of different point sets produced using that generator. As opposed to the random distributions, whose power spectrum is flat, a blue noise pattern produces a high frequency error which is less conspicuous to the human eye. Examples of state of the art blue noise generators can be found in [Fat11, EPMC 11, CYCC 12, dGBOD12]. Larcher-Pillichshammer Points
e Larcher-Pillichshammer points [LP01] are constructions of .0; m; 2/-nets in base 2 which are a restriction of the general .t; m; s/-nets. Formally, a .t; m; s/-net in base q is defined as follows [Nie92]. A .t; m; s/-net in base q is a set of q m points in Œ0; 1Œs enjoying the property that each elementary interval E in base q Definition 2.1
ED
s Y ai ai C 1 ; ; Œ0; 1Œs bi bi q q iD1
Q contains exactly q t points, with ai ; bi 2 Z, bi 0 and 0 ai < q bi . is the cartesian product of sets (or product set). e volume of each elementary interval E is q t m . e parameter t works as a kind of quality parameter which controls the number of points per elementary interval. As a .0; m; 2/-net in base 2, the Larcher-Pillichshammer’s approach allows generating bi-dimensional sets of 2m points containing a single point per elementary interval. is is a very interesting stratification property. Let us take the example in which m D 4. Figure 2.4 shows a .0; 4; 2/-net based on the Larcher-Pillichshammer points, as well as the points distribution over the elementary intervals. It can be seen that the 16 elements fulfill the Latin hypercube stratification condition. is means that if we divide the unit square into 16 horizontal 1 1 or vertical elementary intervals of size 1; 16 and 16 ; 1 , respectively, each line and each column only contain a single sample (Fig. 2.4, right). Furthermore, if we divide the unit square in
14
2. SF POINT SETS FOR QMC ESTIMATES OF ILLUMINATION INTEGRALS
Figure 2.4: e Larcher-Pillichshammer points.
16 squared elementary intervals of size 14 ; 14 there is also a single sample per square (Fig. 2.4, center). Although these stratification properties are interesting, they do not necessarily guarantee a good distribution of points. Two points in neighboring elementary intervals could be very close to each other, which would increase the discrepancy of the point set. But this problem does not occur when using the Larcher-Pillichshammer points and they were shown to have a comparatively large minimum inter-sample distance [GK08]. For more details on how to generate these point sets, please refer to [LP01]. Sobol .0; 2/-sequence
Introduced by the Russian mathematician I. M. Sobol in [Sob67], the Sobol .0; 2/-sequence is a particular case of the general .t; s/-sequences. e .t; s/-sequences are defined as follows [Nie92]. Definition 2.2 Let t 0 be an integer. A sequence of points x0 ; x1 ; : : : in Œ0; 1Œs is a .t; s/-sequence in base q if, for all integers k 0 and m > t , the point set composed of the xkq m ; : : : ; x.kC1/q m 1 , is a .t; m; s/-net in base q .
ese sequences are especially useful for adaptive sampling schemes. Adaptive sampling consists in generating a first set of samples and, based on some criteria, and deciding whether or not to add more samples to the initial set. In case the decision is for adding more samples, the samples set resulting from the combination of the first and second samples sets should also be low discrepancy. is roughly means that the second set of samples cannot generate new samples which are too close to the samples of the first set. e definition of .0; 2/-sequences in base 2 (such as the Sobol .0; 2/-sequence) implies that each successive set of 2m points is a .0; m; 2/-net. Moreover, the combination of a set of 2m points x0 ; : : : ; x2m 1 with the next set of 2m points of the sequence forms a .0; m C 1; 2/net. Such a property is interesting because it allows hierarchical or adaptive sampling schemes as described above. e same cannot be done with the point set generators which strictly produce
2.2. BACKGROUND
15
.t; m; s/-nets and not .t; s/-sequences (e.g., the Larcher-Pillichshammer points). Using the Sobol .0; 2/-sequence instead of the Larcher-Pillichshammer points, however, is not advantageous in every respect since the latter exhibit lower discrepancy properties.
2.2.4 HEMISPHERICAL PROJECTIONS QMC spherical point sets are usually generated on the unit square and then projected onto the unit sphere. e used projection must be an equal-area projection so that an area in the unit square corresponds to the same area in the unit sphere. is feature guarantees that an asymptotically uniformly distributed point set on the unit square, will also be asymptotically uniformly distributed on the sphere after the projection. Note that, despite their area-preserving property, these projections cause a distortion and do not preserve the inter-sample distance. e degree and the location of this distortion can vary from one projection to another. In the following of this section we present the most common hemispherical projections used in computer graphics: Lambert cylindrical [DHMC 01], concentric maps [SC97], and HEALPix [GHBC 05]. Lambert Cylindrical Projection
Probably due to its simplicity, the Lambert cylindrical projection, also-called Archimedes projection, is the most common hemispherical projection used in computer graphics [DHMC 01]. Using this projection, a given point .x; y/ on the unit square is projected onto the hemisphere as follows: D 2x D arccos.1
2y/;
where .; / are the spherical coordinates of the projected point. Although it has no distortion on the equator, the distortion of this projection increases as we approach the pole. At the pole, there is a singularity. All points in the unit square with y D 1 are mapped to a single point on the hemisphere (the pole, with D 0). Concentric Maps
e concentric maps [SC97] is an equal area projection which allows mapping concentric squares to concentric circles on the hemisphere. e goal of this projection is to provide a lower distortion than the Lambert map by leveraging the fact that our interest is restricted to the hemisphere. Roughly speaking, using this projection close points on the unit square will also tend to be close points on the hemisphere. To achieve this, the unit square points are first scaled (so as to belong to Œ 1; 12 ) and mapped onto a unit disk. It is only after this first mapping that the resulting points (in the disk) are lifted to the hemisphere.
16
2. SF POINT SETS FOR QMC ESTIMATES OF ILLUMINATION INTEGRALS B
2
(a, b)
2
φd
r 3
1
3
A
4
1
4
Figure 2.5: e concentric maps of Shirley and Chiu [SC97].
Let .a; b/ be a point on the square Œ 1; 12 resulting from scaling a unit square point with coordinates .x; y/ as follows: a D 2x 1 b D 2y 1: Let us also assume .a; b/ is contained in the region 1 of the square Œ 1; 12 as depicted in Fig. 2.5 (left). e mapping of .a; b/ to a concentric disk is given by: r d
D a D a ; 4b
where r and d are, respectively, the radius and the rotation angle of a point on the unit disk, as shown in Fig. 2.5 (right). For the other three regions similar transforms are applied. Finally, the resulting points in the disk are lifted to the hemisphere using: p D arcsin r 2 r 2 D d ;
where .; / are the spherical coordinates of the projected points. Consequently, a point at the center of the disk (r D 0) is mapped to the pole of the hemisphere D 0, whereas a point at the border of the disk (r D 1) is mapped to the equator of the sphere ( D =2). Figure 2.5 (right) can thus be interpreted as the samples position on the hemisphere, viewed from above. HEALPix Projection
e HEALPix projection [GHBC 05] was originally developed to address processing and analysis needs of huge spherical data sets generated by advanced detectors in modern astronomy. e projection meets several criteria required for the intended application among which the need for
2.2. BACKGROUND
17
an equal-area projection. is makes the HEALPix projection suitable for spherical Monte Carlo integration. e hemispherical HEALPix projection onto the plane can be appreciated in Fig. 2.6. Since the HEALPix projection has as primary goal to project points from the sphere to the plane (and not the reverse), all the points of the sphere have correspondence on the plane, but there are areas of the plane with no correspondence on the sphere. e same is true for the hemisphere. e zones of the unit square with no correspondence on the hemisphere are marked in grey in Fig. 2.6. One of the solutions to project a set of points onto the hemisphere using HEALPix is to generate six sets of points on the unit square. e six point sets can then be mapped onto the numbered regions in Fig. 2.6. It is also possible to use a single square and place it repeatedly in each of the numbered regions. An alternative approach is to generate a single set of points on the plane and reject those which are outside the projectable region. We have experimentally found that this solution results in visually less pleasant distributions than using the approach described above. e mapping of a point .x; y/; y 1=2, on the unit square to a point .; / on the unit hemisphere is given by: D arccos 34 y D 2x while for a point on the unit square with y > 1=2, the projection is given by: D arccos 1 13 .2 2y/2 D 2x yy 1=2 x t 4 ; 1 where x t D 2x
Furthermore, for y >
, 4
mod
: 2
x t must satisfy the condition ˇ ˇˇ ˇ ˇ < .1 y/ ˇx t 4 2
so as to guarantee that the point is contained in the projectable area shown in white in Fig. 2.6.
2.2.5 SUMMARY e theoretical background presented in this section shows that QMC rules for spherical integration are different from those of the unit square case. In particular, it has been shown that the w.c.e. for spherical QMC depends on the distance between the sampling points on the sphere. e common approach in computer graphics to produce sample sets for spherical QMC is to lift point sets with low unit square discrepancy to the sphere, by resorting to an equal area transform. is approach, however, is suboptimal. is is because the spherical projection affects the distance between the samples, hence impairing the low discrepancy properties of the sample
18
2. SF POINT SETS FOR QMC ESTIMATES OF ILLUMINATION INTEGRALS
Figure 2.6: HEALPix hemispherical projection [GHBC 05].
sets on the unit square. To achieve better quality results, one should instead search for sample sets which directly minimize the spherical discrepancy. is idea is the main motivation for our interest in the Spherical Fibonacci point sets [SP06] presented in the next section.
2.3. SPHERICAL FIBONACCI POINT SETS
2.3
19
SPHERICAL FIBONACCI POINT SETS
In the following, we show how spherical Fibonacci points sets can be derived from planar Fibonacci lattices so as to establish a connection between both points systems. However, there exist other construction methods such as the so-called spiral points method which generates points directly on the sphere. e spherical Fibonacci point sets are based on a spherical Fibonacci lattice which is defined as [Sve94, HN04]: D arccos .1 2j=F m/ Fm 1 D 2 j ; Fm
j j
(2.12)
where j ; j are spherical coordinates of the j th point, fxg D x bxc denotes the fractional part for non-negative real numbers x . Fm , the mth Fibonacci number, is fixed and given by [GKP94]: F0 F1 Fm
D 0 D 1 D Fm
1
C Fm
2:
e spherical Fibonacci lattice has the limitation that the number of samples Fm must be a Fibonacci number, due to the Fibonacci ratio Fm p 1 =Fm in Eq. (2.12). However, the value of this ratio quickly tends to the golden ratio ˚ D .1 C 5/=2 as m increases [GKP94]. Consequently, we can write: lim j D 2j˚ 1 m!1
due to the periodicity of the spherical coordinates. Substituting 2j˚ setting Fm D N yields a new point set generator given by: j D arccos.1 2j=N / 0 j < N: j D 2j˚ 1
1
for j in Eq. (2.12) and
(2.13)
Note that this point set generator can produce point sets of any sizes, since N needs not be a Fibonacci number. However, since ˚ is an irrational number, the resulting point sets are no longer lattices. For this reason, in the following we refer to these point sets simply as spherical Fibonacci point sets (SF). e points generated using Eq. (2.13) are evenly distributed along the vertical axis z D cos./. is can be clearly seen by letting zj denote the z coordinate of the j th point, hence yielding: zj D cos j D 1 2j=N: is arrangement divides the sphere into equal-area spherical “rings” [Gon10], each “ring” containing a single point. According to Swinbank and Pusser [SP06] the uniformity of the distribution can still be slightly improved by introducing an offset of 1=N on the zj coordinates (i.e., half
20
2. SF POINT SETS FOR QMC ESTIMATES OF ILLUMINATION INTEGRALS
the z coordinate spacing). is change leads to the final form of the spherical Fibonacci point sets, given by: ) j D arccos 1 2jNC1 0j j ; 8i; j 2 N ; A :
:: :
p2
where i2 is the variance of the coefficients of the order i harmonic. Note that the variance of the coefficient decreases as their order increases which means that our prior states that high frequency coefficients tend to zero. Note also that Q is a diagonal matrix, which means that the harmonic coefficients are considered independent. We draw the readers attention to the fact that f1 ; : : : ; p g is not a set of parameters of the model, but instead a set of parameters of the prior distribution. ese parameters are commonly referred to as hyperparameters in the Bayesian statistics and are in general known before the Bayesian inference takes place. As will be seen later, the hyperparameters can be learned from data in a preprocessing step. For now, let us come back to the general GLM defined in the previous section (Eq. (3.6)). As will be shown in the following, modeling the prior through a Gaussian distribution is particularly interesting since it greatly simplifies the computation of the posterior probability and yields close-form solutions. Let us thus assume a general prior p.w/ given by a multivariate Gaussian distribution with mean vector wN and covariance matrix ˙p such that: p
p.w/ D .2/ 2 j˙p j N ˙p ; N w;
1 2
e.
1 2 .w
N t ˙p 1 .w w/ N / w/
(3.11)
where jXj denotes the determinant of matrix X . Posterior Given the GLM defined by Eq. (3.6) and the prior defined in Eq. (3.11), the posterior distribution p.wjY I X/ over the weights is obtained by applying the Bayes’ rule given by Eq. (3.10). Since both the likelihood function L.w/ and the prior p.w/ are expressed as Gaussian distributions, the posterior is also a Gaussian distribution such that: O A 1 p.wjY I X/ N w; (3.12) where A D n 2 ΦΦt C ˙p 1
38
3. BAYESIAN MONTE CARLO FOR GLOBAL ILLUMINATION
and wO D A
1
N p1 : n 2 ΦY C w˙
e details of this derivation can be found in Appendix A. Note that, as opposed to the ML approach, we do not have as a result a deterministic value of w but instead a posterior probability distribution over w . is is perfectly sensible since nothing guarantees that the information brought by the samples combined with the prior knowledge is sufficient to be sure about the value of w . Our uncertainty about w was probably reduced but we might still have doubts about its value. is quantification of the uncertainty is an important difference between the Bayesian and the frequestist approach. Predictive Distribution In the Bayesian approach, the randomness of the model parameters w makes the output of the linear model random as well. e model predictions have thus the form of a probability distribution, called predictive distribution, instead of a single scalar value as in the frequentist approach. e predictive distribution is obtained by averaging the model predictions using all possible parameters, weighted by the posterior probability over the parameters: Z p.Y jY I x ; X/ D p.Y jwI x / p.wjY I X/; (3.13) W
where p.Y jwI x / is given by Eq. (3.8). Note that p.Y jY I x ; X/ can also be seen as the result of marginalizing out the parameters w from the probability density of the observations, using for that the posterior distribution over the parameters. In the general case, Eq. (3.13) has no analytical solution and one must resort to methods such as Markov Chain Monte Carlo to solve it. However, because of our Gaussian hypothesis for both the observation noise and the prior p.w/, an analytic solution can be found. It can be shown that in such a case the predictive distribution follows a Gaussian distribution such that: Q ; X/ N wO t ˚.Qx/; ˚.Qx/t A 1 ˚.Qx/ : p.Y jY I x (3.14) e details regarding the derivation of Eq. (3.14) are out of the scope of this book. For more details the interested reader might refer to [RW06]. Note that the mean of the predictive distribution is equal to the most probable model output for xQ , when the model is parametrized using the maximum a posteriori wO , such that: Q ; X/ D EŒwO t ˚.Qx/ C "i D wO t ˚.Qx/; EŒp.Y jY I x
given that EŒ"i D 0. e operation of approximating the value of a function over its domain using the predictive distribution is called Bayesian linear regression. Figure 3.2 depicts the result of performing a Bayesian linear regression on the exact same data as in Fig. 3.1. e used prior is given by p.w/ N .0; 100 IdF /, where IdF is an F F identity matrix. A value of n D 0:25 was used for the standard deviation of the observation noise.
3.2. REPRESENTING A FUNCTION USING A SMOOTH MODEL
39
Figure 3.2: Example of a Bayesian linear regression.
e black line in Fig. 3.2 represents the mean value of the predictive distribution. e original data is marked by blue dots. e area in pink corresponds to the 95% confidence interval of the Gaussian predictive distribution. is quantification of the uncertainty regarding the predictions does not exist in the frequestist approach. Brief Summary
We will now make a brief summary of what was presented and discussed in Sec. 3.2.1. e major conclusion the reader should take from this section is that the Bayesian approach uses more information than the classic frequentist approach. is information can be directly included in the model under the form of a prior probability distribution which can be learned using a training data set. Furthermore, the predictions made with a Bayesian approach are more informative than those produced using its frequentist counter-part. is is because the Bayesian approach characterizes the uncertainty of the predictions, while the frequentist approach neglects this type of information by considering the model parameters as deterministic. However, despite these important differences, both the presented approaches share two fundamental limitations which stem from the use of a Gaussian linear model: • the need for choosing a family of basis functions; and • the need for specifying the number of basis functions (i.e., the length of the vector w ).
40
3. BAYESIAN MONTE CARLO FOR GLOBAL ILLUMINATION
Note that the answers to these questions depend on the characteristics of the function we want to approximate, which are often difficult to express mathematically. In the following, we will present a Bayesian nonparametric approach to the problem of regression (Bayesian Regression). We will also show how this approach can be used for integral estimation (Bayesian Monte Carlo).
3.2.2 BAYESIAN REGRESSION In the previous section we have presented a Bayesian approach to the problem of finding the parameters of a Gaussian linear model of an unknown function f .x/. We have proceeded by putting a prior p.w/ over the parameters, collecting a set of observations Y , and using these observations to compute a posterior probability over the parameters p.wjY I X/. e posterior is then used to compute a predictive distribution p.Y jY I x ; X/ which allows making predictions of an unobserved value f .x /. In such an approach, the model parameters w play the role of the unknown quantity. e observations are used to collect information about w and hence reduce our uncertainty regarding its value. is approach is in fact questionable since the “real” unknown quantity in our problem is the unknown function f .x/. At this point the reader should wonder why not making a Bayesian inference directly about f .x/ instead of w ? is is exactly the approach which we will present in this section. In concrete terms, we present an alternative Bayesian approach, called Bayesian regression, in which f .x/ is directly modeled through a probabilistic smooth model based on the concept of Gaussian Process (GP). e Bayesian regression has the advantage of not requiring the specification of a set of basis functions, nor the corresponding vector of coefficients w . Only a mean function and a covariance function are specified. Gaussian Process
Formally, a Gaussian process (GP) is a collection of random variables, any finite number of which has a joint Gaussian distribution. A GP model is completely defined by its mean function fN.x/ and its covariance function k.x; x0 /, which must be positive definite [RW06]: fN.x/ D EŒf .x/ k.x; x0 / D EŒ.f .x/
fN.x//.f .x0 /
fN.x0 //:
(3.15) (3.16)
We will denote a GP model of an unknown function f .x/ as: f .x/ GP ŒfN.x/; k.x; x0 /:
In practice, a Gaussian process governs probabilities over functions just as a normal distribution governs the probabilities over scalars. We can think of a Gaussian process as an infinite set of correlated Gaussian random variables distributed over a certain domain. e mean function fN.x/ represents the mean value of each of these random variables. e covariance function k.x; x0 / defines the covariance between two random variables of the GP such that: cov.Yp ; Yq / D k.xp ; xq /:
3.2. REPRESENTING A FUNCTION USING A SMOOTH MODEL
41
For reasons that will become clear in Sec. 3.4, we chose the squared exponential covariance function for our GP model such that: 1 kx x0 k2 k.x; x0 / WD f2 exp ; (3.17) 2 l2 where f2 is the GP variance and l is the lengthscale of the covariance function. f2 and l are called hyperparameters of the GP model. Note that this covariance function is stationary, i.e., k.x; x0 / D k.x x0 /; 8.x; x0 /. Note also that in this case the variance of f .x/, i.e., k.x x/ D k.0/ is constant. e role of the covariance function and its hyperparameters will be analyzed in detail in the next section. For now, the reader should just keep in mind that the covariance function characterizes the smoothness and the variance of the GP. To accommodate the observations to the GP model and improve numerical conditioning, we assume the observations Y are impaired by an i.i.d. Gaussian noise n . Note that this is similar to what was done in Sec. 3.2.1. Given such a noise assumption, the covariance becomes: cov.Yp ; Yq / D k.xp ; xq / C n2 ıpq ;
(3.18)
where ıpq is the Kronecker symbol. n2 represents the variance of the observation noise which corresponds to the part of the variance which is unexplained by the GP. n2 is thus the third hyperparameter of our GP model, the two other hyperparameters being f2 and the lengthscale l. We have thus presented a tool which allows modeling an unknown function f .x/ in a probabilistic manner. In the next sections we show how to use the GP to build a prior over f .x/, and use a set of observations Y to produce a posterior GP over f .x/. Prior Gaussian Process
e prior GP is formalized by using Eqs. (3.15) and (3.16). Similarly to the prior distribution over the parameters in Sec. 3.2.1, the prior GP must contain our knowledge about f .x/ before sampling. fN.x/ is thus our prior expectation of f .x/, while k.x; x0 / characterizes how smooth we expect f .x/ to be, i.e., how correlated are nearby samples. Figure 3.3 shows an example of a prior GP with a constant mean fN D 0 and a squared exponential covariance function. e pink area represents the interval of confidence of 95% around the mean value for each input x. e red, green, and blue lines on the right image correspond to different realizations of the GP. As mentioned above, the squared exponential convariance function k (Eq. (3.17)) is parametrized by two hyperparameters: the GP variance f2 and the lengthscale l . A large lengthscale value implies a strong correlation between the GP random variables. In such a case, the realizations of the GP will be very smooth functions. On the other hand, a large GP variance means that the confidence on the prior mean function fN.x/ is low. is would cause a larger uncertainty zone (gray) in Fig. 3.3.
42
3. BAYESIAN MONTE CARLO FOR GLOBAL ILLUMINATION
(a) Prior GP
(b) Prior GP realizations
Figure 3.3: Example of a prior GP.
To fully define the prior GP model, the hyperparameters need to be determined from data in a preprocessing step. Furthermore, the value of the mean function fN.x/ also needs to be specified. ese problems will be addressed in Sec. 3.4. For now, we assume that both the hyperparameters and the mean function are known.
Posterior Gaussian Process
e posterior GP is obtained by conditioning the prior to a set of observations. Let D be a set of noisy samples of f .x/, such that:
D D f.xi ; Yi / j i D 1; : : : ; ng
with
Yi D f .xi / C "i ;
where xi is a sample location and Yi is the observed value at xi . Note that each observed value Yi contains a sample "i of an independent, identically distributed (i.i.d.) Gaussian noise with zero mean and variance n2 . e prior GP is thus conditioned to the observations by applying the Bayes’ rule. It can be shown that the resulting posterior process is also a GP with mean and covariance functions given by [RW06]: N EŒf .x/jD D fN.x/ C k.x/t Q 1 .Y F/ 0 0 t 1 covŒf .x/; f .x /jD D k.x; x / k.x/ Q k.x0 /
(3.19)
3.3. BAYESIAN MONTE CARLO
43
with: k.x/ Ki;j Q Y FN
D D D D D
.k.x1 ; x/; : : : ; k.xn ; x//t k.xi ; xj / with .i; j / 2 Œ1; n2 .K C n2 In / .Y1 ; : : : ; Yn /t t fN.x1 /; : : : ; fN.xn / ;
(3.20)
where Y is a vector containing the observations and FN contains the prior expected value for the observations. e covariance matrix Q contains the covariance between the samples, while In is an n n identity matrix. We will now take a close look at the role of each of the terms in Eq. (3.19). Assume we are interested in computing EŒf .x/jD for a particular value x . fN.x/ contains our prior expectation for function f evaluated at point x before any observation is made. is prior expected value is N , which accounts then corrected by the rightmost term of Eq. (3.19), given by k.x/t Q 1 .Y F/ for the information brought by the observations. k.x/ is a row vector containing the covariance between x and the location of the observations x1 ; : : : ; xn (recall that the covariance is a function of the input variables x only). It can thus be seen as a measure of the relevance of each observation for inferring the value of f .x/. e inverse covariance matrix Q 1 accounts for the relative positions of the samples. Two samples close to each other are assigned a high covariance and have thus a low value in the inverse covariance matrix. eir influence in inferring the value of f .x/ is thus attenuated. Such a mechanism allows eliminating redundant information. Finally, N is the difference between the observed and the expected values of f (Y and the vector .Y F/ NF respectively). It can be seen as a measure of what is new in the information brought by the samples. As for the posterior covariance (covŒf .x/; f .x0 /jD), its value is given by the prior covariance k.x; x0 / minus a term (k.x/t Q 1 k.x0 /) which has a larger value close to sample locations. is is perfectly sensible since in these zones our uncertainty is reduced. Figure 3.4 shows an example of a posterior GP produced by combining six samples (marked with blue dots) with the prior GP from Fig. 3.3. Note that the pink area denoting the 95% confidence region has been drastically reduced, especially around the sampled values where the uncertainty regarding the value of f .x/ is smaller. Consequently, the realizations of the posterior GP (red, green, and blue lines in the rightmost plot) are much closer to each other than the ones drawn from the prior GP.
3.3
BAYESIAN MONTE CARLO
Let us now come back to the problem of finding an estimate to the integral in Eq. (3.1) which, we recall, is given by: Z I D
f .x/p.x/ d x; x 2 Rd ;
44
3. BAYESIAN MONTE CARLO FOR GLOBAL ILLUMINATION
(a) Posterior GP
(b) Posterior GP realizations
Figure 3.4: Example of a posterior GP.
where p.x/ is analytically known and f .x/ is unknown before any sampling. As shown in the previous section, given a prior GP model of f .x/ and a set of noisy samples, we can compute a posterior distribution over f .x/ which combines the prior information and the information brought by the samples. In the next sections, we show how to use the posterior GP over f .x/ to produce a Bayesian estimate of the integral given by Eq. (3.1). Such a technique is called Bayesian Monte Carlo (BMC).
3.3.1 BMC QUADRATURE EQUATIONS To compute an estimate of the integral I (Eq. (3.1)) we can resort to Eq. (3.19) which, given a set of observations, provides a posterior estimate of f .x/. e posterior estimate of I , that is IO D E.I jD/, is obtained by using Eq. (3.1) and integrating both terms of Eq. (3.19), yielding [RG02]: N IO D IN C zt Q 1 .Y F/ (3.21)
where:
IN D z D
Z Z
fN.x/p.x/d x
(3.22)
k.x/p.x/d x:
(3.23)
e posterior estimate IO is given by correcting the prior integral estimate IN using the inforN is composed by three factors: mation brought by the samples. e corrective term zt Q 1 .Y F/ 1 (Y FN ) and Q , which have the same role as in Eq. (3.19), and the z vector which captures the influence of each sample given the deterministic function p.x/ and the covariance function k.x; x0 /.
3.3. BAYESIAN MONTE CARLO
45
e variance of the integral estimate given by Eq. (3.21) follows a Gaussian distribution of mean IO and a variance given by [RG02]: Var.I jD/ D VN where: VN D
“
zt Q
1
(3.24)
z
k.x; x0 /p.x/p.x0 / d xd x0 :
(3.25)
We draw the readers attention to the fact that, as opposed to classical Monte Carlo methods, the variance of the BMC estimator does not depend on the value of the observations Y . Instead, it is the position x of the samples which determines the variance of the estimate. is feature is perfectly logical in the Bayesian reasoning, since the covariance function of the prior model of f .x/ already contains the probabilistic knowledge required to estimate Var.I jD/. Another characteristic of BMC is that the samples need not be drawn from a pdf. e practitioner is free to choose how to distribute the samples. Given that the goal is to obtain an integral estimate with the smallest uncertainty possible, a natural choice is to select the samples set which minimizes Var.I jD/. Such a set is called optimal samples set, and is one of the most important features of the BMC. As will be demonstrated in Sec. 3.5, the use of an optimal samples set is one of the reasons for BMC to outperform state of the art QMC methods.
3.3.2 REDUCING THE NUMBER OF HYPERPARAMETERS In this section we show how to reduce the number of hyperparameters for BMC from three to two. Let us recall that, according to what has been presented in the previous sections, BMC requires the use of the following hyperparameters: • l , the lengthscale of the covariance function; • f2 , the variance of the prior GP model; and • n2 , the variance of the observation noise used to accommodate the observations to the smoothness of the GP model. In the following, we demonstrate that in fact the BMC quadrature equations depend on the ratio n0 D n =f and not on these two variables. Because we have chosen a stationary covariance function, k.x; x0 / can be rewritten as: k.x; x0 / D k.x
x0 / D f2 k 0 .x
x0 /;
(3.26)
where k 0 .x x0 / is the correlation function. We can use Eq. (3.26) to rewrite the covariance matrix Q (defined in Eq. (3.20)) as follows: Q D f2 Q0
(3.27)
46
3. BAYESIAN MONTE CARLO FOR GLOBAL ILLUMINATION
with Q0 D K 0 C n02 In ;
where K 0 is obtained by replacing k.x x0 / by k 0 .x x0 /. is result allows rewriting Eq. (3.21) using only terms which depend on n02 instead of f2 and n2 , yielding: IO D IN C z0t Q0
where the z0 vector is obtained by replacing k.x
1
.Y
N F/;
x0 / by k 0 .x
(3.28) x0 / in Eq. (3.23).
3.3.3 SUMMARY Algorithm 2 gives an overview of the BMC algorithm used to obtain a posterior estimate of I . As in any Bayesian method, we start by stating our prior knowledge. In our case, this is done Algorithm 2 e BMC algorithm. 1: 2: 3: 4: 5: 6: 7: 8:
State the prior knowledge in the prior GP model of f .x/ Learn the hyperparameters of the prior GP model Minimize Var.I jD/ to obtain the optimal samples set Compute and invert the covariance matrix Q0 Compute the vector of integrals z0 Compute the prior expected value for the observations FN Collect the observations Y Apply Eq. (3.28) to compute a BMC estimate of I
by choosing a mean and a covariance function for the prior GP model of f .x/ (line 1). e second step consists in learning the hyperparameters associated with the covariance function. Once these steps are performed, the prior GP model is completely defined. It contains all our prior knowledge/beliefs about the unknown function f .x/ before any samples are made. Given this information, and using Eq. (3.24), we can select the optimal samples set (line 3). In lines 4–7 the terms required to obtain a posterior estimate IO of I (line 8) are computed.
3.4
APPLYING BMC TO GLOBAL ILLUMINATION
e value of the illumination integral Lo .ωo / at a given shading point is given by: Z Lo .ωo / D Li .ωi / .ωi ; ωo / .ωi n/ d ˝.ωi /:
(3.29)
˝2
Note that the above integral is of the same form as the integral given in Eq. (3.1). e incident radiance Li .ωi / corresponds to the unknown function f .x/ in Eq. (3.1), and will thus be modeled
3.4. APPLYING BMC TO GLOBAL ILLUMINATION
47
using a Gaussian process. e product .ωi ; ωo /.ωi n/ is the analytically known part of the integrand (p.x/ in Eq. (3.1)). Our goal is to compute a BMC estimate of Lo .ωo / given a samples set fLi .ωj /; j 2 Œ1; ng, where ωj are the samples location (called xi in Sec. 3.2.2). A direct application of the BMC method described in Algorithm 2 to global illumination problems would imply a remarkable computational overhead. Indeed, some of the steps entail a high computational cost. It is the case of the learning step in line 2 and of the minimization of Eq. (3.24) to find the optimal samples set (line 3). Computing and inverting the covariance matrix Q0 and, especially, the computation of the integrals of the z0 vector also entails a large overhead with respect to traditional MC techniques. Because global illumination problems are characterized by the computation of millions of integrals of the same type but with different data, some of the steps of Algorithm 2 need not be executed for each integral evaluation. Instead, as shown and discussed in detail in the following sections, when applying BMC to GI we will try to transfer the most costly steps to a preprocessing phase. In the next sections, we will describe efficient solutions to each of the steps of Algorithm 2 in the context of GI problems.
3.4.1 SPHERICAL GAUSSIANS FOR FAST QUADRATURE COMPUTATION One of the most intensive steps when computing the BMC quadrature is determining the vector of integrals z0 . To cope with this problem, Brouillat et al. [BBLC 09] proposed a solution which consists in precomputing and storing the z0 vector for later use in the rendering phase. However such an approach is very restrictive since it is only applicable to diffuse BRDFs. In the following, we describe a more general approach by Marques et al. [MBRC 13b]. is approach is based on the use of spherical Gaussian functions (SGF) for modeling both the BRDF and the covariance funtion. Since the product of two SGFs yields a SGF, such a choice allows reducing the z0 computation to a simple query to a scene-independent 2-entry look-up table which is precomputed once and for all. e proposed method is not only applicable to rendering purposes, but to all problems where the analytically known function p.x/ can be modeled using SGFs. Spherical Gaussian functions are a type of spherical radial basis functions (RBF) which result from restricting a Gaussian RBF to the unit sphere S 2 . A SGF G is defined as: G.ω
where ω ; ω 0 2 S 2 , and:
ω ω0 ω I ; / WD exp 2 0
jω
ω 0 j2 D 2.1
ω ω 0 /;
1
;
(3.30)
(3.31)
since jω j D jω 0 j D 1. Using Eq. (3.30), we can model the correlation function k 0 by a SGF Gk 0 defined as follows: ω ω0 1 0 0 0 0 k .ω ω / WD Gk .ω ω I 1; l/ D exp ; (3.32) l2
48
3. BAYESIAN MONTE CARLO FOR GLOBAL ILLUMINATION
where l is the lengthscale hyperparameter which controls the smoothness of the prior GP. Similarly, the BRDF is also modeled by a SGF G which is defined as: .ωi ; ωo / WD G .ωr
ωr ωi ωi I ks ; w/ D ks exp w2
1
;
(3.33)
where ks is the specular coefficient, w characterizes the lobe sharpness, i.e., the “width” of the BRDF lobe, and ωr is the perfect mirror incident direction. G has an axially symmetric lobe whose axis is aligned with ωr which is itself function of the outgoing direction ωo . Note that, modeling the BRDF through a SGF does not limit the generality of this approach. is is because most BRDFs can be approximated by a mixture of SGFs (see, e.g., [WRGC 09]). However, for the sake of simplicity, in this book we develop our approach using the glossy term of a Phong BRDF. When modeling a Phong BRDF using a SGF, the perfect reflection direction ωr in Eq. (3.33) is given by:
ωr D 2.ωo n/n
ωo ;
where n is the surface normal at the shading point. Furthermore, the lobe sharpness parameter w can be obtained from the Phong BRDF shininess parameter m using the approximation: cosm D exp .m ln.cos // exp .m.cos
1// ;
(3.34)
p with cos D .ωr ωi /, which leads to w D 1= m by comparing Eqs. (3.33) and (3.34). Modeling a glossy Phong BRDF lobe with a shininess coefficient m > 10 through the above approximation yields a RMSE smaller than 103 . We want to note that that modeling BRDFs with SGFs (which are naturally isotropic) does not restrict the application of this framework to isotropic BRDFs. e reason for this is that anisotropic BRDFs can be modeled using a weighted sum of SGFs. As an example, we have found that the Blinn-Phong BRDF can be modeled with only three SGFs with a RMSE below 0.05. Using Eqs. (3.23), (3.32), and (3.33), each coefficient zj0 of vector z0 can be written as: zj0
D
Z ˝2
Gk 0 .ωj
ω 0 I 1; l/ G .ωr
ω 0 I ks ; w/ d ˝.ω 0 /;
with ωj being the direction vector of sample j . Using the property that the product of two SGFs is also a SGF, we can express zj0 as: zj0 D
Z
G.ωm ˝2
ω 0 I cm ; lm / d ˝.ω 0 /;
(3.35)
3.4. APPLYING BMC TO GLOBAL ILLUMINATION
49
where: 1 2 lm
ωm cm
ˇω ωr ˇˇ ˇ j D ˇ 2 C 2ˇ l w ωr 2 ωj D lm 2 C 2 l w 1 1 D ks exp 2 lm l 2
1 w2
:
Furthermore, by defining a spherical Gaussian integral (SGI) Sg .ω ; l/ as: Z ω ω0 1 Sg .ω ; l/ D d˝.ω 0 /; exp l2 ˝2
(3.36)
we can rewrite Eq. (3.35) as follows: zj0 D cm Sg .ωm ; lm /;
where Sg .ω ; l/ is a SGI whose value is a function of the lobe apex position ω and of the lobe width l . In fact, due to the lobe axial symmetry, only the elevation angle between the direction ω and the normal n is necessary to specify the input direction ω in Eq. (3.36). Figure 3.5 illustrates the shape of the SGI Sg .; l/ for .; l/ 2 Œ0; : : : ; Œ0; : : : ; 1. Note that, as the value of increases, the value of the SGI decreases. is is because the part of the lobe which remains inside the domain of integration gets smaller and smaller. Such an effect is more visible for larger lobes, i.e., for larger lengthscale values. Figure 3.5 also shows that the SGI is a very smooth function which can easily be tabulated for quick evaluations. A single two-entry table with (; l ) as inputs is thus sufficient for storing the SGI values. is table is independent of the scene and of the used BRDFs. It is computed just once and used for any BMC integration within this framework. Such an approach reduces the computation of the z0 vector to simple queries to a bi-dimensional look-up table.
3.4.2 PRIOR GP: A GLOBAL MODEL WITH LOCAL ADAPTATION To completely define the prior GP model of the unknown function Li .ωi /, we need to specify a covariance and a mean function. Our approach to this problem is based on the following hypothesis: In general, the value of the unknown incident radiance function Li .ωi / changes at each shading point, while its smoothness properties remain roughly the same all over the scene. Hypothesis 3.1
Such an assumption means that we should locally adapt the prior mean function Li .ωi /, and use the same covariance function for all integral evaluations, i.e., use global hyperparameters. However, as it will be shown below, the hyperparameters strongly depend on the BRDF at each
50
3. BAYESIAN MONTE CARLO FOR GLOBAL ILLUMINATION
Figure 3.5: Plot of the SGI 2D table values. In this example 25 values have been used for the dimension, and 50 values have been used for the lengthscale l . In our work we have used 200 values for each dimension. In such a case, the table is of size 160 KB using floating point notation.
shading point. erefore, the global hyperparameters used must be different for each BRDF contained in the scene. In the following, we show how to efficiently compute a local mean function based on the samples, and present an algorithm to learn the global hyperparameters per BRDF. Determining the Local Mean Function e mean function LN i .ωi / contains our prior expectations regarding the value of Li .ωi / over the integration domain. e closest LN i .ωi / is to the unknown function Li .ωi /, the better will be the integral estimate. However, the complexity of the function LN i .ωi / should be kept as low as
possible to allow an efficient implementation of the BMC method. For this reason, we chose to use a constant mean function which, as shown below, greatly simplifies the computation of the term IN (Eq. (3.22)). Having chosen to use a constant mean function LN , we still have to decide of its value. Since we want to adapt the mean function according to the characteristics of the incident radiance function at each shading point, a natural choice would be to make a simple mean of the observed samples Li .ωj /. Nevertheless, as will become clear in Sec. 3.4.3, the distribution of the optimal samples is strongly influenced by the BRDF term. Consequently, given that the samples are not uniformly distributed, a simple average of the samples value would provide a strongly biased mean function. A consistent solution should, instead, take into account the samples position. Our approach to this problem is to leverage the prior GP as described in Ch. 2, Sec. 7 of [RW06]. is method resorts to an explicit basis function model to infer a mean function from the observations. Since our goal is to obtain a constant mean function, we use a single basis
3.4. APPLYING BMC TO GLOBAL ILLUMINATION
51
function h.ω / D 1. Its associated weight is thus the desired mean value, yielding: 0 1 N i D HQ Y ; L HQ0 1 H t
(3.37)
where H D Œh.ω1 /; : : : ; h.ωn / D Œ1; : : : ; 1 and Y D ŒLi .ω1 /; : : : ; Li .ωn /t is the samples vector. Not surprisingly, it can be shown that this method slightly increases the estimates variance wince we introduce uncertainty in the model. However, this effect is significant only for very small samples set sizes (N < 10) and can thus be neglected in practice [RW06]. e use of a constant mean function allows an efficient evaluation of the prior integral estimate IN. Indeed, from Eq. (3.22) and Eq. (3.33) we have: N i .ωr / IN D L
(3.38)
where .ωr / is an SGI given by: .ωr / D
Z
G .ωr
ω I ks ; w/ d ˝.ω /;
˝2
whose value can be easily determined by resorting to the same bi-dimensional look-up table as the one used for evaluating the SGI of Eq. (3.36). Furthermore, using H D Œ1; : : : ; 1, LN i (Eq. (3.37)) can be rewritten as a weighted sum of the observations, such that: X Ni D 1 L
j Yj ;
(3.39)
j
where j is given by the sum of the coefficients of the j t h column of the inverse covariance matrix P Q0 1 , and D j j the sum of all coefficients of Q0 1 . e weights j = can be precomputed once the sampling pattern and the hyperparameters have been determined, hence accelerating the computation of LN i . Learning the Global Hyperparameters
To learn the hyperparameters at a scene level for a given BRDF, we use the same principle as Brouillat et al. [BBLC 09]. It consists in numerically estimating the covariance between the samples, and then fitting it to our covariance function model given by cov.ωp ; ωq / D .ωp ωq / 1 2 f exp C n2 ıpq . Nevertheless, the application of this principle to the glossy BRDF l2 case implies designing a learning algorithm which is different from that of Brouillat et al. e conditions in which the covariance is estimated should be as close as possible to the ones which will be found when evaluating the integral. In particular, the samples used to compute the expected value for the integration procedure (Eqs. (3.15) and (3.37)) are distributed according to the lobe of the actual BRDF. erefore, we have decided to compute the expected value for the covariance estimation procedure using the same samples distribution. is decision implies
52
3. BAYESIAN MONTE CARLO FOR GLOBAL ILLUMINATION
that the covariance is evaluated separately for each BRDF shininess. Furthermore, to simplify the learning procedure, we have simulated the incident radiance using an environment map. We propose a learning method in which the training set is built as a superset of incident radiance samples set fLi .ωj /g. Each of these sample sets is designed so as to be nearly optimal for the quadrature equation. As the integral of Eq. (3.29) is strongly dependent on the BRDF, each fωj g set will be more or less concentrated around the ωr direction specified for the BRDF. To take this into account for the determination of the global hyperparmeters of the Li .ω / GP model, our method proceeds as follows. 1. Generate a set of nr uniformly distributed direction vectors fωr g over the S 2 sphere (the basic spiral point algorithm proposed in [SK97] can be used for this). e resulting distribution is depicted in Fig. 3.6, center. 2. For each ωr : (a) Generate a set fωj g of n sampling directions (Fig. 3.6, left) using the spiral points of Algorithm 3 without the polynomial distribution unknown at this stage. Center fωj g around the actual ωr (see Fig. 3.6, right). Compute the corresponding Li .ωj / values. (b) Compute the Quasi-Monte Carlo estimate of the mean incident radiance value: 1 X Li .ωj / LN D : n .ωj ; ωr / j
(c) Build a covariance matrix Aωr , the coefficients of which are the products: aj 0 j D ajj 0 D .Li .ωj 0 /
N L/.L i .ωj /
N L/:
3. Compute AN, the arithmetic mean of the Aωr matrices. 4. Perform a linear regression on all the AN matrix coefficients except the diagonal. To this end, we take the square of the Euclidean distance between pairs of sample directions (see explanations below) as input variable, and the natural logarithm of the AN coefficients value as output variable (see Eq. (3.40)). e slope gives 1=2l 2 and the intercept 2 ln.f /. 5. Subtract f2 from the mean of the diagonal coefficients to obtain n2 . e goal of steps 1–3 is to build an average covariance matrix AN by analyzing the whole range of incidence directions while keeping a point distribution that fits the BRDF. AN can then be considered as an observed sample of matrix Q (Eq. (3.20)). As all Aωr elements are produced with the same point distribution, the Euclidean distance jωi - ωj j between pairs of sampling directions ωi and ωj that are used to compute aij is the same for all Aωr matrices and thus AN. erefore, jωi ωj j D rij :
3.4. APPLYING BMC TO GLOBAL ILLUMINATION
53
ese distances are computed only once and then used in the linear regression step. Given Eq. (3.31) and Eq. (3.32), we have: lnŒk.
0
/ D 2 ln.
f
/
j
0 2
2l 2
j
;
(3.40)
hence the result of the linear regression. We only consider the range of rij values which correspond to significant values of covariance. In our implementation, we have obtained good results with nr D 4K sample sets, each one containing n D 80 samples, yielding a training set with 320K samples.
Figure 3.6: Samples set layout for covariance estimation. On the left: samples set f j g uniformly distributed on a SGF BRDF lobe with a given shininess. Center: set of r directions uniformly distributed on the sphere S 2 . Right: sample sets f j g centered on each r .
Using the procedure described above, we sample the incoming radiance with a distribution concentrated within the BRDF lobe. In this way, the fitting of the covariance function is adapted to the range of interest of the inter-samples distance, that is, a narrow range of distances for high shininess and a wide one for low shininess. But this approach has a limitation regarding scenes with several BRDFs since it implies learning the hyperparameters separately for each shininess parameter used in the scene. Although this operation takes just a few seconds per shininess parameter (typically around 1–4 s depending on the scene complexity), it would make the BMC approach inefficient for scenes with different shininess parameters. To cope with this problem, a fast method to approximate the hyperparameters is proposed in Sec. 3.5.4.
3.4.3 OPTIMAL SAMPLES SET FOR ILLUMINATION INTEGRALS Equation (3.24) shows that the variance of the BMC estimate is strongly dependent on the samples location f j g. Moreover Var.I jD/ does not depend on the observed values, as opposed to classical MC and QMC methods. is feature allows determining the samples set which mini-
54
3. BAYESIAN MONTE CARLO FOR GLOBAL ILLUMINATION
mizes Var.I jD/ before any samples are drawn. We call the samples set resulting from this minimization optimal samples set. e variance of the BMC estimate given by Eq. (3.24) also depends on the covariance function k.x; x0 / and on the analytically known part of the integrand p.x/. However, the value of p.x/ (i.e., the BRDF) is known, as well as the hyperparameters of the covariance function which can be previously determined. Consequently, in practice, Var.I jD/ only depends on the fωj g set. e most direct approach to find the optimal samples set is to consider Var.I jD/ as a function of n variables which are the samples directions. However, such an approach would quickly become intractable even for medium size sets of around 40 samples or more. e problem needs thus to be tackled differently so as to reduce the number of variables to be optimized. Given the axial symmetry of the Gaussian BRDF lobe and the stationary covariance function, there is no reason for which the optimal samples should not be uniformly distributed with respect to the azimuthal angle . When making this assumption, the optimization process would only act on the samples distribution by modifying the angle of elevation . To implement this approach, we have adapted the spherical Fibonacci point sets algorithm presented in Chapter 2, which uniformly distributes a set of samples over a hemisphere. e modified version is presented in Algorithm 3. e main differences with respect to the original algorithm are the following: the samples are now distributed over a Gaussian BRDF lobe (instead of a hemisphere), and the samples distribution over the angle is now controlled by a polynomial (instead of being uniform). Algorithm 3 e modified spiral points algorithm [MBRC 13b]. p 1: .3 5/ 2: 0 3: z 1=n 4: z 1 z=2 5: for all k Œ1 W n do 6: zp polyval.coeff ; z/ 1 7: zv lnŒ1 C zp .e m 1/ m 8: k arccos.min.zv ; 1// 9: k mod.; 2/ 10: z z z 11: C 12: end for
By convention, in Algorithm 3, the z axis is aligned with the surface normal n at the shading point. e first four lines initialize some variables required for the samples distribution which starts in line 5. e uniform distribution over z used in the original algorithm is replaced by a
3.4. APPLYING BMC TO GLOBAL ILLUMINATION
55
polynomial distribution in line 6 whose coefficients are named coeff . is distribution accounts for the effect of the covariance on the samples distribution. Line 7 is the second change in the original algorithm which allows producing a discrete spiral on the Gaussian BRDF lobe rather than on the sphere. is is achieved by using the following warping function for the z coordinates: zv D g.z/ D
1 lnŒ1 C z.e m m
1/;
(3.41)
where m is the Phong shininess parameter. e details of the derivation of g.z/ in Eq. (3.41) are given in the next Sec. (3.4.4). Using Algorithm 3 to generate the samples distribution allows optimizing the polynomial coefficients coeff instead of optimizing all the samples directions individually. We have experimentally found that a polynomial of degree 3 is enough for this optimization. is leads to a significant reduction of the number of parameters to be optimized, making the problem tractable even for large sample sets, since the number of polynomial coefficients required is not dependent on the samples set size. Moreover, for evaluating Eq. (3.24), we only need to consider the term zt Q 1 z since VN does not depend on the sampling pattern. Using this approach, the optimization process takes a few seconds when using the BFGS quasi-Newton method provided by Matlab. We have also found that the final result is not very dependent on the initial condition even if the initial polynomial is of degree 0. Figure 3.7 shows two examples of optimal sample sets distributed over a SG approximation of a Phong BRDF of shininess m D 25. On the left (Fig. 3.7(a)), a lengthcale l D 0:05 was used, while on the right (Fig. 3.7(b)) the used lengthscale value was l D 0:20. As expected, the resulting optimal samples distribution is strongly dependent on the lengthscale value, i.e., on the smoothness of the unknown function Li as specified by the prior. A large lengthscale value, corresponding to a very smooth function Li , implies a strong correlation between the samples. is means that a single sample of Li provides information about a wider domain than if the lengthscale value were small. Consequently, in Fig. 3.7(a), the optimal samples distribution is given by samples which are distant from one another, otherwise they would provide redundant information. On the other hand, in Fig. 3.7(b), the use of a small lengthscale makes the optimal samples more concentrated around the BRDF lobe apex. As regards the noise ratio n0 , we have experimentally found that using n0 D 0:25 yields the best results.
3.4.4 FROM THE HEMISPHERE TO THE GAUSSIAN LOBE e spiral points algorithm presented in Chapter 2 generates uniform point sets on a sphere, the up axis of which is called z axis. Our goal in this section is to show how to warp the z coordinates of the samples produced by the original algorithm so as to uniformly distribute the samples on a SG lobe instead of a hemisphere. In other words, we show how to derive Eq. (3.41), used in the previous section. To achieve this goal, we make use of the following property of every function f
56
3. BAYESIAN MONTE CARLO FOR GLOBAL ILLUMINATION
(a) l D 0:05
(b) l D 0:20
Figure 3.7: Optimal sets of 30 samples distributed over a purely glossy Phong BRDF with a shininess m D 25. Two different lengthscale values were used: l D 0:05 on the left and l D 0:2 on the right. e blue points correspond to the samples direction.
on the hemisphere ˝2 : n
1X 1 f .ωj;n / D n!1 n 2
lim
j D1
Z
f .ω /d˝.ω /
˝2
for sample sets fω1;n ; : : : ; ωn;n g uniformly distributed on a hemisphere. In the following derivations we assume that the lobe axis is aligned with the surface normal at the shading point (ωr D n). erefore, by substituting the spherical Gaussian BRDF given by Eq. (3.33) in the illumination integral of Eq. (3.29), we have: Z Lo .ωo / D ks Li .ωi /e m.nωi 1/ d ˝.ωi /: ˝2
e above equation can be rewritten as follows: Lo .ωo / D ks
Z
Z
2
D0
2
Li .; /e m.cos
1/
sin dd;
D0
with (; ) being the polar coordinates of the ωi . Making the substitution z D cos , we get: Lo .ωo / D ks
Z
2
D0
Z
1
Li .z; /e m.z
1/
dzd:
zD0
To sample the integrand L.z; /e m.z 1/ , a uniform distribution over the hemisphere ˝2 , such as the one generated by the spiral points algorithm, must be used. However, to sample the function L.z; / alone, another substitution is needed so as to include the BRDF factor into new
3.4. APPLYING BMC TO GLOBAL ILLUMINATION
57
integration variables. is is done by making the substitution: z0 D g
from where: dz 0 D
1
m 1 e
yielding: Lo .ωo / D
ks .1
e m
m
e mz em
.z/ D
/
m
Z
e m.z
2
D0
Z
1 ; 1 1/
(3.42)
dz
1 z 0 D0
L0i .z 0 ; / dz 0 d;
with L0i .z 0 ; / D Li .g.z 0 /; /. e domain of integration of the above equation is still the hemisphere ˝2 and is uniformly sampled by .z 0 ; /. However, we still need to revert to the original z coordinate so that we can sample the original Li ./ function instead of L0i ./. e warping function which allows to do so is derived by inverting Eq. (3.42), hence: 1 lnŒ1 C z 0 .e m 1/: m e effect of g./ can be interpreted as a warping of the distance measure so that inter-samples distances are measured between points on the Gaussian lobe rather than on the unit sphere. z D g.z 0 / D
3.4.5 PRECOMPUTATIONS e precomputation steps required to render an image with BMC can be divided in two distinct groups: those that are performed once for all at a precomputing state, and those which must be performed each time an image is rendered. e spherical Gaussian integral look-up table presented in Sec. 3.4.1 is completely sceneindependent. It can thus be computed only once and stored for later use. Regarding the optimal sample sets, we have seen in Sec. 3.4.3 that they are dependent on the hyperparameters which, in their turn, are scene-dependent. However, in our implementation they are also precomputed once for all. is is achieved by precomputing and storing the sample sets for different lengthscale values. During rendering, the most appropriate set is selected from those that have been precomputed. As explained in Sec. 3.4.2, the hyperparameters value depends on the characteristics of the incident radiance and on the BRDF at the shading ponit. Because of such dependencies, the hyperparameters learning is a scene-dependent precomputation step. In fact, as will be described in Sec. 3.5.4, the hyperparameters can be efficiently approximated based only on the BRDF lobe shininess, hence skipping the learning step. Once the hyperparameters are determined, the appropriate optimal samples set can be selected. Once the samples locations are known, the covariance matrix Q0 can be precomputed and inverted, as it only depends on the hyperparameters and on the samples location. Finally, the weights j = (see Eq. (3.39)) of the prior mean function LN i are also precomputed.
58
3. BAYESIAN MONTE CARLO FOR GLOBAL ILLUMINATION
3.4.6 THE RENDERING ALGORITHM e BMC rendering algorithm, which is applied for every shading point, is presented in Algorithm 4. Algorithm 4 e Bayesian Monte Carlo rendering algorithm.
Precumputed values : hyperparameters h, Q0 1 matrix and the prior mean weights = Input : outgoing direction ωo , surface normal n, random number Output : outgoing radiance Lo function integratorBMC(ωo ; n; / 1: S getOptimalSamplesSet.h/ 2: Srot at ed randomRotation.S; / 3: ωr reflect.ωo ; n/ 4: Srot at ed centerSamplesSet.Srot at ed ; ωr / 5: for all ωj 2 Srot at ed do 6: Y Œj Li .ωj / 7: end for Ni 8: L computePriorMean.Y ; = / N i .ωr / 9: IN L N Ni H 10: F L 0 11: z computeZVector.ωr ; w; Srot at ed / N 12: Lo IN C z0 t Q0 1 .Y F/ 13: return Lo end function
e BMC integrator function takes as input the outgoing direction ωo , the surface normal n and a random number . It gives as output the outgoing radiance Lo at the shading point. e precomputed values, i.e., the hyperparameters h D .l; n0 /, the inverse covariance matrix Q0 1 and the prior mean weights = (see Eq. (3.39)) are considered as known. Together with the BRDF parameters w (the lobe sharpness) and ks (the specular coefficient), these values are assumed to belong to the program global scope and are thus not explicitly declared. e first step of Algorithm 4 (line 1) consists in fetching the optimal samples set S , given the hyperparameters h. S is at this point centered around the surface normal n. In line 2, S is rotated around n by a random angle , yielding Srot at ed . e goal of this random rotation is to decorrelate the sampling directions at neighboring shading points, hence avoiding the introduction of artifacts in the final image due to the use of a single regular sampling pattern. In line 3, the perfect reflection direction ωr is computed, and in line 4 the rotated sample set is aligned with ωr . We draw the readers attention to the fact that these rotations do not affect the distance between
3.4. APPLYING BMC TO GLOBAL ILLUMINATION
59
the samples. Consequently, because the covariance function is a SGF which only depends on the inter-samples distance, the precomputed inverse covariance matrix Q0 1 remains valid. e samples Yj of the incident radiance function are collected in lines 5–7 and stored in vector Y . e samples vector Y and the weights = are then used to compute the prior mean LN i by applying Eq. (3.39). In line 9 LN i is used to compute the prior integral estimate IN (Eq. (3.38)). en, the vector FN containing the prior expected value of the observations is determined, followed by the computation of the z0 vector using the SGI look-up table. Finally, the Bayesian Monte Carlo estimator (Eq. (3.28)) is applied to estimate the value of the outgoing radiance Lo at the current shading point. Placing the samples set S around the perfect reflection direction ωr might cause a part of the sampled BRDF lobe to be located below the plane tangent to the object surface at the shading point. is means that a part of the samples lies outside the integration domain. A BMC estimate could still be computed by only using the samples within the integration domain. is solution, however, is not interesting for our approach as it would cause a high computational overhead. It would imply recomputing the inverse covariance matrix Q0 1 whenever one or more samples lie outside the integration domain. An alternative solution is to produce a BMC estimate using all the samples, even those lying outside the integration domain. is raises the question of what value should be assigned to these samples. Setting these values to zero would seem a natural answer but, as shown in Fig. 3.8, such
(a)
(b)
Figure 3.8: Two examples of a Bayesian regression using occluded samples. On (a) the value of the occluded samples is set to zero, while on (b) their value is set to the value of the nearest unoccluded sample. e red dashed line at =2 marks the limit of the integration domain. e samples at the right of this line are thus occluded samples (marked in blue in (a) and green in (b)). e real signal is marked by a black line. e resulting reconstructed signal is represented by a dashed blue line on the left, and a dashed green line on the right.
60
3. BAYESIAN MONTE CARLO FOR GLOBAL ILLUMINATION
a choice can potentially introduce wrong information with an important effect on the integral estimate. is situation is caused by the fact that, although the sampling direction ωj is located outside the integration domain (i.e., ωj … ˝2 ), it may still contribute to the reconstruction of the function Li .ωi / within the integration domain. Setting these sample values to zero would thus make the reconstructed signal tend to zero when approaching the surface tangent plane as shown in Fig. 3.8(a). Our experimental results reveal that an efficient solution to this problem is to assign to these samples the value of the nearest non occluded sample (see Fig. 3.8 (b)). Moreover, we have also found that this solution performs better than assigning the mean value of the samples within the integration domain to the occluded samples.
3.5
RESULTS
e goal of this section is to validate the BMC approach presented previously. It starts with a description of the experimental environment (Sec. 3.5.1), followed by an evaluation of the correctness of the learned hyperparameters (Sec. 3.5.2). In Sec. 3.5.3 we compare BMC using optimal sample sets with other spherical integration methods among which is the state-of-the-art for QMC spherical integration (i.e., QMC using the spherical Fibonacci point sets presented in Chapter 2). Finally, in Sec. 3.5.4, we show how to approximate the value of the hyperparameters based on the BRDF lobe width, hence avoiding a learning step which can be, in some cases, very costly.
3.5.1 EXPERIMENTAL ENVIRONMENT We have implemented several integration methods with a view of comparing them to the performance of BMC using optimal sample sets (which we refer to as BMC Opt): • Quasi-Monte Carlo using a Sobol .0; 2/-sequence [Sob67] (QMC Sobol); • Quasi-Monte Carlo using spherical Fibonacci point sets (QMC SF); • Bayesian Monte Carlo using a Sobol .0; 2/-sequence (BMC Sobol); and • Bayesian Monte Carlo using spherical Fibonacci point sets (BMC SF). e quality of the results is measured in terms of root mean squared error (RMSE) with respect to a reference image computed using QMC SF with 10000 samples per shading point. Results have been generated for six different scenes, the details of which are presented in Table 3.1. e shininess of the Phong BRDFs contained in the scenes varies from 20–200. We consider that such a range is representative of the common usage of glossy BRDFs and allows evaluating the integration methods in very different conditions. For the sake of computation speed, in the scenes Dragon, Buddha, and Horse the incident illumination is simulated by an environment map. In the scenes VW, Room, and Cornell Box,
3.5. RESULTS
61
Table 3.1: Characteristics of the used test scenes. e columns list the number of triangles in the scene, the value of the shininess parameter of the BRDFs contained in the scene, the learned length0 scale and the learned noise ratio. When ll and nl are tagged as “nd” (not determined) the approximate method of hyperparameters has been used instead of the learning step (see Sec. 3.5.4)
Scene Name Dragon Buddha Horse VW Room Cornell Box
Number of triangles
Phong BRDF shininess m
Learned lengthscale ll
Learned noise 0 ratio nl
100 000 170 000 110 000 440 000 540 000 110 000
20 50 80 20, 50, 80 20, 50, 80 80, 200
0.29 0.17 0.13 nd nd nd
0.96 0.53 0.67 nd nd nd
the results are generated using final gathering for photon mapping. e synthesized images have a resolution of 1024 1024 pixels and have been generated using the Mitsuba raytracer [Jak10] running on a 64 bit computer equipped with a 2 GHz Intel Core i7 processor and 8 GB of RAM.
3.5.2 HYPERPARAMETERS LEARNING e hyperparameters have an important role in the BMC method as they influence not only the weight assigned to each sample but also the configuration of the optimal samples set. erefore, we must ensure that the learning algorithm presented in Sec. 3.4.2 yields the correct hyperparameters. To test the correctness of the learned hyperparameters, we have applied our learning algorithm to three scenes (Dragon, Buddha, and Horse), each of them containing a single BRDF. e resulting 0 hyperparameters are shown in Table 3.1, where ll is the value of the learned lengthscale and nl is the value of the learned noise ratio. After learning the hyperparameters, we measured the RMSE of BMC Opt using the learned hyperparameters. en, we generated other images with the same method, but varying the value of the hyperparameters. is operation allows checking whether or not the learned hyperparameters yield the smallest RMSE. e results are depicted in Fig. 3.9. On the left, in 0 Fig. 3.9(a), the RMSE has been computed using the noise ratio n0 D nl (i.e., the learned value) and varying the lengthscale hyperparameter l . e plot shows that, for the three scenes, the value of the RMSE is minimal when the lengthscale value used is the learned value (l D ll l D 0). On the right, in Fig. 3.9(b), a similar operation was performed but this time fixing the value of l to ll and varying n0 . e resulting plot also shows, for the three scenes, that the RMSE is smaller 0 ). when the noise ratio value used is the learned value (i.e., 0 D nl
62
3. BAYESIAN MONTE CARLO FOR GLOBAL ILLUMINATION
(a) Lengthscale l
(b) Noise ratio n0 Figure 3.9: e relative RMSE as a function of each of the hyperparameters l (top) and n0 (bottom). D l is the relative RMSE between the RMSE of an image computed when varying one hyperparameter, and the RMSE l of the image computed using the learned hyperparameters (listed in Table 3.1).
3.5.3 COMPARISON: BMC VS. QMC A comparison between images rendered using BMC Opt and QMC SF for the scenes Dragon, Buddha and Horse is shown in Figs. 3.10, 3.11, and 3.12, respectively. e inserts show that the images produced with BMC Opt have fewer high frequency noise than those produced with
63
SF BMC Opt
(RMSE = 0.0116)
(RMSE = 0.0121)
Ref
3.5. RESULTS
Figure 3.10: Close-up views for the Dragon scene rendered with Bayesian Monte Carlo using optimal sample sets (BMC Opt) and Quasi-Monte Carlo using spherical Fibonacci point sets (QMC SF). e number of ray samples per shading point is 40. e BRDF of the Dragon material is a purely glossy Phong BRDF with a shininess parameter of 20. e figure also shows the RMSE values for each method.
QMC SF. Moreover, BMC Opt also yields a smaller RMSE than QMC SF. e time taken to synthesize the images is very similar because the overhead of BMC with respect to QMC is negligible for scenes containing a single BRDF. Figures 3.13, 3.14, and 3.15 show the RMSE as a function of the number of samples for the scenes Dragon, Buddha, and Horse, respectively. e compared methods are QMC Sobol, BMC Sobol, QMC SF, BMC SF, and BMC Opt. For the three scenes, and for all the number of samples tested, BMC Opt outperforms the other tested methods, which confirms the results presented in Figs. 3.10, 3.11 and 3.12. Moreover, it is particularly interesting to compare the results when using exactly the same samples for BMC and QMC (i.e., BMC Sobol with QMC Sobol, and BMC SF with QMC SF). Such a comparison allows assessing the gain of weighting the samples using the BMC quadrature instead of the samples averaging estimator used in QMC. Finally, comparing BMC SF with BMC Opt shows the gain due to the use of the optimal samples set instead of the spherical Fibonacci point sets (which are the state of the art for QMC). Indeed, it is only through an appropriate samples distribution that the information brought by the prior covariance function can be efficiently exploited.
3. BAYESIAN MONTE CARLO FOR GLOBAL ILLUMINATION
SF BMC Opt
(RMSE = 0.0081)
(RMSE = 0.0086)
Ref
64
Figure 3.11: Close-up views for the Dragon scene rendered with Bayesian Monte Carlo using optimal sample sets (BMC Opt) and Quasi-Monte Carlo using spherical Fibonacci point sets (QMC SF). e number of ray samples per shading point is 40. e BRDF of the Buddha material is a purely glossy Phong BRDF with a shininess parameter of 50. e figure also shows the RMSE values for each method.
3.5.4 SKIPPING THE LEARNING STEP e hyperparameters can be quickly learned for a single BRDF by resorting to around 350K rays [BBLC 09, MBRC 13b]. is task, however can be cumbersome if many different BRDFs exist in the scene. It is thus crucial to find an alternative solution to that of learning the hyperparameters for each BRDF. In the following of this section, we present a method to quickly approximate the value of the hyperparameters for a wide range of BRDFs, hence avoiding the learning step. Let us recall the results presented in Fig. (3.9). e relative RMSE curves show that the RMSE is not very sensitive to variations of the value of the hyperparameters around their optimal value. is means that using an approximated value instead of the optimal value is sufficient for obtaining good quality results. In concrete terms, Fig. 3.9(b) shows that any values of n0 in the interval Œ0:4; 1:1 yield roughly the same RMSE. Nevertheless, in [MBRC 13b], the authors report that using n0 D 0:5 is an interesting choice. Figure 3.16 presents the value of the learned lengthscale as a function of the Phong BRDF shininess coefficient m. e results show that the lengthscale mainly depends on m. As shown in [MBRC 13b], a good approximation of the learned lengthscale value ll based on the BRDF lobe
65
SF BMC Opt
(RMSE = 0.0090)
(RMSE = 0.0097)
Ref
3.5. RESULTS
Figure 3.12: Close-up views for the Dragon scene rendered with Bayesian Monte Carlo using optimal sample sets (BMC Opt) and Quasi-Monte Carlo using spherical Fibonacci point sets (QMC SF). e number of ray samples per shading point is 40. e BRDF of the Horse material is a purely glossy Phong BRDF with a shininess parameter of 80. e figure also shows the RMSE values for each method.
width w (see Eq. (3.33)) is given by: p ll ˛= m D ˛ w;
(3.43)
where m D 1=w 2 is the Phong BRDF shininess parameter, w characterizes the lobe sharpness (see Eq. (3.33)) and ˛ 1:25 is found by performing a linear regression on the learned lengthscale values. e values retrieved using this approximation are marked by a dashed line in Fig. 3.16. e method for fast hyperparameters approximation given by Eq. (3.43) was applied to three complex scenes. e results are depicted in Figs. 3.17, 3.18, and 3.19, where the results generated using BMC Opt are compared to those of QMC Sobol and QMC SF. e results show that the relative RMSE of QMC SF with respect to that of BMC Opt is of 0:1%, 13:5%, and 18:9% for Figs. 3.17, 3.18, and 3.19, respectively. Note that, even when the RMSE of BMC Opt and QMC SF is approximately the same (which is the case of Fig. 3.18), the image produced with BMC Opt yields less high frequency noise. is is because of the Bayesian regression which is implicit in the BMC quadrature equations, which smooths out sharp variations of the integrand while not introducing low frequency artifacts.
66
3. BAYESIAN MONTE CARLO FOR GLOBAL ILLUMINATION
Dragon
Figure 3.13: RMSE plots as a function of the number of samples n for the Dragon scene. e slopes of the line fitting the RMSE curves for each method are given in the legend in-between parentheses.
Buddha
Figure 3.14: RMSE plots as a function of the number of samples n for the Buddha scene. e slopes of the line fitting the RMSE curves for each method are given in the legend in-between parentheses.
3.5. RESULTS
67
Horse
Figure 3.15: RMSE plots as a function of the number of samples n for the Horse scene. e slopes of the line fitting the RMSE curves for each method are given in the legend in-between parentheses.
Figure 3.16: Learned lengthscales as a function of the shininess parameter m.
3. BAYESIAN MONTE CARLO FOR GLOBAL ILLUMINATION
BMC
QMC SF
QMC Sobol
Ref
68
Figure 3.17: Indirect radiance component for the Room scene rendered with BMC, QMC SF, and QMC Sobol. e RMSE of BMC is 0:026. e relative RMSE of QMC Sobol and QMC SF w.r.t. that of BMC is C50:0% and C13:5%, respectively. e rendering times are 2:20 s for BMC, and 2:18 s for the QMC-based methods. e images have been multiplied by a factor of 4. e RMSE and the time are computed by considering only the glossy component. 16 ray samples per visible point were used for the materials with a glossy BRDF (teapot, tea cup and fruit-dish), while 10,000 samples were used for the diffuse BRDFs to ensure convergence since these are not computed using our spherical Gaussian framework.
69
BMC
QMC SF
QMC Sobol
Ref
3.5. RESULTS
Figure 3.18: Indirect radiance component for the VW scene rendered with BMC, QMC SF, and QMC Sobol. e RMSE of BMC is 0:020. e relative RMSE of QMC Sobol and QMC SF w.r.t. that of BMC is C17:7% and C0:1%, respectively. e rendering times are 4:11 s for BMC, and 4:09 s for the QMC-based methods. e shown images have been multiplied by a factor of 4. e RMSE and the time are computed by considering only the glossy component. 16 ray samples per visible point were used for the materials with a glossy BRDF (VW glass, VW bodywork, and VW roof ), while 10,000 samples were used for the diffuse BRDFs to ensure convergence since these are not computed using our spherical Gaussian framework.
3. BAYESIAN MONTE CARLO FOR GLOBAL ILLUMINATION
BMC
QMC SF
QMC Sobol
Ref
70
Figure 3.19: Indirect radiance component for the Cornell Box scene rendered with BMC, QMC SF, and QMC Sobol. e RMSE of BMC is 0:022. e relative RMSE of QMC Sobol and QMC SF w.r.t. that of BMC is C71:7% and C18:9%, respectively. e rendering times are 3:38 s for BMC, and 3:36 s for the QMC-based methods. e shown images have been multiplied by a factor of 4. e RMSE and the time are computed by considering only the glossy component. 16 ray samples per visible point were used for the materials with a glossy BRDF (sphere and back wall), while 10,000 samples were used for the diffuse BRDFs to ensure convergence since these are not computed using our spherical Gaussian framework.
3.6. CONCLUSION
3.6
71
CONCLUSION
In this chapter we presented the BMC integration method, and showed how it can be used to efficiently estimate the value of the illumination integral. e key point of the presented solution is the modeling of both the BRDF and the covariance function with the same family of spherical Gaussian functions. Such an approach makes the computation of a BMC estimate tractable for a broad class of BRDFs. e results confirmed that Bayesian Monte Carlo outperforms state-of-the-art QuasiMonte Carlo methods. ey demonstrate that the most important characteristic of an estimation method is its capacity to incorporate prior information. In particular, CMC and QMC methods are not able to incorporate knowledge in a probabilistic manner. Only deterministic knowledge can be introduced, such as: • information regarding incident radiance for product sampling (CMC); • morphing a samples set to follow the BRDF shape (QMC); and • making a continuity assumption regarding the integrand (QMC). BMC, on the other hand, has proved to be the most flexible of the analyzed methods regarding the use of prior knowledge. It can incorporate deterministic knowledge through the known part of the integrand p.x/. It can also incorporate probabilistic knowledge through the use of a probabilistic model of the unknown part of the integrand f .x/. is model contains information regarding the covariance between the samples, and a mean function fN.x/ which is a prior (rough) approximation of the unknown function f .x/. anks to these features, it was possible to show that BMC outperforms existing state-of-the-art QMC solutions for computer graphics, even at an early stage of application to this research field.
73
APPENDIX
A
Posterior Distribution From Eq. (3.9) we have: 1
L.w/ D
.2n /n=2
e
kY
t wk2 2 2n
:
From Eq. (3.11) we get: p.w/ D .2/
p 2
j˙p j
1 2
e.
1 2 .w
N t ˙p 1 .w w/ N / w/
:
From Eq. (3.10) we obtain: p.wjY I X/ D
L.w/ p.w/ ; m.X/
where m.X/ is a normalizing term. Our goal is to prove the result given by Eq. (3.12) which states that: O A 1 p.wjY I X/ N w; where A D n 2 t C ˙p 1
and wO D A
1
˙p 1 wN C n 2 Y
To prove it we will compute the term L.w/ p.w/ of Eq. (3.10) accounting only for terms which depend on w . e other terms are considered as part of the normalizing term m.X/ of the resulting Gaussian: 1 1 t 2 N t ˙p 1 .w w/ N .w w/ p.wjY I X/ / exp exp kY wk 2n2 2 1 t 1 2 t 2 N ˙p .w w/ N C n kY .w w/ / exp wk : 2 By expanding the products and using the fact that ˙p 1 is a symmetric matrix, we have: 1h t w ˙p 1 w 2w t ˙p 1 wN C wN t ˙p 1 wN p.wjY I X/ / exp 2 i 2 t t tt C n Y Y 2w Y C w w :
74
A. POSTERIOR DISTRIBUTION
e terms Y t Y and wN t ˙p 1 wN remaining terms we get: p.wjY I X/ / exp / exp / exp / exp / exp / exp / exp
can be discarded since they do not depend on w . Rearranging the 1 t w ˙p 1 w C n 2 w t t w 2 w t ˙p 1 wN C n 2 w t Y 2 1 t w ˙p 1 C n 2 t w 2 w t ˙p 1 wN C n 2 w t Y 2 1 t 1 2 t w Aw 2w ˙p wN C n Y 2 1 t w AA 1 Aw 2 ˙p 1 wN C n 2 Y 2 1 t 1 2 1 ˙p wN C n Y w A w 2A 2 1 t O w A Œw 2w 2 1 t t w Aw 2w AwO : 2
We can now add and subtract the term wO t AwO to complete the square and discard wO t AwO since it does not depend on w , hence yielding: 1 t t t t w Aw 2w AwO C wO AwO wO AwO p.wjY I X/ / exp 2 1 t t O A.w w/ O / exp .w w/ wO AwO 2 1 O t A.w w/ O / exp .w w/ : 2
75
Bibliography [ABD12] C. Aistleitner, J. S. Brauchart, and J. Dick. Point sets on the sphere S2 with small spherical cap discrepancy. Discrete & Computational Geometry, pages 1–35, 2012. DOI: 10.1007/s00454-012-9451-3. 5, 24 [BBLC 09] J. Brouillat, C. Bouville, B. Loos, C. Hansen, and K. Bouatouch. A Bayesian Monte Carlo approach to global illumination. Computer Graphics Forum, 28(8):2315–2329, 2009. DOI: 10.1111/j.1467-8659.2009.01537.x. 3, 4, 47, 51, 64 [BD11] J. S. Brauchart and J. Dick. Quasi-Monte Carlo rules for numerical integration over the unit sphere S2 . ArXiv e-prints, January 2011. http://arxiv.org/abs/ 1101.5450. DOI: 10.1007/s00211-011-0444-6. 5, 6, 7, 11 [Bec84] J. Beck. Sums of distances between points on a sphere—An application of the theory of irregularities of distribution to discrete geometry. Mathematika, 31(1):33– 41, June 1984. DOI: 10.1112/S0025579300010639. 11 [BSSW12] J. S. Brauchart, E. B. Saff, I. H. Sloan, and R. S. Womersley. QMC designs: optimal order Quasi Monte Carlo Integration schemes on the sphere. ArXiv e-prints, August 2012. http://arxiv.org/abs/1208.3267. DOI: 10.1090/S0025-57182014-02839-1. 9, 11, 12 [CPC84] R. L. Cook, T. Porter, and L. Carpenter. Distributed ray tracing. In Proceedings of the 11th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH ’84, pages 137–145, New York, USA, 1984. ACM. DOI: 10.1145/964965.808590. 2 [CYCC 12] Z. Chen, Z. Yuan, Y. Choi, L. Liu, and W. Wang. Variational blue noise sampling. IEEE Trans. Vis. Comput. Graph., 18(10):1784–1796, 2012. DOI: 10.1109/TVCG.2012.94. 13 [DBBS06] P. Dutre, K. Bala, P. Bekaert, and P. Shirley. Advanced Global Illumination. AK Peters Ltd, 2006. 1 [dGBOD12] F. de Goes, K. Breeden, V. Ostromoukhov, and M. Desbrun. Blue noise through optimal transport. ACM Trans. Graph. (SIGGRAPH Asia), 31, 2012. DOI: 10.1145/2366145.2366190. 12, 13, 24
76
BIBLIOGRAPHY
[DHMC 01] P. Dutré, P. Heckbert, V. Ma, F. Pellacini, R. Porschka, M. Ramasubramanian, C. Soler, and G. Ward. Global illumination compendium. www.cs.kuleuven.ac.b e/~phil/GI/TotalCompendium.pdf, 2001. 15 [EPMC 11] M. S. Ebeida, A. Patney, S. A. Mitchell, A. Davidson, P. M. Knupp, and J. D. Owens. Efficient maximal Poisson-disk sampling. ACM Transactions on Graphics, 30(4):49, 2011. DOI: 10.1145/2010324.1964944. 13 [Fat11] R. Fattal. Blue-noise point sampling using kernel density model. ACM SIGGRAPH 2011 papers, 28(3):48:1–10, 2011. DOI: 10.1145/1964921.1964943. 13 [GHBC 05] K. M. Gorski, E. Hivon, A. J. Banday, B. D. Wandelt, F. K. Hansen, M. Reinecke, and M. Bartelmann. HEALPix - A framework for high resolution discretization, and fast analysis of data distributed on the sphere. Astrophys. J., 622:759–771, 2005. DOI: 10.1086/427976. 15, 16, 18 [GHSK06] L. Grünschloß, J. Hanika, R. Schwede, and A. Keller. (t, m, s)-nets and maximized minimum distance. In Monte Carlo and Quasi-Monte Carlo Methods, Proceedings of the Seventh International Conference on Monte Carlo and Quasi-Monte Carlo Methods in Scientific Computing, 2006. DOI: 10.1007/978-3-642-04107-5_25. 3 [GK08] L. Grünschloß and A. Keller. (t, m, s)-nets and maximized minimum distance, part ii. In Monte Carlo and Quasi-Monte Carlo Methods, Proceedings of the Eighth International Conference on Monte Carlo and Quasi-Monte Carlo Methods in Scientific Computing, 2008. DOI: 10.1007/978-3-642-04107-5_25. 14 [GKP94] R. L. Graham, D. E. Knuth, and O. Patashnik. Concrete Mathematics: A Foundation for Computer Science. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 2nd edition, 1994. 19 [Gon10] A. González. Measurement of areas on a sphere using Fibonacci and Latitude–Longitude lattices. Mathematical Geosciences, 42:49–64, 2010. DOI: 10.1007/s11004-009-9257-x. 19, 20 [HN04] J. H. Hannay and J. F. Nye. Fibonacci numerical integration on a sphere. Journal of Physics A: Mathematical and General, 37(48):11591, 2004. DOI: 10.1088/03054470/37/48/005. 3, 19 [HS05] K. Hesse and I. H. Sloan. Optimal lower bounds for cubature error on the sphere. Journal of Complexity, 21(6):790–803, 2005. DOI: 10.1016/j.jco.2005.07.004. 10 [ Jak10] W. Jakob. Mitsuba renderer, 2010. http://www.mitsuba-renderer.org. 24, 61
BIBLIOGRAPHY
77
[ Jen96] H. W. Jensen. Global illumination using photon maps. In Proceedings of the Eurographics Workshop on Rendering Techniques ’96, pages 21–30, London, UK, 1996. Springer-Verlag. DOI: 10.1007/978-3-7091-7484-5_3. 2 [Kaj86] J. T. Kajiya. e rendering equation. SIGGRAPH Comput. Graph., 20(4):143–150, August 1986. DOI: 10.1145/15886.15902. 1, 2 [Kel12] A. Keller. Quasi-Monte Carlo image synthesis in a nutshell, 2012. https://si tes.google.com/site/qmcrendering/. 2, 5 [Ken13] A. Kensler. Correlated multi-jittered sampling. Technical report, Pixar, 2013. 12 [KGPB05] J. Křivánek, P. Gautron, S. Pattanaik, and K. Bouatouch. Radiance caching for efficient global illumination computation. IEEE Transactions on Visualization and Computer Graphics, 11(5):550–561, Sept.-Oct., 2005. DOI: 10.1109/TVCG.2005.83. 2 [KK02] T. Kollig and A. Keller. Efficient multidimensional sampling. Comput. Graph. Forum, 21(3):557–563, 2002. DOI: 10.1111/1467-8659.00706. 3, 24 [KN06] L. Kuipers and H. Niederreiter. Uniform Distribution of Sequences. Dover Books on Mathematics. Dover Publications, 2006. 8 [LD08] A. Lagae and P. Dutré. A comparison of methods for generating Poisson disk distributions. Computer Graphics Forum, 27(1):114–129, March 2008. DOI: 10.1111/j.1467-8659.2007.01100.x. 13 [L’E09] P. L’Ecuyer. Quasi-monte carlo methods with applications in finance. Finance and Stochastics, 13(3):307–349, 2009. DOI: 10.1007/s00780-009-0095-y. 6 [LeV56] W. J. LeVeque. Topics in number theory. Vols. 1 and 2. Addison-Wesley Publishing Co., Inc., Reading, Mass., 1956. 20 [LP01] G. Larcher and F. Pillichshammer. Walsh series analysis of the L2-discrepancy of symmetrisized point sets. Monatshefte für Mathematik, 132(1):1–18, 2001. DOI: 10.1007/s006050170054. 12, 13, 14, 24 [LW93] E. P. Lafortune and Y. Willems. Bi-directional path tracing. In Compugraphics ’93, pages 145–153, December 1993. 2 [MBRC 13a] R. Marques, C. Bouville, M. Ribardière, L. P. Santos, and K. Bouatouch. Spherical fibonacci point sets for illumination integrals. Computer Graphics Forum, 32(8):134–143, 12 2013. DOI: 10.1111/cgf.12190. 3, 21, 26, 27, 28, 29
78
BIBLIOGRAPHY
[MBRC 13b] R. Marques, C. Bouville, M. Ribardière, L. P. Santos, and K. Bouatouch. A spherical gaussian framework for bayesian monte carlo rendering of glossy surfaces. IEEE Transactions on Visualization and Computer Graphics, 19(10):1619–1632, 10 2013. DOI: 10.1109/TVCG.2013.79. 3, 4, 47, 54, 64 [MFS04] A. Méndez-Feliu and M. Sbert. Comparing hemisphere sampling techniques for obscurance computation. In 3IA 04: Proceedings of the International Conference on Computer Graphics and Artificial Intelligence, 2004. 5 [Nie88] H. Niederreiter. Low-discrepancy and low-dispersion sequences. Journal of Number eory, 30(1):51–70, 1988. DOI: 10.1016/0022-314X(88)90025-X. 7 [Nie92] H. Niederreiter. Random number generation and quasi-Monte Carlo methods. Society for Industrial and Applied Mathematics, Philadelphia, PA, USA, 1992. DOI: 10.1137/1.9781611970081. 13, 14 [Ost07] V. Ostromoukhov. Sampling with polyominoes. Proceedings of ACM SIGGRAPH 2007, ACM Transactions on Graphics, 26(3), July 2007. DOI: 10.1145/1276377.1276475. 5 [PH10] M. Pharr and G. Humphreys. Physically Based Rendering, Second Edition: From eory To Implementation. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 2nd edition, 2010. 1, 7 [RG02] C. E. Rasmussen and Z. Ghahramani. Bayesian Monte Carlo. In Neural Information Processing Systems, pages 489–496. MIT Press, 2002. 3, 44, 45 [RW06] C. E. Rasmussen and C. K. I. Williams. Gaussian Process for Machine Learning. MIT Press, 2006. 31, 38, 40, 42, 50, 51 [SC97] P. Shirley and K. Chiu. A low distortion map between disk and square. J. Graph. Tools, 2(3):45–52, December 1997. DOI: 10.1080/10867651.1997.10487479. 15, 16, 24, 25, 27 [SEB08] P. Shirley, D. Edwards, and S. Boulos. Monte Carlo and quasi-Monte Carlo methods for computer graphics. In A. Keller, S. Heinrich, and H. Niederreiter, editors, Monte Carlo and Quasi-Monte Carlo Methods 2006, pages 167–177. Springer Berlin Heidelberg, 2008. DOI: 10.1007/978-3-540-74496-2. 5 [SK97] E. Saff and A. Kuijlaars. Distributing many points on a sphere. e Mathematical Intelligencer, 19:5–11, 1997. DOI: 10.1007/BF03024331. 11, 26, 52 [Sob67] I. M. Sobol. On the distribution of points in a cube and the approximate evaluation of integrals. USSR Computational Math. and Math. Phys., 7:86–112, 1967. DOI: 10.1016/0041-5553(67)90144-9. 12, 14, 60
BIBLIOGRAPHY
79
[SP06] R. Swinbank and J. Purser. Fibonacci grids: A novel approach to global modelling. Quarterly Journal of the Royal Meteorological Society, 132(619):1769–1793, 2006. DOI: 10.1256/qj.05.227. 18, 19, 20 [Sve94] D. I. Svergun. Solution scattering from biopolymers: advanced contrast-variation data analysis. Acta Crystallographica Section A, 50(3):391–402, May 1994. DOI: 10.1107/S0108767393013492. 3, 19 [Vea98] E. Veach. Robust Monte Carlo Methods for Light Transport Simulation. PhD thesis, Stanford, CA, USA, 1998. AAI9837162. 2 [VG94] E. Veach and L. Guibas. Bidirectional estimators for light transport. In Proceedings of Eurographics Rendering Workshop, 1994. DOI: 10.1007/978-3-642-87825-1_11. 2 [WRC88] G. J. Ward, F. M. Rubinstein, and R. D. Clear. A ray tracing solution for diffuse interreflection. SIGGRAPH Comput. Graph., 22(4):85–92, June 1988. DOI: 10.1145/378456.378490. 2 [WRGC 09] J. Wang, P. Ren, M. Gong, J. Snyder, and B. Guo. All-frequency rendering of dynamic, spatially-varying reflectance. ACM Trans. Graph., 28:133:1–133:10, December 2009. DOI: 10.1145/1618452.1618473. 48
81
Authors’ Biographies RICARDO MARQUES Ricardo Marques received his M.Sc. degree in Computer Graphics and Distributed Parallel Computation from Universidade do Minho (Fall 2009), after which he worked as a researcher in the same university. He joined INRIA (Institut National de Recherche en Informatique et Automatique) and the FRVSense team as a Ph.D. student in Fall 2010 under the supervision of Kadi Bouatouch. His thesis work has focused on spherical integration methods applied to light transport simulation. He defended his Ph.D. thesis in Fall 2013 and joined the Mimetic INRIA research team as a research engineer in 2014.
CHRISTIAN BOUVILLE Christian Bouville is presently an invited researcher in the FRVSense team at IRISA (Institut de Recherche en Informatique et Systèmes Aléatoires) in Rennes (France). He was a team leader, project leader, and Emeritus expert at Orange Labs until 2006 and has been involved in many European and national projects. His main fields of research are now global illumination models and image-based rendering with a special interest in machine learning approaches.
LUÍS PAULO SANTOS Luís Paulo Santos is an Assistant Professor at the Universidade do Minho, Portugal. He published several papers on both computer graphics and parallel processing on international conferences and journals. He managed two nationally funded graphics R&D projects and participates in multiple European projects with both academia and industry. His main research interests lie on Interactive Global Illumination and Parallel Processing. He has been a member of the Direction Board of the Portuguese chapter of Eurographics since 2008, was Deputy Director of the University of Minho’s Department of Informatics from 2010–2012, and Director of the Doctoral Program on Informatics over the same period. He also acts as Associate Editor of Elsevier’s Computers & Graphics journal.
KADI BOUATOUCH Kadi Bouatouch was an electronics and automatic systems engineer (ENSEM 1974). He was awarded a Ph.D. in 1977 and a higher doctorate in computer science in the field of computer
82
AUTHORS’ BIOGRAPHIES
graphics in 1989. He is working on global illumination, lighting simulation for complex environments, GPU-based rendering, and computer vision. He is currently a Professor at the University of Rennes 1 (France) and a researcher at IRISA (Institut de Recherche en Informatique et Systèmes Aléatoires). He is a member of Eurographics.