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.


Recommended