Modelling and Visualisation of the Optical Properties of Cloth

Cloth and garment visualisations are widely used in fashion and interior design, enter-taining, automotive and nautical industry and are indispensable elements of visual com-munication. Modern appearance models attempt to offer a complete solution for the visualisation of complex cloth properties. In the review part of the chapter, advanced methods that enable visualisation at micron resolution, methods used in three-dimen- sional (3D) visualisation workflow and methods used for research purposes are presented. Within the review, those methods offering a comprehensive approach and experiments on explicit clothes attributes that present specific optical phenomenon are analysed. The review of appearance models includes surface and image-based models, volumetric and explicit models. Each group is presented with the representative authors’ research group and the application and limitations of the methods. In the final part of the chapter, the visualisation of cloth specularity and porosity with an uneven surface is studied. The study and visualisation was performed using image data obtained with photography. The acquisition of structure information on a large scale namely enables the recording of structure irregularities that are very common on historical textiles, laces and also on artistic and experimental pieces of cloth. The contribution ends with the presentation of cloth visualised with the use of specular and alpha maps, which is the result of the image processing workflow. the definition and implementation of the optimal threshold algorithm was crucial and the results served as maps for image-based modelling. The maps were evaluated with the image analysis so that the pores and specular areas could also be numerically analysed before they were applied in a final 3D reconstruction. The contribution reviewed the importance of cloth appearance modelling in 3D computer graphic and presented the opportunities for further developments and implementations.


Introduction
The development of three-dimensional (3D) modelling of cloth appearance is of great interest for various areas activity that requires precise and realistic visualisation of cloth surface, especially its optical characteristics. For some purposes-in fashion, in the automotive and film industries, in architecture, for the preservation and visualisation of cultural heritage and so on-detailed visualisations of fabrics are needed. There are certain characteristics of textile texture that are particularly challenging to visualise, such as the porosity of the structure, which can be very complex, for example, in the case of a lace structure, the translucency of fibres and the unevenness of cloth surface (e.g. in the case of worn materials). When visualising a textile material, both the purpose of the visualisation and the viewing distance have to be considered.
In the review part of the chapter, we present an overview of the methods used for cloth appearance, whereas in the final part of the manuscript, we put substantial focus on the visualisation of cloths with uneven surfaces, which is often the case in the visualisation of cultural heritage. We also present the results of our research, which includes a method of image processing to generate a specular and alpha map for the visualisation of cloth surface. A cloth surface with considerably uneven texture cannot be visualised with methods that generate even or patterned relief, while unevenness can be the result of fabric damage or use. Therefore, data should be obtained using a 3D scanning method or with photo documentation. For this purpose, it is extremely important to record information on a very large sample surface to obtain a distribution of structure irregularities. On the other hand, taking into account the wide range of possible applications, the model should not have excessively detailed topology.

Visualisation of the optical and constructional parameters of cloth
In computer graphics, the cloth modelling includes cloth geometry, cloth deformation and simulation and cloth appearance models. The basic idea of the last is the calculation of data to give a realistic appearance of the virtual representation from real-world data at the fibre, yarn and fabric levels [1,2]. In real-world environments, the appearance of cloth depends on three main conditions: light source, the optical-reflective properties of the material and surface and the observer's visual perception [3]. These three conditions are also considered in mathematical computations for the graphic visualisation of cloth. The optical properties of cloth objects (at the level of the final cloth and at the micro level, i.e. yarns and fibres) are defined by their chemical and physical properties and yarn/fabric structures. In the virtual world, the optical properties of the objects are represented as mathematical abstractions, with a set of three types of data being the most important: geometrical data (object topology), image data (texture and maps) and data on electromagnetic wave and light phenomena (reflectance models and rendering algorithms).
Due to the multi-layered structure of textiles, the final calculation of optical phenomena on their surface is very complex, i.e. at all three levels (fibre, yarn and fabric), the actions of electromagnetic wave and light phenomena can be described with the equation: incident light = portion of reflected light + portion of absorbed light + portion of scattered light + portion of transmitted light.
For the final appearance, a particular optical phenomenon of the entire structural hierarchy at a constructional and compositional level should be taken into consideration to enable an accurate generation and evaluation of surface effects [4].
Cloth properties that contribute to visual appearance and are included in appearance-modelling are as follows: 1. optical properties (reflection, scattering, transmission and absorption) 2. porosity 3. colour (optical properties of fibres and yarns and constructional parameters) 4. texture and relief (type of weave, fibre and yarn construction parameters and finishing) 5. specific properties (anisotropy, yarns and fibres with special effects and higher translucency).

Advanced appearance models
Recently, Schröder et al. [5] and Khungurun et al. [6] have reviewed appearance models and categorised them into three main types of approaches: surface and image-based, volumetric and fibre-based models and the explicit approaches of modelling. It should not be overlooked that some methods implement the combination of fundamentals of different type of appearance models. The cues that Schröder et al. [5] systematically defined and analysed in the study were translucency, silhouette, light diffusion, the possibility of real-time rendering, scalability, integration scale and viewing distance.

Surface-based and image-based models
In surface-based models, different reflectance and texture functions bidirectional reflectance distribution functions (BRDF), bidirectional scattering distribution functions (BSDF), bidirectional texture functions (BTF), bidirectional curve scattering distribution function (BCSDF) and bidirectional fibre scattering distribution function (BFSDF) are implemented. Here, the fabric is represented as a two-dimensional surface (mesh, curve), what has as a consequence the limitations as incorrectness of presenting the 3D silhouette on micro-and macro-level and fabric edges. Moreover, when the simple shape-based approaches that include texture images and relief maps are implemented, there is an insufficient correctness of visualisation of optical phenomena on fibres level and missing accuracy of anisotropic shading [5,6]. In general, surfacebased models are scalable and used for far and medium viewing distance. They can reproduce translucency and can be implemented in real-time solutions; moreover, their integration scale is on the level of the composition [5].
The principle of BRDF and in general terms BSDF models [7,8] is the simplification of reflectance and scattering presented as a function of four real variables that define how light is reflected (scattered) at a surface in dependence of optical properties of materials. The function, with the schematic presentation in Figure 1, presents the flow of radiance that is emitting from the 3D object in the direction of the observer, depending on the direction, angle of incident radiance and position. In the function BRDF λ (θ i , θ r , ϕ i , ϕ r , u, v) and Figure 1, L r is radiance, i.e. reflected radiance form material on space angle and projected surface, E i is irradiance, i.e. intensity of incident light on surface of material, angles θ i and θ r are zenith angle between irradiance and radiance and normal vector on the surface (z); angles ϕ i and ϕ r are azimuth angles between orthogonal axis of irradiance and radiance; and u and v are position parameters.
In the researches, Ashikmin [10], Irawan and Marschner [11] and Sadeghi [12,13] used surface representation of fabric geometry that included functions such as BRDF, BSDF and the collection of various texture data.
Ashikmin [10] presented a microfacet BRDF model that solves the modelling of shape of highlights and enables maintaining of reciprocity and energy conservation. The function was tested on various materials, including satin and velvet fabric.
Adabala et al. [14] used weave information file (WIF) to obtain weave pattern. This format involves threading information, the definition of threading of the warp threads and a lift plan (the weft pattern). The colour scheme for weave pattern is defined with pattern mix and the colour combination and colour information of warp and weft threads. In their research, three weave patterns (one grey scale map and two colour maps) were used. The focus was on both, cloth modelling for the distant and close-up viewing of the material and the development of reflectance models that covered the both viewing conditions. The Cook-Torrance microfacet BRDF model was employed. Transmission, transmission of light through gaps and colour bleeding through fibres were also considered and calculated.
Irawan [15] presented the goniometric measuring method of the anisotropic BRDF for four textile fibres and three weave patterns. Besides, he proposed a reflectance model defined on the basis of specular scattering from fibres composing yarns (consequently weave pattern). For the representation of the geometry, physical-based models and data-driven models BTF are analysed and compared in his doctoral research. Here, the model for calculation of specular highlights in the texture and the BRDF of polyester lining cloth are presented. The results of the thesis presented the collection of fabric visualisations, in which photorealism, perhaps also due to some theoretical assumptions, can be discussed in comparison of the results of modern approaches.
The above-mentioned research continued with the publication of Irawan and Marschner [11] that presented the analysis of the specular and diffuse reflection from woven cloth mainly influencing the optical properties of the fabric. In their research, the procedural scattering model for diffuse light reflection, which calculates the reflection in dependence of texture, is proposed. The research was performed for the variety of fabric samples, including natural and synthetic fibres and staple and filament yarns. Different weave patterns were also included in the analysis (plain, satin and twill). The model is based on the analysis of specular reflectance of light from fibres and simulates the finest fabric surfaces. The model is not data-driven and includes physical parameters as geometry of the fibres and yarns and the weave pattern. The results in the experimental part are evaluated in comparison with high-resolution video of the real fabric and the BTF calculations of analysed fabrics were performed.
The bidirectional texture function (BTF) is an image-based representation of appearance as a function of viewing and illumination direction [16]. Sattler et al. [17] presented a method of determining the BTF of cloths and materials with similar reflectance behaviour including view-dependent texture-maps and using a principal component analysis of the original data. The novelty of their work was also the point light Figure 2. Surface appearance at fixed and varied viewing and illumination directions [16].
Modelling and Visualisation of the Optical Properties of Cloth http://dx.doi.org/10.5772/67736 sources that enable smooth shadow boundaries on the geometry during the data acquisition. Besides, the system was sensitive to geometrical complexity and the sampling density of the environment map, on the basis of which the illumination could be changed interactively.
In the research of Wang et al. [18], the focus was on spatial variations and anisotropy in cloth appearance. The data acquisition device is presented in Figure 3. For the definition of the reflection of the light at a single surface point, they used a data-driven microfacet-based BRDF, i.e. a six-dimensional spatially varying bidirectional reflectance distribution function (SVBRDF) ρ(x,i,o) [19]. In Figure 3, is BRDF at surface point and Ω + is hemisphere of {h|h · n > 0}. Besides, the microfacet 2D normal distribution function (NDF) was implemented. In their research, the SVBRDF was modelled from images of a surface that was acquired from a single view. In their results, they confirmed the reliability of their method, which generates anisotropic, spatially-varying surface reflectance that is comparable with real measured appearance and was tested on various materials.
In some recent researches, the accuracy of BTF was discussed. In the review of appearance modelling methods by Schröder et al. [5] the explanation that the implementation of BTF can limit the appearance results is presented. Namely, the application of BTF can result in incorrectness of modelling of shadow boundaries. Some issues can occur also in the modelling of areas of high curvature that are not represented adequately when BTF is measured with the flat sample as a reference. Moreover, the reproduction of transparency and silhouette correctness are challenging with the use of this function.
The researches performed by Sadeghi and his colleagues [12,13] present the appearance models for visualisation of microstructures. In the last part of the dissertation [12], after the presentation of the models for rendering rainbows and hair, appearance model for rendering cloth is introduced. Here, the focus were the measurements of BRDF of various fabric samples and yarns, which brought to the development of a new analytical BRDF model for threads. The method includes the measurements of profile of reflected light from various types of real yarns. After the measuring, the evaluation and comparison with the reflectance behaviour of the yarns that were predicted with the appearance model was performed, taking into account the fabric composition and yarn parameters [13]. A geometry of light reflection is calculated Iwasaki et al. [20] presented the research about interactive rendering (and interactive editing of parameters for scattering function) of static cloth with dynamic viewpoints and lighting. The method implemented micro cylinder model presenting weaving pattern and patch for calculation of light reflectance with the integration of environment lighting, visibility function, scattering function and weighting function. Their method includes the use of the gradient of signed distance function to the visibility boundary where the binary visibility changes.

Light scattering models for fibres
These models are geometric models of micro geometry that are combined with advanced rendering techniques (global illumination). Here, the micro geometry can be generated procedurally and optical properties of fibres have to be defined with the measurements. Two crucial parameter of fibres have to be considered: anisotropic highlights and translucency (Figure 4) [5].
The fundamentals of light scattering models for fibres that are used in various modern solutions were developed by Marschner et al. [21]. The calculations consider the fibres to be very thin and with long structures, which diameter is very small in comparison to viewing and lighting distance. Consequently, the fibres can be approximated as curves in the scenes and a far-field approximation and curve radiance and curve irradiance are implemented, resulting in bidirectional far-field scattering distribution function for curves BCSDF (Bidirectional Curve Scattering Distribution Function).
Zinke and Weber [22] upgrade the BCSDF in Bidirectional Fibre Scattering Distribution Function (BFSDF) that is a more general approach for light scattering from filaments. In their methods, different types of scattering functions for filaments were used and parameterized for the minimum enclosing cylinder, in which the BFSDF calculates the transfer of radiance ( Figure 5).

Figure 4.
Light scattering from fibres, where R is surface reflection, TT is transmission and TRT is side reflection [5].
Modelling and Visualisation of the Optical Properties of Cloth http://dx.doi.org/10.5772/67736

Volumetric models
Volumetric models consider certain unsolved issues of surface and image-based models by calculating the thickness and fuzziness of the fibres and yarns. The problems of consistent silhouettes and light diffusion in difficult-to-access object areas and accuracy of observation at medium distance are solved with various methods and their combination: with the use of volumetric light transport; the examination of microscopic structures and the processing of computed tomography (CT) data. Here, the fabric elements (fibres, yarns and cloth) are treated as a volume and light scattering models that are applied are, in many applications, explicit [5]. These models enable translucency, light diffusion and optimal silhouettes formations. Their results are scalable and, in dependence of a type of a model, can be integrated in details at yarn and fibre scale. For real-time solutions, they are not suitable and the viewing distance accuracy is usually medium, however in the modern solutions also medium to close.
In volumetric models, light transport theory is usually applied and the calculations for cloth include energy transfers in anisotropic media, i.e. anisotropic light transport computation occurs [23]. In isotropic media, the properties do not depend on the rotation and viewing angle, whereas in anisotropic media (fibres, hair), the optical properties depend on orientation.
Schröder et al. [5] define two types of volumetric appearance models of cloth, a micro-flake model and a Gaussian mixture model of fibres. In micro-flake model, the material is represented as a collection of idealised mirror flakes. Here, the basis of anisotropic light transport are applied, however volume scattering interactions and orientation of flakes are represented with a directional flake distribution. In Gaussian mixture model, fibre location and scattering events are calculated from statistical distribution of intersections between real fibres geometry. Light scattering is additionally calculated with curve scattering models (BCSDF). The mathematical calculations include the computing of defined yarn that is intersecting a voxel cell, for which a Gaussian directionality, density and material properties are generated.
Before the year 2000, there were only few investigations on the use of volumetric methods in the representations of anisotropic, structured media. First implementations were performed for knitwear and for fur [24,25] and that was the beginning of the several researches in the last century.
Xu et al. [26] used the so-called lumislice (Figure 6), a modelling primitive cross-section of yarn that presents a radiance on the level of the fibres (occlusion, shadows, multiple scattering). The sequence of rotated and organised lumislices builds the entire structure of a knit-cloth. In their work, Schröder et al. [27] introduced a concept called local visibility and used a Gaussian mixture model as the approximation of the fibre distribution. This parameter is able to predict self-shadowing and calculates the correlation between defined eye rays and shadow rays. It considers voxels and the size of a yarn cross section and is a fundamental of the function bidirectional visibility distribution function (BVDF). Besides, the authors presented an effective fibre density, which is calculated with the sum of contributions of line segments representing a cloth and intersecting with a certain voxel. The voxelized cloth was finally rendered with Monte Carlo path tracing rendering technique.
Zhao et al. [28] shortly reviewed the volume imaging technologies (CT, magnetic resonance and ultrasound) and discussed their limitation in the sense of their inability for acquiring data that represent direct optical appearance of the material. Besides, the volume rendering and volumetric appearance models are the focus of the paper's introductory part, discussing the complexity of developing the volumetric models that result in physical accuracy and the limitations of procedural methods, which do not consider and calculate the irregularities of cloth. The phenomena of fabric structural and yarn unevenness are crucial for the representation of the natural and organic appearance of cloths. The experiment introduced a method that combines acquisition of volume models, generated from density data of X-ray computed tomography (CT) scans and appearance data from photographs. The authors used a modified volume scattering model [29,30] that describes accurately the anisotropy of the fibres. Due to the very small area that was scanned with CT, in which the result was a very detailed volume reconstruction at a resolution of singular fibre, the represented data have to be augmented and computed with the use of density and orientation fields in the volume that defines the scattering model parameters. Consequently, a highly detail volume appearance model (including highlights and detailed textures) was created with this appearance matching procedure involving the density and orientation fields extracted from the 3D data. The rendering occurs after the definition of global optical parameters. Here, the photo taken under known but not controlled lighting was used and the optical properties were associated with the acquired volume so that the texture of the rendered volume matched the photo's texture. The procedure defines physically accurate scattering properties in the volume of the analysed material and visually and optically accurately describes the appearance of the cloth at the fibre geometry level (small scale) and at viewing from distance. Moreover, at small and large scale, the appearance of the fabric is natural due to the reconstruction of the irregularities at fibre, yarn and cloth level.
After the introduction of micro-CT imaging in volumetric appearance modelling of cloth, Zhao et al. [31] upgraded their research in the next years with the research that presented the cloth modelling process involving the CT technique and the expansion of its use on various fabric and weave patterns with the implementation of a structure-aware volumetric texture synthesis method. The process involves two phases: exemplar creation phase and synthesis phase.
In the first phase, the volume data are acquired with CT scans of very small fabric samples describing the density information on a voxel grid, fibre orientation and yarns. The samples database is created with the procedure that tracks the yarns and their trajectories in the volume grid and segments the voxels so that they match the appropriate yarn and automatically detects the yarn crossing patterns. In the second synthesis phase, the input data are the collection of 2D binary data of weave pattern and 2D data describing the warp and weft yarns at yarn intersecting points. As a result, the output volume is generated that represents the fabric structure, which matches the output of the first phase (exemplars created in the first phase). Further, with the purpose to solve the complexity during the rendering of volumetric data, Zhao et al. [32] also introduced a precomputation-based rendering technique with modular flux transfer, where exemplar blocks are modelled as a voxel grid and precompute voxel-tovoxel, patch-to-patch and patch-to-voxel flux transfer matrices.
Recently, Zhao et al. [33] proposed the automatic fitting approach for the creation of procedural yarns including details at fibre level (Figure 7). CT measurements of cotton, rayon, silk and polyester yarns are taken as a basis for computation of procedural description of yarns. Optical properties of the yarns were defined with Khungurn scattering model [6]. Renderings occur with Mitsuba renderer [30]. The results were compared with photographs, which do on some areas include hairier parts. That was a success of the method, as the combination of very small samples involved in CT acquisition method and procedural approach, usually is not able to reproduce important fabric irregularities. By all means, the method is successful in solving the issue of replication of small pieces of fabric and offers the realistic non-replicating approach to the representation of details.

Fibre-based explicit methods
Fibre-based explicit models use representations with very accurate calculation of reflectance properties in intersecting point between light rays and actual fibres geometry and describe the fabric as a collection of individual discrete fibres represented with explicit geometry. These models are computationally very expensive and can be used for the most physically accurate simulations at fibre level accuracy and close viewing distances including the phenomena of translucency, optimal silhouettes and light diffusion. Usually, the results of explicit methods are not appropriate for real-time solutions [5].
Zhang et al. [34] proposed a solution for the scale-varying representations of woven fabric with the interlaced/intertwisted displacement subdivision surface (IDSS). The IDSS is capable to map the geometric detail on a subdivision surface and generate the fine details at fibre level. The model solves the issues of multiple-view scalability at inter-and intra-scale in woven fabric visualisation due to the implementation of interlaced, intertwisted vector displacement and a three-scale transformation synthesis.
Schröder et al. [35] presented a pipeline of cloth parameterization from a single image that involves a geometric yarn model and automatic estimation of yarn paths, yarn widths and weave pattern. Their inverse engineering pipeline includes input images and coarse optical flow field description, fine flow description of local yarn deformation, fine regularisation of image, output visualisation, the use of active yarn model that procedurally generates fibres, rendering with the setting of fibre and material parameters (Figure 8).
Khungurun [6] presented a fibre-based model including a surface-based cylindrical fibre representation on the basis of volumetric representation. The latter is the voxel array that involves a density of the material at a certain voxel and a local direction of the fibre at this specific voxel. The procedure of fibre geometry generation includes: volume decomposition, fibre centre detection, polyline creation and smoothing and radius determination. The entire pipeline includes: (1) a description of a scene geometry and a set of input photographs of a fabric that were acquired at different lighting and viewing conditions at a defined scene; (2) a development of a light scattering model; (3) the implementation of appearance matching that uses gradient descent optimisation to find optimised parameter values of scattering model and evaluates the differences between renderings and photographs with the objective function. The rendering occurs in extended version of Monte Carlo path tracer. Their research ends with the comparison of micro geometry constructed from CT scans with the explicit fibre-based method and concludes the analysis that both techniques are very successful in representation of cloths at micron level. In Figure 9, (a) fabric geometry creation and (b) appearance modelling pipeline are presented. Figure 8. Inverse engineering pipeline for visual prototyping of cloth [35].

Texture-based reconstruction of the specularity and porosity of cloth
In the context of appearance modelling, mathematical appearance models were reviewed, but computationally less expensive techniques should not be overlooked. These latter techniques are firmly established in 3D animation workflow and in the production of static visualisations that include many objects on the scene, which can be viewed especially at medium and far distance.

Texture mapping
In 3D technology, texture mapping has been used for realistic visualisation of variety of surfaces for a very long time. Using that technique, 2D details of surface properties, i.e. 2D photographs that provide colour and texture surface information from a given object, are added to a 3D geometrical model. In the aspiration to visualise photo realistically, more than one image, respectively, map is needed. Realistic texture must illustrate the complexity of the material surface, what can be achieved using texture mapping without demanding 3D modelling of every detail [36].
Texture mapping is the method which applies texture to an object's boundary geometry, which can be a polygonal mesh, different types of splines or various level-sets. The polygonal mesh is the most suitable for the method, while texture is simultaneously covering the polygons of an object that can be triangles or quads. This process assigns texture coordinates to the polygon's vertices and the coordinates index a texture image and interpolated across the polygon at each of the polygon's pixel determine the texture image's value [37]. The 2D texture that is applied to polygons on the 3D model can be a tiling or a non-tiling image. Methods for computing texture mapping are often called mesh parameterization methods and are based on different concepts of piece-wise linear mapping and differential geometry [36,37].
In UV mapping, defined parameters can be specified by a user, such as precise location of cuts respectively seams, where the 3D model unfolds into a mesh. A UV map can also be generated totally automatically or can be creating with combination of both. The very first introduction of image texturing was in 1974 by Catmull [38]. He introduced the idea of tying the texture pattern to the parameter values. The method guarantees that the pattern rotates and moves with the object. It works for smooth, simple patterns painted on the surface but for simulation of rough textures it was not correct. Since then, the use of various texture mapping for defining different parameters of surface appearance was developed and is in use.
The map that is most commonly used is a diffuse or a colour map that gives surface a colour.
Other maps can define specular reflection, normal vector perturbation, surface displacement, transparency, shadows and others.
Visualisation of roughed, wrinkled and irregular material, firstly introduced by Blinn [39,40], can be implemented with the bump mapping, i.e. a texture function for creation of small perturbation of model's surface normals before using them in the intensity lighting calculations.
With introducing bump map with its functions, roughness of the material can be visualised, although for best result of macroscopic irregularities they have to be modelled. The result of bump mapping is a material that is illusory bumpy, while the geometry of the model is not changed, therefore it is sufficient for shallow types of roughness. Images or maps for visualisation of bumps are greyscale and simulate surface's height, respectively white represent the highest parts or depth, black areas represent the lowest parts.
Where the observation of a rendered model is very close, realistic shading of bumpy surfaces provided with bump mapping is not appropriate while the surface profile does not reveal the realistic roughness and the occlusion effects of the bumps are not visible. In that case the use of a displacement map is necessary. A displacement map contains perturbations of the surface position. When using the displacement map, the geometric position of points on the surface is displaced. This technique is used to add surface detail to a model with the advantage that it has no limitations on bump height. The type of mapping can be considered as a type of modelling although computationally can be quite demanding [41].
A normal map can be used to replace normals entirely. The normal maps are used for adding details to a model without using more polygons. Geometry can be achieved on all three axes. Normal map should be an RGB image which gives three channels that correspond to the X, Y and Z coordinates of the surface normal. For creation of transparent, semi-transparent or even cut-out areas in the surface, a greyscale alpha map can be used.
Aliasing is the artifact that appears when using repetitive images, usually with regular patterns and with high resolution, or animations where the repetition period becomes close to or smaller than the discretization size. The result of such an artifact, where the texture pattern becomes comparable in scale to the raster grid is a moiré pattern that can be highly noticeable in visualised scenes [42].
Aliasing artifacts can be solved with the use of an anti-aliasing technique called MIP mapping [37].
In 1983, Williams [43] described the MIP mapping or pyramids which are pre-calculated and optimised sequences of images at a variety of different resolutions. The method is used to decrease the rendering time, to improve the image quality. At MIP mapping techniques the texture pattern is stored at a number of resolutions. By the process of filtering and decimation, images with high resolution are transformed into ones with lower resolution and that eliminates aliasing.

Work-flow for visualisation of irregular cloth surface
The review of the appearance modelling models revealed that the visualisation of natural appearance of cloth is still a challenge for procedural and computational approaches. The computer-based solution was presented in the research of Zhao et al. [28], however, the issues in representation of irregular cloth structure samples with morphologic, relief and texture data on the large scale that are crucial for visualisation of cloths demand a special attention. This is the case also of the historical and worn cloth that cannot be modelled procedurally with the methods for fibres, yarns and cloth appearance modelling, but with the accurate image-based techniques. Besides, in the cloth production, airy structures, as laces are extremely difficult to reproduce with ordinary 3D modelling techniques in software for 3D computer graphic and they can be computed with simulation algorithms only to some extend [44]. Special attention should be put also on visualisation of hand-made fabrics, artistic and experimental cloths often used in interior and in fashion design.
At micro level appearance modelling, virtual textile porosity is created as a result of interlacing threads into a textile structure and specularity as a consequence of computations of reflectance of shading algorithms. These models are suitable for visualising at close viewing distances or for predictive renderings, for example in the case of computer-aided design (CAD). Besides, porosity, specularity and other irregularities and structural phenomena, that are visible only when cloth is observed at far viewing distance, should not be overlooked. For instance, one should not obey the uneven distribution of organic volume formation in yarns structure that only after interlaced in the final cloth form a random pattern of manifestation.
The aim of our contribution was the analysis and reconstruction of cloth specularity (presenting total specular reflectance and partial reflectance) and porosity (presenting the translucency of cloth and, in technical terms, a void part of the textile's full volume) with the implementation of image processing in the workflow (Figure 10), generation of specular and alpha map (map for porosity) and the definition of the optimal application (mapping) on geometrical models. The image-based appearance modelling workflow for accurate visualisation of a worn cloth that had heterogeneous structure on a large scale was established, which originates from photo documentation (image information) of the material. It was crucial for this process to record information on a very large sample surface (microscopic analysis is hence not appropriate), where it was possible to record uneven structures and time-dependent deformation. The analysed sample was a part of the national costume from the Gorenjska region (100% cotton fabric, plain weave, warp density = 20 threads/cm, weft density = 15 threads/cm, Z yarn twist in warp and weft threads).
The review of the references showed that for the analysis and modelling of appearance of uneven textile surfaces, the use of image-processing methods and computationally less demanding virtual representation is sufficient [45,46]. These workflows focus on the acquisition of specific data, i.e. optical [47][48][49] and constructional [50], and numerical approaches to extract meaningful information on different levels in dependence of the further data implementation. Following these foundations, various illumination conditions at photo acquisition (the combination of two diffuse, left and right, and one direct light) were analysed in the workflow of our research, followed by two phases of image processing (histogram equalisation and rolling ball algorithm). The processing phases were found to be crucial for the detection of specular and porous areas of interest. A special focus was on the study of the optimal threshold method, which enabled the creation of specular and alpha map. Here, the comparison of local and global algorithm techniques [51] was performed and the evaluation of the image analysis results of thresholded images, where different threshold algorithms were implemented.
For the porosity, the threshold was defined with three techniques: min. local point of a histogram, manual definition and Yen algorithm (which was selected on the basis of the image analysis among different ImageJ algorithms) [52].
The detection of specular areas was found to be significantly dependent on local and global threshold approach and Percentile algorithm was finally selected, as other algorithms resulted in threshold images that were unsuitable for further 3D visualisation [53]. Image analysis of detected porous and specular areas enabled the numerical evaluation of areas covered by pores and specular surfaces and the average size and the number of porous and specular areas. Within the image analysis of porosity, special attention was paid to the formation of connected and closed pores in the map for porosity. Here, the connected pores were treated as error, since this phenomenon is not possible to be present in the real fabric. Specular areas manifested different organisation and disposition in dependence of illumination, image processing phase and the type of thresholding algorithm. Further, for the implementation in 3D rendering, the defined specular maps were selected and used with the consideration of location of virtual lights and the specularity appearance of the real fabric.
Fabrics were visualised in 3D program Blender using four different maps, the diffuse map that was a photograph, the normal map, the specular and the alpha map. The last two maps were created and analysed through the workflow established in our research work. In Figure 11, the results of the workflow including variable (real and virtual) lighting conditions and image processing of specular and alpha maps on cloth visualisations are presented. On the left side of Figure 11, emphasised specular areas are presented for diffuse (a and b) and direct (c and d) illumination during image acquisition. The difference among the samples a and c versus b and d is visible due to different position of virtual lights during rendering, where the manifestation of specularity strongly depends on type of lights (diffuse versus direct). On the right side of Figure 11, the visualisation of porosity can be observed with the phenomena of connected and closed pores.

Conclusions
Our contribution is a comprehensive review of advanced and less-demanding methods for modelling of cloth appearance.
The models are classified as image-based, surface-based, volumetric and explicit and the advances in these computer-aided approaches and computations for cloth visualisation are discussed regarding their pipeline, procedure complexity and results implementation at fibre, yarn and cloth scale viewing conditions. In the second part of the chapter, a texturebased and image processing-based modelling of porosity and specularity of irregular cloth surface was introduced. For a realistic modelling and visualisation of a worn cloth with heterogeneous structure and surface on a large scale, a detailed image information of the sample was captured and corresponding image processing methods were applied. In the procedure, the definition and implementation of the optimal threshold algorithm was crucial and the results served as maps for image-based modelling. The maps were evaluated with the image analysis so that the pores and specular areas could also be numerically analysed before they were applied in a final 3D reconstruction. The contribution reviewed the importance of cloth appearance modelling in 3D computer graphic and presented the opportunities for further developments and implementations.