Keywords

1 Introduction

Thin-film coating is a process that consists in adding on top of a material called substrate, a stack of thin layers of different materials to alter its optical properties. The general principle is as follows: the electromagnetic waves reflected on different layers of the coating will travel different optical lengths. The travelled distance has a direct impact on the phase of the wave, which itself plays an important role when calculating the total intensity of the reflected and transmitted waves. Indeed, when summing the amplitude of the waves, the difference in phase leads to a constructive or destructive summation; this is the phenomenon of interference. The interferences created this way modify the Fresnel coefficients in reflection and in transmission of the substrate. This effect is widely used in industry to design materials with desired reflection or transmission properties. In the visible spectrum, thin-film coating can be applied to obtain perfectly reflecting mirrors over a large waveband. One application that to the best of our knowledge has received little attention from the Computer Graphics community is anti-reflective coating. Those coatings are critical when simulating the performances of sensors or optical systems since most lenses and semi-conductors sensors receive anti-reflective treatment. Our presented transfer matrix method provides an easy way to account for such coatings inside a ray-tracer. It can be used for simulation in the visible as well as other spectral domains. In this paper we are addressing this property based on wave interference created by multilayer thin-film coating and apply it to global illumination rendering.

At normal incidence, the coefficient of reflection for an air/glass interface is about \(4\%\). To reduce this coefficient, anti-reflective thin-film coatings are applied on top of windows or goggle glasses and their effects can be very notable (see Sect. 5). A useful tool [3] is available to efficiently model the behaviour of one layer thin-film coating. Unfortunately in many applications, one layer coating model has shown severe limitations. It poorly performs over the entire visible spectrum as well as with large angles of incidence. Another way to simulate anti-reflected coating is to multiply the Fresnel term by a coefficient. This method is not physically correct and creates problems for large angles where the Fresnel reflection coefficient is supposed to converge to one but will converge to this multiplying coefficient instead. To achieve high performing anti-reflective coatings, more than one layer is required (see Fig. 1).

Fig. 1.
figure 1

Energy reflection coefficient variations with light wavelength (left) and light incidence angle (right), at the interface air/BK7 showing no coating (up), one layer (middle) and four layers (bottom) thin-film coating.

In this work, we introduce to the rendering community the matrix transfer method to calculate Fresnel coefficients of a multilayer thin-film coating. Our approach modifies the calculation of Fresnel coefficients and is easy to adapt to the current microfacet models (as illustrated Fig. 2) or smooth interface BRDF (Bidirectional Reflectance Distribution Function). We apply our model and demonstrate its performances on anti-reflective coating. Because multilayered coating design can be a tricky problem [17], we provide, for ease of use, a set of anti-reflective coating examples for several commonly used substrates such as BK7 (high quality optical glass) and polypropylene. We have designed coatings whose behaviour is almost constant over the visible spectrum so that no spectral rendering is required to observe a realistic effect, thus adding little computation time when compared to the computation of non-coated materials. Our method also works perfectly with spectral rendering, enabling coating designers to preview their design.

Our contributions can be summarized as follows:

  1. 1.

    We introduce the matrix transfer method to calculate Fresnel coefficients for multilayer thin-film coating.

  2. 2.

    We provide the code in open source at https://github.com/AlexTintin/Anti-reflective-coating.

2 Previous Work

2.1 Optics

In a pioneering work, Abelès introduced a matrix approach to model multilayer thin-films behaviour [1]. His method differs from ours since he calculates the electric and magnetic fields in each layer whereas we concentrate on the electric field. A vast amount of refining work has followed Abelès’, introducing partially coherent, incoherent and anisotropic layers to the methods [5, 6, 16, 18]. Transfer matrix methods can also be applied to flux and not just amplitude of the wave [19]. Design of new coatings is still an active area of research [27].

We have decided to focus on the \(2\times 2\) matrix method that model multilayer thin-film coatings following mainly the work of [16, 18].

2.2 Computer Graphics

Thin-film Coatings. The issue of multilayer thin-film coatings has been addressed in [10]. Their derivation is based on the Airy summation that results in a recurrence formula. Our method is based on the transfer matrix method and we do not make Stokes reversibility assumption, enabling us to treat non-perfect interfaces (see Sect. 3.4). An extension of their work taking into account anisotropy has been done by [26]. Another work that tries to model the behaviour of multilayer thin-film coatings is [12]. They use the original Abelès’ matrix characteristic of a thin-film layer to solve the Kirchhoff diffraction equation and derive a new BRDF model from this diffraction equation. Our work uses the matrix representation to derive a simple 2 dimensional full transfer matrix model, only deriving new Fresnel coefficients making it adaptable to various BRDF formulations. Other thin-film coating models can be found [20, 22, 23] but they either make approximations in the number of layers or the number of internal reflections. The case of one layer thin-film has been studied recently in [3] to render iridescence. Their model provides a fast and reliable way to perform spectral integration, avoiding spectral aliasing. However, multilayer coatings are required in many settings for high performance coatings.

Anti-reflective coatings. Their usage is common in optics whether it is for solar-panels, windows, sensors or lenses. Their design receives a lot of attention [7, 24, 27] and is often a well-kept secret by their manufacturer. In Computer Graphics, it was used as a small application to illustrate the work of [13]. It was used by [11] in order to render lens flare in camera systems. The lack of easy tools to render highly efficient coatings forced them to use a simple one layer coating.

Layered materials and matrix methods. Our approach differs from layered material modeling as investigated by [2, 9]. In their work, they focus on geometric optics, leaving out the effect of interference. Our present work embraces the interference phenomenon that cannot be neglected when considering layers, whose thickness are smaller than the coherence length of the light source. In addition, it is noteworthy that we have not tried to derive a full BRDF model. Instead, we are providing a convenient way to calculate Fresnel coefficients. Our approach can thus be added to any layered material model. Matrix methods have been successfully applied [8, 15, 21, 28], especially scattering matrix to account for scattering events in layered material and thus obtaining a new BRDF model. In this work, we calculate new energy coefficients assuming that no scattering happens in the thin-film layers.

3 Theoretical Model

3.1 Hypotheses and Notations

We made several hypotheses to construct our model that we explain in this section. See Fig. 2 for a representation of the situation.

  • Let us consider a pile of \(N+1\) locally plane layers separated by N interfaces. The interfaces can be smooth or rough. The layers are parallel to each other and the normal to the parallel surfaces is a local z axis. We consider the problem to be symmetric, so we can place ourselves on a (xz) plane.

  • We consider each layer to be isotropic and non-magnetic (i.e. the permeability \(\mu = \mu _{0}\)) and each layer is defined by a thickness \(d_{i}\) and a index of refraction \(n_{i}\). This index of refraction can be complex (it is the case for metals for example), in which case the imaginary part is called the extinction coefficient.

  • The first layer and the \((N+1)^{\text {th}}\) layer are considered infinite. In practice, this approximation is valid because the first layer is the ambient medium and the \((N+1)^{\text {th}}\) is the substrate that are both much thicker than the thin-film layers.

Fig. 2.
figure 2

Multilayered thin-film coating on top of microfacet geometry (left) and propagation of the ray inside the coating (right). (Color figure online)

Let us assume that an incident ray of light is making incident angle \(\theta _{i}\) with the z axis. Because we are modeling the interference phenomena happening between the different coating layers, we need to consider light as an electromagnetic field and not just a ray. We define the electric field E as:

$$\begin{aligned} E(\mathbf{r} ,t) = E exp{(\text {i} \mathbf{k} _{0}{} \mathbf{r} -\text {i} \omega t)} \end{aligned}$$

with \(\mathbf{r} = \mathbf {-w}_{i}\); \( \mathbf{k} _{0} = 2\pi n_{0}(\mathbf{x} \cos \theta _{i}-\mathbf{z} \sin \theta _{i})/\lambda \) and \(\omega = c/ \lambda \) where \(\lambda \) is the wavelength of the field, \(\mathbf{w} _{i}\) the direction of the incoming wave, c the speed of light in the medium and \(n_{0}\) the index of refraction of the first medium. The situation is illustrated in Fig. 2. We consider the incoming light to be randomly polarized. To calculate the reflection and transmission coefficients we need to consider the linear polarisation s and p as they form an orthogonal basis of the polarization state. The final coefficients will then be given by \(R = (R_{s} + R_{p})/2\) and \( T = (T_{s} + T_{p})/2\). Throughout this paper we will use uppercase letters for energy coefficients and lowercase letters for amplitude coefficients. The s polarisation corresponds to the situation where the electric field E is tangential to the incident plane and p polarisation where magnetic field B is tangential to the incident plane.

3.2 Background

When a wave hits an interface between two different mediums, two waves are created, one is transmitted into the second medium, the other one is reflected. The Snell-Descartes laws of refraction gives us that at the interface between a medium m and a medium l, defined by their indices of refraction \(n_{m}\) and \(n_{l}\), an incoming wave with an incident angle \(\theta _{m}\) is reflected in the incident plane with the same angle and is refracted in the medium l with an angle \(\theta _{l}\) defined by:

$$\begin{aligned} n_{m}\sin \theta _{m} = n_{l}\sin \theta _{l} \end{aligned}$$

For a stack of thin-films we have the following equalities:

$$\begin{aligned} n_{0}\sin \theta _{0} = n_{1}\sin \theta _{1} = ... = n_{m}\sin \theta _{m} = ... = n_{N}\sin \theta _{N} \end{aligned}$$
(1)

Fresnel Coefficients. From the continuity relations of the electromagnetic field at the interface between two mediums m and l, we can derive the Fresnel coefficients in amplitude for polarisation s and p.

$$\begin{aligned} r^{s}_{m,l} =\frac{n_{m}\cos \theta _{m}-n_{l}\cos \theta _{l}}{n_{m}\cos \theta _{m}+n_{l}\cos \theta _{l}} \qquad r^{p}_{m,l} =\frac{n_{l}\cos \theta _{m}-n_{m}\cos \theta _{l}}{n_{m}\cos \theta _{l}+n_{l}\cos \theta _{m}} \end{aligned}$$
(2)
$$\begin{aligned} t^{s}_{m,l} =\frac{2n_{m}\cos \theta _{m}}{n_{m}\cos \theta _{m}+n_{l}\cos \theta _{l}} \qquad t^{p}_{m,l} =\frac{2n_{m}\cos \theta _{l}}{n_{m}\cos \theta _{l}+n_{l}\cos \theta _{m}} \end{aligned}$$
(3)

3.3 One Layer Transfer Matrix

At equilibrium, in each layer a forward electromagnetic wave is propagating toward the \(-z\) direction and a backward wave towards the \(+z\) direction. We want to express the forward and backward electric field at the layer j as a linear combination of the field at the layer \(j+1\). A detailed derivation can be found in [16, 18]. We only provide here the matrix equation relating the forward and backward electric field at the layer j noted respectively \(E^{-}_{j}\) and \(E^{+}_{j}\) as a linear combination of the forward and backward field at the layer \(j+1\).

$$\begin{aligned} \begin{bmatrix} E^{-}_{j} \\ E^{+}_{j} \end{bmatrix} = P_{j}D_{j,j+1}\begin{bmatrix} E^{-}_{j+1} \\ E^{+}_{j+1} \end{bmatrix} \end{aligned}$$

where the matrix \(D_{j,j+1}\) and \(P_{j}\) are defined by:

$$\begin{aligned} D_{j,j+1} =\frac{1}{t_{j,j+1}} \begin{bmatrix} 1 &{} -r_{j+1,j} \\ r_{j,j+1} &{} t_{j,j+1}t_{j+1,j} - r_{j,j+1}r_{j+1,j} \end{bmatrix} \quad P_{j} =\begin{bmatrix} e^{-\text {i}\delta _{j}} &{} 0 \\ 0 &{} e^{\text {i}\delta _{j}}\\ \end{bmatrix} \end{aligned}$$
(4)

with \(\delta _{j}\) the phase accumulated by the wave due to the layer j.

$$\begin{aligned} \delta _{j} = \frac{2\pi }{\lambda }n_{j}d_{j}\cos \theta _{j} \end{aligned}$$
(5)

3.4 Total Transfer Matrix

The efficiency of the transfer matrix method is observable now. Indeed since we have established the transfer matrix for one layer, we can easily express the total transfer matrix that relates \(E^{-}_{0}\) and \(E^{+}_{0}\) to \(E^{-}_{N}\) and \(E^{+}_{N}\) by a product of \(2\times 2\) matrices.

$$\begin{aligned} \begin{bmatrix} E^{-}_{0} \\ E^{+}_{0} \end{bmatrix} =D_{0,1}P_{1}...D_{j-1,j}P_{j}... P_{N-1}D_{N-1,N}\begin{bmatrix} E^{-}_{N} \\ E^{+}_{N} \end{bmatrix} \end{aligned}$$

The product of all the matrices makes a new 2 by 2 matrix that we call T.

$$\begin{aligned} \begin{bmatrix} E^{-}_{0} \\ E^{+}_{0} \end{bmatrix} = \begin{bmatrix} T_{11} &{} T_{12}\\ T_{21} &{} T_{22} \end{bmatrix}\begin{bmatrix} E^{-}_{N} \\ E^{+}_{N} \end{bmatrix} \end{aligned}$$

By definition of the amplitude coefficients of reflection and transmission

$$\begin{aligned} r_{0,N}=\frac{E^{+}_{0}}{E^{-}_{0}} = \frac{T_{21}}{T_{11}} \qquad t_{0,N}=\frac{E^{-}_{N}}{E^{-}_{0}} = \frac{1}{T_{11}} \end{aligned}$$
(6)

Several comments must be made concerning this final results. First, the final coefficients \(r_{0,N}\) and \(t_{0,N}\) are defined for \(E^{+}_{N} = 0\). We can also define the coefficients \(r_{N,0}\) and \(t_{N,0}\) by \(r_{N,0} =E^{-}_{N}/E^{+}_{N} = -T_{12}/T_{11} \) and \(t_{N,0} =E^{+}_{0}/E^{+}_{N} = Det(T)/T_{11}\) assuming \(E^{-}_{0} = 0\). Det(T) is the determinant of the matrix T. Considering the case where two incident waves are coming from the two opposite sides of the coating, we can assume they do not interact with one another to create interference inside the coating. We can thus treat each wave separately, using the coefficients defined previously to each wave and add their respective intensity contributions.

For an ideal interface \(t_{j,j+1}t_{j+1,j} - r_{j,j+1}r_{j+1,j} = 1\). This is the Stokes reversibility assumption. In the case of rough interface or absorbing media, this difference is not equal to one. In the case of an absorbing medium, the following equality holds true [16] \(t_{j,j+1}t_{j+1,j}^{*} - r_{j,j+1}r_{j+1,j}^{*} = 1\) where \(^{*}\) represent the complex conjugate. Finally the energy coefficients can be computed as follow [6]:

$$\begin{aligned} R_{s/p} = |r_{s/p}|^{2} \qquad T_{s} = \frac{|t_{s}|^{2}Re(n_{N}\cos \theta _{N})}{n_{0}\cos \theta _{0}} \qquad T_{p} = \frac{|t_{p}|^{2}Re(n_{N}^{*}\cos \theta _{N})}{n_{0}\cos \theta _{0}} \end{aligned}$$
(7)

4 Results

We implemented our developed matrix transfer method to render anti-reflective coatings on plastic and on thin dielectric materials under global illumination using Mitsuba renderer [14]. More details about anti-reflective coating designs and performances can be found [17]. We provide the designed anti-reflective coatings with our code.

4.1 Single vs Multiple Layers

We first reveal the significant enhancement of multiple layers over a single layer of anti-reflective coating rendering. In a first step we decided to implement a four and a five layers coating because they are the ones which exhibit the best theoretical performances over the full visible spectrum [17]. We want to observe their performances for rendering purposes and chose the most appropriate one for further study. We present the results obtained by rendering a polypropylene material with index of refraction of 1.49. The outcomes are presented in Fig. 3. Similar results can be observed on coatings made for thin dielectrics, which has major real-world applications (see Fig. 4).

Fig. 3.
figure 3

Comparison between different anti-reflective coating designs on top of blue polypropylene plastic. No coating (top-left corner), one layer (top-right corner), four layers (bottom-left corner) and five layers (bottom right corner) thin-film coatings. (Color figure online)

As a primary note we confirm the decisive impact of applying anti-reflective thin-film coatings with all our rendering illustrations. The outcomes presented in Fig. 3 show a dramatic rendering enhancement of four layers coating over one layer coating. No noticeable rendering difference can be seen between four and five layers designs. The computing times on the other hand linearly increase with the number of layers as shown Table 1. This is perfectly understandable considering our algorithm whose complexity increases linearly with the number of layers. The algorithm (available in open source) also shows that the number of wavelengths is a multiplier coefficient for the complexity of the algorithm, explaining the importance of having constant reflective properties to avoid spectral integration. We have not tried to optimize our algorithm, which can be a topic for future work. For computing efficiency we decide to use four layers coating for the rest of our study.

Fig. 4.
figure 4

Car [4] rendering without (left) and with (right) our four layers anti-reflective coating on the windows and the windshield. (Color figure online)

Fig. 5.
figure 5

Teapot [4] rendering without (left) with one layer (middle) and with our four layers (right) anti-reflective coating. (Color figure online)

Table 1. Computation time to render the matpreview scene for different coatings.

4.2 Spectral vs RGB

An important point we wanted to demonstrate was to use our model to realistically render real-world coated material without resorting to spectral rendering. While resorting to importance sampling of wavelength have been shown to dramatically improve convergence of spectral rendering [25] and our coatings can certainly benefit from that, the presented multi-layer anti-reflective coatings can be easily supported in a RGB renderer. It is easy to implement and shows good performance to render realistic images quickly. In Fig. 6 we show the comparison of spectral rendering and RGB rendering of an object with polypropylene material with four layers coating. The renderings are very similar. The main differences in the difference image are not due to the coating but the background. Even though the four layers coating reflectance exhibit small undulations of the reflectance value between \(400\;nm\) and \(700\;nm\) (see Fig. 1), those variations have negligible visual effect.

Fig. 6.
figure 6

Spectral rendering with 64 wavelengths between \(360\;nm\) and \(830\;nm\) (left) and RGB (middle) renderings of the matpreview scene. Pixels with L1 difference value above \(5\%\) are represented on the right. (Color figure online)

4.3 Look-Up Table Driven Rendering

Our transfer matrix method lends itself well for look-up table based rendering to achieve higher rendering time performances. Indeed, once the substrate is chosen and the coating is designed with the appropriate number of layers, the two remaining degrees of freedom are the wavelength and the angle of incidence of the light on the surface. Because our four layers anti-reflective coating does not need spectral rendering, we created a table with a sampling step of \(1^{\text {o}}\) for the incidence angle at three wavelengths: \(450\;nm\), \(550\;nm\), and \(580\;nm\), for the blue, green, and red channels. With a linear interpolation for the incidence angle values, we obtain the renderings shown in Fig. 7 (left image). No noticeable difference can be observed between the renderings with look-up table sampling and with run time matrix evaluation. The rendering overhead with look-up table is insignificant (21.4 seconds with look-up table vs 20.8 seconds for rendering without thin film support) compared to the high overhead in computation time (38.9 seconds) for full calculation of the Fresnel coefficients at runtime.

Fig. 7.
figure 7

Look-up table based rendering (left) compared with the rendering that carries out the full calculation of the Fresnel coefficients at the rendering time (right) for the model with our 4 layers anti-reflection coating. (Color figure online)

Fig. 8.
figure 8

Spaceship [4] rendering without (left) with one layer (middle) and with our four layers (right) anti-reflective coating on windshield. We can observe the sampling issue for both one and four layers coated windshields. (Color figure online)

Fig. 9.
figure 9

Example of iridescence effect with a four layers thin-film that can be obtained with our transfer matrix method. (Color figure online)

5 Conclusion and Future Works

We have introduced the transfer matrix method to render multilayer thin-film coatings, have successfully applied it to render high performing anti-reflective coatings, and have shown that single or multilayer coatings can be efficiently supported in rendering. We have also created coatings, whose behavior over the visible spectrum is constant enough so that they can be directly used in a RGB rendering pipeline to produce antiglare effects without resorting to expensive spectral rendering. Spectral integration works perfectly as well thus offering a tool for coating designers to preview the effect of their work, for which spectral rendering is often required. We have successfully applied our anti-reflective coating on various real-world materials (Figs. 3, 4, 5) and have demonstrated the impressive effect it can provide. Our transfer matrix method can also be applied to render other optical effects introduced by thin-films such as iridescence (Figs. 9). Limits that can be interesting to remove in future works are the symmetry and the isotropic assumptions of the model. Another direction to further refine anti-reflective coating rendering in general would be to address the case of a direct reflection of a light source. Indeed, the sampling of the light source becomes apparent due to the low reflection coefficient, thus requiring more rays to obtain a uniform light (see Figs. 8).