• 沒有找到結果。

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!
7
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

Irradiance Environment Maps Irradiance Environment Maps Irradiance Environment Maps

Incident Radiance

(Illumination Environment Map)

Irradiance Environment Map

R N

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

Diffuse Reflection Diffuse Reflection Diffuse Reflection

Radiosity (image intensity)

Reflectance (albedo/texture)

Irradiance (incoming light)

= ×

quake light map

) ( ) ( )

,

( x n x E n

B = ρ

(2)

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

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

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 + …

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

( )

21

2 2

( 1) !

2 ( 2)( 1) 2 !

l

l l l

A l l even

l l

π

=

+ − ⎢

0 1 2

l

(3)

9 Parameter Approximation 9 Parameter Approximation 9 Parameter Approximation

-1

-2 0 1 2

0 1 2

( , ) Ylm θ ϕ

y z x

xy yz 3z21 zx x2y2 l

m

Exact image Order 0

1 term

RMS error = 25 %

9 Parameter Approximation 9 Parameter Approximation 9 Parameter Approximation

-1

-2 0 1 2

0 1 2

( , ) Ylm θ ϕ

y z x

xy yz 3z21 zx x2y2 l

m

Exact image Order 1

4 terms

RMS Error = 8%

9 Parameter Approximation 9 Parameter Approximation 9 Parameter Approximation

-1

-2 0 1 2

0 1 2

( , ) Ylm θ ϕ

y z x

xy yz 3z21 zx x2y2 l

m

Exact image Order 2

9 terms

RMS Error = 1%

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

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

θ φ

= ∑ ×

(4)

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∝ × ×

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 =

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)

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) ; }

(5)

Complex Geometry Complex Geometry Complex Geometry

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

y

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

Results Results Results 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

(6)

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

( ) 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 iPreprocess for all

s N

i 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 Basic idea B asic idea

Basis 16 Basis 16

Basis 17 Basis 17

Basis 18 Basis 18

illuminate

illuminate resultresult

.. .. . .

. .. .. .

Use 25 basesUse 25 bases

Precomputation Precomputation Precomputation

No Shadows/Inter Shadows

No Shadows/Inter Shadows Shadows+InterShadows+Inter

Diffuse Diffuse Diffuse

(7)

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

Arbitrary BRDF Arbitrary BRDF Arbitrary BRDF

Other BRDFs

Other BRDFs Spatially VaryingSpatially Varying Anisotropic BRDFs

Anisotropic BRDFs

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

參考文獻

相關文件

for Real - - Time Rendering in Dynamic, Time Rendering in Dynamic, Low Low - - Frequency Lighting Environments Frequency Lighting Environments. Peter-Pike Sloan, Microsoft

Efficient Image - - Based Methods Based Methods for Rendering Soft Shadows.. for Rendering

Efficient Image-Based Methods for Rendering Soft Shadows Efficient Image.. Efficient Image- -Based Methods Based Methods for Rendering Soft Shadows for Rendering

– During each time unit, the backlight device at none(C), low light display (DL), and high light display (HL) consumes E C , E DL , and E DH of energy, respectively.. • Of course

This hardware architecture be employed to encode dual-diagonal codes defined in both IEEE 802.16e and IEEE 802.11n standards without any matrix With low data dependency and

This is due to the equalization of more moments in the pdf of the noisy speech, which provides a better compensation of the mismatch caused by noise. Similarly, a

At the end, we detect the symmetry of blocks in the natural pictures, and identify the block whether is even or odd, and compute the Peak Signal-to-Noise Ratio

Galois symmetries of fundamental groupoids and noncommutative geometry.