1 / 62

Distributed Area Lighting

Distributed Area Lighting. Joon Jae Lee Keimyung University. Overview. Motivation Compact Lights Distributed Lights. General Case. Light comes from all positions and from all directions We need approximations in order to model in finite time Choices are:

paxton
Download Presentation

Distributed Area Lighting

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Distributed Area Lighting Joon Jae Lee Keimyung University

  2. Overview • Motivation • Compact Lights • Distributed Lights

  3. General Case • Light comes from all positions and from all directions • We need approximations in order to model in finite time • Choices are: • Represent lighting envt as small number of compact light sources • Model a real nature of light sources

  4. Compact Lighting Model • Well known, understood • Light characterized solely by direction vector • Shadows have sharp edges • stencils, horizon maps, etc.

  5. Shadowing • Cast shadows • Self shadowing

  6. Motivation • Most common case • everything is a secondary reflector • and therefore a light source

  7. Distributed Lighting Models • Environment Mapping • Specular—common, understood • blur somewhat for lower power • Diffuse—less commonly used • use normal instead of reflection vector • blur texture—prefilter to integrate

  8. Environment map types • Cube • LonLat • Hemisphere • Paraboloid • Dual paraboloid • Spherical Harmonics • etc.

  9. Hardware Environment Maps • see Debevec • Facilitated by next generation hardware

  10. Model Elements Sky Color Ground Color Hemisphere Model Final Color

  11. Diffuse Envt Mapped Bunny

  12. Diffuse Environment Mapped Head

  13. Distributed Light Model Hemisphere of possible incident light directions q Surface Normal Microfacet Normal - defines axis of hemisphere

  14. Procedural Environment Maps • Generate environment maps by: • rendering into cube map • if you have cube map hardware, okay • otherwise, use other method • Rendering into other maps types is possible too • especially the the light sources

  15. Procedural Hemisphere Map

  16. Procedural Diffuse Maps • Hemisphere Lighting • Spherical Harmonic Lighting

  17. Hemisphere Lighting • Simplest area light model • Fairly accurate model for sky/ground case • Somewhat generalizable to other profiles • Building/canyon version

  18. 2-Hemisphere Model Sky Color q Ground Color

  19. Area Light Shadows • Self occlusion not well represented • Representation is a scalar • At each point • Ray-trace to generate

  20. Distributed Light Model Hemisphere of possible incident light directions q Microfacets Other facets can shadow this one: Occlusion

  21. Approximating Occlusion • Need to determine extent of shadowing • Cast rays out from facet to see which ones intersect the object

  22. Ray Cast Occlusion Model Microfacet Some rays hit this object, others miss it

  23. Occlusion Representations • Can store result in various ways • Compute ratio of hits / misses • Occlusion Factor • A single scalar parameter • Should weight with cosine • Use to blend in shadow color • Sufficient for hemisphere lighting

  24. Model Elements Sky Color Ground Color Object Color Sphere Model Occlusion Factor Final Color

  25. Occlusion Factor Absent

  26. Occlusion Factor Present

  27. Occlusion Factor Absent

  28. Occlusion Factor Present

  29. Occlusion Factor Absent

  30. Occlusion Factor Present

  31. Lightwave Image

  32. Hi-Res

  33. Per Pixel Occlusion Factor • Estimate area based on adjacent pixels in height field • Should cast to all pixels in image • Should ray-cast bumps and pixels at the same time

  34. Pixel Occlusion

  35. Other Occlusion Methods • What if we need to produce sharp shadows? • e.g. to model effect of compact lights • Compute cone of visibility • = cone of unocclusion • Store as more than a scalar • put axis of cone (xyz) + cos cone angle in alpha • There are other representations • C. F. Heidrichs et al. “Ellipses”

  36. Occlusion Cone Model Axis Ang Surface Normal Fit cone to horizon between hits and misses

  37. Occlusion Cone Shadows • Each sample has a cone • Check to see if light ray is in it • If ( L dot Axis > cosAng ) • If so then • It is lit • Else • It is in shadow • Need not be Boolean • For softer edged shadows

  38. Horizon Maps • Enable Per-Pixel shadowing • Also per-vertex for terrain engines • Representation is a set of scalar samples • 1 for each direction • Cone is ~ octahedral

  39. Standard Bump Map

  40. Horizon Map Shadows

  41. Horizon Maps: Occlusion Cones • Horizon maps represent occlusion cones as 8-sided figures • Cone is parameterized as 8 values • N, NE, E, SE, S, SW, W, NW • Works fine for compact lights • Scalar factor works for hemispheres • What about lights in between?

  42. Spherical Harmonics • Another way to parameterize information on a sphere • Analogous to Fourier Transforms, but over surface of a sphere

  43. Spherical Harmonics

  44. Spherical Harmonic Environment Maps • Represent environment map as set of colors for each harmonic • Very compact representation • 16 colors sufficient for diffuse • Very efficient math to use • Just multiply-adds or dot products • Simple to generate procedurally • Easy to generate from image data

  45. Buddha No Shadow

  46. Environment + Scalar Occlusion

  47. Procedural with No Shadow

  48. Procedural with Occlusion

  49. Spherical Harmonic Surface Response • What about occlusion/shadow terms? • Representation is set of SH scalar weights • Store set at each point • Pixel or vertex • Ray-trace to generate • Convert to SH basis

  50. Environment + Scalar Occlusion

More Related