© Machiraju/Möller Fundamentals of Rendering - Reflectance Functions cis782 Advanced Computer Graphics Raghu Machiraju.

Slides:



Advertisements
Similar presentations
Computer Vision Radiometry. Bahadir K. Gunturk2 Radiometry Radiometry is the part of image formation concerned with the relation among the amounts of.
Advertisements

1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
Week 9 - Monday.  What did we talk about last time?  BRDFs  Texture mapping and bump mapping in shaders.
Local Reflection Model Jian Huang, CS 594, Fall 2002.
Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry Many slides courtesy Pat Hanrahan.
Radiometry. Outline What is Radiometry? Quantities Radiant energy, flux density Irradiance, Radiance Spherical coordinates, foreshortening Modeling surface.
Physically Based Illumination Models
Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection Many slides courtesy.
Computer Vision - A Modern Approach Set: Radiometry Slides by D.A. Forsyth Radiometry Questions: –how “bright” will surfaces be? –what is “brightness”?
Light and Matter For Computer Graphics Comp 770 Lecture Spring 2009.
Torrance Sparrow Model of Reflectance + Oren Nayar Model of Reflectance.
Based on slides created by Edward Angel
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Shading I.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner Lighting/Shading II Week.
University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.
Computer Graphics (Spring 2008) COMS 4160, Lecture 20: Illumination and Shading 2
Part I: Basics of Computer Graphics
3-D Computer Vision CSc83029 / Ioannis Stamos 3-D Computer Vision CSc Radiometry and Reflectance.
Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2
Rendering General BSDFs and BSSDFs Randy Rauwendaal.
Objectives Learn to shade objects so their images appear three- dimensional Learn to shade objects so their images appear three- dimensional Introduce.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Lighting and Shading Week.
Basic Principles of Surface Reflectance Lecture #3 Thanks to Shree Nayar, Ravi Ramamoorthi, Pat Hanrahan.
Computer Graphics (Fall 2004) COMS 4160, Lecture 16: Illumination and Shading 2 Lecture includes number of slides from.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Lighting Week 5, Mon 29 Sep 2003 recap: picking, light sources lighting.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Shading I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Course Website: Computer Graphics 16: Illumination.
Specular Reflections from Rough Surfaces Lecture #4 Thanks to Shree Nayar, Ravi Ramamoorthi, Pat Hanrahan.
CS 480/680 Computer Graphics Shading I Dr. Frederick C Harris, Jr.
CS 445 / 645: Introductory Computer Graphics
University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell Reflection Models I Today Types of reflection models The BRDF and.
Shading / Light Thanks to Srinivas Narasimhan, Langer-Zucker, Henrik Wann Jensen, Ravi Ramamoorthi, Hanrahan, Preetham.
02/25/05© 2005 University of Wisconsin Last Time Meshing Volume Scattering Radiometry (Adsorption and Emission)
MIT EECS 6.837, Durand and Cutler Local Illumination.
-Global Illumination Techniques
CSC418 Computer Graphics n Illumination n Lights n Lightinging models.
David Luebke 1 10/26/2015 Lighting CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
Taku KomuraComputer Graphics Local Illumination and Shading Computer Graphics – Lecture 10 Taku Komura Institute for Perception, Action.
Advanced Illumination Models Chapter 7 of “Real-Time Rendering, 3 rd Edition”
Diffuse Reflections from Rough Surfaces Lecture #5
Announcements Office hours today 2:30-3:30 Graded midterms will be returned at the end of the class.
Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr.
Illumination and Shading
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.
CS 450: COMPUTER GRAPHICS TRANSPARENT SURFACES SPRING 2015 DR. MICHAEL J. REALE.
CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai.
BRDF models and their use in Global Illumination Algorithms László Szirmay-Kalos.
Reflection models Digital Image Synthesis Yung-Yu Chuang 11/22/2007 with slides by Pat Hanrahan and Matt Pharr.
Computer Graphics (Spring 2003) COMS 4160, Lecture 18: Shading 2 Ravi Ramamoorthi Guest Lecturer: Aner Benartzi.
University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Shading.
02/2/05© 2005 University of Wisconsin Last Time Reflectance part 1 –Radiometry –Lambertian –Specular.
Local Illumination and Shading
Cornell CS465 Spring 2004 Lecture 4© 2004 Steve Marschner 1 Shading CS 465 Lecture 4.
CS348B Lecture 10Pat Hanrahan, Spring 2005 Reflection Models I Today Types of reflection models The BRDF and reflectance The reflection equation Ideal.
OpenGL Shading. 2 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build.
Physically-based Illumination Model
Illumination Study of how different materials reflect light Definition of radiance, the fundamental unit of light transfer in computer graphics How the.
Physically-based Illumination Models (2) CPSC 591/691.
Layered Media / Subsurface Scattering (1)
Computer Graphics Lecture 30 Mathematics of Lighting and Shading - IV Taqdees A. Siddiqi
Reflection Models (1) Physically-Based Illumination Models (2)
Computer Graphics: Illumination
Shading CS 465 Lecture 4 © 2004 Steve Marschner • 1.
Advanced Computer Graphics
BRDFs Randy Rauwendaal.
Radiometry (Chapter 4).
Shading Variation in observed color across an object
Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular model
Computer Graphics (Fall 2003)
Presentation transcript:

© Machiraju/Möller Fundamentals of Rendering - Reflectance Functions cis782 Advanced Computer Graphics Raghu Machiraju

© Machiraju/Möller Reading Chapter 9 of “Physically Based Rendering” by Pharr&Humphreys Chapter 16 in Foley, van Dam et al. Chapter 15 in Glassner

© Machiraju/Möller Surface Reflectance –Measured data Gonioreflectometer (See the Cornell Lab) –Phenomenological models Intuitive parameters Most of graphics –Simulation Know composition of some materials simulate complicated reflection from simple basis –Physical (wave) optics Using Maxwell’s equations Computationally expensive –Geometric optics Use of geometric surface properties

© Machiraju/Möller Gonioreflectometer

© Machiraju/Möller Surface Reflectance Diffuse –Scatter light equally in all directions –E.g. dull chalkboards, matte paint Glossy specular –Preferred set of direction around reflected direction –E.g. plastic, high-gloss paint Perfect specular –E.g. mirror, glass Retro-reflective –E.g. velvet or earth’s moon

© Machiraju/Möller Surface Reflectance Iso-tropic vs. anisotropic –If you turn an object around a point -> does the shading change?

© Machiraju/Möller Surface Reflectance Iso-tropic vs. anisotropic –If you turn an object around a point -> does the shading change? Phong (isotropic) Banks (anisotropic)

© Machiraju/Möller Surface Properties Reflected radiance is proportional to incoming flux and to irradiance (incident power per unit area).

© Machiraju/Möller The BSDF Bidirectional Scattering Distribution Function: Measures portion of incident irradiance (E i ) that is reflected as radiance (L o ) Or the ratio between incident radiance (L i ) and reflected radiance (L o )

© Machiraju/Möller The BRDF and the BTDF Bidirectional Reflectance Distribution Function (BRDF) –Describes distribution of reflected light Bidirectional Transmittance Distribution Function (BTDF) –Describes distribution of transmitted light BSDF = BRDF + BTDF

© Machiraju/Möller Illumination via the BxDF The Reflectance Equation The reflected radiance is –the sum of the incident radiance over the entire (hemi)sphere –foreshortened –scaled by the BxDF

© Machiraju/Möller Parameterizations 6-D BRDF f r ( p,  o,  i ) –Incident direction L i –Reflected/Outgoing direction L o –Surface position p: textured BxDF 4-D BRDF f r (  o,  i ) –Homogeneous material –Anisotropic, depends on incoming azimuth –e.g. hair, brushed metal, ornaments

© Machiraju/Möller Parameterizations 3-D BRDF f r (  o,  i,  o –  i ) –Isotropic, independent of incoming azimuth –e.g. Phong highlight 1-D BRDF f r (  i ) –Perfectly diffuse –e.g. Lambertian

© Machiraju/Möller BxDF Property 0 Ranges from 0 to  (strictly positive) Infinite when radiance distribution from single incident ray

© Machiraju/Möller BRDF Property 1 Linearity of functions Sillion, Arvo, Westin, Greenberg

© Machiraju/Möller = BRDF Property 2 Helmholtz Reciprocity f r (  o,  i ) = f r (  i,  o ) –Materials are not a one-way street –Incoming to outgoing pathway same as outgoing to incoming pathway

© Machiraju/Möller Isotropic vs. anisotropic f r (  i,  i,  o,  o ) = f r (  o,  i,  o –  i ) Reciprocity and isotropy f r (  o,  i,  o –  i ) = f r (  i,  o,  i –  o ) = f r (  o,  i, |  o –  i |) BRDF Property 3

© Machiraju/Möller Surface Incoming light Reflected light BRDF Property 4 Conservation of Energy –Materials must not add energy (except for lights) –Materials must absorb some amount of energy –When integrated, must add to less than one

© Machiraju/Möller Reflectance ratio of reflected to incident flux Is between 0 and 1 3x3 set of possibilities for  : If L is isotropic and uniform there is a clear relationship between  and f. Reflectance

© Machiraju/Möller Reflectance Hemispherical-directional reflectance –Reflection in a given direction due to constant illumination over a hemisphere –Total reflection over hemisphere due to light from a given direction (reciprocity) –Also called albedo - incoming photon is reflected with probability less than one

© Machiraju/Möller Reflectance Hemispherical-hemispherical reflectance –Constant spectral value that gives the fraction of incident light reflected by a surface when the incident light is the same from all directions

© Machiraju/Möller Representations Tabulated BRDF’s –Require dense sampling and interpolation scheme Factorization –Into two 2D functions for data reduction (often after reparameterization) Basis Functions (Spherical Harmonics) –Loss of quality for high frequencies Analytical Models –Rough approximation only –Very compact –Most often represented as parametric equation (Phong, Cook-Torrance, etc.)

© Machiraju/Möller Law of Reflection p I R N Angle of reflectance = angle of incidence

© Machiraju/Möller Polished Metal

© Machiraju/Möller Ideal Reflection (Mirror) p BRDF cast as a delta function

© Machiraju/Möller Mirror Surface

© Machiraju/Möller  i,  t indices of refraction (ratio of speed of light in vacuum to the speed of light i the medium) p I T N Snell’s Law

© Machiraju/Möller Law of Refraction Starting at Snell’s law: We conclude that Assuming a normalized T: Solving this quadratic equation: Leads to the total reflection condition:

© Machiraju/Möller Optical Manhole Total Internal Reflection For water n w = 4/3 Livingston and Lynch

© Machiraju/Möller Fresnel Reflection At top layer interface –Some light is reflected, –Remainder is transmitted through Simple ray-tracers: just given as a constant Physically based - depends on –incident angle –Polarization of light –wavelength Solution of Maxwell’s equations to smooth surfaces Dielectrics vs. conductors

© Machiraju/Möller Fresnel Reflection - Dielectrics Objects that don’t conduct electricity (e.g. glass) Fresnel term F for a dielectric is proportion of reflection (e.g. glass, plastic) –grazing angles: 100% reflected (see the material well!) –normal angles: 5% reflected (almost mirror-like)

© Machiraju/Möller Polarized light: Where  t is computed according to Snell’s law Unpolarized light: Fresnel Reflection - Dielectrics

© Machiraju/Möller Fresnel Reflection - Dielectrics

© Machiraju/Möller Fresnel Reflection - Conductor Typically metals No transmission Absorption coefficient k

© Machiraju/Möller Fresnel Reflection - Conductor Polarized light: Unpolarized light:

© Machiraju/Möller Fresnel Reflection - Conductor How to determine k or  ? Measure F r for  i =0 (normal angle) 1. Assume k = 0 2. Assume  = 1

© Machiraju/Möller Fresnel Normal (Dielectric) Material Air 10% reflected 90% transmitted

© Machiraju/Möller Fresnel Grazing (Dielectric) Material Air 90% reflected 10% transmitted

© Machiraju/Möller Fresnel Mid (Dielectric) Material Air 60% reflected 40% transmitted

© Machiraju/Möller Fresnel Reflection Conductor (Aluminum) Dielectric (N=1.5) Schlick Approximation:

© Machiraju/Möller Fresnel Reflection Example - Copper –color shift as  goes from 0 to  /2 –at grazing, specular highlight is color of light Measured Reflectance Approximated Reflectance

© Machiraju/Möller Ideal Specular - Summary Reflection: Transmission:

© Machiraju/Möller Ideal Diffuse Reflection Uniform –Sends equal amounts of light in all directions –Amount depends on angle of incidence Perfect –all incoming light reflected –no absorption

© Machiraju/Möller Layered Surface Varnish Dye Layer

© Machiraju/Möller Layered Surface Larger Varnish Dye Particles

© Machiraju/Möller Ideal Diffuse Reflection Lamberts Cosine Law:

© Machiraju/Möller Diffuse Helmholtz reciprocity? Energy preserving?

© Machiraju/Möller Reflectance Models Ideal –Diffuse –Specular Ad-hoc: Phong –Classical / Blinn –Modified –Ward –Lafortune Microfacets (Physically-based) –Torrance-Sparrow (Cook-Torrance) –Ashkhimin

© Machiraju/Möller Classical Phong Model Where 0 0 Cast as a BRDF: Not reciprocal Not energy-preserving Specifically, too reflective at glancing angles, but not specular enough But cosine lobe itself symmetrical in  i and  o

© Machiraju/Möller Blinn-Phong Like classical Phong, but based on half-way vector Implemented in OpenGL Not reciprocal Not energy-preserving Specifically, too reflective at glancing angles, but not specular enough But cosine lobe itself symmetrical in  i and  o

© Machiraju/Möller Modified Phong For energy conservation: k d + k s < 1 (sufficient, not necessary) Peak gets higher as it gets sharper, but same total reflectivity

© Machiraju/Möller Ward-Phong Based on Gaussians  : surface roughness, or blur in specular component.

© Machiraju/Möller Lafortune Model Phong cosine lobes symmetrical (reciprocal), easy to compute Add more lobes in order to match with measured BRDF How to generalize to anisotropic BRDFs? weight dot product:

© Machiraju/Möller Glossy

© Machiraju/Möller Physically-based Models Some basic principles common to many models: –Fresnel effect –Surface self-shadowing –Microfacets To really model well how surfaces reflect light, need to eventually move beyond BRDF Different physical models required for different kinds of materials Some kinds of materials don’t have good models Remember that BRDF makes approximation of completely local surface reflectance!

© Machiraju/Möller Based in part on the earlier Torrance-Sparrow model Neglects multiple scattering D - Microfacet Distribution Function –how many “cracks” do we have that point in our (viewing) direction? G - Geometrical Attenuation Factor –light gets obscured by other “bumps” F - Fresnel Term Cook-Torrance Model

© Machiraju/Möller Microfacet Models Microscopically rough surface Specular facets oriented randomly measure of scattering due to variation in angle of microfacets a statistic approximation, I.e. need a statistic distribution function

© Machiraju/Möller Rough Surface Reduced Specular Diffuse Scattering

© Machiraju/Möller Blinn where m is the root mean square slope of the facets (as an angle) Blinn says c is a arbitrary constant Really should be chosen to normalize BRDF... Microfacet Distribution Function D

© Machiraju/Möller Beckmann (most effective) Represents a distribution of slopes But  = tan  for small  Microfacet Distribution Function D

© Machiraju/Möller May want to model multiple scales of roughness: Bumps on bumps … Multiscale Distribution Function

© Machiraju/Möller No interferenceshadowingmasking Self-Shadowing (V-Groove Model) Geometrical Attenuation Factor G –how much are the “cracks” obstructing themselves?

© Machiraju/Möller Cook-Torrance - Summary

© Machiraju/Möller Cook-Torrance - Summary

© Machiraju/Möller Ashkhimin Model Modern Phong Phenomological, but: –Physically plausible –Anisotropic Good for both Monte-Carlo and HW implementation

© Machiraju/Möller Ashkhimin Model Weighted sum of diffuse and specular part: Dependence of diffuse weight on k s decreases diffuse reflectance when specular reflectance is large Specular part f s not an impulse, really just glossy Diffuse part f d not constant: energy specularly reflected cannot be diffusely reflected For metals, f d = 0

© Machiraju/Möller Ashkhimin Model k s : Spectrum or colour of specular reflectance at normal incidence. k d : Spectrum or colour of diffuse reflectance (away from the specular peak). q u, q v : Exponents to control shape of specular peak. – Similar effects to Blinn-Phong model – If an isotropic model is desired, use single value q – A larger value gives a sharper peak – Anisotropic model requires two tangent vectors u and v – The value q u controls sharpness in the direction of u – The value q v controls sharpness in the direction of v

© Machiraju/Möller Ashkhimin Model  is the angle between u and  h

© Machiraju/Möller Ashkhimin Model Diffuse term given by: Leading constant chosen to ensure energy conservation Form comes from Schlick approximation to Fresnel factor Diffuse reflection due to subsurface scattering: once in, once out

© Machiraju/Möller Schlick BRDF

© Machiraju/Möller Schlick Roughness  diffuse Isotropy factor  isotropic g, d, s of brdf calculated from roughness

© Machiraju/Möller + + Complex BRDF Combination of the three.

© Machiraju/Möller BRDF illustrations Phong Illumination Oren-Nayar

© Machiraju/Möller BRDF illustrations Hapke BRDF Cook-Torrance-Sparrow BRDF

© Machiraju/Möller BRDF illustrations cement lumber

© Machiraju/Möller BRDF illustrations Surface microstructure

© Machiraju/Möller bv = Brdf Viewer Diffuse Szymon Rusinkiewicz Princeton U. Torrance-Sparrow Anisotropic

© Machiraju/Möller BRDF cannot Spatial variation of reflectance

© Machiraju/Möller BRDF cannot Transparency and Translucency (depth) Glass: transparent Wax: translucent BTDF Opaque milk (rendered) Translucent milk (rendered) BSSRDF