08 shading and frames
play

08 Shading and Frames Steve Marschner CS5625 Spring 2020 Light - PowerPoint PPT Presentation

08 Shading and Frames Steve Marschner CS5625 Spring 2020 Light reflection physics Radiometry redux Power Intensity power per unit solid angle Irradiance power per unit area Radiance power per unit (solid angle area) Sources of light Point


  1. 08 Shading and Frames Steve Marschner CS5625 Spring 2020

  2. Light reflection physics

  3. Radiometry redux Power Intensity power per unit solid angle Irradiance power per unit area Radiance power per unit (solid angle × area)

  4. Sources of light Point sources (intensity) • light from points in the local scene; can be directionally varying—spotlights Area sources (radiance) • light from geometry in the local scene; can be spatially varying—stained glass windows Directional sources (irradiance) • light from points far outside the local scene; aka. from fixed directions—e.g. sun Environment lighting (radiance) • light from everything far outside the local scene—e.g. env. maps, sun-sky models Indirect lighting (radiance) • light reflected from other surfaces—e.g. lighting from torchiere lamp

  5. Simple kinds of scattering Ideal specular reflection • incoming ray reflected to a single direction • mirror-like behavior • arises at smooth surfaces Ideal specular transmission • incoming ray refracted to a single direction • glass-like behavior • arises at smooth dielectric (nonmetal) surfaces Ideal di ff use reflection or transmission • outgoing radiance independent of direction • arises from subsurface multiple scattering

  6. Ideal specular reflection from metals Wenzel Jakob / Mistuba Cu Au

  7. Ideal reflection and transmission from smooth dielectrics Wenzel Jakob / Mistuba Water (ior = 1.33) Diamond (ior = 2.4)

  8. Two di ff use surfaces Wenzel Jakob / Mistuba

  9. More complex scattering Rough interfaces • metal interfaces: blurred reflection • dielectric interfaces: blurred transmission Subsurface scattering • liquids—milk, juice, beer, … • coatings—paint, glaze, varnish, … • natural materials—wood, marble, … • biological materials—skin, plants, … • low optical density leads to translucency

  10. Reflection from rough metal interfaces Wenzel Jakob / Mistuba Cu ( α = 0.1) Al (anisotropic)

  11. Ling-qi Yan & Milos Hasan | work in progress

  12. Ling-qi Yan & Milos Hasan | work in progress

  13. Reflection and refraction at rough dielectric interfaces Wenzel Jakob / Mistuba Anti-glare glass ( α = 0.02) Etched glass ( α = 0.1)

  14. Translucent materials low optical density Wenzel Jakob / Mistuba high optical Wenzel Jakob / Mistuba “skim milk” density

  15. Modeling complex scattering Opaque materials • reflection: bidirectional reflectance 
 distribution function (BRDF) • transmission: bidirectional transmittance 
 distribution function (BTDF) • both: bidirectional scattering 
 distribution function (BSDF) Translucent materials • bidirectional subsurface scattering 
 reflectance distribution function (BSSRDF) • more on this later, maybe

  16. Isotropy vs. anisotropy � � i i � e � e � e � i �� isotropic anisotropic

  17. Types of BRDF/BSDF models Ad hoc formulas • e.g. Blinn-Phong Physics-based analytical models • Lambertian • Microfacet-based models • Kirchho ff -based models Measured data • tables of data from pointwise BRDF measurements • image-based BRDF measurements

  18. Light reflection in shaders

  19. Light reflection: full picture all types of reflection reflect all types of illumination • di ff use, glossy, mirror reflection • environment, area, point illumination incident distribution reflected distribution (function of direction) (function of direction)

  20. Categories of illumination di ff use glossy mirror simple specular point/directional hard shadows point reflections highlight shaped specular reflected image of area soft shadows highlight source blurry reflection of reflected image of environment soft shadows environment environment soft indirect blurry reflections reflected images indirect illumination of other objects of other objects = easy to compute using traditional basics

  21. How to compute shading Basic case: point or directional lights; di ff use or glossy BRDF Type in BRDF model, plug in illumination and view direction • can write down model in world space, use world-space vectors • can write down model in surface frame, transform vectors • really not di ff erent Subtleties are all about what frame to use for shading

  22. Interpolated shading Coarse triangle meshes are fast Discontinuities are bad Therefore: interpolate geometric quantities across triangles • goal: shading is smooth across edges What do we interpolate? • what do we need to compute shading?

  23. Shading frames When we carry around a normal, we are defining a tangent plane • interpolated normal defines an approximate, smoothly varying tangent plane For some purposes, the tangent plane is enough • e.g. computing shading for isotropic BRDFs • any coordinate system conforming to the normal is equally good In other cases, need a complete frame • whenever directions within the plane are inequivalent • e.g. anisotropic BRDFs • e.g. tangent-frame normal maps How to compute these from normals and texture coordinates? (blackboard)

  24. What to interpolate Need plane: can just interpolate a normal Need frame: interpolate enough data to define a tangent frame One and a half vectors rounds up to two • normal and one tangent vector • two tangent vectors • normal and one tangent, plus sign Rebuilding a frame from the vectors • worry about handedness matching texture coordinates (or not) • orthonormality gets broken by interpolation (when does that matter?)

  25. What you need for shading When/why you need full frames • when you care (or not) what the orientation is • when you care (or not) about orthonormality What to interpolate • underlying math question: representation of frames • representations that behave well under interpolation How to author orientation • with maps • by following a parameterization How to deal with corner cases

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