Embed
Email

Recommended Book

Document Sample
Recommended Book
.

. Subject 71: pbrt - Radiometry and BSDF





Recommended Book



Matt Pharr and Greg Humphreys

Physically Based Rendering: From Theory to Implementation

Morgan Kaufmann, San Francisco, 2004.









01: Introduction

02: Geometry and transformations

03: Shapes

04: Primitives and intersection acceleration

05: Color and radiometry

06: Camera models

07: Sampling and reconstruction

08: Film, and the imaging pipeline 13: Light sources

09: Reflection models 14: Monte carlo integration I

10: Materials 15: Monte carlo integrations II

11: Texture 16: Light transport I

12: Volume scattering 17: Light transport II

Chapters with bold numbers: especially of “physical relevance”



Page 1 July 2009

.

. Subject 71: pbrt - Radiometry and BSDF



Considering that the geometric issues of ray tracing are solved

(and known for the class from COMPSCI 372/373; see, for

example, my 372 lecture notes from 2008), pbrt is particularly of

interest for radiometric issues.



Components of a Ray Tracer



Following Turner Whitted’s original ray tracing algorithm from

1979, simulation tasks address:



• Cameras: rays from eye via pixel on a film into the scene



• Ray-object intersections: mainly geometry - where it hits,

but also surface properties



• Light distribution: energy distribution of light in the scene



• Visibility: path between point on surface and light source



• Surface scattering: how light interacts with the surface,

scattered light



• Recursive ray tracing: e.g., for shiny surfaces or glass



• Ray propagation: rays in fog, smoke etc., not just in a

vacuum



At a given pixel on a film: which color values should be

displayed there? What physical models may be considered to

have this as photo-realistic as possible? - See examples in

Chapter 1 of the book.



Page 2 July 2009

.

. Subject 71: pbrt - Radiometry and BSDF







pbrt



Physically-based ray tracing (pbrt) started as a project at Stanford

university at the end of the 1990s. It lead to this book, and it also

defines the background of LuxRender:









Proper use of this renderer requires an understanding of

concepts of physically-based ray tracing (as discussed, for

example, in this book; the book comes with the sources of pbrt.)

The provided theory is in particular strong for sampling theory

and material models. It aims at photo-realistic modeling (i.e., at

images which are indistinguishable from those recorded with a

camera).

The sources of pbrt have been used by CG students at various

places to render award-winning pictures (see, for example,

Figures 1.11 to 1.14 in the book).



Page 3 July 2009

.

. Subject 71: pbrt - Radiometry and BSDF



Scene file (by Ralf Haeusler in Blender) for Tamaki campus:









Quick application of LuxRender - to be improved!



Page 4 July 2009

.

. Subject 71: pbrt - Radiometry and BSDF





Example of a POV-ray Sequence









Page 5 July 2009

.

. Subject 71: pbrt - Radiometry and BSDF









Generated by Clemens Rabe at Daimler AG, Germany (July

2009) in POV-ray, also using



• a physics engine (ODE) for realistic movements of vehicles



• a landscape generator



• a tool for generating a road layout from 3D splines



• 3D tree models (not just billboards)



• embedding of 3D models from Google Sketchup



Possible improvements by



• Physics simulation in general



• real textures of road surfaces



• model of “air” as a medium (e.g., saturation decreases with

distance to eye)



• more irregularity









Page 6 July 2009

.

. Subject 71: pbrt - Radiometry and BSDF





BTW ... Literate Programming



An interesting aspect of the Pharr/Humphreys book is that pbrt

is presented by means of literate programming, as developed by

Donald Knuth at Stanford while designing the Latex text editor.

Presentation is by refinements of fragments (based on C++) of 10

or less lines. For example,

main program ≡

int main(int argc, char *argv[]){

pbrtInit();

Process scene description 22

pbrtCleanup();

return 0;

}

defines a fragment main program, which contains some C++

code and a pointer to a fragment Process scene description which

is further explained on page 22. There it says:

Process scene description ≡ 21

if (argc == 1) {

Parse scene from standard input 22

} else {

Parse scene from input file 22

}

Here, the 21 refers to the page where fragment Process scene

description was introduced in the book. This way the book

contains (basically) the complete source of pbrt.



Page 7 July 2009

.

. Subject 71: pbrt - Radiometry and BSDF





Basic Radiometry - Section 5.2



pbrt uses geometric optics for describing light (propagation,

reflection, scattering):



• linearity: combined effect equals to the sum of the effects



• energy conservation: scattering effects do not produce more

energy



• no polarization: light is only characterized by wavelength,

not by polarization



• independence: of behavior of light at different wave lengths

(e.g., no fluorescence)



• constant radiance distribution: no change over time, steady

state



Radiometric quantities:

Φ: Radiant flux or power, measured in Watts (W), used for total

emmission of a light source

E: Irradiance is flux per unit area, measured in W/m2 .

I: Intensity is defined for a point light source and is flux per

solid angle. In 2D, the arc length of a unit circle defines the angle

(measured in radians) and vice versa. In 3D, a surface patch of

the unit sphere defines a solid angle (measured in steradians).

L: Radiance is flux per solid angle and unit area (and the most

important radiometric quantity for pbrt).



Page 8 July 2009

.

. Subject 71: pbrt - Radiometry and BSDF





Irradiance for Point Light Source



Assume a point light source with flux Φ.

Note that the surface area of a unit sphere equals 4π, and this is

also a full solid angle in 3D space.

Consider a sphere (‘in the atmosphere’) of radius r around the

point light source. Then we have that

Φ

E=

4πr2

In other words, the received light decreases with the squared

distance to the source.





... for Planar Light Source



Assume a planar light source of area A and flux Φ, illuminating

an area A2 on a planar surface, with angle θ between surface

normal and direction to light source. The irradiance in A2

equals

Φ cos θ

E2 = for A2 = A/ cos θ

A



... for General Case (Φ not constant)





E=

dA2

These are “small” differentials at a point (not a derivative).



Page 9 July 2009

.

. Subject 71: pbrt - Radiometry and BSDF







Intensity and Radiance



Assume a reference point p on the unit sphere identifying a

surface patch (e.g., of area A) and a unit vector ω from the

center of the sphere to p (i.e., approximating a “small”

differential cone to all points in A). Then we have that





I=



for a point light source. In this case we also have that





L=

dω dA⊥

2





A⊥ is the projected area of A2 on a plane perpendicular to ω. If

the ‘cone’ defined by dω becomes very small, dA2 and dA⊥ also

2

become very small (see Figure 5.7 at page 241 in the book).

Incident radiance Li (p, ω) arrives at a surface point p (e.g., due to

illumination) and exitant radiance Lo (p, ω) leaves p (e.g., due to

reflection).

For any point p in 3D space which is not on a surface but in

vacuum (i.e., no scattering by a participating media), we have

that





Lo (p, ω) = Li (p, −ω)





Page 10 July 2009

.

. Subject 71: pbrt - Radiometry and BSDF









Integration



Assume that surface point p with normal n is illuminated from

directions ω, defining a set Ω. Let angle θω be defined by n and

direction ω ∈ Ω to a light source.

Then we have irradiance





E(p, n) = Li (p, ω)| cos θω |dω (1)





at point p. Value cos θω identifies the area reduction when

projecting A2 onto A⊥ . If using a projected solid angle measure





dω ⊥ = | cos θω |dω



then the integral formula would simplify to





E(p, n) = Li (p, ω)dω ⊥





The Pharr/Humphreys book discusses further specifications of

the basic integration formula (1) which are practically useful

(but not presented here in these three pbrt lectures, and thus not

examinable).







Page 11 July 2009

.

. Subject 71: pbrt - Radiometry and BSDF





BRDF



The radiometric model of a bidirectional reflectance distribution

function (BRDF) has been used in material sciences for some

time before it was identified as being useful in computer

graphics or vision (see Figure 5.15 on page 249 in the book).

Basically, the BRDF models at a surface point p the exitant

radiance Lo (p, ωo ) in a direction ωo for incident radiance

Li (p, ωi ) into direction ωi .









(figure from hinjang.com/articles/03.html)

Considering ωi as (small) differential cone we have that





dE(p, ωi ) = Li (p, ωi ) cos θi dωi



Page 12 July 2009

.

. Subject 71: pbrt - Radiometry and BSDF









Due to assumed linearity (of geometric optics), we have that





dLo (p, ωo ) = c · dE(p, ωi )



for some constant c of proportionality, which is the actual





BRDF at point p



dLo (p, ωo ) dLo (p, ωo )

fr (p, ωo , ωi ) = = (2)

dE(p, ωi ) Li (p, ωi ) cos θi dωi



The BRDF is the ratio of exitant radiance to incident radiance,

the latter weighted by the cos-shortend solid angle of dωi .

Two general properties of the BRDF:





fr (p, ωi , ωo ) = fr (p, ωo , ωi )







fr (p, ωo , ω) cos θω dω ≤ 1



The second property says that the total energy of exitant light is

upper limited by total energy of incident light.









Page 13 July 2009

.

. Subject 71: pbrt - Radiometry and BSDF









BTDF and, finally, BSDF



For the BRDF it is assumed that ωo and ωi are in the same

hemisphere, defined by the tangential plane at surface point p.

Now let ωo and ωi be in opposite hemispheres (e.g., for

modeling glass).



The bidirectional transmittance distribution function (BTDF),

denoted by ft (p, ωo , ωi ) models the distribution of transmitted

light, and is otherwise defined as the BRDF.



For simplicity, f (p, ωo , ωi ) denotes a combined BRDF or BTDF

function. No conflict occurs because of merging two disjoint

functions. This merged function is also known as bidirectional

scattering distribution function (BSDF), and defined by the

following equation:



dLo (p, ωo ) dLo (p, ωo )

f (p, ωo , ωi ) = = (3)

dE(p, ωi ) Li (p, ωi )| cos θi |dωi



Note the absolute value for the cosine function. (pbrt is not

mapping directions always into the same hemisphere as some

renderers do.)









Page 14 July 2009


Related docs
Other docs by vadenkaut
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!