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

Post on 17-Dec-2015

222 Views

Category:

Documents

4 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Graphics

Graphics Lab @ Korea University

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

CGVR

Graphics Lab @ Korea University

Overview

Direct Illumination Emission at light sources Scattering at surfaces

Global Illumination Shadows Refractions Inter-object reflections

Direct Illumination

CGVR

Graphics Lab @ Korea University

Overview

Direct Illumination Emission at light sources Scattering at surfaces

Global Illumination Shadows Refractions Inter-object reflections

Direct Illumination

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

CGVR

Graphics Lab @ Korea University

Empirical Model

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

CGVR

Graphics Lab @ Korea University

Light Source Model

Simple Mathematical Models: Point light Directional light Spot light

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

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

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

CGVR

Graphics Lab @ Korea University

Overview

Direct Illumination Emission at light sources Scattering at surfaces

Global Illumination Shadows Refractions Inter-object reflections

Direct Illumination

CGVR

Graphics Lab @ Korea University

Modeling Surface Reflection

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

CGVR

Graphics Lab @ Korea University

Empirical Model

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

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

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

CGVR

Graphics Lab @ Korea University

Diffuse Reflection

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

CGVR

Graphics Lab @ Korea University

Diffuse Reflection

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

CGVR

Graphics Lab @ Korea University

Diffuse Reflection

Lambertian Model Cosine law (dot product)

LDD IKI LN LDD IKI LN

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

CGVR

Graphics Lab @ Korea University

Specular Reflection

Reflection is Strongest Near Mirror Angle Examples: mirrors, metals

CGVR

Graphics Lab @ Korea University

Specular Reflection

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

viewer

CGVR

Graphics Lab @ Korea University

Specular Reflection

Phong Model {cos()}n

Ln

SS IKI RV Ln

SS IKI RV

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

CGVR

Graphics Lab @ Korea University

Emission

Represents Light Emitting Directly From Polygon

Emission ≠ 0Emission ≠ 0

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

CGVR

Graphics Lab @ Korea University

Ambient Term

Represents Reflection of All Indirect Illumination

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

CGVR

Graphics Lab @ Korea University

Reflectance Model

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

CGVR

Graphics Lab @ Korea University

Reflectance Model

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

CGVR

Graphics Lab @ Korea University

Reflectance Model

Sum Diffuse, Specular, Emission, and Ambient

CGVR

Graphics Lab @ Korea University

Surface Illumination Calculation

Single Light Source:

Ln

SLDALAE IKILNKIKII RV Ln

SLDALAE IKILNKIKII RV

CGVR

Graphics Lab @ Korea University

Surface Illumination Calculation

Multiple Light Sources:

i i

niSiiDALAE IKILNKIKII )RV(

i in

iSiiDALAE IKILNKIKII )RV(

CGVR

Graphics Lab @ Korea University

Overview

Direct Illumination Emission at light sources Scattering at surfaces

Global Illumination Shadows Refractions Inter-object reflections

Global Illumination

CGVR

Graphics Lab @ Korea University

Global Illumination

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

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(

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(

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

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

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

CGVR

Graphics Lab @ Korea University

Refractive Transparency

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

LT LT

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

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

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 )

top related