# Spherical Function

Λογισμικό & κατασκευή λογ/κού

14 Δεκ 2013 (πριν από 4 χρόνια και 5 μήνες)

111 εμφανίσεις

Interactive Hair Rendering Under
Environment Lighting

Valentin JANIAUT

Zhong Ren, Kun Zhou, Tengfei Li, Wei Hua,
Baining Guo

2

Hair Rendering

Hair fiber represented with lines

We can draw it with
glDrawArray
using

GL_LINES_STRIP
.

Basic shading model is not realistic at all.

Basic OpenGL
illumination

Deep Opacity
Map [YUK08]

3

Environment Lighting

Natural Illumination

No directional light

Environment Lighting

Single Light

4

Spherical Function

How to represent a
spherical function?

SPHERICAL
HARMONIC

5

Spherical Harmonic

6

Useful to approximate spherical function

Spherical
Coordinate of the
Spherical Function

Number of SRBF to
use for the
approximation

Coefficient
depending of the
problem

SRBF

with
actually
5 parameters

Spherical
Coordinate of the
center of the SRBF

Bandwidth of the
center of the SRBF

Same idea than Fourier S
eries
.

7

SRBF Light

A SRBF function can represent a light in
graphic rendering.

Expression of the SRBF light
j
.

Intensity of the light
j
.

Gaussian distribution

Result on the sphere

2D

3D

Gaussian distribution.

8

SRBF and Environment Lighting

We can now represent the environment
lighting as the sum of the SRBF lights, as
following:

9

Outgoing Curved Intensity

Diameter of the hair
fiber

Environment Lighting

Transmittance

Bidirectional
scattering
function

10

Transmittance or Absorbtance

Transmittance is the fraction of
incident light that passes through a
sample.

Attenuation
coefficient.

Density function:

1 if covered by hair fiber.

0 otherwise

11

Bidirectional scattering function

S(ω
i

o
) will be the bidirectional scattering
function, similar to BRDF in surface
reflectance.

The scattering is the deviation of the
straight trajectory of a ray light due to an
obstacle.

12

A scattering model.

Kajiya and Kay model [1989]

13

Environment Lighting Approximation

Remember SRBF? It’s time to use it.

14

Effective Transmittance

Last step of our simplification

Average attenuation of the SRBF Lighting j.

How to compute this equation?

15

Splitting the equation

Transmittance

Convolution of SRBF and
scattering function.

16

Convolving SRBF and Scattering Function

Marschner et al. model [2003]

With:

17

Computing Effective Transmittance

Precomputed in a table

Sampled at the SRBF
center

Use of the
Deep
Opacity Map

technique

18

Self
-

Deep Opacity Map

19

Deep Opacity Map

z

T

z
1

z
2

z
3

Compute the
optical depth

Z
o

Z
1

Z
2

Z
3

20

Multiple Scattering

Transmittance

Convolution of SRBF and
scattering function.

More realistic model.

21

Multiple Scattering Computation

Voxelize

Hair Model

For each
voxel

store:

ϖ

: Average Fiber Direction

ν

: Standard Deviation of
fiber direction

ς
t
Τ

: Perpendicular
Attenuation Coefficient

Sample
Tf

and on a rough grid

Store as 3D texture

Hardware tri
-
linear
interpolation

22

Algorithm Overview

Single Scattering

Precompute

SRBF decomposition

Single Scattering
integration table

Runtime

Generate Deep
Opacity Depth Map
(DODM)

Construct the
Summed Area Table

Sample the effective
transmittance

Sample the single
scattering integral

23

Results

24

Limitations

Runtime change of hair properties

precomputation is costly (~50 minutes)

Eccentricity of hair scattering is omitted

Additional video memory for the integral
tables

12MB for single scattering

24MB for single + multiple scattering

no per
-
fiber hair property

25

References

http://www.kunzhou.net/

(Author of the
main paper, some of his slides are used in
this slideshow)

http://www.cemyuksel.com/

(Author of
the Deep Opacity Maps and numerous other

Illustration on slide 10 comes from
wikipedia.

http://www.cse.cuhk.edu.hk/~ttwong/pa
pers/srbf/srbf.html