distributed area lighting
DESCRIPTION
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: - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/1.jpg)
Distributed Area LightingDistributed Area Lighting
Joon Jae LeeJoon Jae Lee
Keimyung UniversityKeimyung University
![Page 2: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/2.jpg)
OverviewOverview
MotivationMotivation
Compact LightsCompact Lights
Distributed LightsDistributed Lights
![Page 3: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/3.jpg)
General CaseGeneral Case
Light comes from all positions and Light comes from all positions and from all directionsfrom all directions
We need approximations in order to We need approximations in order to model in finite timemodel in finite time
Choices are:Choices are:Represent lighting envt as small number Represent lighting envt as small number of compact light sourcesof compact light sources
Model a real nature of light sourcesModel a real nature of light sources
![Page 4: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/4.jpg)
Compact Lighting ModelCompact Lighting Model
Well known, understoodWell known, understood
Light characterized solely by direction Light characterized solely by direction vectorvector
Shadows have sharp edgesShadows have sharp edgesstencils, horizon maps, etc.stencils, horizon maps, etc.
![Page 5: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/5.jpg)
ShadowingShadowing
Cast shadowsCast shadows
Self shadowingSelf shadowing
![Page 6: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/6.jpg)
MotivationMotivation
Most common caseMost common case
everything is a secondary reflectoreverything is a secondary reflectorand therefore a light sourceand therefore a light source
![Page 7: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/7.jpg)
Distributed Lighting ModelsDistributed Lighting Models
Environment MappingEnvironment Mapping
Specular—common, understoodSpecular—common, understoodblur somewhat for lower powerblur somewhat for lower power
Diffuse—less commonly usedDiffuse—less commonly useduse normal instead of reflection vectoruse normal instead of reflection vector
blur texture—prefilter to integrateblur texture—prefilter to integrate
![Page 8: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/8.jpg)
Environment map typesEnvironment map types
CubeCube
LonLatLonLat
HemisphereHemisphere
ParaboloidParaboloid
Dual paraboloidDual paraboloid
Spherical HarmonicsSpherical Harmonics
etc.etc.
![Page 9: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/9.jpg)
Hardware Environment MapsHardware Environment Maps
see Debevecsee Debevec
Facilitated by next generation Facilitated by next generation hardwarehardware
![Page 10: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/10.jpg)
Model ElementsModel Elements
Sky Color
Final ColorFinal Color
Ground ColorGround Color
Hemisphere ModelHemisphere Model
![Page 11: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/11.jpg)
Diffuse Envt Mapped BunnyDiffuse Envt Mapped Bunny
![Page 12: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/12.jpg)
Diffuse Environment Mapped HeadDiffuse Environment Mapped Head
![Page 13: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/13.jpg)
Distributed Light ModelDistributed Light Model
Hemisphere of possible incident light directions
Surface Normal
Microfacet Normal - defines axis of hemisphere
![Page 14: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/14.jpg)
Procedural Environment MapsProcedural Environment Maps
Generate environment maps by:Generate environment maps by:
rendering into cube maprendering into cube mapif you have cube map hardware, okayif you have cube map hardware, okay
otherwise, use other methodotherwise, use other method
Rendering into other maps types is Rendering into other maps types is possible toopossible too
especially the the light sourcesespecially the the light sources
![Page 15: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/15.jpg)
Procedural Hemisphere Map
![Page 16: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/16.jpg)
Procedural Diffuse MapsProcedural Diffuse Maps
Hemisphere LightingHemisphere Lighting
Spherical Harmonic LightingSpherical Harmonic Lighting
![Page 17: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/17.jpg)
Hemisphere LightingHemisphere Lighting
Simplest area light modelSimplest area light model
Fairly accurate model for sky/ground Fairly accurate model for sky/ground casecase
Somewhat generalizable to other Somewhat generalizable to other profilesprofiles
Building/canyon versionBuilding/canyon version
![Page 18: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/18.jpg)
2-Hemisphere Model2-Hemisphere Model
Sky Color
Ground Color
![Page 19: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/19.jpg)
Area Light ShadowsArea Light Shadows
Self occlusion not well representedSelf occlusion not well represented
Representation is a scalarRepresentation is a scalarAt each pointAt each point
Ray-trace to generateRay-trace to generate
![Page 20: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/20.jpg)
Distributed Light ModelDistributed Light Model
Hemisphere of possible incident light directions
Microfacets
Other facets can shadow this one: Occlusion
![Page 21: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/21.jpg)
Approximating Occlusion
Need to determine extent of shadowing
Cast rays out from facet to see which ones intersect the object
![Page 22: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/22.jpg)
Ray Cast Occlusion ModelRay Cast Occlusion Model
Microfacet
Some rays hit this object, others miss it
![Page 23: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/23.jpg)
Occlusion RepresentationsOcclusion Representations
Can store result in various ways
Compute ratio of hits / missesOcclusion FactorA single scalar parameterShould weight with cosine
Use to blend in shadow color
Sufficient for hemisphere lighting
![Page 24: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/24.jpg)
Model ElementsModel Elements
Sky Color
Final ColorFinal Color
Ground ColorGround Color
Object ColorObject Color Sphere Model
Occlusion Factor
![Page 25: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/25.jpg)
Occlusion Factor AbsentOcclusion Factor Absent
![Page 26: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/26.jpg)
Occlusion Factor PresentOcclusion Factor Present
![Page 27: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/27.jpg)
Occlusion Factor AbsentOcclusion Factor Absent
![Page 28: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/28.jpg)
Occlusion Factor PresentOcclusion Factor Present
![Page 29: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/29.jpg)
Occlusion Factor AbsentOcclusion Factor Absent
![Page 30: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/30.jpg)
Occlusion Factor Present
![Page 31: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/31.jpg)
Lightwave Image
![Page 32: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/32.jpg)
Hi-Res
![Page 33: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/33.jpg)
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
Per Pixel Occlusion Factor
![Page 34: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/34.jpg)
Pixel Occlusion
![Page 35: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/35.jpg)
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 scalarput axis of cone (xyz) + cos cone angle in alphaThere are other representations
C. F. Heidrichs et al. “Ellipses”
![Page 36: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/36.jpg)
Occlusion Cone ModelOcclusion Cone Model
Surface Normal
Fit cone to horizon between hits and misses
Ang
Axis
![Page 37: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/37.jpg)
Occlusion Cone ShadowsOcclusion Cone Shadows
Each sample has a coneEach sample has a cone
Check to see if light ray is in itCheck to see if light ray is in itIf ( L dot Axis > cosAng )If ( L dot Axis > cosAng )
If so thenIf so thenIt is litIt is lit
ElseElseIt is in shadowIt is in shadow
Need not be BooleanNeed not be BooleanFor softer edged shadowsFor softer edged shadows
![Page 38: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/38.jpg)
Horizon MapsHorizon Maps
Enable Per-Pixel shadowingEnable Per-Pixel shadowing
Also per-vertex for terrain enginesAlso per-vertex for terrain engines
Representation is a set of scalar Representation is a set of scalar samplessamples
1 for each direction1 for each direction
Cone is ~ octahedralCone is ~ octahedral
![Page 39: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/39.jpg)
Standard Bump Map Standard Bump Map
![Page 40: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/40.jpg)
Horizon Map ShadowsHorizon Map Shadows
![Page 41: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/41.jpg)
Horizon Maps: Occlusion ConesHorizon Maps: Occlusion Cones
Horizon maps represent occlusion Horizon maps represent occlusion cones as 8-sided figurescones as 8-sided figures
Cone is parameterized as 8 valuesCone is parameterized as 8 valuesN, NE, E, SE, S, SW, W, NWN, NE, E, SE, S, SW, W, NW
Works fine for compact lightsWorks fine for compact lights
Scalar factor works for hemispheresScalar factor works for hemispheres
What about lights in between?What about lights in between?
![Page 42: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/42.jpg)
Spherical Harmonics
Another way to parameterize information on a sphere
Analogous to Fourier Transforms, but over surface of a sphere
![Page 43: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/43.jpg)
Spherical Harmonics
![Page 44: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/44.jpg)
Spherical Harmonic Environment MapsSpherical Harmonic Environment Maps
Represent environment map as set of Represent environment map as set of colors for each harmoniccolors for each harmonic
Very compact representationVery compact representation16 colors sufficient for diffuse16 colors sufficient for diffuse
Very efficient math to useVery efficient math to useJust multiply-adds or dot productsJust multiply-adds or dot products
Simple to generate procedurallySimple to generate procedurally
Easy to generate from image dataEasy to generate from image data
![Page 45: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/45.jpg)
Buddha No Shadow
![Page 46: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/46.jpg)
Environment + Scalar Occlusion
![Page 47: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/47.jpg)
Procedural with No Shadow
![Page 48: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/48.jpg)
Procedural with Occlusion
![Page 49: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/49.jpg)
Spherical HarmonicSpherical Harmonic Surface Response Surface Response
What about occlusion/shadow terms?What about occlusion/shadow terms?
Representation is set of SH scalar Representation is set of SH scalar weightsweights
Store set at each pointStore set at each pointPixel or vertexPixel or vertex
Ray-trace to generateRay-trace to generateConvert to SH basisConvert to SH basis
![Page 50: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/50.jpg)
Environment + Scalar Occlusion
![Page 51: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/51.jpg)
Environment + Surf Response
![Page 52: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/52.jpg)
Procedural with Occlusion
![Page 53: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/53.jpg)
Procedural with Surface Response
![Page 54: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/54.jpg)
Surface Response
Environment Map + Surface Response
Due to power of SH representation
Surface Response can include:Self-shadowingInter-reflection: glows, causticsSubsurface scattering
![Page 55: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/55.jpg)
No Shadow
![Page 56: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/56.jpg)
Shadow
![Page 57: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/57.jpg)
Shadow + Inter-Reflection
![Page 58: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/58.jpg)
Glossy No Shadow
![Page 59: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/59.jpg)
Glossy Shadow
![Page 60: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/60.jpg)
Combination TechniqueCombination Technique
Models diffuse environment lightingModels diffuse environment lightingLike Debevec’sLike Debevec’s
Can produce moving shadowsCan produce moving shadowsLike horizon mapsLike horizon maps
But for arbitrary light envtBut for arbitrary light envtNot just single point lightNot just single point light
Analog of cone shadow modelAnalog of cone shadow modelUses basis to decide if in cone or notUses basis to decide if in cone or not
![Page 61: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/61.jpg)
Cool Techniques
Hemisphere LightingDiffuse soft lighting technique
Horizon MappingSelf-shadowing bump maps
Diffuse Environment MappingVery realistic diffuse lighting
Spherical Harmonic IlluminationDiffuse lighting + self-shadowing + inter-reflection + subsurface + …
![Page 62: Distributed Area Lighting](https://reader035.vdocuments.us/reader035/viewer/2022062423/56814e39550346895dbba14a/html5/thumbnails/62.jpg)
References
Spherical Harmonic Environment Mapping work Ravi Ramamoorthi, Hanrahan
http://graphics.stanford.edu
Spherical Harmonic Illumination Sloan, Kautz, Snyder SIGGRAPH 2002
http://research.microsoft.com/~ppsloan