Top Banner
Distributed Area Lighting Distributed Area Lighting Joon Jae Lee Joon Jae Lee Keimyung University Keimyung University
62

Distributed Area Lighting

Jan 19, 2016

Download

Documents

paxton

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 Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Distributed Area Lighting

Distributed Area LightingDistributed Area Lighting

Joon Jae LeeJoon Jae Lee

Keimyung UniversityKeimyung University

Page 2: Distributed Area Lighting

OverviewOverview

MotivationMotivation

Compact LightsCompact Lights

Distributed LightsDistributed Lights

Page 3: Distributed Area Lighting

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

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

ShadowingShadowing

Cast shadowsCast shadows

Self shadowingSelf shadowing

Page 6: Distributed Area Lighting

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

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

Environment map typesEnvironment map types

CubeCube

LonLatLonLat

HemisphereHemisphere

ParaboloidParaboloid

Dual paraboloidDual paraboloid

Spherical HarmonicsSpherical Harmonics

etc.etc.

Page 9: Distributed Area Lighting

Hardware Environment MapsHardware Environment Maps

see Debevecsee Debevec

Facilitated by next generation Facilitated by next generation hardwarehardware

Page 10: Distributed Area Lighting

Model ElementsModel Elements

Sky Color

Final ColorFinal Color

Ground ColorGround Color

Hemisphere ModelHemisphere Model

Page 11: Distributed Area Lighting

Diffuse Envt Mapped BunnyDiffuse Envt Mapped Bunny

Page 12: Distributed Area Lighting

Diffuse Environment Mapped HeadDiffuse Environment Mapped Head

Page 13: Distributed Area Lighting

Distributed Light ModelDistributed Light Model

Hemisphere of possible incident light directions

Surface Normal

Microfacet Normal - defines axis of hemisphere

Page 14: Distributed Area Lighting

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

Procedural Hemisphere Map

Page 16: Distributed Area Lighting

Procedural Diffuse MapsProcedural Diffuse Maps

Hemisphere LightingHemisphere Lighting

Spherical Harmonic LightingSpherical Harmonic Lighting

Page 17: Distributed Area Lighting

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

2-Hemisphere Model2-Hemisphere Model

Sky Color

Ground Color

Page 19: Distributed Area Lighting

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

Distributed Light ModelDistributed Light Model

Hemisphere of possible incident light directions

Microfacets

Other facets can shadow this one: Occlusion

Page 21: Distributed Area Lighting

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

Ray Cast Occlusion ModelRay Cast Occlusion Model

Microfacet

Some rays hit this object, others miss it

Page 23: Distributed Area Lighting

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

Model ElementsModel Elements

Sky Color

Final ColorFinal Color

Ground ColorGround Color

Object ColorObject Color Sphere Model

Occlusion Factor

Page 25: Distributed Area Lighting

Occlusion Factor AbsentOcclusion Factor Absent

Page 26: Distributed Area Lighting

Occlusion Factor PresentOcclusion Factor Present

Page 27: Distributed Area Lighting

Occlusion Factor AbsentOcclusion Factor Absent

Page 28: Distributed Area Lighting

Occlusion Factor PresentOcclusion Factor Present

Page 29: Distributed Area Lighting

Occlusion Factor AbsentOcclusion Factor Absent

Page 30: Distributed Area Lighting

Occlusion Factor Present

Page 31: Distributed Area Lighting

Lightwave Image

Page 32: Distributed Area Lighting

Hi-Res

Page 33: Distributed Area Lighting

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

Pixel Occlusion

Page 35: Distributed Area Lighting

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

Occlusion Cone ModelOcclusion Cone Model

Surface Normal

Fit cone to horizon between hits and misses

Ang

Axis

Page 37: Distributed Area Lighting

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

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

Standard Bump Map Standard Bump Map

Page 40: Distributed Area Lighting

Horizon Map ShadowsHorizon Map Shadows

Page 41: Distributed Area Lighting

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

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

Spherical Harmonics

Page 44: Distributed Area Lighting

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

Buddha No Shadow

Page 46: Distributed Area Lighting

Environment + Scalar Occlusion

Page 47: Distributed Area Lighting

Procedural with No Shadow

Page 48: Distributed Area Lighting

Procedural with Occlusion

Page 49: Distributed Area Lighting

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

Environment + Scalar Occlusion

Page 51: Distributed Area Lighting

Environment + Surf Response

Page 52: Distributed Area Lighting

Procedural with Occlusion

Page 53: Distributed Area Lighting

Procedural with Surface Response

Page 54: Distributed Area Lighting

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

No Shadow

Page 56: Distributed Area Lighting

Shadow

Page 57: Distributed Area Lighting

Shadow + Inter-Reflection

Page 58: Distributed Area Lighting

Glossy No Shadow

Page 59: Distributed Area Lighting

Glossy Shadow

Page 60: Distributed Area Lighting

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

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

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