All-Frequency Rendering of Dynamic, Spatially

advertisement
1
2
3
–
–
–
–
–
Dynamic lighting
Changeable viewpoint
All-frequency effects
Dynamic, editable, and spatially-varying materials
Dynamic, deformable scenes
4
• Modeling the complex reflectance of real world materials
• Integration over the whole hemisphere (cannot afford especially
when environment maps are used)
• Interreflection, shadows, …etc
5
Precomputed
Radiance
Transfer
Real-time
Ray-tracing
Wang et al. SIGGRAPH ‘09
Programmable
Graphics
Hardware
Ritschel
Dachsbacher
et al. SIGGRAPH
et al. SIGGRAPH
Asia ‘08
‘07
6
– The term comes from
– Precompute
L( x, o )  
4 
L(i )V ( x, i )[  (i , o ) max( i  n( x),0)]di
– Compress by
(SH, Wavelet, SRBF…)
– The computation of rendering equation reduces
to
in the run time
7
Triple Product
Ng et al. SIGGRAPH ‘03
Zhou et al. SIGGRAPH ‘05
Ng et al. SIGGRAPH ‘04
Wavelet
Dynamic
Scenes
02
03
04
05
Sloan et al. SIGGRAPH ‘05
Sloan et al. SIGGRAPH ‘02
Pioneer, SH
Sloan et al. SIGGRAPH ‘03
Wang et al. EGSR ‘04
In-Out
Fac.
CPCA
Lui et al. EGSR ‘04
8
BRDF-Editing
With G.I.
SVBRDF,
BRDF-Editing
Wang et al. SIGGRAPH Asia ‘09
Ben-Artzi et al. ACMTOG ‘08
Green et al. EGSR ‘07
Green et al. I3D ‘06 BRDF-Editing
Ben-Artzi et al. SIGGRAPH ‘06
SRBF
06
07
08
Ramamoorthi CG&V ‘09
Wang et al. ACMTOG ‘06 Sun et al. SIGGRAPH ‘07
BRDF-Editing
With G.I.
09
Xu et al. TVCG ‘08
Survey
CTA
Tsai et al. SIGGRAPH ‘06
9
– Compression
• PCA, Clustered PCA (CPCA), Clustered Tensor
Approximation (CTA) …
– Basis
•
•
•
•
Spherical harmonics (SH)
Wavelets
Zonal harmonics (ZH)
Spherical Radial Basis Function (SRBF)
10
– How to choose good basis for representation?
•
•
•
•
Can model all-frequency effects
Rotational invariant
Accuracy
Compact
Fit clamped cosine term to basis
Wang et al. SIGGRAPH Asia ‘09 – supplement materials
11
– A type of SRBF, symmetric around a specific lobe
axis
G(v; p,  ,  )  e (v p 1)
lobe axis
lobe amplitude
lobe sharpness
– All advantages in the previous page
– Inner product & cross product can be efficiently
computed
12
Single Lobe
Two Lobes
Multiple Lobes
n
F (v)   G (v; pi , i , i )
*
i 1
n
RF (v)   G (v; Rpi , i , i )
*
Rotated version
i 1
13
14
• Real-time
(editable, change with time),
BRDFs
• All-frequency effects from both environmental
and local point lights
15
• Propose two new representations for
and
to compact the size of data
• Accurate and compact
• Parametric BRDFs can be fit on-the-fly
• Fast rotation, warping, and products in run time
• Ghost-free, per-pixel interpolation
• Dynamic local point lights
17
• Decoupling BRDF from visibility
Represent
6D SVBRDF
Fit into SGs
4D NDF
Mixture of SGs
(Microfacet)
(Spherical Gaussians)
Map
PCA
Visibility
SSDF
(binary)
(Spherical Signed Distance Functions)
EigenVectors
18
19
• Microfacet Model
 (i , o ) 
D(h )G (i , o ) F (i , h )
4 cos i cos o
Normal Geometry
Distribution Term
Function
Fresnel
Term
• Why use microfacet model?
– General
20
• Reflectance representation using SGs
 (o, i)  M o (i) D(h)
remaining factor
(shadowing+Fresnel)
Very Smooth
NDF
High-Frequency
Fit into SGs
– Example: Cook-Torrance Model
M o (i) 
FCT (o, i) SCT (o, i)
 (n  i)( n  o)
D(h)  e
 (arccos(hn ) / m) 2
 G(h; n,2 / m2 ,1)
21
Cook-Torrance
m=0.1
Cook-Torrance
m=0.045
64-term
16-term
ground truth single-lobe SG 256-term
(this paper)
BRDF factorization
22
Ashikhmin-Shirley
nu=8,nv=128
Ashikhmin-Shirley
nu=25,nv=400
Ashikhmin-Shirley
nu=75,nv=1200
ground truth
7-lobe SG
(this paper)
256-term
64-term
BRDF factorization
23
– Parametric isotropic models
24
– Parametric anisotropic models
25
• Reflectance representation using SGs
• Using
shadowing factor S at each surface point
• Compress shadowing function by PCA (8D)
• Fit NDF with a small number of SGs
and
26
fabric
green
delrin
phenolic
yellow
albm
bronze
violet
acrylic
steel
ground
truth
1SG
2SG
3SG
256-Term
Fac.
64-Term
Fac.
27
– Measured BRDFs
28
29
• Spatially-varying visibility is represented with
– Directly interpolate binary visibilities will produce
ghost effects
– SSDF maps binary visibility to continuous function
30
– Positive: visible; negative: occluded
– Value: the
to the nearest direction
t on the shadow boundary
 min arccos(t  i), if V (i)  1;
V (i ) 
V ( t ) 0
 min arccos(t  i), if V (i)  0.
V ( t ) 1
31
Reconstructed Visibility
V ' (i ) 
1, if  (i) 

2
- d
0, otherwise
δ: elevation angle
Inner product / vector product of
SGs and V’(i) can be efficiently
evaluated in the run time!
32
• Compression
– Using PCA
Nv
Vx (i)  V j (i)wVx, j
j 1
PCA eigenvectors PCA coefficients
• PCA coefficients are stored as
and
Interpolated to each pixel during rasterization
• Eigenvectors are encoded in multiple textures
33
• Compression results
Ray-Traced
Uncompressed SSDF
SSDF/PCA 384 Terms
SSDF/PCA 144 Terms
SSDF/PCA 48 Terms
SSDF/PCA 16 Terms
34
35
– Approximated with a single-lobe SG
– Yielding a
lx
2r 2
s
l: 3D light position
1
L (i)  G(i;
, fa (
),
)
s: intensity
|| l  x ||
|| l  x ||2 || l  x ||2
*
x
L* (i )  G (i; I , f a1 (2r 2 ), s )
36
• Distant environmental lighting
– Apply to diffuse component
• [Tsai. et al. SIGGRAPH 2006]
– Apply to specular component
• Preconvolve environmental radiance with SG kernels
• The run-time inner product is reduced to a MIPMAP
texture fetch
• [Kautz et al. EGWR 2000], [McAllister et al. GH 2002],
[Green et al. I3D 2006]
37
38
– Position, texture coordinates, local coordinate
frame, PCA coefficient for SSDF
• BRDF parameters, tabulated SG lobes (for
measured BRDFs), and PCA-compressed
shadow factors are stored in textures
39
R(o)  kd Rd  ks Rs (o)
Rd   2 L(i)V (i) max( 0, i  n)di Rs (o)   2 L(i)  s (o, i)V (i) max( 0, i  n)di
S
S
Cosine
Approximation
C * (i; nx )  G (i; nx , c , c ), c  2.133, c  1.170
Lighting
Approximation
L* (i )
BRDF
Approximation
SGs for NDF
Visibility
Approximation
PCA coefficients
of SSDFs
Rd  (C * (i; nx )  L* (i )) Vxd (i )
Spherical Warp
Multiplied remaining factor
D* (h)  W * (i)
 s* (i; o)  M o (i )  W * (i )
Uncompressed
on GPU
Rs (o)  (C* (i; nx )  s*, x (i, o) Vxd (i))  L* (i)
40
41
42
• Per-vertex vs. per-pixel
wireframe
per-vertex shading
per-pixel shading
43
• Distant environmental light + nearby point
light
44
• Results for isotropic BRDFs
45
• Results for anisotropic BRDFs
46
• Video
47
• Solution for highly-specular, spatially varying,
dynamic materials, natural lighting, changeable
viewpoints realistic rendering
• Accurate and compact
• Fast rotation, warping, and products in run time
• Ghost-free, per-pixel interpolation
• Allow sparse set of per-vertex visibility samples
48
49
50
• Algorithm (diffuse)
– Express lighting as
L(i )   j 1  jY j (i )
( l *1) 2
– Reflection Equation becomes
L ( x)     Y ( )V ( x,  ) max(   n,0)d
o
j
j
4 
j
i
– Define
i
i
i
and project to SH
T j ( x)  
 4
Y j (i )V ( x, i )  max( i  n,0)di Transfer vector (diffuse)
Transfer Matrix (glossy)
– Rendering reduces to
Lo ( x )   j 1 jT j (i )
51
52
T ( x,  )  V ( x,  )  (, o ( x)) max( i  n( x),0)
Lo ( x )  iT ( x, i )L(i )
Lo  TL
Column:
Lighting direction
Lo
=
Li
Row:
Pixel or Vertex
53
• The dimension of
– 300000 x 25000 for a 512x512 image and 6 x 64 x
64 environment map
(How to preserve high-frequency shadow?)
are enough to generate
high-quality results (compared to 20000 with SH)
54
55
• Changeable view makes a
• Factor the BRDF and visibility, reduce 6D
function into
– For each spatial location and outgoing direction,
store 3 functions in cubemaps (Light, Visibility,
BRDF)
– Calculate
in run time
B ( x,  o )  
4
 L  ( ) V ( x) ( )  (n( x),  ) ( )d
j
j
j
i
k
k
k
i
l
l
o
l
i
i
  j k l L jVk  l   j (i ) k (i ) l (i )di
 4
  j k l C jkl L jVk  l
56
57
58
• Factor the BRDF into terms which depend only
on incident / outgoing angles
 (i , o )  k 1 k hk (o ) g k (i )
K
• We can then define and precompute a viewindependent transport function
Tk ( x, i )  V ( x, i ) g k (i ) max( i  n( x),0)
• Thus, rendering is reduced to
B( x, o )  k 1 k hk (o )
K
4
L(i )Tk ( x, i )di
59
– Triple product
• Pros: support true all-frequency effects
• Cons: performance
– BRDF in-out factorization
• Pros: speed and simple
• Cons: k can not be large, make it only suit for glossy or
broad specular lobes
60
61
62
• Real-Time BRDF Editing in Complex Lighting
– Ben-Artzi, Overbeck, Ramamoorthi
– SIGGRAPH 2006
63
• Fixed the scene, lighting, and viewpoint
• Write the BRDF as an expansion in terms of
basis functions, instead of lighting
 (i , o )   q (i , o ) f ( (i , o ))   q (i , o ) j 1 c j b j ( )
J
Fixed part
Editable part
64
65
Download