A Practical Microcylinder Appearance Model for Cloth Rendering to Implementation (1)

This article is a day 22 part of raytracing advent calendar 2018

Sorry for late!

日本語でも良い方はこちらを ( If you like Japanese, please check this )

ushiostarfish.hatenablog.com

Cloth and Fiber

There are several categories fibers used in cloth. For example, animal, plant and synthetic. Let's check.

animal

Name Based on
Wool Fur of sheep
Cashmere Fur of cashmere goat
Silk Silkworm cocoon
Mohair Angora goat

plant

Name Based on
Cotton Cotton plants of the genus Gossypium in the mallow family Malvaceae
Linen Linum
Ramie Boehmeria nivea

synthetic

Name Based on
Polyester Petroleum etc.
Nylon Coal or petroleum

Each of these fibers is a one-dimensional structure. Clothes need to make two-dimensional plane by some structure. For example, Felt is a sheet of entangled wool. We classify such cloth as nonwoven fabric (Nonwoven fabric) .

f:id:ushiostarfish:20181223175746j:plain

※ Nonwoven fabric(zoom)不織布 - Wikipedia より

In contrast, a cloth by wave orthogonal thread, it is named "woven cloth".

f:id:ushiostarfish:20181223180828p:plain

※ Silk Crepe de Chine (zoom) IMAN SADEGHI, OLEG BISKER, JOACHIM DE DEKEN, HENRIK WANN JENSEN, UC San Diego, "Practical Microcylinder Appearance Model for Cloth Rendering"

Other than these, "knitting" is that created by make looping structure and connect vertically and horizontally with curved thread.

f:id:ushiostarfish:20190102160429p:plain

信州大学繊維学部, はじめて学ぶ繊維 P.140

We use knitting cloth for T-shirt, socks and Sportswear because of elasticity from this structure.

f:id:ushiostarfish:20190102160652p:plain

信州大学繊維学部, はじめて学ぶ繊維 P.140

Cloth shading model

Many people have researched cloth shading, for a long time. The old one is Michael Ashikhmin, Simon Premoze, Peter Shirley, "A microfacet-based brdf generator" , mention to microfacet based Satin, Velvet shading model. Irawan, Marschner proposed massive woven cloth BRDF(Piti Irawan, "Appearance of Woven Cloth"). This support large-scale and small-scale analytic shading model. It is implemented to Mitsuba render But...it is too difficult for me...

These models are a surface-based approach. But there are some volumetric approaches. Wenzel Jakob, Adam Arbree, Jonathan T. Moon, Kavita Bala, Steve Marschner, "radiative transfer framework for rendering, materials with anisotropic structure" , Its scarf image is amazing.

f:id:ushiostarfish:20181223192902p:plain

※ Figure 1 (a) Isotropic scattering. Wenzel Jakob, Adam Arbree, Jonathan T. Moon, Kavita Bala, Steve Marschner, "radiative transfer framework for rendering, materials with anisotropic structure"

There are many interesting papers, but I have chosen woven cloth shading model described at IMAN SADEGHI, OLEG BISKER, JOACHIM DE DEKEN, HENRIK WANN JENSEN, UC San Diego, "Practical Microcylinder Appearance Model for Cloth Rendering" . This model support only large-scale appearance, the appearance of individual threads is ignored. But it can reproduce cloth anisotropic behavior and It is a good match to measured cloth BRDF. Additionary, the rendered image is very impressive, in particular, Silk Shot Fabric.

f:id:ushiostarfish:20181224143716p:plain

※ Figure 24 IMAN SADEGHI, OLEG BISKER, JOACHIM DE DEKEN, HENRIK WANN JENSEN, UC San Diego, "Practical Microcylinder Appearance Model for Cloth Rendering"

This characteristic gradation is caused by weft and warp threads that have each different color.

A Practical Microcylinder Appearance Model for Cloth Rendering

f:id:ushiostarfish:20181224143513p:plain

※ Figure 24 IMAN SADEGHI, OLEG BISKER, JOACHIM DE DEKEN, HENRIK WANN JENSEN, UC San Diego, "Practical Microcylinder Appearance Model for Cloth Rendering"

This approach in this paper has the following flow.

  1. BSDF measurement for individual threads.
  2. Create a shading model for individual threads.
  3. Create a BRDF model by two orthogonal threads.
  4. Tuning the visibility and shading from a woven pattern and tangent distribution.
  5. Apply Shadowing and Masking, and tuning shading weight from its tangent ( in this paper, called "Reweighting").

Coordinate System

Let's check the coordinate system at Fig. 9 in the paper.

f:id:ushiostarfish:20181224144148p:plain

※ Figure 9 IMAN SADEGHI, OLEG BISKER, JOACHIM DE DEKEN, HENRIK WANN JENSEN, UC San Diego, "Practical Microcylinder Appearance Model for Cloth Rendering"

  •  \theta is an angle from the normal plane of thread t.
  •  \phi is an angle from cloth normal in thread normal plane.

But  \theta_i, \theta_r, \phi_i, \phi_r is not used for indivisual thread bsdf model. Instead of this,

 
\displaystyle {
\phi_{ d }=\phi_{ i }-\phi_{ r }\\ \theta _{ h }=\frac { \theta _{ i }+\theta _{ r } }{ 2 } \\ \theta _{ d }=\frac { \theta _{ i }-\theta _{ r } }{ 2 } 
}

An amount such as above is used for thread bsdf. Let's check the significance of each angle.



 
\displaystyle {
\phi_{ d }=\phi_{ i }-\phi_{ r }
}

 \phi_d is a difference angle between incident angle  \phi_i and outgoing angle  \phi_r .



 
\displaystyle {
\theta _{ h }=\frac { \theta _{ i }+\theta _{ r } }{ 2 } 
}

 \theta _h is a middle angle between incident angle  \theta _i and outgoing angle  \theta _r . As this is closer to 0, the specular reflection component becomes stronger.



 
\displaystyle {
\theta _{ d }=\frac { \theta _{ i }-\theta _{ r } }{ 2 } 
}

 \theta _d is half angle from difference angle between incident angle  \theta_i and outgoing angle  \theta_r . In other words, it is angle between  \theta _h and  \theta_i .

  \phi_d is half angle but  \theta _d is not half. This cause little bit confusing. But I use the same definition according to this paper. Incidentally, Iman Sadeghi's Ph.D. Thesis "Controlling the Appearance of Specular Microstructures" use no half angle at "5.2 Background Theory".

Thread model

We will describe a thread bsdf model by using above the angle definition. A thread is assumed that it is a rough dielectric cylinder, it is defined by the following two functions.

 
\displaystyle {
f_{ s }\left( t,\omega _{ i },\omega _{ r } \right) =\frac { f_{ r,s }\left( t,\omega _{ i },\omega _{ r } \right) +f_{ r,v }\left( t,\omega _{ i },\omega _{ r } \right)  }{ \cos ^{ 2 } \theta _{ d } } 
}

Where  f_{ r,s } is specular component on cylinder surface,  f_{ r,s } is volumetric scattering component in cylinder. What is the denominator  \cos ^{ 2 } \theta _{ d } ? So I will think about this.

denominator  \cos ^{ 2 } \theta _{ d }

If cylinder surface is perfectly smooth, incident light is reflected  \theta_r = -\theta_i angle. The fact is already mentioned at もふもふレンダリング(3) . But I visualize this behavior following.

f:id:ushiostarfish:20181224160335g:plain

So, we can define a scattering function by using δ function.

 
\displaystyle {
S\left( \phi _{ i },\phi _{ r },\theta _{ i },\theta _{ r } \right) =\frac { N\left( \phi _{ i } \right) \delta \left( \theta _{ i }+\theta _{ r } \right)  }{ \cos ^{ 2 }{ \theta  }  } 
}

Where  N \left( \phi_i \right) is density function,  \theta = \theta_i = \theta_r

Additionally, I'll check the energy conservation.

 
\displaystyle {
\int _{ \Omega  }^{  }{ S\left( \phi _{ i },\phi _{ r },\theta _{ i },\theta _{ r } \right) \cos { \theta _{ i } } d\omega  } \\ =\int _{ -\pi  }^{ \pi  } \int _{ -\frac { \pi \:  }{ 2 }  }^{ \frac { \pi  }{ 2 }  } \: S\left( \phi _{ i },\phi _{ r },\theta _{ i },\theta _{ r } \right) \cos ^{ 2 }{ \theta _{ i } } d\theta d\phi \\ =\int _{ -\pi  }^{ \pi  } \int _{ -\frac { \pi \:  }{ 2 }  }^{ \frac { \pi  }{ 2 }  } \frac { N\left( \phi _{ i } \right) \delta \left( \theta _{ i }+\theta _{ r } \right)  }{ \cos ^{ 2 }{ \theta  }  } \cos ^{ 2 }{ \theta _{ i } } d\theta d\phi \\ =\int _{ -\pi \:  }^{ \pi \: \:  } N\left( \phi  \right) d\phi \int _{ -\frac { \pi \:  }{ 2 }  }^{ \frac { \pi  }{ 2 }  } \frac { \delta \left( \theta _{ i }+\theta _{ r } \right)  }{ \cos ^{ 2 }{ \theta  }  } \cos ^{ 2 }{ \theta _{ i } } d\theta \\ =\int _{ -\frac { \pi \:  }{ 2 }  }^{ \frac { \pi  }{ 2 }  } \frac { \delta \left( \theta _{ i }+\theta _{ r } \right)  }{ \cos ^{ 2 }{ \theta  }  } \cos ^{ 2 }{ \theta _{ i } } d\theta \\ =\frac { \cos ^{ 2 }{ \theta _{ i } }  }{ \cos ^{ 2 }{ \theta  }  } \\ =1
}

The term  \frac {1}{ \cos ^{ 2 } \theta} is works well. It is essential term for discribe something. The angle θ can be anything angle, but is this scattering invariant? I'll check two extreme cases.

First,  \theta = 0 case.

f:id:ushiostarfish:20181224164108p:plain

Second,  \theta \approx 20° case.

f:id:ushiostarfish:20181224164410p:plain

First case rays is higher density than second case rays. As  \theta is closer to  \frac {\pi}{2},  \frac {1}{ \cos ^{ 2 } \theta} becomes bigger and bigger, so  \frac {1}{ \cos ^{ 2 } \theta} term expresses this change of density.

Extending from δ function

Stephen R. Marschner, Henrik Wann Jensen, Mike Cammarano, "Light Scattering from Human Hair Fibers" extend the above scattering models to a rough surface.

 
\displaystyle {
S\left( \phi _{ i },\phi _{ r },\theta _{ i },\theta _{ r } \right) =\frac { N\left( \phi _{ i } \right) M\left( \theta _{ i } \right)  }{ \cos ^{ 2 }{ \theta _{ d } }  } 
}

 \theta_i = \theta_r is no longer true. It use  \theta_d instead of this, but it is approximate. So thread bsdf model in the paper contains  \theta_d term because of this.

Specular component  f_{ r,s }

Specular component is defined following equation.

 
\displaystyle {
f_{ r,s }\left( t,\omega _{ i },\omega _{ { r } } \right) =F_{ r }\left( \eta ,\vec { w } _{ i } \right) \cos  \left( \frac { \phi _{ d } }{ 2 }  \right) g\left( \gamma _{ s },\theta _{ h } \right) 
}

Where  F_{ r } is fresnel term and  g is normalized gaussian function (average is zero). I'll discuss the fresnel term later,  g is

 
\displaystyle {
g\left( \sigma ,x \right) =\frac { 1 }{ \sqrt { 2\pi { \sigma  }^{ 2 } }  } exp\left( -\frac { { x }^{ 2 } }{ 2{ \sigma  }^{ 2 } }  \right) 
}

 \theta _h is a middle angle between incident angle  \theta _i and outgoing angle  \theta _r . So as  \theta _h close to 0, the specular component is more stronger. Also we can modify the lobe shape by changing the variance.

f:id:ushiostarfish:20181224185718g:plain

※I ignore fresnel term in this plot.

What is  \cos  \left( \frac { \phi _{ d } }{ 2 }  \right) ?

 \cos  \left( \frac { \phi _{ d } }{ 2 }  \right) has a characteristic shape. This is

f:id:ushiostarfish:20181225233337p:plain

※ desmos : cos(theta/2)

This is based on a considering of distribution rays reflection from a smooth cylinder. I'll show this visualization by raytracing.

f:id:ushiostarfish:20181224190158p:plain

It shows that the reflected rays have a high density as incident angle close to an outgoing angle. Conversely, as an incident angle far from an outgoing angle, the reflected rays have low density. I will think about this property.

f:id:ushiostarfish:20190102160840p:plain

In this picture, we can see the relationship between  \phi and the point P.

 
\displaystyle {
x=\frac { 1 }{ 2 } \sin \left( \phi  \right) 
}

Where a incident ray is reflected to  2\phi as a outgoing ray.

f:id:ushiostarfish:20190102160932p:plain

So,

 
\displaystyle {
2\phi =\phi _{ r }\\ \phi =\frac { 1 }{ 2 } \phi _{ r }
}

Using this fact, we get the following relationship  x and  \phi_{ r }.

 
\displaystyle {
x=\frac { 1 }{ 2 } \sin \left( \frac { 1 }{ 2 } \phi _{ r } \right) 
}

The derivative is

 
\displaystyle {
x=\frac { 1 }{ 2 } \sin { \left( \frac { 1 }{ 2 } \phi _{ r } \right)  } \\ \frac { dx }{ d\phi _{ r } } =\frac { 1 }{ 2 } \frac { 1 }{ 2 } \cos  \left( \frac { 1 }{ 2 } \phi _{ r } \right) \\ \frac { dx }{ d\phi _{ r } } =\frac { 1 }{ 4 } \cos  \left( \frac { 1 }{ 2 } \phi _{ r } \right) 
}

Where  \frac { dx }{ d\phi_{ r } } is smallness x per smallness reflected angle. It shows how distrebutions the smallness x belonging to unit length (=1) has. So, in the above section "Extending from δ function" , N can be

 
\displaystyle {
N\left( \phi _{ i },\phi _{ r } \right) =\frac { 1 }{ 4 } \cos  \left( \frac { 1 }{ 2 } \phi _{ d } \right) 
}

And, the integration in a around must be 1 because of N is density function.

 
\displaystyle {
\int _{ -\pi  }^{ \pi  }{ N\left( \phi _{ i },\phi _{ r } \right) d\phi _{ i } } =\int _{ -\pi  }^{ \pi  }{ \frac { 1 }{ 4 } \cos  \left( \frac { 1 }{ 2 } \phi  \right) d\phi  } 
}

We can use the following derivative

 
\displaystyle {
\frac { d }{ d\phi  } \left( \frac { 1 }{ 2 } \sin { \left( \frac { 1 }{ 2 } \phi  \right)  }  \right) =\frac { 1 }{ 4 } \cos  \left( \frac { 1 }{ 2 } \phi  \right) 
}

So,

 
\displaystyle {
\int _{ -\pi  }^{ \pi  }{ \frac { 1 }{ 4 } \cos  \left( \frac { 1 }{ 2 } \phi  \right) d\phi  } \\ =\frac { 1 }{ 2 } \sin { \left( \frac { 1 }{ 2 } \pi  \right)  } -\frac { 1 }{ 2 } \sin { \left( -\frac { 1 }{ 2 } \pi  \right)  } \\ =\frac { 1 }{ 2 } +\frac { 1 }{ 2 } \\ =1
}

We have verified. So specular component equation

 
\displaystyle {
f_{ r,s }\left( t,\omega _{ i },\omega _{ { r } } \right) =F_{ r }\left( \eta ,\vec { w } _{ i } \right) \cos  \left( \frac { \phi _{ d } }{ 2 }  \right) g\left( \gamma _{ s },\theta _{ h } \right) 
}

 \cos  \left( \frac { \phi _{ d } }{ 2 }  \right) come from here.

Missing  \frac { 1 }{ 4 }

But, there is no  \frac { 1 }{ 4 } in this equation! Actually, In Eugene d’Eon, Guillaume Francois, Martin Hill, Joe Letteri, Jean-Marie Aubry, "An Energy-Conserving Hair Reflectance Model"

When,

 
\displaystyle {
N\left( \phi _{ i },\phi _{ r } \right) =\frac { 1 }{ 4 } \cos  \left( \frac { 1 }{ 2 } \phi _{ d } \right) \\ M\left( \theta _{ i },\theta _{ r } \right) =g\left( \beta ,\theta _{ h } \right) \\ S\left( \phi _{ i },\phi _{ r },\theta _{ i },\theta _{ r } \right) =\frac { N\left( \phi _{ d } \right) M\left( \theta _{ h } \right)  }{ \cos ^{ 2 }{ \theta _{ d } }  } 
}

Then,

 
\displaystyle {
\int _{ -\pi  }^{ \pi  } \int _{ -\frac { \pi \:  }{ 2 }  }^{ \frac { \pi  }{ 2 }  } \: S\left( \phi _{ i },\phi _{ r },\theta _{ i },\theta _{ r } \right) \cos ^{ 2 }{ \theta _{ i } } d\theta d\phi 
}

Figure 3 shows how amount this expression value, as several  \beta, as changing  \theta_i .

f:id:ushiostarfish:20181229114321p:plain

※ Figure 3 Eugene d’Eon, Guillaume Francois, Martin Hill, Joe Letteri, Jean-Marie Aubry, "An Energy-Conserving Hair Reflectance Model"

I have plotted graph to verify by using this implementation.

It shows

f:id:ushiostarfish:20181224231933p:plain

 \beta unit is degrees, the horizontal unit is an outgoing angle (unit: radians), the vertical unit is outgoing radiance.

Total reflectance from cylinders - Google スプレッドシート

This is exactly same to Eugene d’Eon, Guillaume Francois, Martin Hill, Joe Letteri, Jean-Marie Aubry, "An Energy-Conserving Hair Reflectance Model" Figure 3. So the energy amplifies in the most part of this. This fact causes a motivation to introduce energy conservation Mp function from spherical gaussian.

From this, specular component  f_{ r,s } has potential amplify the energy 4 times from above expression. But, it is not a mistake. IMAN SADEGHI, OLEG BISKER, JOACHIM DE DEKEN, HENRIK WANN JENSEN, UC San Diego, "Practical Microcylinder Appearance Model for Cloth Rendering" has no energy conservation description. It is not the focal point in this paper. So I'll finish this study, go next.

Fresnel Term

Fresnel term is defined by

 
\displaystyle {
F_{ r }\left( \eta ,\vec { w } _{ i } \right) =F_{ r }\left( \eta ,\cos ^{ -1 }{ \left( \cos { \left( \theta _{ d } \right)  } \cos { \left( \frac { \phi _{ d } }{ 2 }  \right)  }  \right)  }  \right) 
}

Sorry...I can't find where is come from. But  \theta_{ d } and   \frac {\phi _{ d } }{ 2 } is both angle from half angle. And a product of these terms means that the angle is treated as grazing angle if either one of the cosine of them approaches 0. In this paper says "We considered using the full microfacet specular formulation, but found that it did not improve the matching to our measured results".

I choose the following fresnel expression as fresnel term from Bruce Walter, Stephen R. Marschner, Hongsong Li, Kenneth E. Torrance, "Microfacet Models for Refraction through Rough Surfaces". It describes as "A convenient exact formulation for dielectrics with unpolarized light".

 
\displaystyle {
{ F\left( \eta _{ t },\eta _{ i },\theta  \right) =\frac { 1 }{ 2 } \frac { \left( g-c \right) ^{ { 2 } } }{ \left( g+c \right) ^{ { 2 } } } \left( 1+\frac { \left( c\left( g+c \right) -1 \right) ^{ { 2 } } }{ \left( c\left( g+c \right) +1 \right) ^{ { 2 } } }  \right)  }\\ g=\sqrt { \frac { { \eta _{ t } }^{ 2 } }{ { \eta _{ i } }^{ 2 } } -1+{ c }^{ 2 } } \\ c=\cos { \theta  } 
}

Volume scattering component  f_{ r,s }

 f_{ r,s } is defined by

 
\displaystyle {
f_{ r,v }\left( t,\omega _{ i },\omega _{ r } \right) =F\frac { \left( 1-k_{ d } \right) g\left( \gamma _{ v },\theta _{ h } \right) +k_{ d } }{ \cos { \theta _{ i } } +\cos { \theta _{ r } }  } A
}

Where A is a spectrum dependence absorption coefficient. The coefficient that the specular component doesn't contain makes outgoing light colored.

F Term

F is defined by following expression in this paper.

 
\displaystyle {
F=F_{ t }\left( \eta ,\vec { \omega _{ i } }  \right) F_{ t }\left( \eta ',\vec { \omega '_{ r } }  \right) 
}

But I don't find more details in the paper, but maybe

 
\displaystyle {
F_{ t }\left( \eta ,\vec { \omega _{ i } }  \right) =1-F_{ r }\left( \eta ,\vec { w } _{ i } \right) 
}

and,

 
\displaystyle {
F_{ t }\left( \eta ',\vec { \omega '_{ r } }  \right) 
}

is undefined in the paper. However, If cylinder volume multiple scattering is assumed that is described by the  f_{ r,s } term,

 
\displaystyle {
F=F_{ t }\left( \eta ,\vec { \omega _{ i } }  \right) 
}

is not so bad, I think. but I choose the following expression for my implementation.

 
\displaystyle {
F={ { F_{ t } }^{ 2 }\left( \eta ,\vec { \omega _{ i } }  \right)  }
}

 g\left( \gamma _{ v },\theta _{ h } \right) Term

 g\left( \gamma _{ v },\theta _{ h } \right) effect is exactly same to specular component  g\left( \gamma _{ s },\theta _{ h } \right) without the variance parameter. So it is modeled that refracted rays has same behavior with reflected rays on cylinder surface (= these has same  \theta). Is it ture ? Let's check this by tracking refracted rays into a smooth dielectric cylinder. ( Houdini vex: tracking refraction · GitHub )

f:id:ushiostarfish:20181229123015g:plain

Where the incident rays has  \theta = 45° . And plotting its  \sin \theta shows

f:id:ushiostarfish:20190102162337p:plain

Surprisingly, all of the outgoing vectors is exactly the same angle to its incident angle. It has the same behavior even if use other incident angles. This fact is already showed at Stephen R. Marschner, Henrik Wann Jensen, Mike Cammarano, "Light Scattering from Human Hair Fibers" , section "A Loci of reflections". This is the figure 16. In the explanation of "A Loci of reflections", this is explained by treating the normal of the dielectric cylinder as the normal of the equator of the sphere.

f:id:ushiostarfish:20181229152111p:plain

※ The part with n, n 'is the cylinder normal.

where  v_i on sphere is seen incident vector. And this incident vector  v \ _ i can intersect with various normals on the equator (only front-side,  0 \lt v \ _ i \cdot n ). First, I'll talk about typical normal  n directly under  v \ _ i.

The  v_i refract to  v_t with a relative refractive index with surface normal  n. With snell's law,

 
\displaystyle {
\eta _{ i }\sin  \theta _{ i }=\eta _{ t }\sin  \theta _{ t }
}

where  \eta =\frac { \eta _{ t } }{ \eta _{ i } } , we get

 
\displaystyle {
\sin  \theta _{ i }=\eta \sin  \theta _{ t }
}

What is  \sin\theta_i,\sin\theta_t ? Geometrically, we can treat that it is  h \ _ i, h \ _ t in the figure respectively. So we get

 
\displaystyle {
\left| h_{ i } \right| =\eta \left| h_{ t } \right| 
}

But normal is not only  n on the figure but also it can be any vector on the equator of the sphere. Let's check the following figure for other cases  n'.

f:id:ushiostarfish:20181229173945p:plain

※ I add  h'_{ i }, h'_{ t } that  \sin\theta of  n'.

where a amount of  \left| h'_{ t } \right| projected to Y axis is

 
\displaystyle {
H=\left| h'_{ t } \right| \left| \frac { h'_{ t } }{ \left| h'_{ t } \right|  } \cdot Y \right| 
}

I consider what value it will be. First, with Snell's law,

 
\displaystyle {
\left| h'_{ i } \right| =\eta \left| h'_{ t } \right| 
}

So,

 
\displaystyle {
H=\frac { \left| h'_{ i } \right|  }{ \eta  } \left| \frac { h'_{ t } }{ \left| h'_{ t } \right|  } \cdot Y \right| 
}

Next,

 
\displaystyle {
\left| h'_{ i } \right| \left| \frac { h'_{ i } }{ \left| h'_{ i } \right|  } \cdot Y \right| =\left| h_{ i } \right| \\ \left| h'_{ i } \right| ={ \left| \frac { h'_{ i } }{ \left| h'_{ i } \right|  } \cdot Y \right|  }^{ -1 }\left| h_{ i } \right| 
}

Because of the above equation, we get

 
\displaystyle {
H=\frac { 1 }{ \eta  } { \left| \frac { h'_{ i } }{ \left| h'_{ i } \right|  } \cdot Y \right|  }^{ -1 }\left| h_{ i } \right| \left| \frac { h'_{ t } }{ \left| h'_{ t } \right|  } \cdot Y \right| \\ H=\frac { \left| h_{ i } \right|  }{ \eta  } { \left| \frac { h'_{ i } }{ \left| h'_{ i } \right|  } \cdot Y \right|  }^{ -1 }\left| \frac { h'_{ t } }{ \left| h'_{ t } \right|  } \cdot Y \right| 
}

Then, vector  h'_i direction is exactly inverse of  h'_t direction . So,

 
\displaystyle {
\left| \frac { h'_{ i } }{ \left| h'_{ i } \right|  } \cdot Y \right| =\left| \frac { h'_{ t } }{ \left| h'_{ t } \right|  } \cdot Y \right| 
}

Using this, we get

 
\displaystyle {
H=\frac { \left| h_{ i } \right|  }{ \eta  } 
}

Oh, I remember  \left| h_{ i } \right| =\eta \left| h_{ t } \right| .

 
\displaystyle {
H=\frac { \left| h_{ i } \right|  }{ \eta  } =\frac { \eta \left| h_{ t } \right|  }{ \eta  } =\left| h_{ t } \right| 
}

It says that a vertical distance of refracted vector from equator plane depend on only refractive index for any  n' . In addition, considering that it goes out after entering from the dielectric cylinder, the refractive indices cancel each other out, and when exiting it exits at the same θ as incident θ (although it will reverse about positive and negative).

Because of this,  g\left( \gamma _{ v },\theta _{ h } \right) term in volume scattering component is plausible. Although it is modeled with a rough dielectric cylinder, it seems that the light that enters inside will repeat scattering inside it. So, g in the volume scattering component has a different variance parameter from the specular component. And all of  \gamma_v is greater than  \gamma_s on Table Ⅱin this paper.

Denominator  \cos { \theta _{ i } } +\cos { \theta _{ r } }

In this paper says "The division by the sum of projected cosines comes from Chandrasekhar [1960], in his derivation for diffuse reflectance due to multiple scattering in a semi-infinite medium." I'm afraid I can't understand these details because of my limited knowledge. But the paper says that this term has an effect to match more to brdf measurements.

※ Chandrasekhar [1960] = Subrahmanyan Chandrasekhar, "Radiative Transfer"

 k_d term

 k_d term simply express isotropic scattering for cotton, linen, and so on. It interpolate  g\left( \gamma _{ v },\theta _{ h } \right) to  1.

I'll show specular component lobe. It's intuitive I think.

f:id:ushiostarfish:20181229172951g:plain

I have completed introducing modeling of an individual thread. Next I will describe the shading model by using this.

ushiostarfish.hatenablog.com