Introduction to Physically-Based Illumination, Radiosity and Shadowcomputations Forcomputer Graphics

Introduction to Physically-Based Illumination, Radiosity and Shadowcomputations Forcomputer Graphics

Introduction to Physically-Based Illumination, Radiosity and ShadowComputations forComputer Graphics Eugene Fiume Department of Computer Science University of Toronto 1CSC2522 LectureNotes January,2015 Overview •physically-based illumination models for computer graphics are maturing. •tutorial on concepts of physically-based models. •introduction to light transport (rendering equation). •overviewofradiosity-based approach. 2CSC2522 LectureNotes January,2015 Solid Angle r sin θ dθ dA r dω θ φ dφ Differential surface element dA on sphereofradius r: dA=(longitudinal arc length) × (latitudinal arc length) = (r dθ )(r sin θ dφ) =r2 sin θ dθ dφ. Differential solid angle dω (on sphere of radius 1): dA dω = = sin θ dθ dφ. r2 Solid angle (in steradians) requires (messy) contour integral. 3CSC2522 LectureNotes January,2015 Idon’t think this is very clear The longitudinal arc is on a circle of radius r that slices through the sphere and includes the origin. So, what’sthe arc length of part of a circle? Let’ssuppose that this circle is parameterised by X(θ ) =rsin θ , Y(θ ) =rcos θ . The arc length of a part of the circle described by angle ∆θ is θ + ∆θ 2 2 ∫ √ X˙+ Y˙ dθ . θ But look at the integrand: 2 2 √ √ X˙+ Y˙ = √ r2(sin 2θ + cos 2θ ) =r. So, the length of the longitidinal arc is just r dθ . Remember the parametric definition of a sphere: x(θ , φ) =rsin θ sin φ, y(θ , φ) =rsin θ cos φ, z(θ ) =rcos θ . Holding θ constant givesusalatitudinal circle of radius r sin θ in the z=r cos θ plane. So the length of the latititudinal arc is r sin θ dφ. 4CSC2522 LectureNotes January,2015 Solid Angle Properties Surface area of unit hemisphere = 2π steradians (sr). Surface area of unit sphere = 4π steradians (sr). Just do the integral: S 2π ∫ ∫ sin φ dφ dθ , 0 0 where S=π /2 for the hemisphere and π for the sphere. Practical Solid Angle Computation polygon P with area A r N θ R ω 1 O Solid angle of P: projected area of P onto sphere in direction of O. Approximation: if r << R so that projection of P on sphere is almost planar,then approximate solid angle def- inition by A cos θ w= . R2 5CSC2522 LectureNotes January,2015 Geometry of Basic Projection Suppose we have a beam of thickness L projecting onto a locally planar region with normal N. Assume the beam makehas an inci- dence angle of θ with the plane. N cos θ = L / M L M L = M cosθ θ π/2−θ M = L / cosθ θ Then we have the above relations. 6CSC2522 LectureNotes January,2015 Physical Lighting Terminology What is this ‘‘intensity’’stuffanyway? Theyare all measures of power density w.r.t. solid angles and area (and power is a measure of energy density w.r.t. time). Radiant power (Φ): Rate at which light energy is transmitted (energy/unit time, or Watts, W). Physical term: flux. Radiant Intensity (I): Flux radiated onto a unit solid angle in a givendirection (W/sr). E.g., "intensity" of apoint light source. Radiance (L): Radiant intensity per unit projected surface area (W/(m2 ⋅ sr )). E.g., "intensity" of reflection of a surface. Irradiance (E): Incident flux density on a locally planar area, in units of flux per unit surface area (W/m2). This is a direction-independent quantity. Radiosity (B): Exitant flux density from a locally planar area, in units of flux per unit surface area (W/m2). These are radiometric quantities, i.e., physical measurements of electromagnetic energy.There are comparable photometric quanti- ties corresponding to psychovisual measurement. 7CSC2522 LectureNotes January,2015 Relationships Between Radiometric Quantities Radiant power: Φ. Irradiance/Radiosity: dΦ E, B= , dA where dΦ = ( ∫ L cos θ dω ) dA, Ω Ω is the visible hemisphere, and L is incoming or outgoing radiance. Radiant Intensity: dΦ I(ωω ) = . dω Radiance:the quantity from which we construct the others. Call it L(x, ωω ), which is power per unit area radiated to point x along direction ωω . Use radiance to denote light carried by a ray in a ray tracer.(NO inverse square lawinnon-participating media.) Use radiant intensity to denote energy distributions of light sources. (Follows inverse square law.) 8CSC2522 LectureNotes January,2015 Incident Irradiance ω Suppose incoming radiance from differential solid angle d i along ωω direction i is Li. L i ω L d i r N θ i θr φ i φ r Then incident irradiance is θ ω Ei =Li cos i d i Bidirectional Reflectance Distribution Function To characterise arbitrary reflection functions, write down an expression that relates incident irradiance to outgoing radiance in ωω direction r : Lr fi→r = Ei or ωω θ φ θ φ Lr ( r ) =fi→r ( i, i, r , r ) Ei, so bidirectional reflectance distribution function (BRDF) fi→r is ωω proportion of incident irradiance that is reflected in direction r . 9CSC2522 LectureNotes January,2015 BRDF and Reflectance Units of BRDF are sr−1,and givesdensity of flux per steradian. BRDF is always positive,and is in fact a true distribution (and really should only be used under an integral). But it is possible for a BRDF to be an "impulse", meaning perfect specular reflection in one direction. Reflectivity or the Reflectance Reflectance acts likeaBRDF,but is instead a unitless proper frac- tion in [0,1]. It is defined as reflected flux dΦ ρ r = = Φ . incoming flux d i The region of integration givesdifferent kinds of canonical reflectances. Of particular interest to us is this fact: if the surface is Lambertian or diffuse,meaning that incoming light is equally likely to be scat- tered in all directions, then the hemispheric reflectance is ρ π d = fi→r , or ρ d f → = . i r π Another nice fact: B ρ = . d E 10 CSC2522 LectureNotes January,2015 Physically-Plausible Reflectance Models The use of BRDF allows specification of •anisotropic reflection models: fixing i and r butrotating the surface will change directional reflectance. •fully plausible, energy-conserving, empirically validated illu- mination models. •models that are really really expensive tocompute. Really! Howdoes this sit with traditional illumination models? In fact, it’snot that hard to makecurrent models more plausible. Traditionally,local illumination models have been defined as intensity at a point = ambient + diffuse ++specular . That is, IP =ka Ia +kd Id +ks Is. As a first step, to translate to physical models, use radiance, and define BRDF as ρ ρ ρ =kd d +ks s, kd +ks = 1, ρ ρ where d is Lambertian reflector and s is your favourite specular reflection function this week. Leave ambient component ad hoc. So, ρ ρ Lr =ka La + (kd d +ks s)Ei ρ ρ θ ω =ka La + (kd d +ks s) Li cos i d i Sum or integrate as appropriate overall light sources. 11 CSC2522 LectureNotes January,2015 Rendering Equation (Kajiya and Hanrahan) Characterise all interactions of light from anypoint x on anysur- face s with a point x′ on a surface. The result is an outgoing radiance value. The rendering equation describes a two-point (i.e., one-bounce) light transport. Multi-point transport is got by cascading the equation to get full ray transport problem. Based on radiance. ωω ωω ′ ′ ωω ′ ′ ′ ′ L(x, ) =Le(x, ) + ∫ f (x ; x) L(x , ) G(x, x ) V(x, x )dA , S where S is all surfaces, and dA′ is a differential element of S , ′ ωω ′ Le(x , )isself-emission, V(x, x′)is1if x is visible to x′,and is 0 otherwise, G(x, x′)isageometric scale factor, f (x′; x)isBRDF (actually depends on all angles): light reflected about x from x′. Notice that radiance to be computed appears on LHS and under integral. Kajiya proposed some (theoretically) nice ways to compute the equation (including Monte Carlo path tracing and a series expan- sion). 12 CSC2522 LectureNotes January,2015 Radiosity Equation Under Lambertian assumption, the BRDF is independent of incom- ing, outgoing directions, and can be taken out of the integral. Furthermore, outgoing radiance is direction independent, so we can work with irradiance/radiosity instead. In fact, B(x) L(x, ωω ) = ,(*) π so we can rewrite the rendering equation as a radiosity equation: ρ (x) B(x) =E(x) + d ∫ B(x′) G(x, x′) V(x, x′)dA′ π S Notes: •This reformulation in terms of radiosity/irradiance can be eas- ily got by multiplying rendering equation by π and changing units. ρ •Notice the change from BRDF f to reflectance d. So far,sogood, but notice again that radiosity appears on LHS and under integral. From nowon, we will bury the visibility term V and 1/π into geo- metric term G. G will resurface as the integrand for a form factor. 13 CSC2522 LectureNotes January,2015 Discretisation of the Radiosity Equation Even the radiosity equation is intractable (let alone the rendering equation), so work with that first. Break all surfaces up into patches or elements and makeassump- tions about the nature of radiosity.Let there be n patches Ai, i= 1, ..., n.(By convention, areas of the patches will have same name −−ouch!) The easiest assumption is that radiosity is constant across a sur- face. If we can solvefor radiosities, then, each element i will have constant radiosity Bi. In that case, we get n ρ Bi =Ei + i Σ B j Fij. j=1 To makethe derivation clearer,multiply through by Ai,which is allowed because Ai >0: n ρ Bi Ai =Ei Ai + i Σ B j Fij Ai. j=1 Physically,what this does is turn an equation in flux density to an equation in flux.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    24 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us