A mixed Boolean and deposit model for the modeling of metal pigments in paint layers

Pigments made of metal particles of around 10 m m or 20 m m produce sparkling effects in paints, due to the specular reﬂection that occurs at this scale. Overall, the optical aspect of paints depend on the density and distribution in space of the particles. In this work, we model the dispersion of metal particles of size up to 50 m m, visible to the eyes, in a paint layer. Making use of optical and scanning electron microscopy (SEM) images, we estimate the dispersion of particles in terms of correlation functions. Particles tend to aggregate into clusters, as shown by the presence of oscillations in the correlation functions. Furthermore, the volume fraction of particles is non-uniform in space. It is highest in the middle of the layer and lowest near the surfaces of the layer. To model this microstructure, we explore two models. The ﬁrst one is a deposit model where particles fall onto a surface. It is unable to reproduce the observed measurements. We then introduce a “stack” model where clusters are ﬁrst modeled by a 2D Poisson point process, and a bi-directional deposit model is used to implant particles in each cluster. Good agreement is found with respect to SEM images in terms of correlation functions and density of particles along the layer height.


INTRODUCTION
In automotive applications, most paints consist of multi-layered materials, where each layer has a different purpose, ranging from anti-corrosion to visual aspects (Streitberger, 2008). The overall appearance of paints depends on the paint composition but also on the spatial distribution of particles, most often heterogeneous and multi-scale (Couka et al., 2015). At the largest scales, where geometrical optics apply, metal particles produce specular reflection and sparkling effects. These effects depend on the chemical nature of the particles, their surface roughness, but also on the dispersion of particles and on clustering effects (Dumazet, 2010).
The description of industrial paint layers is a challenging problem. The separation and identification of chemical elements in paint coatings, used to estimate their dispersion in the material, is a complex task b). At the nanometric scale, the effect of pigments on the optical properties has been studied experimentally and compared with effective medium theories (Cummings et al., 1984). More recently, numerical works have been carried out to estimate the effect of the dispersion of pigments in a deposit model (Azzimonti et al., 2013). To represent the material and compute its properties using numerical means, a microstructural model is required.
In other contexts, microstructure models based on hardcore processes have been proposed to forbid the overlap of inclusions in the embedding medium. The effective elasto-plastic response of particlereinforced composites has been studied in (Chawla et al., 2006), making use of an optimized hardcore procedure to generate microstructures. In (Moreaud et al., 2012), a hardcore deposit model is proposed to simulate a boehmite material. However, the simulation of microstructures using hardcore models becomes difficult when approaching the close-packing limit (Escoda et al., 2015). To overcome this difficulty, random walk stochastic procedures have been developed (Altendorf and Jeulin, 2011) to generate fibrous microstructures, as an improvement on random sequential adsorption models (Feder, 1980). Another problem concerns the generation of multiscale models, for which various methods have been proposed (Paciornik et al., 2002;Jean et al., 2011). This work is concerned by the modeling of microscopic metallic particles, responsible of the sparkling effects in a paint layer, by means of 3D random microstructures. Such virtual microstructures are required to simulate the paint layers optical response with a rendering engine. We first present the material, then segment and separate particle in SEM images. We use the segmented images to measure the dispersion, size, shape and orientation of particles using various morphological tools. We introduce and evaluate a deposit and "stack" model, we conclude on their ability to modelize the dispersion of the metallic particles.

OPTICAL AND ELECTRON MICROSCOPY IMAGES
This work focuses on a sparkling, grey-colored industrial paint layer used in automotive applications. The material color results from two types of pigments: several metal oxides of unknown composition, not larger than a few micrometers, and, at a larger scale, aluminium metallic particles of up to 50 µm visible to the eyes. The two types of pigments are encircled in red and orange respectively in Fig. 1a, an optical microscopy image representing the surface of the layer. The image, however, does not allow one to separate all pigments. Instead, aluminium particles are clearly visible in SEM (scanning electron microscopy) images (Fig. 1b). This image represents a 2D section orthogonal to the surface layer. As shown in the two views, the average shape of the aluminium particles is flat and the particles are often aligned with the layer surface.
The aim of this work is to characterize and model the shape and dispersion of aluminium particles in the paint layer, which produce its sparkling effects. We disregard the oxide pigments entering the paint composition at a smaller scale. Hereafter, we make use of 5 non-overlapping SEM images similar to Fig. 1b to model the aluminium particles spatial distribution.
The actual manufacturing process and exact composition behind this industrial paint is unknown and is therefore not modeled. Instead, we use 3D models with a small number of parameters to mimic the real material. The latter bear no relation with the actual manufacturing process.

SEGMENTATION AND SEPARATION OF PARTICLES
We now segment the aluminium particles from the background in the grey-level SEM images. We also separate individual particles. This step is necessary for computing statistics on particles. The black region at the top of the image, outside of the paint layer, is first segmented by thresholding the images. The threshold value is chosen manually. Furthermore, the paint layer is not exactly aligned with the borders of the SEM images. We identify it with a parallelogram in each image and measure its disorientation with the image borders.
We now apply an area opening of size 20 pixels with a square structural element to remove noise in the image and smoothen the background (Fig. 2b). The resulting image is segmented by an entropy-based automatic thresholding (Otsu, 1979) (Fig. 2c).
Some of the aluminium particles have merged because of the low contrast in the gaps located in between two particles that are close to one another. The watershed algorithm is used to separate the particles. Watershed markers are obtained in several steps. We first compute the distance function given by successive erosions using a horizontal structural element (Fig. 2d). The size of the structural elements size is 3 pixels. The deepest markers are extracted from the distance map using the H-maxima algorithm (Schmitt and Preteux, 1986) with size parameter set to 35 pixels. The histogram of the distance map is stretched for more convenience. Using the markers, we compute the watershed partition on the inverse of the distance map previously computed. This leads to a slightly over-segmented image (Fig. 2e). Only about 6 boundaries per image are not well located. We correct them manually.
In the next sections, we use the 5 segmented images to measure various statistics on the segmented image χ(x, y) where χ = 1 in the particles and 0 outside. Then the measures are used to build two 3D microstructure models for the aluminium particles.

Fig. 2. Original (a) and opened (b) images. Segmented image (c). Distance by erosion using a horizontal structural element (d). Result of the watershed algorithm (e). Magnification; Resolution of the initial image: 1280x77 pixels
Hereafter we compute the lineic fraction of particles along the height, the correlation functions, a distribution of size and orientations and statistics on particles aggregates. The area fraction, extracted from the segmented images, is about f = ⟨χ(x, y)⟩ x,y = 6.5%.

FRACTION OF PARTICLES ALONG THE HEIGHT
The lineic fraction of aluminium particles is not usually constant along the paint layer height. To estimate it, we first correct the angular deviation of the paint layer in each image by a rotation. The fraction of particles f t (y) = ⟨χ(x, y)⟩ x is then obtained by averaging over lines parallel to e 2 (vertical axis). For each sample, the latter function is represented in Fig. 3 as a function of y/L y , where L y is the paint layer height. We emphasize that this is a relative, not an absolute, distance. The fraction of particles, of about 17%, is highest in the middle of the paint layer, and nearly 0 close to the outer layers. Accordingly, the microstructure is not stationnary in the vertical direction.

CORRELATION FUNCTION
The covariance function is defined as the probability : where H is the union of the aluminium particles, and x is a point. At large distances |r| ≫ 30 µm the two events x ∈ H and x + r ∈ H become uncorrelated and C(r = ∞) ≈ C(0) 2 . Thus, we define the normalized covariance, or correlation function, as: We take r = re 1 (r ≥ 0), aligned with the paint layer surface (Fig. 4) or r = re 2 along the paint height (Fig. 5). The slope at the origin for C(re 1 ) is nearly the same for each sample (Fig. 4). The tangent at the origin, represented in the same figure, intersects the r-axis at about r ≈ 12 µm. This value is the average length of the particles along the direction e 1 .
The "average" here is not an average in number (of particles), but in number of chords, i.e. it is weighted by the particles thickness.
Along the layer height, the correlation function C(re 2 ) (Fig. 5) instead shows local minima that are typical of repulsion effects in stacks of nonoverlapping inclusions. Here, the tangent at the origin intersects the r-axis at about 3 µm, the mean particle thickness. As expected, this length is much smaller than the average size along e 1 .

PARTICLES SIZE AND ORIENTATION
In the following, we model aluminium particles as cylinders and measure the distribution of lengths along the principal direction of the particles to infere their size distribution in 3D. We first identify two extremal points in each particle, with maximum and minimum coordinate along e 1 . The thickness of the particle is estimated as the diameter of the inscribed circle centered in the middle of the two extremal points (Fig. 6). Knowing the centre of each particle, we compute the size of the inscribed circle from the dilation by a rhombicuboctahedron. The orientation and length along the main direction of the particle is estimated by simple geometrical formulae (Fig. 6).

Fig. 6. Representation of the identification of the parameters of a segmented cylinder.
Assume first that all particles are identical cylinders with the same basis diameter D, and unspecified distribution of orientations. The particles appear as elongated rectangles on a 2D section. The cumulative distribution of the length L of the largest side of the rectangles reads: The cumulative distribution function for the measures is concave whereas it is convex for the theoretical distribution P 1 (ℓ), as seen in Fig. 7, which invalidates our hypothesis. Therefore, we seek for an alternative 3D model for the particles size distribution.
We notice the existence of small particles in optical images, and consider a uniform distribution of diameters in the range [0; D] for the cylinders basis. The resulting cumulative distribution is derived by integrating on Eq. 3. We find: Choosing D = 26.4 µm, a good agreement is found between the distribution above and the measures (Fig. 7). The orientation of the particles, defined as the angle between their main directions and the surface of the paint, is extracted using previously computed points (Fig. 6). The cumulative distribution function (Fig. 8)

DISTRIBUTION OF AGGREGATES
As seen in SEM images (Fig. 1), particles tend to aggregate in the direction transverse to the surface of the paint layer, as "stacks". We define stacks as lines transverse to the surface layer and construct them recursively. Each stack initially contains one particle. We identify them with the line passing by the particle center, parallel to the direction e 1 . We merge two stacks if the distance between them is smaller than the mean radius of all particles, about 7.24 µm. Once again, the new stack is defined as a line transverse to the surface layer. Its e 1 coordinate is the average of that of the merged stacks, weigthed by the number of particles each of them contain. The process is stopped when stacks can not be merged anymore. An example of the set of stacks is shown in Fig. 9. The number of particles per stack does not exceed 6. Its statistic is given in Tab. 1. The mean number of particles per stack is 1.7. Accordingly, the mean distance between two particles in one stack is 5.85 µm.

RESULTS
We compare now the measures obtained on the SEM images to the ones taken on numerical random microstructure models. For the sake of simplicity, we model the particles as cylinders in the rest of this work. Their diameters follow a uniform distribution in the range [0; D] with D = 26.4 µm. The angle between the cylinder basis and the surface follows a uniform distribution as well, in the range [−12.5 • ; 12.5 • ]. Furthermore, we fix the cylinders's aspect ratio (basis diameter over height) to 4. This value is consistent with the particles surface density, related to the slopes at the origin of the correlation functions (Figs. 4 and 5).
We emphasize that the models are general. With minimal changes, they allow one to incorporate more complex particle shapes. This holds in particular for flakes which ressemble cylinders.

DEPOSIT MODEL
In this section, we model the dispersion of particles by a 3D deposit model. This model is loosely inspired by the actual fabrication process of the material. Cylinders fall along direction e 2 from the top of the simulated domain to the bottom. If they encounter another cylinder, or the bottom, they are moved in the opposite direction, from bottom to top, by a distance d. Their initial position is taken randomly on the top of the domain. If a cylinder is not entirely contained in the domain, it is rejected and a new initial position is chosen for another cylinder.
The simulation is stopped after N failed attempts. This number controls the density of particles at the top of the layer. This model has two parameters: the repulsion distance d and the number of failed attempts N. The repulsion distance is chosen as a random variable in the range [0; d max ] to allow contact points between particles as seen in the SEM images (Fig. 1). We choose d max /2 = D/2. This value is close to the mean distance between two particles in a stack (5.85 µm). Furthermore, we move cylinders by steps of 2 voxels. This low value is necessary in order to make sure that no cylinder passes through another.
We let N vary to recover the measured surface fraction of particles, and find N = 30. A 2D section of the model is represented in Fig. 10. The fraction of particles along lines parallel to the surface layer is represented in Fig. 11 with respect to the height coordinate e 2 , and compared with that of SEM images. For the deposit model, we average over 100 configurations of size 1024 × 1024 × 104 voxels. Although the fraction of particles is 0 along the bottom and top of the model as in the real material, the fraction of particles is overall much more regular in the deposit model than in the paint layer. In the deposit model, the variation of the particle fraction near the surfaces is controlled by the size of the cylinders and their orientation. However, these two parameters are unable to reproduce the fluctuations observed in the SEM images.
Likewise, we compare the model in terms of correlation function (Fig. 12). The slope at the origin is correctly reproduced. Repulsion effects show up as a local minimum on the correlation function for the deposit model around a size of 5.85 µm. This size is comparable to that of the bump observed on the SEM images. This bump is itself an effect of local minima in the correlation functions of individual samples (Fig. 5). Nevertheless, repulsion effects are much more pronounced in the deposit model than in the paint layer. Thus, both measures investigated here, the fraction of particles along lines parallel to the surface and the correlation function, invalidate our deposit model. In the next section, we consider a different model where we directly use statistics on the number of particles per stack.

STACK MODEL
In the "stack" model developed hereafter, we proceed in two steps. We first simulate stacks by a 2D Poisson point process on the surface layer. The Poisson point process is the most simple random point process. The validity of this assumption will be examined later on. Second, we associate each stack with a random number of particles. This random number follows the distribution in Tab. 1. Next, particles are recursively added in the simulated domain, along each stack. Each particle is a cylinder with shape, size and orientation defined as in the deposit model. As in the deposit model, the particles do not intersect. Initially, we place the center of each cylinder at a random initial position along the stack axis. This initial position follows a given distribution. Cylinders are moved along the stack axis to the top of the domain if the initial position is closer to the top than it is from the bottom. Otherwise we move the cylinder in the opposite direction. We let the cylinder move as long as it intersects another cylinder.
The distribution of initial positions strongly influences the final density of particles along e 2 , as computed in Fig. 3. We choose a triangular distribution, symmetrical around the middle of the stack axis. More precisely, we take: where L 2 is the width of the domain, i.e. the distance between the bottom and top. The density of probability f (y) is highest at the center y = L 2 /2 and decreases linearly with y. It is zero at y = L 2 /2 ± δ . We optimize on the parameter δ to approach the density fraction of the SEM images, in terms of least squares. The density fraction of the cylinders in the stack model is narrow for small values of δ and wider for large values (Fig. 13). We find δ = 0.05L 2 as optimal value.
Two random 2D sections of the optimal stack model are shown in Fig. 14, together with one segmented SEM image for comparison. Overall, the stack model is much more heterogeneous than the deposit model. On the one hand, particles are stacked together as clusters. On the other hand, isolated particles appear, although no repulsion effect has been introduced in the model. We remark that both features are present in the SEM images. Furthermore, there exists vertical areas joining the bottom and top which are free of particles. This last feature is present in the deposit model but is difficult to control. It presumably has implications on the optical rendering. Hereafter, we compare our model with SEM images in quantitive ways.
The density fraction of particles along e 2 is shown in Fig. 15vand compared with measures on the SEM images. Measures for the stack model are averaged over 100 configurations of size 1024 × 1024 × 104. As expected, the higher concentration of particles in the middle is recovered in the stack model. Overall, the density fraction of particles is very close to that of the real material.  We now evaluate our stack model in terms of the correlation function C(re 2 ) along e 2 . The correlation functions of individual SEM images show fluctuations characteristic of repulsion effects (Fig. 5) or hardcore phenomena due to contact points in 3D. This effect disappears when averaging the correlation functions measured over all the images of the sample (black curve). Accordingly, we compare separately the correlation functions of one 2D section of random configurations of the stack model with individual SEM images (Fig. 16), and that of averages (Fig. 17). For the latter, we average over all SEM images and over 10 realisations of the 3D stack model. Overall, the correlation functions for the stack model follow the same patterns as in SEM images. Averaging suppresses the fluctuations observed on individual sections for r > 5µm, for both SEM images and the stack model. Furthermore, these fluctuations are of the same order of magnitude in the SEM images and 2D sections of the stack model. However, the correlation functions of SEM images show slightly larger differences between individual images than was found for random configurations of the stack model. Good agreement is found between the means of correlation functions as well (Fig. 17): the slopes at the origin are nearly the same, and the correlation functions show a regime change at about 4 µm. The small discrepancy observed at length scale larger than 4 µm is hardly representative, given the small number of available SEM images.
Finally, we compare the distribution of lengths of the particles along their main directions, as observed in 2D sections of the stack model with that of SEM images and the theoretical formula seen in Eq. 4 (Fig. 18). We compute this length by the same methodology as described previously (see Fig. 6

DISCUSSION
In this work, we studied micrography images of a paint layer. The 2D distribution of sizes and orientations of metallic particles, measured along sections in the material, were used to determine similar 3D parameters required by the modeling. Furthermore, the dispersion of the particles showed strong clustering effects and inhomogeneous dispersion along the height of the paint layer. The particles density is highest along the middle of the layer and zero along its borders. A basic deposit model where particles fall along the direction normal to the paint layer was unable to qualitatively reproduce the observed clustering effects and fluctuations of density over the height. Accordingly, we modelled the particles dispersion by a combined Poisson point process for the clusters and a hard-core process for implanting particles in each cluster. We use statistics on the number of particles per cluster and density of clusters in the paint layer, that were determined on the SEM images. The resulting "stack model" showed good agreement with the SEM images in terms of particles size and correlation functions. The density of particles along the height is also well reproduced. This stack model is straightforward to implement and requires only one parameter that is easy to identify. It may also take into account particles with any distribution of shapes and orientations, and could be adapted to other similar paints.