physically based shading
play

Physically based shading Ats Kurvet MTAT.03.296 Computer Graphics - PowerPoint PPT Presentation

Physically based shading Ats Kurvet MTAT.03.296 Computer Graphics Seminar Tartu 2014 1 Why use PBS? Consistency - across materials and lighting conditions. Speed - of authoring content (better tools, less variables, intuitive


  1. Physically based shading Ats Kurvet MTAT.03.296 Computer Graphics Seminar Tartu 2014 1

  2. Why use PBS? • Consistency - across materials and lighting conditions. • Speed - of authoring content (better tools, less variables, intuitive parameters, easier troubleshooting). • Easier to achieve “hyperrealism” • Cheaper. 2

  3. Examples of PBS in action 3

  4. 4 http://atskurvet.com/portfolio.html

  5. 5 http://www.unrealengine.com/files/downloads/2013SiggraphPresentationsNotes.pdf

  6. 6 http://www.fxguide.com/wp-content/uploads/2013/04/blueumbrella1.jpg

  7. http://www.cgmag.at/index.php?page=Attachment&attachmentID=5113&h=47ccf5d3bb8c3aad 7 a9c32a34d63f957f506ae0a9

  8. 8 https://www.fxguide.com/featured/gravity/

  9. Also check out • Unreal Infiltrator demo: https://www.youtube.com/watch?v=dO2rM -l-vdQ • Order 1886: https://www.youtube.com/watch?v=2FK8d gzW0o8 • And probably anything else that looks good* 9

  10. PBS needs a strong base • HDR and Tone mapping • Anti-aliasing (also accounting for specular) • Per object motion blur • Depth of field (if using a realistic camera model) • PostFX • … 10

  11. Physics 11

  12. Optics • Geometrical/ray optics – Basic reflections – Basic refractions • Physical/wave optics – Interference – Diffraction – Polarization • Electromagentic wave optics – Maxwell equations • Quantum optics – Photons: the atomic principle – Wave-particle duality 12

  13. ? • http://isites.harvard.edu/fs/docs/icb.topic186199.files/images/EdgeDiffraction2-800x533.jpg 13

  14. Visible spectrum • http://hyperphysics.phy-astr.gsu.edu/hbase/vision/imgvis/specol.gif • 14 http://upload.wikimedia.org/wikipedia/commons/1/1f/Light_dispersion_of_a_mercury- vapor_lamp_with_a_flint_glass_prism_IPNr%C2%B00125.jpg

  15. Lights interaction with matter 15

  16. Refraction and absorption • The refractive index – Describes how light interacts with the medium it is travelling in. – Spectral quantity – The complex refractive index: • The real part describes the affect to the speed and thus angle of deviation. • The imaginary part describes the amount of absorption and color. http://www.topwallpaperphoto.com/wp-content/uploads/2013/09/Whiskey-Drink.jpg 16

  17. Scattering • Light splits into multiple directions due to abrupt micro scale changes in refraction. • http://blog.selfshadow.com/pu blications/s2013-shading- course/hoffman/s2013_pbs_p hysics_math_slides.pdf 17

  18. Absorption, scattering and emission • http://blog.selfshadow.com/publications/s2013-shading- 18 course/hoffman/s2013_pbs_physics_math_slides.pdf

  19. Emission • Many different sources and ways of generation • There is a difference between white light and white light http://www.ni.com/cms/image s/devzone/tut/image4_200801 19 09201025.png

  20. Reflections on a planar surface 20

  21. Non-Optically-Flat Surfaces • http://blog.selfshadow.com/publications/s2013-shading- 21 course/hoffman/s2013_pbs_physics_math_notes.pdf original source: “Real -Time Rendering, 3rd edition"

  22. Subsurface scattering • http://blog.selfshadow.com/publications/s2013-shading- 22 course/hoffman/s2013_pbs_physics_math_notes.pdf original source: “Real -Time Rendering, 3rd edition"

  23. SSS and the diffuse term • http://blog.selfshadow.com/publications/s2013-shading-course/hoffman/s2013_pbs_physics_math_notes.pdf 23 original source: “Real -Time Rendering, 3rd edition"

  24. Math 24

  25. Radiance - L • Radiance is the measurement of the quantity of radiation that passes through or is emitted from a surface and falls within a given solid angle in a specified direction. In our case “a single ray of light”. • Radiance is a spectral quantity. http://upload.wikimedia.org/wikipedia/en/thu mb/6/63/Etendue-Definition.png/400px- Etendue-Definition.png 25

  26. Bidirectioanl Reflectance Distribution Function f( l , v ) • http://blog.selfshadow.com/publications/s2013-shading-course/hoffman/s2013_pbs_physics_math_notes.pdf 26 original source: “Real -Time Rendering, 3rd edition"

  27. ? • BTDF • BSDF • BSSRDF 27

  28. Reversability • http://blog.selfshadow.com/publications/s2013-shading-course/hoffman/s2013_pbs_physics_math_notes.pdf 28 original source: “Real -Time Rendering, 3rd edition"

  29. Reciprocity & energy conservation 29

  30. Reflectance equation 30

  31. Diffuse and specular term • http://blog.selfshadow.com/publications/s2013-shading-course/hoffman/s2013_pbs_physics_math_notes.pdf 31 original source: “Real -Time Rendering, 3rd edition"

  32. Splitting diffuse and specular in the real world • Check out the tutorial at: http://filmicgames.com/archives/233 32

  33. Real world examples 33 http://filmicgames.com/archives/547

  34. Real world examples 34 http://filmicgames.com/archives/547

  35. Real world examples 35 http://filmicgames.com/archives/547

  36. Surface Reflectance (Specular Term) 36

  37. Microfacet theory • Microgeometry • Light only reflected when, h = m , where h is the half angle vector and m is the microgeometry normal. – But only when the surface point is not shadowed or masked by neighboring geometry. • http://blog.selfshadow.com/publications/s2013-shading-course/hoffman/s2013_pbs_physics_math_notes.pdf 37 original source: “Real -Time Rendering, 3rd edition"

  38. Shadowing & masking • Shadowing (left) – accounted for. • Masking (middle) – accounted for. • Interreflections (right) – not accounted for. • http://blog.selfshadow.com/publications/s2013-shading-course/hoffman/s2013_pbs_physics_math_notes.pdf 38 original source: “Real -Time Rendering, 3rd edition"

  39. Microfacet BRDF • D( h ) – microgeometry normal distribution function • G( l , v , h ) - the geometry function • F( l , h ) - Fresnel reflectance • 4( n . l )( n . v ) – correction factor for transforms between micogeometry space and the macrosurface 39

  40. Fresnel reflectance • The Fresnel reflectance function computes the fraction of light reflected from an optically flat surface. • Depends on the incomoing angle of the light and the index of refraction. • Spectral quality. • Values between 0 and 1 40

  41. Fresnel reflectance for a variety of substances • http://blog.selfshadow.com/publications/s2013-shading-course/hoffman/s2013_pbs_physics_math_notes.pdf 41 original source: “Real -Time Rendering, 3rd edition"

  42. Characteristic specular reflectance – F 0 • http://blog.selfshadow.com/publications/s2013-shading-course/hoffman/s2013_pbs_physics_math_notes.pdf 42 original source: “Real -Time Rendering, 3rd edition"

  43. • http://blog.selfshadow.com/publications/s2013-shading-course/hoffman/s2013_pbs_physics_math_notes.pdf 43 original source: “Real -Time Rendering, 3rd edition"

  44. The Schlick Approximation to Fresnel • For microfacet BRDFs (otherwise replace h with n ): 44

  45. Microgeometry normal distribution function - D( m ) • Describes the amount of microgeometry normals m having the same direction as the surface normal n . • Values must me greater than 0. • Scalar. • Determines the size, brightness, and shape of the specular highlight. • Isotropic and anisotropic surfaces. https://lva.cg.tuwien.ac.at/ecg/wiki/lib/exe/fetch.php?hash=ac8b26&media=http%3A%2F%2Fwww.cs.utexas.edu%2F~fussell%2Fcourses%2Fcs3 45 84g%2Fprojects%2Fraytracing%2Fray_examples%2Fanisotropy_ball.jpg & http://blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_notes_v2.pdf

  46. Examples of NDFs • http://blog.selfshadow.com/publications/s2013-shading-course/hoffman/s2013_pbs_physics_math_notes.pdf 46 original source: “Real -Time Rendering, 3rd edition"

  47. Geometry function - G( l , v , m ) • Represents the probability that surface points with a given microgeometry normal m will be visible from both the light direction l and the view direction v . • Scalar. • Values between 0 and 1. 47

  48. Limitations of the Microfacet model • Does not account for pronounced wave optics effects (such as diffraction and interference), those are usually solved with ad hoc methods. • Geometry features in the scale range of wavelength of light, or larger features becoming smaller due to foreshortening at grazing angles. • More complex microgeometry. 48

  49. Subsurface Reflectance (Diffuse Term) 49

  50. Diffuse Term • Gets the left over light that is not reflected straight off the surface(specular term). • Spectral. • Values between 0 and 1. • Extra considerations to look at: – Specular reflectance increases at grazing angles so the diffuse value must decrease. – Affect of roughness (microgeometry features larger than that of the sub-surface scattering distance) 50

  51. Lambert • Most widely used. A constant value. 51

  52. Other terms • Subsurface single-scattering. • Multiple-bounce surface reflectance. • Might want to account for these in some ways no. 52

  53. Illumination model 53

  54. General Lighting • Integrate BRDF against all incoming light from all directions. • Solving this requires global illumination models such as Monte Carlo ray tracing. 54

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend