interactive hair rendering and appearance editing under environment lighting

36
Interactive Hair Rendering and Appearance Editing under Environment Lighting Kun Xu 1 , Li-Qian Ma 1 , Bo Ren 1 , Rui Wang 2 , Shi-Min Hu 1 1 Tsinghua University 2 University of Massachusetts

Upload: elma

Post on 14-Feb-2016

29 views

Category:

Documents


1 download

DESCRIPTION

Interactive Hair Rendering and Appearance Editing under Environment Lighting. Kun Xu 1 , Li- Qian Ma 1 , Bo Ren 1 , Rui Wang 2 , Shi-Min Hu 1 1 Tsinghua University 2 University of Massachusetts. Hair Appearance Editing under Environment Lighting. Motivation hair appearance editing - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 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

Page 2: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

Hair Appearance Editing under Environment Lighting

• Motivation• hair appearance editing• Natural illumination

• Challenges• Light integration complexity

Page 3: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

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]

Page 4: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

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

Page 5: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

Light Integration

𝐿 (𝜔𝑜 )=𝐷∫Ω

𝐿 (𝜔𝑖 )𝑇 (𝜔𝑖 )𝑆(𝜔𝑖 ,𝜔𝑜)cos𝜃 𝑖 𝑑𝜔𝑖

Single scattering

• : environment lighting• : self shadowing• : hair scattering function

Page 6: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

Light Integration

𝐿 (𝜔𝑜 )=𝐷∫Ω

𝐿 (𝜔𝑖 )𝑇 (𝜔𝑖 )𝑆(𝜔𝑖 ,𝜔𝑜)cos𝜃 𝑖 𝑑𝜔𝑖

Single scattering

• Approximate by a set of SRBFs [Tsai and Shih 2006]

𝐿 (𝜔𝑜 )≈𝐷∫Ω

(∑𝑗 𝑙 𝑗𝐺 𝑗 (𝜔𝑖 ))𝑇 (𝜔𝑖 )𝑆 (𝜔𝑖 ,𝜔𝑜)cos𝜃 𝑖𝑑𝜔𝑖𝐿 (𝜔𝑜 )≈𝐷∑𝑗𝑙 𝑗∫Ω

𝐺 𝑗 (𝜔𝑖 )𝑇 (𝜔𝑖 )𝑆 (𝜔𝑖 ,𝜔𝑜 ) cos𝜃𝑖 𝑑𝜔 𝑖

Page 7: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

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

Page 8: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

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𝜃 𝑖𝑑𝜔𝑖

Page 9: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

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

Page 10: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

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

Page 11: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

Circular Gaussian• SRBF Decomposition

1D Longitudinalcircular Gaussian

1D Azimuthalcircular Gaussian

= *

¿𝑔𝑐 (𝜃 𝑖 ;𝜃 𝑗 , 𝜆 𝑗 ) ⋅𝑔𝑐 (𝜙𝑖 ;𝜙 𝑗 ,𝜆 𝑗 /√cos𝜃𝑖𝑐𝑜𝑠𝜃 𝑗 )

2D SRBF

Page 12: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

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

Page 13: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

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)

Page 14: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

Scattering Function

• Definition [Marschner03]

Page 15: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

Scattering Function

• Definition [Marschner03]

• Longitudinal function : normalized Gaussian

simulates specular reflection along longitudinal direction

Page 16: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

Scattering Function

• Definition [Marschner03]

• Azimuthal function • Complex analytic functions• Different for each mode

– Fresnel reflection term– exponential attenuation term

Page 17: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

Azimuthal Functions

• R mode

• Fresnel term (Schlick’s approximation)

• Approximated by polynomial of

Page 18: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

Azimuthal Functions

• TT mode

• Simple shape: look like Gaussian• approximated by 1 circular Gaussian centered at

• Parameters fitted by preserving energy

𝜃𝑑=0 𝜃𝑑=𝜋6 𝜃𝑑=

 𝜋3

Page 19: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

TT mode approximation

• : coefficient • set as the peak value,

• : bandwidth• Preserving energy

𝑁 𝑇𝑇 (𝜙 )≈𝑏𝑇𝑇𝑔𝑐 (𝜙 ;𝜋 ,𝜆𝑇𝑇)

∫ 𝑁𝑇𝑇 (𝜙 )𝑑𝜙¿12 ∫ (1−F (𝜂 ,𝜃𝑑 , h ))2𝑇 (𝜎 𝑎

′ , h )𝑑 h• : fresnel reflection• : attenuation function

Page 20: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

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

Page 21: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

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

Page 22: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

Single ScatteringIntegral

• =: SRBF decomposition• : scattering func. def.

Circular Gaussian

Circular Gaussian Gaussian Cosine /

Circular Gaussian

Analytic Integral

Page 23: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

Light Integration

Multiple scattering

𝐿 (𝜔𝑜 )≈𝐷∑𝑗𝑙 𝑗𝑇 𝑓∫

Ω

ψ (⋅ )𝑆𝐷 (𝜔𝑖 ,𝜔𝑜 ) cos𝜃 𝑖 𝑑𝜔𝑖[Ren 2010]

• Spread function: • BCSDF: [Zinke 2010]

• Approximate scattering function similarly

Analytic Integral

Page 24: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

Results

Page 25: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

Results

Page 26: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

Results

Page 27: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

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

Page 28: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

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

Page 29: Interactive Hair Rendering and Appearance Editing  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

Page 30: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

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.

Page 31: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

Circular Gaussian vs Gaussian• 1D Circular Gaussian

• Defined on unit circle :

• 1D Gaussian • Defined on x-axis

Page 32: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

Single ScatteringIntegral

N 𝒕 (⋅ )=∫❑

𝑁 𝑡 (𝜙𝑖−𝜙𝑜 )𝑔𝑐 (𝜙 𝑖 )𝑑𝜙 𝑖

• =: SRBF seperation• : scattering func. def.• Two dimensional integral over and

¿∑∫𝜃𝑖

𝑔𝑐 (𝜃𝑖)𝑀 𝑡 (𝜃h )cos2𝜃𝑖

cos2𝜃𝑑N𝒕 (⋅ )𝑑𝜃𝑖 Outer integral

inner integral:

Page 33: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

Inner Integral R Mode• Hair scattering function approx.

• polynomial of : • Inner integral

Precompute into 2D tables

Page 34: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

Inner IntegralTT & TRT modes• Hair scattering function approx.

• sum of circular Gaussians : • Inner integral

Analytic Integral

N 𝒕 (⋅ )≈∑ 𝑏𝑘∫❑

𝑔𝑐(𝜙 𝑖−𝜙𝑜 ;𝜙𝑘 ,𝜆𝑘)𝑔𝑐 (𝜙 𝑖 ;𝜙 𝑗 ,𝜆 𝑗 )𝑑𝜙𝑖

Page 35: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

Outer Integral

Piecewise Linear approximation

Smooth FunctionGaussian

Analytic Integral

Page 36: Interactive Hair Rendering and Appearance Editing  under Environment Lighting

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.