• 沒有找到結果。

An Efficient Representation for Irradiance Environment Maps An Efficient Representation for An Efficient Representation for

N/A
N/A
Protected

Academic year: 2022

Share "An Efficient Representation for Irradiance Environment Maps An Efficient Representation for An Efficient Representation for "

Copied!
27
0
0

加載中.... (立即查看全文)

全文

(1)

An Efficient Representation for Irradiance Environment Maps An Efficient Representation for An Efficient Representation for

Irradiance Environment Maps Irradiance Environment Maps

Ravi Ramamoorthi Ravi Ramamoorthi Pat Hanrahan Pat Hanrahan

Stanford University SIGGRAPH 2001 Stanford University

SIGGRAPH 2001

(2)

Irradiance Environment Maps Irradiance Environment Maps Irradiance Environment Maps

Incident Radiance

(Illumination Environment Map)

Irradiance Environment Map

R N

(3)

Assumptions Assumptions Assumptions

• Diffuse surfaces

• Distant illumination

• No shadowing, interreflection

Hence, Irradiance is a function of surface normal

• Diffuse surfaces

• Distant illumination

• No shadowing, interreflection

Hence, Irradiance is a function of surface normal

Ω

=

) (

) )(

( )

(

n

n

n L ω ω d ω

E

(4)

Diffuse Reflection Diffuse Reflection Diffuse Reflection

Radiosity

(image intensity)

Reflectance (albedo/texture)

Irradiance

(incoming light)

= ×

quake light map

) (

) (

) ,

( x n x E n

B = ρ

(5)

Computing Irradiance Computing Irradiance Computing Irradiance

• Classically, hemispherical integral for each pixel

• Lambertian surface is like low pass filter

• Frequency-space analysis

• Classically, hemispherical integral for each pixel

• Lambertian surface is like low pass filter

• Frequency-space analysis Incident

Radiance Irradiance

(6)

Spherical Harmonics Spherical Harmonics Spherical Harmonics

-1

-2 0 1 2

0

1

2

. . .

( , ) Y lm θ ϕ

y z x

xy yz 3 z

2

− 1 zx x

2

y

2

l

m

1

(7)

Spherical Harmonic Expansion Spherical Harmonic Expansion Spherical Harmonic Expansion

Expand lighting (L), irradiance (E) in basis functionsExpand lighting (L), irradiance (E) in basis functions

0

( , ) ( , )

l

lm lm

l m l

L θ φ

+

L Y θ φ

= =−

= ∑ ∑

0

( , ) ( , )

l

lm lm

l m l

E θ φ

+

E Y θ φ

= =−

= ∑ ∑

= .67 + .36 + …

(8)

Analytic Irradiance Formula Analytic Irradiance Formula Analytic Irradiance Formula

Lambertian surface acts like low-pass filter

Lambertian surface acts like low-pass filter

lm l lm

E = A L A

l

π

2 / 3π

π / 4 0

( )

2 1

2 2

( 1) !

2 ( 2)( 1) 2 !

l

l l l

A l l even

l l

π

=

+ − ⎢

0 1 2

l

(9)

9 Parameter Approximation 9 Parameter Approximation 9 Parameter Approximation

-1

-2 0 1 2

0 1 2

( , ) Ylm θ ϕ

y z x

xy yz 3z2 1 zx x2 y2 l

m

Exact image Order 0

1 term

RMS error = 25 %

(10)

9 Parameter Approximation 9 Parameter Approximation 9 Parameter Approximation

-1

-2 0 1 2

0 1 2

( , ) Ylm θ ϕ

y z x

xy yz 3z2 1 zx x2 y2 l

m

Exact image Order 1

4 terms

RMS Error = 8%

(11)

9 Parameter Approximation 9 Parameter Approximation 9 Parameter Approximation

-1

-2 0 1 2

0 1 2

( , ) Ylm θ ϕ

y z x

xy yz 3z2 1 zx x2 y2 l

m

Exact image Order 2

9 terms

RMS Error = 1%

For any illumination, average error < 3% [Basri Jacobs 01]

(12)

Computing Light Coefficients Computing Light Coefficients Computing Light Coefficients

Compute 9 lighting coefficients L

lm

• 9 numbers instead of integrals for every pixel

• Lighting coefficients are moments of lighting

• Weighted sum of pixels in the environment map

Compute 9 lighting coefficients L

lm

• 9 numbers instead of integrals for every pixel

• Lighting coefficients are moments of lighting

• Weighted sum of pixels in the environment map

2

0 0

( , ) ( , ) sin

lm lm

L L Y d d

π π

θ φ

θ φ θ φ θ θ φ

= =

= ∫ ∫

( , )

[ ] [ ]

lm lm

pixels

L envmap pixel basisfunc pixel

θ φ

= ∑ ×

(13)

Comparison Comparison Comparison

Incident illumination

300x300

Irradiance map Texture: 256x256

Hemispherical Integration 2Hrs

Irradiance map Texture: 256x256 Spherical Harmonic

Coefficients 1sec

Time 300 300 256 256 × × × Time 9 256 256∝ × ×

(14)

Rendering Rendering Rendering

• We have found the SH coefficients for irradiance which is a spherical function.

• Given a spherical coordinate, we want to calculate the corresponding irradiance quickly.

• We have found the SH coefficients for irradiance which is a spherical function.

• Given a spherical coordinate, we want to calculate the corresponding irradiance quickly.

) ,

ˆ ( )

, (

,

φ θ

φ

θ

lm lm

m l

l

L Y A

E =

(15)

Rendering Rendering Rendering

Irradiance approximated by quadratic polynomialIrradiance approximated by quadratic polynomial

2

4 00 2 11 2 1 1 2 10 5 2

2 2

0

1 2 2 1 21 1 2 1 1 22

1 (3 1

( ) 2 2 2

2 2 2 ( )

)

x y z z

x

E n c L c L c L c L c L

c L y c L xz c L yz c L x y

= + + + +

+ −

+

+ +

( )

t

E n = n Mn

1 x y z

⎛ ⎞⎜ ⎟

⎜ ⎟⎜ ⎟

⎜ ⎟⎜ ⎟

⎝ ⎠

Surface Normal vector column 4-vector

4x4 matrix (depends linearly on coefficients Llm)

(16)

Hardware Implementation Hardware Implementation Hardware Implementation

Simple procedural rendering method (no textures)

• Requires only matrix-vector multiply and dot-product

• In software or NVIDIA vertex programming hardware

Simple procedural rendering method (no textures)

• Requires only matrix-vector multiply and dot-product

• In software or NVIDIA vertex programming hardware

( ) t

E n = n Mn

surface float1 irradmat (matrix4 M, float3 v) { float4 n = {v , 1} ;

return dot(n , M*n) ; }

(17)

Complex Geometry Complex Geometry Complex Geometry

Assume no shadowing: Simply use surface normalAssume no shadowing: Simply use surface normal

y

(18)

Lighting Design Lighting Design Lighting Design

Final image sum of 3D basis functions scaled by Llm

Alter appearance by changing weights of basis functions

Final image sum of 3D basis functions scaled by Llm

Alter appearance by changing weights of basis functions

(19)

Results Results Results

(20)

Summary Summary Summary

Theory

• Analytic formula for irradiance

• Frequency-space: Spherical Harmonics

• To order 2, constant, linear, quadratic polynomials

• 9 coefficients (up to order 2) suffice

Practical Applications

• Efficient computation of irradiance

• Simple procedural rendering

• New representation, many applications

Theory

• Analytic formula for irradiance

• Frequency-space: Spherical Harmonics

• To order 2, constant, linear, quadratic polynomials

• 9 coefficients (up to order 2) suffice

Practical Applications

• Efficient computation of irradiance

• Simple procedural rendering

• New representation, many applications

(21)

Precomputed Radiance Transfer Precomputed Radiance Transfer

for Real

for Real - - Time Rendering in Dynamic, Time Rendering in Dynamic, Low Low - - Frequency Lighting Environments Frequency Lighting Environments

Peter-Pike Sloan, Microsoft Research Jan Kautz, MPI Informatik

John Snyder, Microsoft Research

SIGGRAPH 2002

(22)

( ) V sr

( ) i i ( ) L sr =%

l B sr

( )

( ) i i( ) ( ) ( , ) N ( ) R vr =%

∫ ∑

l B s V s f s v Hr r r r s d sr r

( )

i i

( ) ( ) ( , )

N

( )

R v r = % ∑ ∫ l B s V s f s v H r r r r s d s r r ( ) max( , 0)

H

N

s =

Preprocess for all Preprocess for all

s N

ii

vr

( ) ( ) ( ) ( , ) N ( ) R vr =

L s V s f s v Hr r r r s d sr r

( )

i i

R v r = %l t

Basic idea B B asic idea asic idea

(23)

Basis 16 Basis 16

Basis 17 Basis 17

Basis 18 Basis 18

illuminate

illuminate resultresult

... .. .

... .. .

UUse 25 basesse 25 bases

Precomputation Precomputation Precomputation

(24)

No Shadows/Inter Shadows

No Shadows/Inter Shadows Shadows+InterShadows+Inter

Diffuse Diffuse Diffuse

(25)

Glossy Glossy Glossy

No Shadows/Inter Shadows

No Shadows/Inter Shadows Shadows+InterShadows+Inter

Glossy object, 50K mesh

Runs at 3.6/16/125fps on 2.2Ghz P4, ATI Radeon 8500

(26)

Arbitrary BRDF Arbitrary BRDF Arbitrary BRDF

Other BRDFs

Other BRDFs Spatially VaryingSpatially Varying Anisotropic BRDFs

Anisotropic BRDFs

(27)

Volumes Volumes Volumes

• Diffuse volume: 32x32x32 grid

• Runs at 40fps on 2.2Ghz P4, ATI 8500

• Here: dynamic lighting

• Diffuse volume: 32x32x32 grid

• Runs at 40fps on 2.2Ghz P4, ATI 8500

• Here: dynamic lighting

參考文獻

相關文件

• The randomized bipartite perfect matching algorithm is called a Monte Carlo algorithm in the sense that.. – If the algorithm finds that a matching exists, it is always correct

• Similar to futures options except that what is delivered is a forward contract with a delivery price equal to the option’s strike price. – Exercising a call forward option results

Efficient Solution for More Driving Comfort and Safety, Robert

Receiver operating characteristic (ROC) curves are a popular measure to assess performance of binary classification procedure and have extended to ROC surfaces for ternary or

Large data: if solving linear systems is needed, use iterative (e.g., CG) instead of direct methods Feature correlation: methods working on some variables at a time (e.g.,

 Propose eQoS, which serves as a gene ral framework for reasoning about th e energy efficiency trade-off in int eractive mobile Web applications.  Demonstrate a working prototype and

language reference User utterances “Find me an Indian place near CMU.” language reference Meta data Monday, 10:08 – 10:15, Home contexts of the tasks..

In this chapter, a dynamic voltage communication scheduling technique (DVC) is proposed to provide efficient schedules and better power consumption for GEN_BLOCK