Professional Documents
Culture Documents
https://doi.org/10.1007/s41095-019-0154-z
Research Article
c The Author(s) 2019.
Abstract This paper proposes a lightweight bi- components have recently attracted much attention
directional scattering distribution function (BSDF) due to the demand for surface-painted man-made
model for layered materials with anisotropic reflection objects. For example, a characteristic appearance
and refraction properties. In our method, each layer of of cars is generated by the surface coating process
the materials can be described by a microfacet BSDF in which the car body is coated many times with
using an anisotropic normal distribution function different types of paints.
(NDF). Furthermore, the NDFs of layers can be defined While accurate representation [1, 2] and sampling
on tangent vector fields, which differ from layer to of light transport paths [3] for layered materials have
layer. Our method is based on a previous study in been proposed in the context of offline rendering, light
which isotropic BSDFs are approximated by projecting
transport in layered materials is usually approximated
them onto base planes. However, the adequateness of
using analytic models particularly in real-time
this previous work has not been well investigated for
rendering. Weidlich and Wilkie [4] and the extension
anisotropic BSDFs. In this paper, we demonstrate that
of their work by Elek [5] linearly combined the
the projection is also applicable to anisotropic BSDFs
and that the BSDFs are approximated by elliptical bidirectional scattering distribution functions (BSDFs)
distributions using covariance matrices. of layers using a transmission factor. Guo et al. [6]
extended normal distribution functions (NDFs) using
Keywords layered materials; microfacet BSDF; von Mises–Fisher (vMF) distributions to consider
reflection modeling; real-time rendering
multiple reflection lobes and internal scattering.
However, the vMF distributions cannot capture the
1 Introduction heavy tails of directional distributions, which is often
required for modeling metallic materials. Recently,
In the last several decades, the visual quality of Belcour [7] considered directional statistics of light
computer graphics has been improved significantly rays by projecting the directional distribution on a
due to the long-standing efforts of both the research base plane. The reflection or refraction property of
and industrial communities. In particular, success in each layer is then defined as an operator of changing
reflectance modeling has enabled representation of the projected distribution. He referred to the operator
a surprisingly wide variety of real-world materials as an atomic operator. Although the atomic operator
in computer graphics. Among such materials, was practically simple and powerful, its applicability
those comprising of thin layers of different material to anisotropic reflection and refraction has not been
well investigated.
1 Waseda University, Tokyo, 155-8885, Japan. E-mail:
In this paper, we extend the atomic operator for
T. Yamaguchi, tomoya.tomoya@akane.waseda.jp ( );
S. Morishima, shigeo@waseda.jp. anisotropic reflection and refraction properties of
2 The University of Tokyo, Tokyo, 153-8656, Japan. E-mail: layers. The previous method limited its application
tatsy@den.t.u-tokyo.ac.jp. to isotropic reflection due to the use of a scalar value
3 Intel Corporation, CA, 95054, USA. E-mail: to define the variance of an isotropic distribution. We
yusuke.tokuyoshi@intel.com. replace this scalar variance with a 2 × 2 covariance
Manuscript received: 2019-12-14; accepted: 2019-12-21 matrix to define the anisotropy of the distribution.
1
2 T. Yamaguchi, T. Yatagawa, Y. Tokuyoshi, et al.
However, this extension is non-trivial because changes the parameters of reflected or transmitted light;
in the shapes of directional distributions have not α ∈ [0, 1] and η refer to the roughness parameter
been well investigated for rough boundary surfaces and relative refractive index on a boundary surface
between layers with anisotropic scattering properties. between layers, respectively. F GD∞ represents an
Even in the most related study [8], the changes for integral of the product of Fresnel term F , shadowing-
reflection and refraction are calculated only on the masking function G, and NDF D. In the original
center of directional distributions. In contrast, we method, Belcour [7] precomputed the F GD∞ values
derive the distribution shapes for entire directional while considering multiple scattering effects [11] and
distribution by considering the coordinate transform stored them in a lookup table. On the other hand,
between those for NDFs and projected directional another implementation in Unity [10] ignored multiple
distributions. We implement this extended atomic scattering effects and approximated the integral using
operator for anisotropic reflections/refractions on a a simple product of F and G for a direction of perfect
real-time rendering system [9] by following a publicly reflection or refraction. For detailed definitions of
available implementation of the previous method function h(α) and roughness scaling factor s, refer to
[10]. The experimental results demonstrate that our the original paper [7].
extension synthesizes almost identical appearances to By successively applying the above transformations
those obtained by offline Monte Carlo path tracing by the layers, we can obtain eq , μq , and σq of
while its computational overhead from the previous outgoing light for a configuration q of successive light
method is as small as only 2.5%. interactions. For instance, q = T RT represents a
transmission–reflection–transmission path. Let Q be
2 Background a set of valid sequences of light interactions. Then, a
bidirectional reflectance distribution function (BRDF)
In the original method [7], a behavior of light ρ is defined as follows:
interaction with layered materials was represented by
ρ(ωi , ωo ) = eq ρq (ωq , ωo , αq ) (3)
energy of light e and two statistical parameters, that
q∈Q
is, the mean μ ∈ [−1, 1]2 and variance σ ∈ [0, ∞] of
where
the distribution of light directions. The symbol σ
αq = h−1 (σq ), ωq = reflect(μq ),
represents variance rather than standard deviation
following the original paper [7]. The property of a D(h)G(ωq , ωo )
ρq (ωq , ωo , αq ) =
surface between two neighboring layers is defined by 4|ωq · n||ωo · n|
2
three functions each of which modifies one of the In these equations, ωo ∈ S is the outgoing direction,
three parameters above. For rough reflection and D(h) ∈ [0, ∞] denotes an NDF for halfvector h =
refraction, the parameters are transformed as follows: (ωq + ωo )/ ωq + ωo , G(ωq , ωo ) ∈ [0, 1] denotes a
Reflection : shadowing-masking function, and reflect(μq ) repre-
⎧ sents the direction of perfect reflection for μq .
⎪ R
⎨e = ei × F GD
∞
The above formulas are only applicable to isotropic
μR = −μi (1)
⎪
⎩σ R = σ + h(α) reflection and refraction because the variance is
i
modeled with a single variance parameter σ to define
Refraction : a radially symmetric distribution.
⎧
T ∞
⎨e = ei × (1 − F GD )
⎪
μT = −ημi (2) 3 Layered materials with anisotropic
⎪
⎩ σi
σT = η + h(s × α) normal distributions
α1.1 1 ωi · n The proposed method is an extension of Belcour’s
where h(α) = 1.1
, s= 1+η ,
1−α 2 ωt · n method [7] which approximated BSDFs by projecting
where ωi ∈ S 2 denotes an incident direction; ωt ∈ S 2 them onto the base plane. The previous study
refers to a refracted direction; n ∈ S 2 denotes a restricted their applicability only to isotropic NDFs.
surface normal; (ei , μi , σi ) refer to the parameters In contrast, the proposed method extends the
of incident light; (e{R,T } , μ{R,T } , σ {R,T } ) denote approach to anisotropic NDFs, as shown in Fig. 1.
Real-time rendering of layered materials with anisotropic normal distributions 3
Fig. 1 Our method works for layers with anisotropic NDFs defined
on varying tangent vector fields, whereas the previous method [7] can Fig. 3 Visualizations of projected distributions for BSDFs with
be applied only to isotropic NDFs. different incident zenith angles. The distributions are calculated with
a GGX normal distribution indicated in the center of Fig. 2. In this
figure, the Fresnel terms for conductors and dielectrics are omitted
3.1 Covariance of projected distribution for only focusing on material-independent BSDF terms.
2xh yh cos θi
J01 = −
1 − x2h − yh2
2xh yh cos θi
J10 = 2yh sin θi −
Fig. 2 Projected distributions for an NDF and corresponding BRDF
are visualized. To evaluate the BRDF, we used the zenith angle π/4 of
1 − x2h − yh2
incident direction ωi , as shown in the image to the left. The principal
axes for these distributions are the same, and the elliptic shape for 2 1 − x2h − 2yh2 cos θi
the NDF is approximately preserved in that of the BRDF. J11 = 2xh sin θi +
1 − x2h − yh2
4 T. Yamaguchi, T. Yatagawa, Y. Tokuyoshi, et al.
Assuming xh , yh , and θi are small enough and we using h(α). Accordingly, the covariance matrix for a
can ignore the second- and higher-order terms of xh , BSDF is given as
yh , and sin θi , we approximate the above Jacobian T σ 0
x
matrix as ⎡ ⎤
Σ = tx t y t x ty
0 σy
2 cos θi 0
Jr ≈ ⎣ ⎦ (4) where
0 2 cos θi
h α{x,y} , for reflection
The same representation was derived by Stam [8] σ{x,y} =
h s × α{x,y} , for refraction
as an exact solution at the perfect reflection vector
For energy e and mean μ, we use the same
(which corresponds to μR ). Unlike his solution,
representations as those in the previous study because
Eq. (4) is the approximation over the region near
the anisotropy of BSDFs does not affect these terms
μR . For refraction, we also approximate the Jacobian
significantly. Therefore, we obtain an extended BSDF
matrix Jt using the same assumption, as follows:
⎡ ⎤ with anisotropic NDFs by substituting the above
(cos θi − cos θt ) /η 0 covariance matrix Σ into Eqs. (1) and (2). To build
Jt ≈ ⎣ ⎦ (5)
a global BRDF using the adding-doubling method as
0 (cos θi − cos θt ) /η
in the original paper [7], we take exactly the same
where θt is the zenith angle for the direction of procedure introduced in it.
refraction ωt . For both cases, the Jacobian matrix is
a simple scaling matrix. For the derivation, please
4 Results and discussion
refer to Appendix A.1.
Although the assumption of the small zenith The following experiments were conducted on a
TM
angle θi causes a large error in the grazing angle, computer with an Intel R
Core i7-8700 3.2 GHz CPU
we prioritize the simplicity of implementation over and NVIDIA R
GeForce R
RTX 2080 Ti GPU. We use a
physical strictness. While this problem of the grazing two-layer material in which the bottom conductor layer
angle was also observed in the previous study is coated with a clear dielectric layer unless otherwise
[7], a compromise is allowable in practice, as we specified. The formulas for two-layer materials are
demonstrate later. We also need to consider the obtained by the adding-doubling method, and their
effects of the Fresnel term, shadowing-masking derivations are described in Appendix A.2. We implement
function, and cosine term to define a BSDF [13]. the proposed method using Marmoset Toolbag 3 [9].
Nevertheless, these effects are low-frequency and can In the rendering pipeline, we follow an approximation
be negligible when the roughness parameters are for F GD∞ in the implementation of Unity [10] to
relatively small. In the following, we discuss the avoid the lookup table being memory consuming for
property of the coordinate transform using the above anisotropic materials. In addition, we calculate an
Jacobian matrices. average covariance matrix, which can differ from
As we can see in Eqs. (4) and (5), the Jacobian channel to channel, for three color channels following
matrices for both reflection and refraction are the public implementation of the previous studies
diagonal, and their two diagonal entries are equal. [7, 10].
The diagonality implies that the directions of the While we mainly show the results of image-based
orthogonal basis vectors of P are preserved, as shown lighting, the computation time of our method for a
in Fig. 2. Therefore, we only need to transform trivial scene with a directional light is 1.01 ms, which
anisotropic roughness parameters (αx , αy ) ∈ [0, 1]2 is sufficiently short for real-time applications such as
along the tangent vector tx and binormal vector ty interactive material editing.
to define a covariance matrix for the projected BSDF. Figure 4 shows the rendering results obtained
The uniformity of the diagonal entries implies that using our method for various layered materials
the stretch of the variances along tx and ty depends with isotropic/anisotropic NDFs defined on the
on neither the definition of the tangent vector field nor same/different tangent vector fields. These results
the difference in the roughness parameters. Therefore, include only direct illumination from environment
we transform the roughness parameters (αx , αy ) to maps. For this image-based lighting, we compute
corresponding scalar variances (σx , σy ) ∈ [0, ∞]2 the Monte Carlo integration using visible NDF
Real-time rendering of layered materials with anisotropic normal distributions 5
Fig. 4 Layered materials rendered using the proposed method. Each layer of the materials has an anisotropic NDF, and it can be defined on a
tangent vector field, which differs from layer to layer. The materials are comprised of dielectric top layers with a refractive index of 1.49 for (a)–(e),
and metallic bottom layers with a complex refractive index of (1+1i, 1+0i, 1+0i) for (a)–(d) and (0.143+3.983i, 0.373+2.387i, 1.444+1.602i) for (e).
importance sampling [14] for each term of Eq. (3). roughness parameters and rotation angles for the
We compare the computation time between Belcour’s local coordinate system appear in the Electronic
method [7] for isotropic BSDFs and our extension Supplementary Material.
to anisotropic BSDFs. In this comparison, we Our extension to anisotropic BSDFs does not
evaluate both methods by sampling the BRDFs in depend on the number of material layers. Therefore,
Eq. (3) separately to focus on the overhead incurred it is also available with materials with more than
by changing scalar variance σ to our covariance three layers as shown in Fig. 8(b). In this material,
matrix Σ. Figure 5 shows the rendering time the layered material shown in Fig. 8(a) (which
using varying numbers of samples. Although our is equivalent to Fig. 4(d)) is further coated by a
method increases the ALU overhead and register smooth dielectric layer. In addition, the atomic
pressure, this experimental result demonstrates that operators for anisotropic reflection/refraction can
the performance degradation when using our method be combined also with those for isotropic ones.
for anisotropic BSDFs is negligible. For instance, Fig. 8(c) shows a rendering result
The visual comparisons of the results for different for a layered material including an interface of a
layer configurations and different tangent vector participating medium. In Belcour’s method, he
directions are shown in Figs. 6 and 7, respectively.
In these figures, pixel-wise root-mean-square errors
(RMSEs) are visualized in the column to the right.
We find that the RMSEs are rather large on the
rim regions of the sphere, where the viewing angles
are comparatively small. However, the overall
computation time to render a single frame with 2048
samples per pixel was 587.8 ms for naive simulation to
obtain reference images, whereas that for our method
is only 45.1 ms. Additional results using different
Fig. 6 Our results are visually compared with the reference images,
Fig. 5 The chart to the left compares the computation time of and the error value for each pixel is also visualized in the images to
Belcour [7] for isotropic BSDFs and our extension to anisotropic the right. The root-mean-square error (RMSE) values are shown to
BSDFs. The chart to the right shows the additional computation time the bottom left. The roughness parameters for these results are the
in percentage terms of our extension over Belcour’s method. same as those used for Figs. 4(a), 4(b), and 4(d).
6 T. Yamaguchi, T. Yatagawa, Y. Tokuyoshi, et al.
5 Conclusions
In this paper, we introduced a real-time approach
for rendering layered materials wherein the layers
are modeled by anisotropic NDFs defined on varying
tangent vector fields. The proposed method is easily
implemented on the top of the original approach
proposed by Belcour [7] for isotropic NDFs, and works
with minor additional computation cost.
Fig. 7 The visual comparisons with RMSEs are shown to different
combination of tangent vector directions. From top to bottom, the
tangent vectors of two layers have π/2, π/3, and π/6 gaps, respectively. Appendix A Derivations of formulas
A.1 Derivation of Jacobian matrices
assumed the medium exhibits only forward scattering,
To derive Jacobian matrices, we partly followed the
and approximated the change of the directional
derivation by Stam [8]. Different from his derivation,
distribution using an atomic operator as well. In our
we derived an approximate solution for the Jacobian
result in Fig. 8(c), we inserted this forward scattering
matrices over the region near to the center of the
layer in the middle of dielectric and conductor layers
NDF, while Stam derived the exact solution only at
of the material shown in Fig. 8(a). For the forward
the center. Without loss of generality, we can assume
scattering layer, an atomic operator is calculated
incident direction ωi as (θi , 0). Let ωr and ωt be
by the parameter of the medium, i.e., absorption
directions for reflection and refraction, respectively.
coefficient ka , scattering coefficient ks , and average
We denote the directions ωi , ωr , ωt , and h as follows:
cosine of the scattering angle g (see the literature [15]).
For the details, refer to Belcour’s original paper [7]. ωi = (sin θi , 0, cos θi )
While our method renders anisotropic layered ωr = (xr , yr , zr )
materials in interactive frame rates by extending ωt = (xt , yt , zt )
Belcour’s method [7], it is inevitable that our method h = (xh , yh , zh )
Let η be a relative refractive index between two
interfaces, we can write ωr and ωt as follows:
ωr = 2(ωi · h)h − ωi
ηωt = ωi · h − (ωi · h)2 + η 2 − 1 h − ωi
Using these equations, we can obtain the projected
2D coordinates (xr , yr ) and (xt , yt ) of ωr and ωt :
xr = 2Axh − sin θi
Fig. 8 Layered materials with more than two layers and with yr = 2Ayh
participating media are rendered using our method. The layer ⎧
configurations are illustrated in the bottom. In material (b), the ⎪
⎨ηxt = A − A2 + η 2 − 1 xh − sin θi
material shown in (a) is coated by a smooth dielectric layer (η =
1.2). In material (c), a forward scattering layer (g = 0.9, ks = ⎪
⎩ηyt = A − A2 + η 2 − 1 yh
(0.01, 1.0, 0.01), ka = (0.01, 1.0, 0.01)) is inserted in the middle of
two layers of the material (a).
Real-time rendering of layered materials with anisotropic normal distributions 7
where A = xh sin θi + cos θi 1 − x2h − yh2 . For T R+ T , the atomic operators are obtained as
follows:
Therefore, for reflection, the Jacobian matrix is + t12 r23 t12
obtained as in the main body of the paper. For refrac- eT R T =
1 − r23 r12
tion, the Jacobian matrix is calculated as follows:
⎡ ⎤ +
∂xt ∂xt μT R T
= −μi
∂xh ∂yh
Jt = ⎣ ⎦
∂yt ∂yt + t12 r23 t12
∂xh ∂yh ΣT R T
=
1 − r23 r12
∂xt ∂A 2A
η = A− A2 +η 2 −1+xh 1− r23 r21
∂xh ∂xh A +η 2 −1
2 × ΣT12 +ΣT21 +K21 ΣR
23 + ΣR
1−r23 r21 21
∂xt ∂A 2A In these formulas, rjk and tjk denote reflection
η = xh 1−
∂yh ∂yh A + η2 − 1
2
and transmission coefficients between j-th and k-th
interfaces, and Kjk is a transmission scaling factor
∂yt ∂A 2A which scales the roughness parameters. As explained
η = yh 1−
∂xh ∂xh A + η2 − 1
2 {R,T }
in the main body of the paper, Σ12 can be obtained
as follows:
∂yt ∂A
2A T σ {R,T }
η = A− A2 +η 2 −1+yh 1− {R,T } 12,x 0
∂yh ∂yh A +η 2 −1
2 Σ12 = t x ty {R,T } t x t y
0 σ12,y
⎧
xh cos θi
⎨ ∂xh = sin θi − √1−x2 −y2
⎪ ∂A
R
T
h h σ12,{x,y} = h α{x,y} , σ12,{x,y} = h s × α{x,y}
where
⎪
⎩ ∂A = − √yh cos2 θi
∂yh 2
1−xh −yh
As we wrote in the main body of the paper, we assume Acknowledgements
xh , yh , and θi are small enough and we can ignore This research was supported by the JST ACCEL
the second- and higher-order terms of xh , yh , and (JPMJAC1602) and JSPS KAKENHI (JP17H06101,
sin θi . Then, we can approximate Jt as follows: 18K18075, and JP19H01129).
1 cos θi − cos2 θi +η 2 −1 0
Jt ≈ Electronic Supplementary Material Electronic
η 0 cos θi − cos2 θi +η 2 −1 supplementary materials are available in the online
version of this article at https://doi.org/10.1007/
1 cos θi −cos θt 0
= s41095-019-0154-z.
η 0 cos θi −cos θt