# brdf_decompose

Document Sample

```					Interactive Rendering with
Arbitrary BRDFs
using Separable
Approximations
WARNING!!!!!

THIS PAPER IS VERY HARD!
BUT…

YOU CAN HANDLE IT!
Agenda
•   Introduction
•   Why we need BRDFs
•   Separable Representations
•   Decompositions Algorithms
– SVD
– ND
•   Parameterizations
•   Implementation
•   Examples
•   Issues
•   Conclusion
Introduction
Application for Interactive
Rendering of BRDFs
• Discussion Question
– Color Shifting Automotive Paint
BDRF
•   Arbitrary
– Good
•   Can obtain any surface reflection with a
Gonio Spectrophotometer
– Professor Gary Meyer
•   4 Dimensional
•   128x128x128x128*4 = 1 Gig of memory
– Not good
Decompositions Algorithms
• Goal is to reduce the size of the BRDF
• Converts the 4 dimensional BRDF to the
sum of products of 2 dimensional functions
• SVD Decomposition
• Normalized Decomposition
SVD Decomposition
• Given a NxN matrix M
• M = U*S*VT
• S is diagonal       N
M    k u k vk
T

k 1

or
N
F ( i ,  i ,  o ,  o )    k hk ( i ,  i )*g k ( o ,  o )
k 1

1   2   3
A little example
M  USV T 
 a * l *  1  b *o *  2  c *r *  3     a * m *  1  b * p *  2  c * s*  3   a * n *  1  b *q *  2  c * t*  3 
d * l *   e *o *   f *r *             d * m *  1  e * p *  2  f * s*  3   d * n *  1  e *q *  2  f * t*  3 
          1            2              3                                                                                   
 g * l *  1  h *o *  2  i *r *  3
                                           g * m *  1  h * p *  2  i * s*  3   g * n *  1  h *q *  2  i * t*  3 


a b    c   1 0       0   l m n
d e    f  0  2       0  o p q 
                                
g h
       i  0 0
             3  r s t 
       

 a 0 0  1       0 0   l m n  0 b 0   0 0                   0 0    0 0  0 0          c  0 0 0  0 0 0 
 d 0 0  0        0 0   0 0 0   0 e 0   0  2               0  o   p q   0 0        f  0 0 0  0 0 0 
                                                                                                        
 g 0 0  0
                 0 0   0 0 0  0 h 0   0 0
                                       0 0
     0 0  0 0
              i  0 0  3   r s t 
                 
To Compress
Since the  values are decreasing, the  ' s are in order of importance
(the most important being  1 ).
If the matrix is highly separable, only one term is necessary!

a       0 0  1   0 0  l m n 
M   SUV T  d
        0 0  0
       0 0  0 0 0 
       
g
        0 0  0
       0 0  0 0 0 
       
Mapping A 4D Function to
a single 2D Matrix

• Create a 2d matrix of size (N^2) x (N^2) instead of 4d of
size NxNxNxN
• Same size as original
• One dimension fixes the incident light
• One dimension fixes the view direction
• 2d you can use common 2d algorithms (remember this in
the future)
Use imagination
You end up with a matrix like this
Getting back from the huge matrix
Resulting Hemisphere Texture
Maps
So…. To evaulate the BDRF
• Just look in the textures
F ( i ,  i ,  o ,  o )   k hk ( i ,  i )*g k ( o ,  o )
Problems With SVD
• Memory does not scale nicely (N^4)
– 64 samples requires 67 Megs
– 128 requires 1 Gig
– Less makes too many artifacts
– (but once computed, it will render fast)
• Must Complete full Approximation
• Always Finds RMS (root mean squared)
error
Normalized Decomposition
Normalized Decomposition
• SVD is too expensive to compute high
resolution textures
• ND requires only the output textures as
memory
• One term of ND is about as good as SVD
Separability
• The parameterization
of the BRDF can
affect separability.
• No one
parameterization
works well for all
BRDFs
• Must be compatible
with linear
interpolation found on
graphics hardware.
Parameterizations
•   Incident/View:
– Easy to calculate
– Poor separability for most BRDFs
– Suitable for hardware interpolation
•   Elevation/Azimuth:
– Easy to calculate
– Good separability for many BRDFs
– Not suitable for hardware interpolation (periodicity)
•   Gram-Schmidt:
– Good separability
– Suitable for hardware interpolation

•   Single rotation, Rusinkiewicz, others…
Implementation
• Represent G() and H() as 2d textures
• cubemaps if your hardware supports them
• nVidia’s example code runs on NVIDIA TNT,
TNT2, GeForce, GeForce2
– Take the two textures or scaling value representing a
G() and H() and Sigma
– Computing the texture coordinates at each vertex of
the model
– Set the register combiner state to appropriately
– Setup multitexturing for reconstructing the BRDF
approximation on a per-pixel basis.
Examples
Design the BRDF
nVidia’s BRDF viewer
works with low polygon models
issues
• Banding
• Dynamic Range
• No single parameterization works well for
all
• Decomposition takes time
• BTF? (bi-directional texture function)
Conclusion
•   Separable Representations:
•   Highly Compressed N^4 to k*N^2 +k
•   Implementable in hardware
•   Decomposition:
•   Singular value decomposition
•   Normalized decomposition
•   Parameterization:
•   Affects separability
•   Many BRDFs separable under suitable parameterizations
•   Implementation:
•   Using texture mapping, compositing
•   Linear interpolation of texture coordinates
•   Not all parameterizations have desired properties

```
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
 views: 50 posted: 3/7/2008 language: English pages: 29