Interactive Hair Rendering and Appearance Editing under Environment Lighting
description
Transcript of Interactive Hair Rendering and Appearance Editing under Environment Lighting
Interactive Hair Rendering and Appearance Editing
under Environment Lighting
Kun Xu1, Li-Qian Ma1, Bo Ren1, Rui Wang2, Shi-Min Hu1
1Tsinghua University2University of Massachusetts
Hair Appearance Editing under Environment Lighting
• Motivation• hair appearance editing• Natural illumination
• Challenges• Light integration complexity
Related Works
• Hair scattering function/models
• Self Shadowing• deep shadow maps [Lokovic & Veach 2000]• opacity shadow maps [Kim & Neumann 2001]• density clustering [Mertens et al. 2004]• deep opacity maps [Yuksel & Keyser 2008]• occupancy maps [Sintorn & Assarson 2009]
[Kajiya & Kay 89] [Marschner 03] [Zinke & Webber 07] [Sadeghi 10] [d’Eon 11]
Related Works
• Multiple scattering• Photon Mapping [Moon & Marschner 2006]• Spherical Harmonics [Moon et al. 2008]• Dual Scattering [Zinke et al. 2008]
• Environment lighting [Ren 2010]• Model lighting using SRBFs• Precomputed light transport into
4D tables• Fix hair scattering properties
hair appearance editing under environment
lighting remains unsolved
Light Integration
𝐿 (𝜔𝑜 )=𝐷∫Ω
❑
𝐿 (𝜔𝑖 )𝑇 (𝜔𝑖 )𝑆(𝜔𝑖 ,𝜔𝑜)cos𝜃 𝑖 𝑑𝜔𝑖
Single scattering
• : environment lighting• : self shadowing• : hair scattering function
Light Integration
𝐿 (𝜔𝑜 )=𝐷∫Ω
❑
𝐿 (𝜔𝑖 )𝑇 (𝜔𝑖 )𝑆(𝜔𝑖 ,𝜔𝑜)cos𝜃 𝑖 𝑑𝜔𝑖
Single scattering
• Approximate by a set of SRBFs [Tsai and Shih 2006]
𝐿 (𝜔𝑜 )≈𝐷∫Ω
❑
(∑𝑗 𝑙 𝑗𝐺 𝑗 (𝜔𝑖 ))𝑇 (𝜔𝑖 )𝑆 (𝜔𝑖 ,𝜔𝑜)cos𝜃 𝑖𝑑𝜔𝑖𝐿 (𝜔𝑜 )≈𝐷∑𝑗𝑙 𝑗∫Ω
❑
𝐺 𝑗 (𝜔𝑖 )𝑇 (𝜔𝑖 )𝑆 (𝜔𝑖 ,𝜔𝑜 ) cos𝜃𝑖 𝑑𝜔 𝑖
Light Integration
Single scattering
• Approximate by a set of SRBFs [Tsai and Shih 2006]
• Move T out from the integral [Ren 2010]
𝐿 (𝜔𝑜 )≈𝐷∑𝑗𝑙 𝑗~𝑇∫
Ω
❑
𝐺 𝑗 (𝜔𝑖 )𝑆 (𝜔𝑖 ,𝜔𝑜 )cos𝜃 𝑖 𝑑𝜔𝑖𝐿 (𝜔𝑜 )≈𝐷∑𝑗𝑙 𝑗∫Ω
❑
𝐺 𝑗 (𝜔𝑖 )𝑇 (𝜔𝑖 )𝑆 (𝜔𝑖 ,𝜔𝑜 ) cos𝜃𝑖 𝑑𝜔 𝑖
Problem: evaluate scattering Integral
Single ScatteringIntegral
• Previous Approach [Ren 2010]• Precompute the integral into 4D table
• Our key insight • Is there an approximated analytic solution? • YES
• Decompose SRBF into products of circular Gaussians• Approximate scattering function by circular Gaussians
∫Ω
❑
𝐺 𝑗 (𝜔𝑖 )𝑆 (𝜔𝑖 ,𝜔𝑜 ) cos𝜃 𝑖𝑑𝜔𝑖
Circular Gaussian
• SRBF (Spherical Radial Basis Function)• Typically spherical Gaussian• Widely used in rendering
• Environment lighting [Tsai and Shih 2006]
• Light Transport [Green 2007]
• BRDF [Wang 2009]
• Circular Gaussian • 1D case of SRBF • Share all benefits of SRBFs
0.2
0.4
0.6
0.8
1
30
210
60
240
90
270
120
300
150
330
180 0
Circular Gaussian
𝑔𝑐 (𝑥 ;𝑢 , 𝜆 )=𝑒2 [cos (𝑥−𝑢)−1]
𝜆2
bandwidthcenter
• Useful Properties• Local approximation by Gaussian
, error < 1.3%,
• Closed on product
0.2
0.4
0.6
0.8
1
30
210
60
240
90
270
120
300
150
330
180 0
Circular Gaussian• SRBF Decomposition
1D Longitudinalcircular Gaussian
1D Azimuthalcircular Gaussian
= *
¿𝑔𝑐 (𝜃 𝑖 ;𝜃 𝑗 , 𝜆 𝑗 ) ⋅𝑔𝑐 (𝜙𝑖 ;𝜙 𝑗 ,𝜆 𝑗 /√cos𝜃𝑖𝑐𝑜𝑠𝜃 𝑗 )
2D SRBF
Scattering Function
• Sum of three modes: R, TT, TRT [Marschner03]
hair fiber longitudinal
angle
R mode: Reflection
(p=0)
TT Mode:Transmission-Transmission
(p=1)
TRT Mode:Transmission-Reflection-
Transmission (p=2)
tilted angle
Scattering Function
• Sum of three modes: R, TT, TRT [Marschner03]
hair fiber cross section azimuthal angle
R mode: Reflection
(p=0)
TT Mode:Transmission-Transmission
(p=1)
TRT Mode:Transmission-Reflection-
Transmission (p=2)
Scattering Function
• Definition [Marschner03]
Scattering Function
• Definition [Marschner03]
• Longitudinal function : normalized Gaussian
simulates specular reflection along longitudinal direction
Scattering Function
• Definition [Marschner03]
• Azimuthal function • Complex analytic functions• Different for each mode
– Fresnel reflection term– exponential attenuation term
Azimuthal Functions
• R mode
• Fresnel term (Schlick’s approximation)
• Approximated by polynomial of
Azimuthal Functions
• TT mode
• Simple shape: look like Gaussian• approximated by 1 circular Gaussian centered at
• Parameters fitted by preserving energy
𝜃𝑑=0 𝜃𝑑=𝜋6 𝜃𝑑=
𝜋3
TT mode approximation
• : coefficient • set as the peak value,
• : bandwidth• Preserving energy
𝑁 𝑇𝑇 (𝜙 )≈𝑏𝑇𝑇𝑔𝑐 (𝜙 ;𝜋 ,𝜆𝑇𝑇)
∫ 𝑁𝑇𝑇 (𝜙 )𝑑𝜙¿12 ∫ (1−F (𝜂 ,𝜃𝑑 , h ))2𝑇 (𝜎 𝑎
′ , h )𝑑 h• : fresnel reflection• : attenuation function
TT mode approximation
• : coefficient • set as the peak value,
• : bandwidth• Preserving energy
𝑁 𝑇𝑇 (𝜙 )≈𝑏𝑇𝑇𝑔𝑐 (𝜙 ;𝜋 ,𝜆𝑇𝑇)
∫ 𝑁𝑇𝑇 (𝜙 )𝑑𝜙¿12 ∫ (1−F (𝜂 ,𝜃𝑑 , h ))2𝑇 (𝜎 𝑎
′ , h )𝑑 h• : fresnel reflection• : attenuation function 4-th order Taylor expansion
¿12 ∫ (1−F (𝜂 ,𝜃𝑑 , h ))2( ∑
𝑘=0,2,4𝑎𝑘 (𝜃𝑑 ,𝜎𝑎 )h𝑘)𝑑 h¿
12 ∑𝑘=0,2,4
𝑎𝑘 (𝜃𝑑 ,𝜎𝑎 )∫ (1−F (𝜂 ,𝜃𝑑 , h ))2h𝑘 h𝑑
Precompute into 2D tables
Azimuthal Functions• TRT mode:
• Shape: sum of Circular Gaussians • : approximated by 3 circular Gaussians• approximated by 1 circular Gaussian
• Fitted by preserving energy similar as TT mode
𝜃𝑑=0 𝜃𝑑=𝜋6 𝜃𝑑=
𝜋3
Single ScatteringIntegral
• =: SRBF decomposition• : scattering func. def.
Circular Gaussian
Circular Gaussian Gaussian Cosine /
Circular Gaussian
Analytic Integral
Light Integration
Multiple scattering
𝐿 (𝜔𝑜 )≈𝐷∑𝑗𝑙 𝑗𝑇 𝑓∫
Ω
❑
ψ (⋅ )𝑆𝐷 (𝜔𝑖 ,𝜔𝑜 ) cos𝜃 𝑖 𝑑𝜔𝑖[Ren 2010]
• Spread function: • BCSDF: [Zinke 2010]
• Approximate scattering function similarly
Analytic Integral
Results
Results
Results
Performance
hair model #fibers #segments FPSanimation 10K 270K 8.3ponytail 6K 100K 8.9natural 10K 1.6M 4.8
• Testing Machine• Intel Core 2 Duo 3.00 GHz CPU, 6 GB RAM NVIDIA
GTX 580• 720 * 480 with 8x antialias
Conclusion
• 1D circular Gaussian• Accurate and compact for representing hair
scattering functions• Closed form integral with SRBF lights
• New effects • interactive hair appearance editing under
environment lighting • Rendering of spatially varying hair scattering
parameters under environment lighting
Future works
• View transparency effects [Sintorn and Assarsson 2009]
• Other hair scattering models• Artist friendly model [Sadeghi 2010]
• Energy conserving model [d’Eon 2011]
• Near-field light sources• Accelerate off-line hair rendering
Acknowledgement
• Anonymous Siggraph and Siggraph Asia reviewers • Ronald Fedkiw, Cem Yuksel, Arno Zinke, Steve
Marschner • Sharing their hair data
• Zhong Ren• Useful discussion
Thank you for your attention.
Circular Gaussian vs Gaussian• 1D Circular Gaussian
• Defined on unit circle :
• 1D Gaussian • Defined on x-axis
Single ScatteringIntegral
N 𝒕 (⋅ )=∫❑
❑
𝑁 𝑡 (𝜙𝑖−𝜙𝑜 )𝑔𝑐 (𝜙 𝑖 )𝑑𝜙 𝑖
• =: SRBF seperation• : scattering func. def.• Two dimensional integral over and
¿∑∫𝜃𝑖
❑
𝑔𝑐 (𝜃𝑖)𝑀 𝑡 (𝜃h )cos2𝜃𝑖
cos2𝜃𝑑N𝒕 (⋅ )𝑑𝜃𝑖 Outer integral
inner integral:
Inner Integral R Mode• Hair scattering function approx.
• polynomial of : • Inner integral
Precompute into 2D tables
Inner IntegralTT & TRT modes• Hair scattering function approx.
• sum of circular Gaussians : • Inner integral
Analytic Integral
N 𝒕 (⋅ )≈∑ 𝑏𝑘∫❑
❑
𝑔𝑐(𝜙 𝑖−𝜙𝑜 ;𝜙𝑘 ,𝜆𝑘)𝑔𝑐 (𝜙 𝑖 ;𝜙 𝑗 ,𝜆 𝑗 )𝑑𝜙𝑖
Outer Integral
Piecewise Linear approximation
Smooth FunctionGaussian
Analytic Integral
Summary ofSingle Scattering • Hair scattering function approximation
• R mode: polynomial of cosine • TT/TRT mode: circular Gaussian
• Inner integral• R mode: 2D tables • TT/TRT mode: 2D tables, analytic integral
• Outer integral• Piecewise linear approximation for smooth func.• Analytic integral.