graphics graphics lab @ korea university cgvr.korea.ac.kr illumination model 고려대학교...

43
Graphics Graphics Lab @ Korea University Illumination Model 고고고고고 고고고 고고고고 고고고

Upload: elizabeth-simon

Post on 17-Dec-2015

222 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

Graphics

Graphics Lab @ Korea University

Illumination Model

고려대학교 컴퓨터 그래픽스 연구실

Page 2: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Illumination

How do We Compute Radiance for a Sample Ray? Must derive computer models for ...

Emission at light sources Scattering at surfaces Reception at the camera

Wireframe WithoutIllumination

DirectIllumination

Page 3: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Overview

Direct Illumination Emission at light sources Scattering at surfaces

Global Illumination Shadows Refractions Inter-object reflections

Direct Illumination

Page 4: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Overview

Direct Illumination Emission at light sources Scattering at surfaces

Global Illumination Shadows Refractions Inter-object reflections

Direct Illumination

Page 5: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Modeling Light Source

IL(x,y,z,) Describes the intensity of energy, Leaving a light source Arriving at location(x,y,z) From direction () With wavelength

Page 6: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Empirical Model

Ideally Measure Irradiant Energy for “All” Situations Too much storage Difficult in practice

Page 7: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Light Source Model

Simple Mathematical Models: Point light Directional light Spot light

Page 8: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Point Light Source

Models Omni-Directional Point Source (E.g., Bulb) Intensity (I0)

Position (px, py, pz) Factors (kc, kl, kq) for attenuation with distance (d)

2q1c

0

kkk

I

ddIL

2q1c

0

kkk

I

ddIL

Page 9: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Directional Light Source

Models Point Light Source at Infinity (E.g., Sun) Intensity (I0)

Direction (dx,dy,dz)

No attenuationwith distance 0ILI 0ILI

Page 10: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Spot Light Source

Models Point Light Source with Direction (E.g., Luxo) Intensity (I0),

Position (px, py, pz) Direction (dx, dy, dz) Attenuation

2

q1c

0

kkk

LDI

ddIL

2

q1c

0

kkk

LDI

ddIL

Page 11: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Overview

Direct Illumination Emission at light sources Scattering at surfaces

Global Illumination Shadows Refractions Inter-object reflections

Direct Illumination

Page 12: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Modeling Surface Reflection

Rs(,) Describes the amount of incident energy Arriving from direction () Leaving in direction (,) With wavelength

Page 13: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Empirical Model

Ideally Measure Radiant Energy for “All” Combinations of Incident Angles Too much storage Difficult in practice

Page 14: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Reflectance Model

Simple Analytic Model: Diffuse reflection + Specular reflection + Emission + “Ambient”

Based on modelproposed by Phong

Based on modelproposed by Phong

Page 15: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Reflectance Model

Simple Analytic Model: Diffuse reflection + Specular reflection + Emission + “Ambient”

Based on modelproposed by Phong

Based on modelproposed by Phong

Page 16: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Diffuse Reflection

Assume Surface Reflects Equally in All Directions Examples: chalk, clay

Page 17: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Diffuse Reflection

How Much Light is Reflected? Depends on angle of incident light dLdAcos

Page 18: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Diffuse Reflection

Lambertian Model Cosine law (dot product)

LDD IKI LN LDD IKI LN

Page 19: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Reflectance Model

Simple Analytic Model: Diffuse reflection + Specular reflection + Emission + “Ambient”

Based on modelproposed by Phong

Based on modelproposed by Phong

Page 20: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Specular Reflection

Reflection is Strongest Near Mirror Angle Examples: mirrors, metals

Page 21: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Specular Reflection

How Much Light is Seen? Depends on angle of incident light and angle to

viewer

Page 22: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Specular Reflection

Phong Model {cos()}n

Ln

SS IKI RV Ln

SS IKI RV

Page 23: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Reflectance Model

Simple Analytic Model: Diffuse reflection + Specular reflection + Emission + “Ambient”

Based on modelproposed by Phong

Based on modelproposed by Phong

Page 24: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Emission

Represents Light Emitting Directly From Polygon

Emission ≠ 0Emission ≠ 0

Page 25: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Reflectance Model

Simple Analytic Model: Diffuse reflection + Specular reflection + Emission + “Ambient”

Based on modelproposed by Phong

Based on modelproposed by Phong

Page 26: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Ambient Term

Represents Reflection of All Indirect Illumination

This is a total hack (avoids complexity of global illumination)!

Page 27: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Reflectance Model

Simple Analytic Model: Diffuse reflection + Specular reflection + Emission + “Ambient”

Page 28: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Reflectance Model

Simple Analytic Model: Diffuse reflection + Specular reflection + Emission + “Ambient”

Page 29: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Reflectance Model

Sum Diffuse, Specular, Emission, and Ambient

Page 30: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Surface Illumination Calculation

Single Light Source:

Ln

SLDALAE IKILNKIKII RV Ln

SLDALAE IKILNKIKII RV

Page 31: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Surface Illumination Calculation

Multiple Light Sources:

i i

niSiiDALAE IKILNKIKII )RV(

i in

iSiiDALAE IKILNKIKII )RV(

Page 32: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Overview

Direct Illumination Emission at light sources Scattering at surfaces

Global Illumination Shadows Refractions Inter-object reflections

Global Illumination

Page 33: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Global Illumination

Page 34: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Shadows

Shadow Terms Tell Which Light Sources are Blocked Cast ray towards each light source Li

Si = 0 if ray is blocked, Si = 1 otherwise

L LL

nSDAAE ISKLNKIKII )RV(

L LLn

SDAAE ISKLNKIKII )RV(

ShadowTerm

Page 35: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Ray Casting

Trace Primary Rays from Camera Direct illumination from unblocked lights only

L LL

nSDAAE ISKLNKIKII )RV(

L LLn

SDAAE ISKLNKIKII )RV(

Page 36: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Recursive Ray Tracing

Also Trace Secondary Rays from Hit Surfaces Global illumination from mirror reflection and

transparency

TTRSL LLn

SDAAE IKIKISKLNKIKII )RV( TTRSL LLn

SDAAE IKIKISKLNKIKII )RV(

Page 37: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Mirror Reflection

Trace Secondary Ray in Direction of Mirror Reflection Evaluate radiance along secondary ray and include it into

illumination model

TTRSL LLn

SDAAE IKIKISKLNKIKII )RV( TTRSL LLn

SDAAE IKIKISKLNKIKII )RV(

Radiancefor mirror

reflection ray

Page 38: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Transparency

Trace Secondary Ray in Direction of Refraction Evaluate radiance along secondary ray and include it into

illumination model

TTRSL LLn

SDAAE IKIKISKLNKIKII )RV( TTRSL LLn

SDAAE IKIKISKLNKIKII )RV(

Radiance forrefraction ray

Page 39: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Transparency

Transparency coefficient is fraction transmitted KT = 1 if object is translucent, KT = 0 if object is opaque

0 < KT < 1 if object is semi-translucent

TTRSL LLn

SDAAE IKIKISKLNKIKII )RV( TTRSL LLn

SDAAE IKIKISKLNKIKII )RV(

TransparencyCoefficient

Page 40: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Refractive Transparency

For Thin Surfaces, Can Ignore Change in Direction Assume light travels straight through surface

LT LT

Page 41: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Refractive Transparency

For Solid Objects, Apply Snell’s Law: r sin risin i

ηN)coscos

η

η(T

r

iri

r

i Lη

ηN)coscos

η

η(T

r

iri

r

i

Page 42: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Summary

Direct Illumination Ray casting Usually use simple analytic approximations for light

source emission and surface reflectance

Global illumination Recursive ray tracing Incorporate shadows, mirror reflections,

and pure refractions

Page 43: Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

CGVR

Graphics Lab @ Korea University

Illumination Terminology

Radiant power [flux] (Φ) Rate at which light energy is transmitted (in Watts).

Radiant Intensity (I) Power radiated onto a unit solid angle in direction( in Watt/sr)

e.g.: energy distribution of a light source (inverse square law)

Radiance (L) Radiant intensity per unit projected surface area( in Watts/m2sr)

e.g.: light carried by a single ray (no inverse square law)

Irradianc (E) Incident flux density on a locally planar area (in Watts/m2 )

Radiosity (B) Exitant flux density from a locally planar area ( in Watts/m2 )