Computer graphcs III Lght reflecton, BRDF Jaroslav Křvánek, MFF UK Jaroslav.Krvanek@mff.cun.cz
Basc radometrc quanttes Image: Wojcech Jarosz CG III (NPGR010) - J. Křvánek 2015
Interacton of lght wth a surface Absorpton Reflecton Transmsson / refracton Reflectve propertes of materals determne the relaton of reflected radance L r to ncomng radance L, and therefore the appearance of the object: color, glossness, etc. CG III (NPGR010) - J. Křvánek 2015
Interacton of lght wth a surface Same llumnaton Dfferent materals Source: MERL BRDF database CG III (NPGR010) - J. Křvánek 2015
BRDF Bdrectonal reflectance dstrbuton functon (cz: Dvousměrová dstrbuční funkce odrazu) outgong n L (ω ) L r (ω o ) dω reflected θ o θ ncomng f r ( ω ω ) o = dlr ( ωo) de( ω ) = L dlr ( ωo) ( ω ) cosθ dω [sr 1 ] CG III (NPGR010) - J. Křvánek 2015
BRDF Mathematcal model of the reflecton propertes of a surface Intuton Value of a BRDF = probablty densty, descrbng the event that a lght energy packet, or photon, comng from drecton ω gets reflected to the drecton ω o. Range: ( ω o) [ 0, ) ω f r CG III (NPGR010) - J. Křvánek 2015
BRDF The BRDF s a model of the bulk behavor of lght on the mcrostructure when vewed from dstance CG III (NPGR010) - J. Křvánek 2015 Westn et al. Predctng Reflectance Functons from Complex Surfaces, SIGGRAPH 1992.
BRDF propertes Helmholz recprocty (always holds n nature, a physcally-plausble BRDF model must follow t) f r ( ω ωo) = f ( ωo ω) r CG III (NPGR010) - J. Křvánek 2015
BRDF propertes Energy conservaton Reflected flux per unt area (.e. radosty B) cannot be larger than the ncomng flux per unt surface area (.e. rradance E). CG III (NPGR010) - J. Křvánek 2015 [ ] 1 )cos ( cos )cos ( ) ( )cos ( )cos ( o = = = = o o r r o o r d L d d L f d L d L E B ω θ ω ω θ ω θ ω ω ω ω θ ω ω θ ω
BRDF (an)sotropy Isotropc BRDF = nvarant to a rotaton around surface normal CG III (NPGR010) - J. Křvánek 2015 ( ) ( ) ( ) o o o o o o,,, ;,, ;, φ φ θ θ φ φ θ φ φ θ φ θ φ θ = + + = r r r f f f
Surfaces wth ansotropc BRDF CG III (NPGR010) - J. Křvánek 2015
Ansotropc BRDF Dfferent mcroscopc roughness n dfferent drectons (brushed metals, fabrcs, ) CG III (NPGR010) - J. Křvánek 2015
Isotropc vs. ansotropc BRDF Isotropc BRDFs have only 3 degrees of freedom Instead of φ and φ o t s enough to consder only φ = φ φ o But ths s not enough to descrbe an ansotropc BRDF Descrpton of an ansotropc BRDF φ and φ o are expressed n a local coordnate frame (U, V, N) U tangent e.g. the drecton of brushng V bnormal N surface normal the Z axs of the local coordnate frame CG III (NPGR010) - J. Křvánek 2015
Reflecton equaton A.k.a. reflectance equaton, llumnaton ntegral, OVTIGRE ( outgong, vacuum, tme-nvarant, gray radance equaton ) How much total lght gets reflected n the drecton ω o? From the defnton of the BRDF, we have dl r ( ω ) o = f r ( ω ω ) L o ( ω ) cosθ dω CG III (NPGR010) - J. Křvánek 2015
Reflecton equaton Integratng the contrbutons dl r over the entre hemsphere: L r ( x, ω ) o = L H ( x) ( x, ω ) f r ( x, ω ω ) cosθ dω o upper hemsphere over x L o (x, ω o ) θ o n L (x, ω ) θ dω L r (x, ω o ) CG III (NPGR010) - J. Křvánek 2015
Reflecton equaton Evaluatng the reflectance equaton renders mages!!! Drect llumnaton Envronment maps Area lght sources etc. CG III (NPGR010) - J. Křvánek 2015
Reflectance Rato of the ncomng and outgong flux A.k.a. albedo (used mostly for dffuse reflecton) Hemsphercal-hemsphercal reflectance See the Energy conservaton slde Hemsphercal-drectonal reflectance The amount of lght that gets reflected n drecton ω o when llumnated by the unt, unform ncomng radance. ρ( ω ) o = a( ω ) o = H ( x) f r ( x, ω ω ) o cosθ dω CG III (NPGR010) - J. Křvánek 2015
Hemsphercal-drectonal reflectance Nonnegatve Less than or equal to 1 (energy conservaton) ρ( ω o ) [ 0,1] Equal to drectonal-hemsphercal reflectance What s the percentage of the energy comng from the ncomng drecton ω that gets reflected (to any drecton)? Equalty follows from the Helmholz recprocty CG III (NPGR010) - J. Křvánek 2015
CG III (NPGR010) - J. Křvánek 2015
CG III (NPGR010) - J. Křvánek 2015
BRDF components General BRDF Ideal dffuse (Lambertan) Ideal specular Glossy, drectonal dffuse CG III (NPGR010) - J. Křvánek 2015
Ideal dffuse reflecton
Ideal dffuse reflecton CG III (NPGR010) - J. Křvánek 2015
Ideal dffuse reflecton A.k.a. Lambertan reflecton Johann Henrch Lambert, Photometra, 1760. Postulate: Lght gets reflected to all drectons wth the same probablty, rrespectve of the drecton t came from The correspondng BRDF s a constant functon (ndependent of ω, ω o ) ( ω ω = f r, d o) fr, d CG III (NPGR010) - J. Křvánek 2015
Ideal dffuse reflecton Reflecton on a Lambertan surface: L o ( ωo) = f r, d L = f r, d H ( x) Vew ndependent appearance E ( ω ) cosθ dω rradance Outgong radance L o s ndependent of ω o Reflectance (derve) ρ = π d f r, d CG III (NPGR010) - J. Křvánek 2015
Ideal dffuse reflecton Mathematcal dealzaton that does not exst n nature The actual behavor of natural materals devates from the Lambertan assumpton especally for grazng ncdence angles CG III (NPGR010) - J. Křvánek 2015
Whte-out condtons Under a covered sky we cannot tell the shape of a terran covered by snow We do not have ths problem close to a localzed lght source. Why? CG III (NPGR010) - J. Křvánek 2015
Whte-out condtons We assume sky radance ndependent of drecton (covered sky) L ( = L x, ω) We also assume Lambertan reflecton on snow sky Reflected radance gven by: snow snow Lo = ρd L sky Whte-out!!! CG III (NPGR010) - J. Křvánek 2015
Ideal mrror reflecton
Ideal mrror reflecton CG III (NPGR010) - J. Křvánek 2015
CG III (NPGR010) - J. Křvánek 2015
CG III (NPGR010) - J. Křvánek 2015 Nshno, Nayar: Eyes for Relghtng, SIGGRAPH 2004
The law of reflecton n θ o θ φ φ o θ o = θ φ o = (φ + π) mod 2π Drecton of the reflected ray (derve the formula) ω o = 2( ω n) n ω CG III (NPGR010) - J. Křvánek 2015
Dgresson: Drac delta dstrbuton Defnton (nformal): The followng holds for any f: Image: Wkpeda Delta dstrbuton s not a functon (otherwse the ntegrals would = 0) CG III (NPGR010) - J. Křvánek 2015
BRDF of the deal mrror BRDF of the deal mrror s a Drac delta dstrbuton θ o = θ θ o n θ We want: L θ, ϕ ) = R( θ ) L ( θ, ϕ ± π ) r ( o o o o Fresnel reflectance (see below) f r, m ( θ, ϕ ; θ, ϕ ) o o = R( θ ) δ (cosθ cosθo) δ ( ϕ ϕo cosθ ± π ) CG III (NPGR010) - J. Křvánek 2015
BRDF of the deal mrror BRDF of the deal mrror s a Drac delta dstrbuton Varfcaton: CG III (NPGR010) - J. Křvánek 2015 ), ( ) ( cos ), ( cos ) ( ) cos (cos ) ( cos (.) (.) ), ( r r o o, o o r π ϕ θ θ ω θ ϕ θ θ π ϕ ϕ δ θ θ δ θ ω θ ϕ θ ± = ± = = L R d L R d L f L m r
CG III (NPGR010) - J. Křvánek 2015
Ideal refracton
Ideal refracton CG III (NPGR010) - J. Křvánek 2015
Ideal refracton Index of refracton η Water 1.33, glass 1.6, damond 2.4 Often depends on the wavelength Snell s law η sn θ = η o snθ o η ω η o ω o CG III (NPGR010) - J. Křvánek 2015
Ideal refracton Drecton of the refracted ray: ω o = η η η o = η o o ω ( 2 2 η cosθ + 1 η (1 cos θ ) )n o o f < 0, total nternal reflecton Image: wkpeda Crtcal angle: ηo θ, = c arcsn η CG III (NPGR010) - J. Křvánek 2015
Ideal refracton Change of radance Follows from the conservaton of energy (flux) When gong from an optcally rarer to a more dense medum, lght energy gets compressed n drectons => hgher energy densty => hgher radance η L o = L η 2 o 2 CG III (NPGR010) - J. Křvánek 2015
BRDF of deal refracton BRDF of the deal refracton s a delta dstrbuton: Change of radance Fresnel transmttance Snell s law f t ( θ, ϕ ; θ, ϕ ) o o η = (1 R( θ)) η 2 o 2 δ ( η snθ η o snθo) δ ( ϕ ϕo cosθ ± π ) Refracted ray stays n the ncdence plane CG III (NPGR010) - J. Křvánek 2015
Fresnel equatons
Fresnel equatons Read [frenel] Rato of the transmtted and reflected lght depends on the ncdent drecton From above more transmsson From the sde more reflecton Extremely mportant for realstc renderng of glass, water and other smooth delectrcs Not to be confused wth Fresnel lenses (used n lghthouses) CG III (NPGR010) - J. Křvánek 2015
Fresnel equatons Delectrcs Image: Wkpeda CG III (NPGR010) - J. Křvánek 2015
Fresnel equatons Delectrcs CG III (NPGR010) - J. Křvánek 2015
Fresnel equatons From the sde - lttle transmsson - more reflecton Try for yourself!!! From above - lttle reflecton - more transmsson CG III (NPGR010) - J. Křvánek 2015
Fresnel equatons Metals CG III (NPGR010) - J. Křvánek 2015
CG III (NPGR010) - J. Křvánek 2015
CG III (NPGR010) - J. Křvánek 2015
Glossy reflecton
Glossy reflecton Nether deal dffuse nor deal mrror All real materals n fact fall n ths category CG III (NPGR010) - J. Křvánek 2015
Surface roughness and blurred reflectons The rougher the blurrer Mcroscopc surface roughness CG III (NPGR010) - J. Křvánek 2015
CG III (NPGR010) - J. Křvánek 2015
BRDF models
BRDF modelng BRDF s a model of the bulk behavor of lght when vewng a surface from dstance BRDF models Emprcal Physcally based Approxmaton of measured data (a.k.a meso-scale) CG III (NPGR010) - J. Křvánek 2015
Emprcal BRDF models An arbtrary formula that takes ω and ω o as arguments ω and ω o are sometmes denoted L (Lght drecton) a V (Vewng drecton) Example: Phong model Arbtrary shadng calculatons (shaders) CG III (NPGR010) - J. Křvánek 2015
Phong shadng model L N R V ( n k ( N L) + k ( V R ) C = I ) d s R = 2( N L) N L CG III (NPGR010) - J. Křvánek 2015
Phong shadng model n the radometrc notaton ω n r ω o Orgnal shadng model L ( n cosθ cos θ ) ( ωo) = L ( ω) k d k s o + cosθ = ω r r = 2( n ω ) n ω r o r BRDF f r = L L o cosθ f Phong Org r = k d + k s n cos θr cosθ CG III (NPGR010) - J. Křvánek 2015
Physcally-plausble Phong BRDF Modfcaton to ensure recprocty (symmetry) and energy conservaton Phong modf d + r = + Energy conserved when f ρ π n 2 ρs cos 2π n θ r ρ d + ρ s 1 It s stll an emprcal formula (.e. t does not follow from physcal consderatons), but at least t fulflls the basc propertes of a BRDF CG III (NPGR010) - J. Křvánek 2015
Physcally-plausble BRDF models E.g. Torrance-Sparrow / Cook-Torrance model Based on the mcrofacet theory CG III (NPGR010) - J. Křvánek 2015
CG III (NPGR010) - J. Křvánek 2015
Torrance-Sparrow BRDF Analytcally derved Used for modelng glossy surfaces (as the Phong model) Corresponds more closely to realty than Phong Derved from a physcal model of the surface mcrogeometry (as opposed to because t looks good - approach used for the Phong model) CG III (NPGR010) - J. Křvánek 2015
Torrance-Sparrow BRDF Assumes that the macrosurface conssts of randomly orented mcrofacets We assume that each mcrofacet behaves as an deal mrror. We consder 3 phenomena: Reflecton Maskng CG III (NPGR010) - J. Křvánek 2015 Shadowng
Torrance-Sparrow BRDF Fresnel term Geometry term Models shadowng and maskng f = F( θ) G( ω, ωr) D( θh) 4cos( θ)cos( θr) Mcrofacet dstrbuton Part of the macroscopc surface vsble by the lght source Part of the macroscopc surface vsble by the vewer CG III (NPGR010) - J. Křvánek 2015
Approxmaton of measured data We can ft any BRDF model to the data Some BRDF models have been specfcally desgned for the purpose of fttng measured data, e.g. Ward BRDF, Lafortune BRDF Nonlnear optmzaton requred to fnd the BRDF parameters CG III (NPGR010) - J. Křvánek 2015
BRDF measurements Gono-reflectometer CG III (NPGR010) - J. Křvánek 2015
BRDF models vs. measured data CG III (NPGR010) - J. Křvánek 2015
BRDF models vs. measured data CG III (NPGR010) - J. Křvánek 2015
BRDF models vs. measured data CG III (NPGR010) - J. Křvánek 2015
BRDF models vs. measured data CG III (NPGR010) - J. Křvánek 2015
BRDF models vs. measured data CG III (NPGR010) - J. Křvánek 2015
BRDF, BTDF, BSDF: What s up wth all these abbrevatons? BTDF Bdrectonal transmttance dstrbuton functon Descrbed lght transmsson BSDF = BRDF+BTDF Bdrectonal scatterng dstrbuton functon CG III (NPGR010) - J. Křvánek 2015
SBRDF, BTF SV-BRDF Spatally Varyng BRDF BRDF parameters are spatally varyng (can be gven by a surface texture) BTF Bdrectonal Texture Functon Used for materals wth complex structure As opposed to the BRDF, models even the meso-scale CG III (NPGR010) - J. Křvánek 2015
BSSRDF BRDF Lght arrvng at a pont s reflected/transmtted at the same pont No subsurface scatterng consdered BSSRDF B-drectonal surface scatterng reflectance dstrbuton functon Takes nto account scatterng of lght under the surface CG III (NPGR010) - J. Křvánek 2015
BSSRDF Sub-surface scatterng makes surfaces looks softer BRDF BSSRDF CG III (NPGR010) - J. Křvánek 2015
BSSRDF BRDF BSSRDF CG III (NPGR010) - J. Křvánek 2015