





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
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
1 / 9
This page cannot be seen from the preview
Don't miss anything!
Real-time Rendering & Graphics Hardware Pradeep Sen
Class 17 – March 28, 2007
ECE 595 / CS 491 / CS 591
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
f
ω θ
ω
ω
ω
ω^
∫Ω
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^
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^
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
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
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
slide courtesy Peter-Pike Sloan
Lookup Lookupat Rat R
Freeze the Light
Real-time Rendering & Graphics Hardware Pradeep Sen
Class 17 – March 28, 2007
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
*^
*^
(^
nonenone
1 bounce1 bounce
2 bounces2 bounces
causticscaustics
interreflectionsinterreflections
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
Arbitrary BRDFs [Kautz02]
tran
p^
N
r^
v^
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 BRDFs [Kautz02]
tran
p^
N
r^
v^
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 BRDFs [Kautz02]
tran
p^
N
r^
v^
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 BRDFs [Kautz02]
tran
p^
N
r^
v^
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
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
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
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
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
Non-linear Wavelet Light Approximation
slide courtesy Ren Ng
Real-time Rendering & Graphics Hardware Pradeep Sen
Class 17 – March 28, 2007
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
)
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
In contrast– Spherical harmonics
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