A Theoretical Framework for Physically Based Rendering
Total Page:16
File Type:pdf, Size:1020Kb
Volume 13, (1994) number 2, pp. 97-107 A Theoretical Framework for Physically Based Rendering Eric P. Lafortune and Yves D. Willems Department of Computer Science, Katholieke Universiteit Leuven Celestijnenlaan 200A, 3001 Heverlee, Belgium [email protected] Abstract In this paper we introduce the concept of the global reflection distribution function which allows concise formulation of the global illumination problem. Unlike previous formulations it is not geared towards any specific algorithm. As an example of its versatility we derive a Monte Carlo rendering algorithm that seam- lessly integrates the ideas of shooting and gathering power to create photorealistic images. Keywords: Rendering and visualisation; Global illumination; Photorealistic rendering 1. Introduction 2. Related Work The global illumination problem consists of determining An important milestone in the development of the global the lighting functions for a given scene by simulating illumination theory for computer graphics was the in- the transport of light throughout the scene. The starting troduction of the radiosity method by Goral et al.1. point for finding a physically correct solution consists Originally developed within the field of heat transfer in identifying the quantities and properties that are rele- it is based on the energy equilibrium between diffuse vant to the problem. Using these notions a mathematical emitters and reflectors of radiative energy such as heat model can be constructed, which formally expresses the or light. Although restricted to the simulation of diffuse physical laws of illumination, reflection, refraction and lighting effects it presents a sound physical model. Dis- everything else encompassing the transport of light. The cretisation of the scene in patches or elements results complexity of the problem most often forces simplifying in a mathematical model consisting of a set of linear assumptions. The final step is to derive practical algo- energy equations. The coefficients are determined by the rithms to solve the mathematically formulated problems. geometry and the reflective properties of the scene, the A concise mathematical formulation allows standard an- right-hand side coefficients are the self-emitted radiosi- alytical and numerical techniques to be applied to solve ties of the elements and the unknowns are the radiosities the problem. In computer graphics the solution of the of the elements. Various algorithms have been presented global illumination problem is mostly used to create a to solve this set of equations. The radiosity solution is realistic rendering of the scene. In this case the solution view-independent. Smits et al.2 introduced the notion can be tuned for one or more specific views. of importance and adapted the radiosity algorithm to tune the solution with respect to the final rendering In the following paragraphs we will introduce a new parameters. formulation of the global illumination problem. The medium is assumed to be non-participating; only sur- The rendering equation as proposed by Kajiya3 pro- faces interact with light, by reflection, refraction and ab- vides a more general mathematical formulation of the sorption. We will then present a new rendering algorithm problem that is no longer restricted to diffusely emitting and show how it can be derived from the mathematical surfaces. It can be expressed as a Fredholm equation formulation. of the second kind where the kernel is determined by © The Eurographics Association 1994. Published by Blackwell Publishers, 108 Cow- ley Road, Oxford OX4 1JF, UK and 238 Main Street, Cambridge, MA 02142, USA. 97 7-2 98 E. Lafortune and Y. Willems A Theoretical Framework for Physically Based Rendering Figure 1: Explanation of the symbols used in the rendering equation and the potential equation respectively. the geometry and the reflective properties of the scene. strongly reduce the storage requirements and the com- The unknown function is the radiance across the sur- putational times. faces of the scene. Path tracing is presented as a Monte Carlo algorithm that solves the rendering equation. The idea is to sample the flux through the pixels, gather- 3. The Rendering Equation and the Potential Equation ing light by following all light paths back to the light We briefly recall the rendering equation and the po- sources. As such it is entirely view-dependent. Various tential equation which were presented by Pattanaik10-12 4-9 other algorithms are based on the same principle . as a set of adjoint equations, both describing the global illumination problem from a different point of view. The 10-12 Pattanaik recently presented the potential equa- rendering equation expresses the emitted radiance at a tion, which is adjoint to the rendering equation. The given point on a surface and in a given direction as the notions of radiance and potential capability, and the sum of the self-emitted radiance and of the reflected ra- set of equations form a mathematical framework that diance resulting from incoming light from other surfaces explains all common global illumination algorithms. He (Figure 1): proposed an accompanying Monte Carlo particle trac- ing algorithm that shoots light particles from the light sources13. The scene is discretised into elements at which received and diffusely emitted power is accumulated dur- ing the simulation. In a second view-dependent pass, path tracing or distribution ray tracing is used to ren- where : der the scene, adding specular effects to the already the emitted radiance at point x along computed diffuse components. direction the self-emitted radiance at point x along Most other algorithms that solve the global illu- direction mination problem are similarly based on two-pass 14-17 the bi-directional reflection distribu- methods . They compute diffuse lighting compo- tion function (brdf) at point x for light coming in nents in a first extended radiosity pass and specular from direction and going out along direction lighting components in a second view-dependent pass. Some algorithms try to represent the complete radiance y = the point that 'sees' point x along direction function instead of only its diffuse component order in the absolute value of the cosine of the to find a view-independent solution. The main prob- angle between the direction and the normal to the lem with this approach is the huge amount of storage surface at point x, that is required to represent the lighting function. Aup- 18 19 the set of incoming directions around point x perle and Hanrahan and Christensen et al. tried to (a sphere or a hemisphere), meet this problem using the notion of directional impor- a differential angle around [sr]. tance, explained in a mathematical framework similar to Pattanaik's. Their deterministic algorithms concentrate The flux of light leaving a given set S, consisting of on important contributions to the solution and thereby pairs of points on a surface and directions around these © The Eurographics Association 1994 E. Lafortune and Y. Willems / A Theoretical Framework for Physically Based Rendering 99 points in which one is interested, can then be expressed by : where: belongs to the set S, and 0 otherwise, A = the set of all surface points of the given scene, a differential surface area element around point x on surface A. Sets S in which one is commonly interested are the points and directions associated with the patches in a scene for radiosity methods, ana me points ana direc- Figure 2: The global reflection distribution function gives tions seen through the pixels for ray tracing techniques. a measure of the fraction of the radiance emitted at The potential capability is the dual of the point x along direction that is eventually output at radiance function It is defined as the differen- point y along direction through all possible reflections tial flux through a given set S of points and directions, throughout the scene. resulting from a single unit of emitted radiance from point x along direction Although not presented as such earlier, this definition can be expressed formally as: defined by the expressions, making it difficult to com- bine them into some model or algorithm. We therefore propose the notion of the global reflectance distribution function (grdf) which is defined with respect to a given scene but which does not depend on any particular emis- sion function such as nor on a fixed set such The potential equation that governs the potential ca- as S. pability expresses that the potential of a point and a direction to light the given set results from a direct con- 4.1. Definition tribution if the pair belongs to the set and from an indirect contribution through reflection on the surface The definition bears some similarity to the approach to which it points (Figure 1). Formally: often taken in system theory, where a system is studied on the basis of its response to some input signal. The grdf expresses the differential amount of radiance leaving point y along direction as result of a single unit of emitted radiance from point x on a surface along direction (Figure 2). Formally: where: y = the point seen by point x along direction the set of outgoing directions around point y. The flux can now be expressed in terms of the poten- tial capability: The grdf may be considered as a generalisation of the brdf. While the latter only specifies the local behaviour of light reflecting at a single surface, the former defines the global illumination effects of light reflecting through 4. The Global Reflection Distribution Function a complete scene. Note that the function is defined in From the previous paragraph it is clear that the radi- terms of radiances leaving the surfaces, unlike the brdf ance function is defined with respect to a fixed which is commonly expressed in terms of both incoming self-emitted radiance function and that the and outgoing radiances. It is theoretically defined over potential function is defined with respect to the entire space of points and directions, but in the a fixed function corresponding to the set S.