Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Real-time Rendering & Graphics Hardware: Techniques and Algorithms - Prof. Pradeep Sen, Quizzes of Electrical and Electronics Engineering

An in-depth exploration of real-time rendering and graphics hardware, covering topics such as diffuse self-transfer, precomputation, transfer matrices, glossy rendering, local lighting using radiance sampling, light size vs. Sh order, and ray-tracing matrix columns. The document also discusses the importance of sparse matrix-vector multiplication and non-linear wavelet light approximation for efficient rendering.

Typology: Quizzes

Pre 2010

Uploaded on 07/23/2009

koofers-user-jhb-1
koofers-user-jhb-1 🇺🇸

1

(1)

10 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Real-time Rendering & Graphics Hardware
PradeepSen Class 17March 28, 2007
ECE 595 / CS 491 / CS 591
Real-Time Rendering &
Graphics Hardware
Pradeep Sen
Advanced Graphics Lab
Class 18
April 2, 2007 Real-time Rendering & Graphics Hardware
PradeepSen Class 17 –March 28, 2007
Pop-quiz
1. What is “radiance”? Define & give the units.
2. Suppose you integrate the incident radiance
over the hemisphere. What do you get?
Name and give the units.
3. What if you integrate the unit from #2 over
the area of the surface? What do you get?
Name and give the units.
Real-time Rendering & Graphics Hardware
PradeepSen Class 17 –March 28, 2007
Announcements
GFX Café this Friday will be given by Mike
Bispeck on the professional game
development process
Real-time Rendering & Graphics Hardware
PradeepSen Class 17 –March 28, 2007
Last time
Spherical harmonics, irradiance maps
Real-time Rendering & Graphics Hardware
PradeepSen Class 17 –March 28, 2007
Today
Pre-computed radiance transfer
Real-time Rendering & Graphics Hardware
PradeepSen Class 17 –March 28, 2007
Problem
The irradiance maps we talked about last
week
They only work for convex objects
Many objects are concave
Real-time Rendering & Graphics Hardware
PradeepSen Class 17 –March 28, 2007
Need to account for visibility
iiiioiroo dLfL
ωθωωωω
Ω
= cos)()()(
iiiioirioo dLfVL
ωθωωωωω
Ω
= cos)()()(()(
Real-time Rendering & Graphics Hardware
PradeepSen Class 17 –March 28, 2007
Example
unshadowedirradiance irradiance accounting for
self-shadowing
images Peter-Pike Sloan
Real-time Rendering & Graphics Hardware
PradeepSen Class 17 –March 28, 2007
PRT introduced by Sloan et al.
Sloan et al. “Precomputed Radiance
Transfer for Real-time rendering in Dynamic,
Low-frequency Lighting Environments”
SIGGRAPH 2002
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Real-time Rendering & Graphics Hardware: Techniques and Algorithms - Prof. Pradeep Sen and more Quizzes Electrical and Electronics Engineering in PDF only on Docsity!

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

ECE 595 / CS 491 / CS 591

Real-Time Rendering &

Graphics Hardware

Pradeep Sen Advanced Graphics Lab

Class 18April 2, 2007

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Pop-quiz 1.

What is “radiance”? Define & give the units.

Suppose you integrate the incident radianceover the hemisphere. What do you get?Name and give the units.

What if you integrate the unit from #2 overthe area of the surface? What do you get?Name and give the units.

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Announcements ƒ^

GFX Café this Friday will be given by MikeBispeck on the professional gamedevelopment process

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Last time ƒ^

Spherical harmonics, irradiance maps

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Today ƒ^

Pre-computed radiance transfer

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Problem ƒ^

The irradiance maps we talked about lastweek ƒ^

They only work for convex objects ƒ^

Many objects are concave

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Need to account for visibility

i i i i o i r o

o^

d

L

f

L

ω θ

ω

ω

ω

ω^

∫Ω

=^

cos) ( )

i i i i o i r i o

o^

d

L

f

V

L

ω θ ω ω ω ω

ω^

=^

cos) ( )

( )( (

) (

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Example

unshadowed irradiance

irradiance accounting for

self-shadowingimages Peter-Pike Sloan

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

PRT introduced by Sloan et al. ƒ^

Sloan et al. “Precomputed RadianceTransfer for Real-time rendering in Dynamic,Low-frequency Lighting Environments”SIGGRAPH 2002

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Basic Idea

( )

( )

( )

( ,

)

( )N

R v

L s V s

f s v H

s d s

=^ ∫

r^

r^

r^

r r

r^

r slide courtesy Peter-Pike Sloan

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Basic Idea

( )

( )

( )

( ,

)

( )N

R v

L s V s

f s v H

s d s

=^

r^

r^

r^

r r

r^

r slide courtesy Peter-Pike Sloan

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Basic Idea

slide courtesy Peter-Pike Sloan r ( )V s

( )

( )

( )

( ,

)

( )N

R v

L s V s

f s v H

s d s

=^ ∫

r^

r^

r^

r r

r^

r

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Basic Idea

slide courtesy Peter-Pike Sloan r ( )V s

( )

( )

( )

( ,

)

( )N

R v

L s V s

f s v H

s d s

=^ ∫

r^

r^

r^

r r

r^

r

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Basic Idea

slide courtesy Peter-Pike Sloan

( )

( )

( )

( ,

)

( )N

R v

L s V s

f s v H

s d s

=^

r^

r^

r^

r r

r^

r

r v

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Basic Idea

slide courtesy Peter-Pike Sloan

( )

( )

( )

( ,

)

( )N

R v

L s V s

f s v H

s d s

=^ ∫

r^

r^

r^

r r

r^

r

max(

N H

s^

s^

N
=^

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Basic Idea

( )

( ) i^ i

L s

l B

s

=^

r^

r

%

( )

( )

( )

( ,

)

( )N

R v

L s V s

f s v H

s d s

=^ ∫

r^

r^

r^

r r

r^

r slide courtesy Peter-Pike Sloan

(^

( )

( )

( )

( ,

)^

( )

i^ i^

N

R v

l B

s V s

f^

s v H

s d s

=^

r^

r^

r^

r r

r^

r

%

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

i i

R v

l t =^ ∑ r^

Basic Idea

( )

( ) i^ i

L s

l B

s

=^

r^

r

%

slide courtesy Peter-Pike Sloan

i^

i^

N

R v

l^

B^

s V s

f^

s v H

s d s

=^

∑ ∫ r^

r^

r^

r r

r^

r

Preprocess for all

i

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

i i

R v

l t =^ ∑ r^

Basic Idea

( )

( ) i^ i

L s

l B

s

=^ ∑

r^

r

%

slide courtesy Peter-Pike Sloan

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Glossy Rendering

T

pv

pv

p

r

b

M l

slide courtesy Peter-Pike Sloan

Lookup Lookupat Rat R

Freeze the view

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Glossy Rendering

T

pv

pv

p

r

b

M l

slide courtesy Peter-Pike Sloan

Lookup Lookupat Rat R

Freeze the view

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

T

pv

pv

p

r

b

M l

Glossy Rendering

slide courtesy Peter-Pike Sloan

Lookup Lookupat Rat R

Freeze the Light

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

T

pv

pv

p

r

b

M l

Glossy Rendering

slide courtesy Peter-Pike Sloan

LookupLookupat Rat R

Freeze the Light

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

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

slide courtesy Peter-Pike Sloan

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Interreflections and Caustics

*^

*^

(^
(^
|^
LS
S^
D G
P
LP

(^

|^
L D G
P

nonenone

1 bounce1 bounce

2 bounces2 bounces

causticscaustics

interreflectionsinterreflections

LGP

Transport PathsTransport Paths

slide courtesy Peter-Pike Sloan

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Runtime is independentRuntime is independentof transport complexityof transport complexity

Interreflections and Caustics

nonenone

1 bounce1 bounce

2 bounces2 bounces

causticscaustics

interreflectionsinterreflections

slide courtesy Peter-Pike Sloan

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

T

pv

pv

p^

p

r

b

R M l

Arbitrary BRDFs [Kautz02]

tran

p^

N

r^

v^

L^

s^

f v s H

s d s

=^

r^

r^

r r

r^

r

(^

p^

i^ i^

N

r^

v^

l y

s^

f v s H

s d s

=^

r^

r^

r r

r^

r

p^

i^

i^

N

r^

v^

l^

y^

s^

f v s H

s d s

=^

r^

r^

r r

r^

…… r

BRDF CoefficientsBRDF Coefficients

slide courtesy Peter-Pike Sloan

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

T

pv

pv

p^

p

r

b

R M l

Arbitrary BRDFs [Kautz02]

tran

p^

N

r^

v^

L^

s^

f v s H

s d s

=^

r^

r^

r r

r^

r

(^

p^

i^

i^

N

r^

v^

l y

s

f v s H

s d s

=^

r^

r^

r r

r^

r

p^

i^

i^

N

r^

v^

l^

y^

s^

f v s H

s d s

=^

r^

r^

r r

r^

…… r

BRDF CoefficientsBRDF Coefficients

slide courtesy Peter-Pike Sloan

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

T

pv

pv

p^

p

r

b

R M l

Arbitrary BRDFs [Kautz02]

tran

p^

N

r^

v^

L^

s^

f v s H

s d s

=^

r^

r^

r r

r^

r

(^
)^

p^

i^ i^

N

r^

v^

l y

s

f v s H

s d s

=^

r^

r^

r r

r^

r

p^

i^

i^

N

r^

v^

l^

y^

s^

f v s H

s d s

=^

r^

r^

r r

r^

…… r

BRDF CoefficientsBRDF Coefficients

slide courtesy Peter-Pike Sloan

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

T

pv

pv

p^

p

r

b

R M l

Arbitrary BRDFs [Kautz02]

tran

p^

N

r^

v^

L^

s^

f v s H

s d s

=^

r^

r^

r r

r^

r

(^

p^

i^ i^

N

r^

v^

l y

s^

f v s H

s d s

=^

r^

r^

r r

r^

r

p^

i^

i^

N

r^

v^

l^

y^

s^

f v s H

s d s

=^

r^

r^

r r

r^

…… r

BRDF CoefficientsBRDF Coefficients

slide courtesy Peter-Pike Sloan

==

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Arbitrary BRDF Results

Other BRDFs

Spatially Varying

Anisotropic BRDFs

slide courtesy Peter-Pike Sloan

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Neighborhood Transfer^ ƒ^

Allows to cast shadows/caustics onto arbitrary receivers ƒ^ Store how object scatters/blocks light around itself(transfer matrices on grid)


transfer matricestransfer matrices

transferred radiancetransferred radiance

receiverreceiver

lightinglighting

receiverreceiver

slide courtesy Peter-Pike Sloan

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Neighborhood Transfer Results ƒ^ 64x64x8 neighborhood ƒ^ diffuse receiver ƒ^ timings on 2.2Ghz P4,

ATI Radeon 8500 ƒ^

4fps if light changes ƒ^

120fps for constant light

slide courtesy Peter-Pike Sloan

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Volumes ƒ^

Diffuse volume: 32x32x32 grid ƒ^

Runs at 40fps on 2.2Ghz P4, ATI 8500 ƒ^

Here: dynamic lighting

slide courtesy Peter-Pike Sloan

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Local Lighting using Radiance Sampling ƒ Sample incident radiance at

multiple

points

ƒ^

Choose sample points over object using ICP from VQ ƒ^

single samplesingle sampleCorrect for shadows but not interreflections (at center = light at(at center = light at

∞∞ ))

multimulti-

-samplesampleresultresult

multimulti-

-samplesample locationslocations

slide courtesy Peter-Pike Sloan

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Light Size vs. SH Order 0 0°° 20 20°° 40 40°°

n=2n=2linearlinear

n=3n=3quadraticquadratic

n=4n=4cubiccubic

n=5n=5quarticquartic

n=6n=6quinticquintic

n=26n=

n=26n=26windowedwindowed

RTRT

slide courtesy Peter-Pike Sloan

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

PRT ƒ^

Now shipping in DirectX!

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Light-Transport Matrix Rows

11

12

1

21

22

2

31

32

3

1

2

M M M

N^

N^

NM

T^

T^

T

T^

T^

T

T^

T^

T

T^

T^

T

⎡^

⎢^

⎢^

⎢^

⎢^

⎢^

⎢^

⎣^

LLL

M^

M^

O

M

L

slide courtesy Ren Ng

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Light-Transport Matrix Rows

11

12

1

21

22

2

31

32

3

1

2

M M M

N^

N^

NM

T^

T^

T

T^

T^

T

T^

T^

T

T

T^

T

⎡^

⎢^

⎢^

⎢^

⎢^

⎢^

⎢^

⎣^

LLL

M^

M^

O

M

L

slide courtesy Ren Ng

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Light-Transport Matrix Rows

11

12

1

21

22

2

31

32

3

1

2

M M M

N^

N^

NM

T^

T^

T

T^

T^

T

T^

T^

T

T^

T^

T

⎡^

⎢^

⎢^

⎢^

⎢^

⎢^

⎢^

⎣^

LLL

M^

M^

O

M

L

slide courtesy Ren Ng

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Rasterizing Matrix Rows

Pre-computing rows: ƒ^ Rasterize visibilityhemicubes with graphicshardware ƒ^ Read back pixels andweight by reflectionfunction

slide courtesy Ren Ng

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Matrix Multiplication is Enormous ƒ^

Dimension– 512 x 512 pixel images– 6 x 64 x 64 cubemap environments ƒ^

Full matrix-vector multiplication is intractable– On the order of 10

10

operations

per frame

slide courtesy Ren Ng

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Sparse Matrix-Vector Multiplication

Choose data representations with mostly zeroesVector: Use

non-linear wavelet approximation on lighting

Matrix:

Wavelet-encode transport rows^11

12

1

1

21

22

2

2

31

32

3

1

2

M M M

N

N^

N^

NM

T^

T^

T^

L

T^

T^

T^

L

T^

T^

T

L

T^

T^

T

⎡^

⎤ ⎡^

⎢^

⎥ ⎢^

⎢^

⎥ ⎢^

⎢^

⎥ ⎢^

⎢^

⎥ ⎢^

⎢^

⎥ ⎣^

⎢^

⎣^

LLL

M

M^

M^

O

M L

slide courtesy Ren Ng

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Non-linear Wavelet Light Approximation

ƒ^

WaveletTransform

slide courtesy Ren Ng

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Non-linear Wavelet Light Approximation

ƒ^

WaveletTransform

slide courtesy Ren Ng

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Non-linear Wavelet Light Approximation

ƒ^

WaveletTransform

slide courtesy Ren Ng

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Non-linear Wavelet Light Approximation

ƒ^

WaveletTransform

slide courtesy Ren Ng

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Non-linear Wavelet Light Approximation

ƒ^

WaveletTransform

slide courtesy Ren Ng

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

L^1 L^2 L^3 L^4 L^5 L^6 L^ N
⎡^
⎢^
⎢^
⎢^
⎢^
⎢^
⎢^
⎢^
⎢^
⎢^
⎢^
⎢^
⎣^
M

Non-linear Wavelet Light Approximation

slide courtesy Ren Ng

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

L^1 L^2 L^3 L^4 L^5 L^6 L^ N
⎡^
⎢^
⎢^
⎢^
⎢^
⎢^
⎢^
⎢^
⎢^
⎢^
⎢^
⎢^
⎣^
0 L^2000 L^6 M 0
⎡^
⎢^
⎢^
⎢^
⎢^
⎢^
⎢^
⎢^
⎢^
⎢^
⎢^
⎢^
⎣^
M ⎦

Non-linear Wavelet Light Approximation

Non-linearApproximation

Retain 0.1% – 1% terms

slide courtesy Ren Ng

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Why Non-linear Approximation? ƒ^

Linear– Use a fixed set of approximating functions– Precomputed radiance transfer uses 25 - 100 of

the lowest frequency spherical harmonics ƒ^

Non-linear– Use a dynamic set of approximating functions

( depends on each frame’s lighting

)

  • In our case: choose 10’s - 100’s from a basis of 24,576 wavelets ƒ^

Idea: Compress lighting by considering input data

slide courtesy Ren Ng

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Why Wavelets?

ƒ^

Wavelets provide dual space / frequencylocality– Large wavelets capture low frequency,

area lighting

  • Small wavelets capture high frequency, compact features ƒ^

In contrast– Spherical harmonics

  • Perform poorly on compact lights
    • Pixel basis
      • Perform poorly on large area lights

slide courtesy Ren Ng

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Error in Lighting: St Peter’s Basilica

Approximation Terms

Error (%) 2 L Relative

Sph. Harmonics Non-linear Wavelets

slide courtesy Ren Ng

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Error in Output Image: Plant Scene

Approximation Terms

Error (%) 2 L Relative

Sph. Harmonics Non-linear Wavelets

slide courtesy Ren Ng

Real-time Rendering & Graphics Hardware Pradeep Sen

Class 17 – March 28, 2007

Output Image Comparison^ Top:

Linear Spherical Harmonic Approximation

Bottom:

Non-linear Wavelet Approximation

25

slide courtesy Ren Ng