Archaeology and Restoration of Costumes in Tang Tomb Murals Based on Reverse Engineering and Human-Computer Interaction Technology

: This paper takes the tomb murals as the research object, and realizes the development of the costume patterns of the Tang tomb murals and the 3D simulation restoration of the costumes through 3D interactive clothing pattern-making technology and virtual simulation technology. Firstly, the 3D garment model is constructed in the virtual environment according to the costume outline of the Tang Dynasty tomb mural costume. Then, the structural curves of the garment are drawn on the 3D garment according to the characteristics of the Tang Dynasty tomb mural garment style, the 3D surface is expanded and surrounded by these curves into the 2D garment plane, and the expanded surface is adjusted to obtain the 2D garment plane pattern. We use 3D virtual simulation technology to sew the patterns of Tang Dynasty tomb mural costumes and realize the virtual simulation restoration of Tang Dynasty tomb mural costumes. Finally, we create a fuzzy comprehensive evaluation of the restoration effect of the restored costumes. Compared with the traditional costume restoration methods, the method proposed in this paper reduces the technical requirements for operators in the restoration process without destroying cultural relics, and provides a new method for the rapid simulation and restoration of ancient Chinese costumes.


Introduction
The Tang Dynasty (618-907) of China has a history of more than 1000 years.It is one of the dynasties that made the greatest contribution to Chinese costume culture in Chinese history, with the most national strength and the longest duration [1].The development of ancient Chinese garments reached its heyday in the Tang Dynasty.The stability of politics, the development of the economy, the progress of production and textile technology, and frequent foreign exchanges promoted the unprecedented prosperity of costuming.An unprecedented new situation was presented regarding garment style, color, pattern, etc. Women's garments in this period were rich and gorgeous, strange and complex, forming was the most wonderful chapter in Chinese garments [2].Tang Dynasty tomb murals with a unique style of architecture, simple and vivid characters, distinctive utensils, a simple and lively landscape, and lifelike animals and plants, depict the etiquette norms, life customs, costume characteristics, entertainment and architectural style at that time, which is an important image material for the study of social life in Tang Dynasty, especially the noble life and spiritual pursuits [3].At present, some murals of Tang tombs fall off, and the color degeneration is serious.Therefore, it is urgent and necessary to study the archaeology and restoration of Tang tomb murals.The costumes in the murals of Tang tombs are diverse and colorful; they are important materials for studies on the government, economy, and culture of the Tang Dynasty.The archaeology of costumes in Tang tomb murals can provide necessary information for further costume restoration.The traditional manual restoration of clothing cultural relics has a complex operation process, which are limited by time and space in the dissemination of clothing culture [4].Digital clothing restoration has significant advantages in the dissemination of costume culture [4].In addition, the research on the costume restoration of Tang tomb murals is a supplement for the traditional Chinese costume culture.
Costume restoration can be divided into technical restoration and practical restoration.Technical restoration is used to analyze and restore the production process of the research object from the technical perspective.Through a field investigation of cultural relics and comparison with the same period objects, the restoration and restoration of the target object can be achieved with equal proportion and technology.Practical restoration refers to the technical practice of imitating and restoring the real object, including its structure, color, pattern, and technology.It aims to reshape or reconstruct the original object, mostly to obtain a replica, manufacturing process and related technology [5].These two methods require operators to have a comprehensive and systematic ability regarding the production of traditional clothing, which is time-consuming and has a high cost.A new method in the development of information technology is to study the pattern unfolding and virtual simulation of garments using three-dimensional technology.The transformation from a three-dimensional (3D) garment pattern to a two-dimensional (2D) garment pattern is automatically completed by a computer, which obviously reduces the difficulties in garment pattern development [6].For example, Hinds et al. applied the Gaussian curvature expansion method proposed by Calladine to study the expansion problem of a 3D garment surface to a 2D pattern [6].Based on the principle of dart transfer, Heisey et al. studied the mutual transformation between a 3D garment surface and 2D garment pattern by dividing and stitching the hemispherical surface with different angles and pieces, which was then combined with the properties of garment materials [7].Okabe et al. designed a 3D garment CAD system with C and C + + language [8].The system unfolds the 3D surface with the opening position of the dart at the maximum fabric tension, and fully considers the mechanical properties of the fabric in the virtual stitching of 2D samples.As the system includes the 2D sample and the design window of the fabric style, as well as the display window of the 3D garment, it already has the prototype of the current 3D garment CAD.In addition, 3D draping, another method for obtaining a plat pattern, has also been studied.
For example, Hwan et al. assigned a Non-Uniform Rational B-Splines (NURBS) surface dynamic attributes.This took the NURBS surface with dynamic attributes as a virtual fabric, covered it on a 3D human platform to simulate 3D cutting, and cut the NURBS surface with virtual scissors where it needed to be divided.No matter how the shape of the dynamic NURBS surface changed, it had a one-to-one correspondence with the vertices of the non-dynamic NURBS surface before transformation; however, the spatial coordinates were different.After the dynamic NURBS surface was cut by the NURBS curve, the non-dynamic NURBS surface changed accordingly, Therefore, a 2D garment pattern can be automatically generated with the 3D cutting process [9].Kaixuan Liu et al. used 3D virtual simulation technology to construct a 3D garment model, and then drew garment structure lines on the garment model.The garment structural surface was enclosed according to the structure's lines and, finally, the garment surface was expanded to obtain the garment pattern [10].Fang JJ et al. made use of the mass spring method and iterative optimization method to analyze how to set the minimum deformation after the provincial road-flattening [11].They also introduced an energy method to verify the analysis results, and put forward an effective method to generate the optimal provincial road by surface flattening.However, due to the physical and mechanical properties of fabric at present, there are still many defects in the surface unfolding of complex garment styles [12,13].
The digital restoration of cultural relics has gradually become a research hotspot in recent years [14,15].Hou et al. proposed a novel method for the virtual restoration of cultural relics with a complex geometric structure based on multiscale spatial geometry [16].Chu, Gao and Yang et al. applied virtual reality and deep learning technologies to study the classification, restoration and restoration of the fragments of the Terra Cotta Warriors [17][18][19].Chen et al. proposed a method for modeling and supporting digital restoration based on unmanned aerial vehicle oblique photogrammetry combined with three-dimensional (3D) laser scanning technology to restore the ancient watchtower complex in the Tibetan region of China [20].Han et al. presents a non-destructive, more efficient and more scientific method, which combines hyperspectral imaging and computer technology for the digital virtual restoration of the bronze chariot's patterns [21].Hou, Zhou, et al. proposed a virtual restoration method for stains on ancient paintings with maximum noise fraction transformation based on hyperspectral imaging [22].Liu et al. proposed a bilateral filtering point cloud denoising algorithm based on salient features to reconstruct a 3D model of cultural relic fragments [23].The above research on the digital restoration of cultural relics mainly focuses on rigid cultural relics, while textile cultural relics are flexible objects.The digital restoration of flexible objects is much more difficult than that of rigid objects.The shape of flexible objects changes with the change in environmental factors, such as gravity, wind, collision.This leads to more irregular surfaces on the surface of flexible objects, which makes modeling very difficult.Therefore, there are few studies on the digital, three-dimensional restoration of clothing cultural relics.With the emergence of the 3D modeling method for clothing based on the pattern-stitching technology, this provides a feasible method for the rapid 3D modeling of clothing [24][25][26][27].Liu et al. used virtual try-on technology to restore the costumes in the Han Xizai Banquet Painting [4].Wijnhoven and Moskvin used parameterization, computer-aided design and physically based rigid-body simulation to reconstruct the Vimose coat of mail dating to AD 150-220 [28].At present, there are two main methods for the digital restoration of costume cultural relics.One is to model the costume cultural relic through a virtual stitching garment pattern, to realize the three-dimensional restoration of the costume cultural relic.This method needs the garment pattern, which needs to be made by professionals, and the technical difficulty is high.The second is to directly apply the forward modeling method, from point to line, from line to surface, and from surface to object, and finally to realize the three-dimensional restoration of costume cultural relics.This process is very time-consuming, highly professional, and inefficient, which is not conducive to the restoration of large-scale costume cultural relics.
A virtual display system is a product of the development of the Internet era.Virtual display systems are widely used, for example for garments, teaching and so on.Using 3D virtual technology in fashion design can improve the design efficiency.For example, Xudong Zhang et al. introduced a 3D virtual fashion design in detail [29].They also sorted out and listed the relevant steps and methods, and provided the specific process of 3D virtual fashion design, which mainly included human body modeling, style design, color design, and a garment virtual pressure assessment.Liu et al. realized the intelligent and automatic generation of garment style through parametric technology, which provides a new method for the rapid design of garment style [30].In addition, the fitness evaluation of garment pressure and pattern optimization can also be realized through 3D virtual technology.In addition, Kaixuan Liu et al. adjusted and optimized the garment pattern according to the static and dynamic garment pressure based on the comfort of cycling pants [31].Finally, they verified the optimized pattern and proved that this method can be used for the fitting test of garment pressure.A virtual garment display system is also used in academic education.At present, the application of 3D virtual technology to garments mainly involves digital garment design, garment fit evaluation, garment pattern optimization, etc., but the research on ancient garment virtual simulation restoration has not been mentioned.
There is very little material on Tang Dynasty costumes.To date, no landmark costume specimen has been unearthed or handed down.Almost no material objects related to Tang Dynasty costumes have been preserved.We can obtain a glimpse of the style of the costumes at that time by mainly relying on image materials and text materials.Therefore, based on technical restoration, this paper adopts a virtual simulation technology to study Tang tomb mural costumes by way of image interpretation.Combined with a 3D inter-active pattern-making technology, the paper automatically develops patterns and finally completes the virtual simulation restoration of Tang tomb costumes.The innovation of this paper can be summarized in three aspects: (1) This paper obtains a structural drawing of costumes in Tang tomb murals through human-computer interaction and reverse engineering technology, solves the limitation that the current pattern restoration of costume cultural relics needs to be made by professionals, and significantly improves the efficiency of costume structure restoration; (2) This paper presents a novel digital restoration process for costumes in Tang tomb murals based on reverse modeling and reverse modeling technology, which resolves the slow speed and poor accuracy of 3D clothing modeling, and quickly provides 3D model materials for costume virtual display; (3) In this paper, 3D virtual simulation technology is used to restore the costumes in the murals of Tang tombs.Compared with traditional methods, our proposed method is easier to preserve and can be displayed online for a long time, without being limited by time and space.This provides a new, feasible means of disseminating the costume culture of China's Tang Dynasty.
Section 2 first introduces the basic scheme of the article, obtains style information by analyzing costumes in the murals of Tang tombs, then obtains clothing pattern information using forward modeling, human-computer interactions, and surface unfolding technologies.Then, the clothing is restored using the pattern obtained through virtual simulation technology.Section 3 provides the structure diagram and simulation diagram for the seven costumes of Tang tomb murals restored by the method proposed in this paper.Section 4 discusses the advantages, disadvantages, and innovation of our method.Section 5 summarizes the conclusion and provides future research directions.

General Scheme
The general Scheme of this study is shown in Figure 1.First, the selected restoration objects are analyzed to determine the garment style, color, fabric, etc. Figure 1a,b).Second, a 2D garment outline is drawn based on the extracted Tang Tomb garment line drawing combined with the size and proportion of the human body (Figure 1c).Third, a garment model is established in the virtual environment, and the 2D garment contour is converted into a 3D garment model (Figure 1e).Fourth, the surface of the 3D model is stretched to eliminate wrinkles on the model surface (Figure 1f).Fifth, the structural curves are drawn on the 3D garment surface according to the garment styles in Tang Dynasty tombs (Figure 1g).Sixth, the subdivided 3D surfaces are generated by the structural curves (Figure 1h).Seventh, the 2D garment patterns of the restored object are obtained by unfolding the subdivided 3D surfaces (Figure 1i).Eighth, the 2D garment patterns are used to model the costumes (Figure 1j-m).Finally, colors and patterns are added to the costume model to restore the costumes more realistically according to the murals in Tang tombs (Figure 1n).The technology proposed in this paper, and shown in Figure 1a-i, is our unique, new technology [10], and Figure 1j-n uses the existing technology [32].The whole recovery process is original.

Object Analysis
In the Tang Dynasty tomb murals, the costume of the maid is composed of four basic elements, including the Ru, half-arm shawl, short, embroidered cape and skirt.From the early Tang Dynasty to the late Tang Dynasty, there are many female figures in the portraits dressed in a Ru.Ru is usually a jacket with narrow and short width, or light clothes made of cotton.Ru and Pao are relative concepts.A garment that reaches to above the knee can be called Ru.Some people think that a short garment with a waist can be called Ru.The half-arm shawl, as the name suggests, refers to half of the full length of the sleeve.The length of the half-arm shawl reaches to the waist of the human body, and the length of the sleeve reaches to the elbow of the body.The half-arm shawl is worn on the outside of the Ru.The cuff and hem of the half-arm shawl are sometimes decorated.Some half-arm shawls are knotted near the hem of the placket, while others are buckled in the middle of the placket.The short, embroidered cape is covered by a long piece of cloth at the back of the shoulder, and the ends are naturally dropped after winding the arms.The skirt is composed of several pieces of fabric, which are connected and sewed at the hem to form a cluster shape.

Object Analysis
In the Tang Dynasty tomb murals, the costume of the maid is composed of four basic elements, including the Ru, half-arm shawl, short, embroidered cape and skirt.From the early Tang Dynasty to the late Tang Dynasty, there are many female figures in the portraits dressed in a Ru.Ru is usually a jacket with narrow and short width, or light clothes made of cotton.Ru and Pao are relative concepts.A garment that reaches to above the knee can be called Ru.Some people think that a short garment with a waist can be called Ru.The half-arm shawl, as the name suggests, refers to half of the full length of the sleeve.The length of the half-arm shawl reaches to the waist of the human body, and the length of the sleeve reaches to the elbow of the body.The half-arm shawl is worn on the outside of the Ru.The cuff and hem of the half-arm shawl are sometimes decorated.Some half-arm shawls are knotted near the hem of the placket, while others are buckled in the middle of the placket.The short, embroidered cape is covered by a long piece of cloth at the back of the shoulder, and the ends are naturally dropped after winding the arms.The skirt is composed of several pieces of fabric, which are connected and sewed at the hem to form a cluster shape.
The statue of the second maid on the left in the east wall of the tomb of Princess Xincheng was selected as the object of restoration (see Figure 2).The image is 155 cm high and 280 cm wide.It was unearthed in Princess Xincheng Tomb in Zhaoling Mausoleum, Liquan County, Shaanxi Province.The first reason for choosing the maid is that the Ru, half-arm shawl, short, embroidered cape, skirt, bun, round head shoes and accessories depicted in the image are typical characteristics of maids in the early Tang Dynasty.Second, the murals in the tomb of Princess Xincheng are better preserved compared with the tomb murals of the same period.Thirdly, the frescoes in the tomb are The statue of the second maid on the left in the east wall of the tomb of Princess Xincheng was selected as the object of restoration (see Figure 2).The image is 155 cm high and 280 cm wide.It was unearthed in Princess Xincheng Tomb in Zhaoling Mausoleum, Liquan County, Shaanxi Province.The first reason for choosing the maid is that the Ru, half-arm shawl, short, embroidered cape, skirt, bun, round head shoes and accessories depicted in the image are typical characteristics of maids in the early Tang Dynasty.Second, the murals in the tomb of Princess Xincheng are better preserved compared with the tomb murals of the same period.Thirdly, the frescoes in the tomb are more exquisite in style and shape than the maids in the corridor; therefore, the garment style and characteristics of the restored objects can be more comprehensively obtained.
The restoration of the maid's portrait shows that the second maid on the left is wearing a white Ru with narrow sleeves.There is a dividing line in the middle of her upper arm and the cuff ends at the wrist, which is spliced on the sleeve body with white edges.Both hands can be seen at the site of the elbow and forearm, with more folds.Therefore, the sleeve length is longer, and speculated to be the left Lapel Narrow Sleeve Ru.The white half-arm shawl is worn on the outside of the Ru, but is darker than the white of the Ru and skirt.The style of the half arm shawl is similar to that of the fourth maid on the left.The collar is a low, square, round collar with white edges at the neckline, and the sleeve cuff is spliced, with a red background and white brocade.The sleeve cuff has white edges on both sides.It is speculated that the half-arm shawl is a short half-arm shawl with a square round collar and sleeves.The outer part of the skirt is decorated with white brocade on a red background, and the waist is white.The maid is wearing a long, white and tawny, striped, pleated skirt with a longer body.Through an analysis of the costume style of the second maid on the left, we can see that the costume style is exquisite.Combined with the location of the tomb, this shows that the maid has a high ranking and is qualified to wear a silk costume.more exquisite in style and shape than the maids in the corridor; therefore, the garment style and characteristics of the restored objects can be more comprehensively obtained.The restoration of the maid's portrait shows that the second maid on the left is wearing a white Ru with narrow sleeves.There is a dividing line in the middle of her upper arm and the cuff ends at the wrist, which is spliced on the sleeve body with white edges.Both hands can be seen at the site of the elbow and forearm, with more folds.Therefore, the sleeve length is longer, and speculated to be the left Lapel Narrow Sleeve Ru.The white half-arm shawl is worn on the outside of the Ru, but is darker than the white of the Ru and skirt.The style of the half arm shawl is similar to that of the fourth maid on the left.The collar is a low, square, round collar with white edges at the neckline, and the sleeve cuff is spliced, with a red background and white brocade.The sleeve cuff has white edges on both sides.It is speculated that the half-arm shawl is a short half-arm shawl with a square round collar and sleeves.The outer part of the skirt is decorated with white brocade on a red background, and the waist is white.The maid is wearing a long, white and tawny, striped, pleated skirt with a longer body.Through an analysis of the costume style of the second maid on the left, we can see that the costume style is exquisite.Combined with the location of the tomb, this shows that the maid has a high ranking and is qualified to wear a silk costume.

Garment Size Determination
A mural is a two-dimensional structure, while clothing is a three-dimensional structure.In the process of converting a two-dimensional image to three-dimensional clothing, we need to pay attention to the size conversion.The restoration research looks at the relationship between human size and human body proportion to obtain the approximate outline size of the Tang Dynasty tomb mural costume and, through observation, the relationship between the body parts and the garments of the characters is determined, and the corresponding body size data are obtained.We found that, in some murals, the sleeve length of the female reaches only the wrist, and the corresponding sleeve length is about the arm length of the human body, as shown in Figure 3.However, there are obvious folds in the female's forearm, as shown in Figure 2. The sleeve length should exceed the arm length of the human body, which should be calculated according to the proportion of the human body.The height of the human body is divided into seven

Garment Size Determination
A mural is a two-dimensional structure, while clothing is a three-dimensional structure.In the process of converting a two-dimensional image to three-dimensional clothing, we need to pay attention to the size conversion.The restoration research looks at the relationship between human size and human body proportion to obtain the approximate outline size of the Tang Dynasty tomb mural costume and, through observation, the relationship between the body parts and the garments of the characters is determined, and the corresponding body size data are obtained.We found that, in some murals, the sleeve length of the female reaches only the wrist, and the corresponding sleeve length is about the arm length of the human body, as shown in Figure 3.However, there are obvious folds in the female's forearm, as shown in Figure 2. The sleeve length should exceed the arm length of the human body, which should be calculated according to the proportion of the human body.The height of the human body is divided into seven units, with the waistline as the node.The upper and lower parts are three heads and four heads, respectively.We used the relationship between the proportion of the human body to obtain the size data.Firstly, the top of the head, the front neck and the middle of the waistline are determined.Then, the three points are connected into two straight lines, if the angle between the two lines is close to 180.The corresponding limb has no bend, and then the length  of the three-dimensional straight line between the first and the third part nodes We used the relationship between the proportion of the human body to obtain the size data.Firstly, the top of the head, the front neck and the middle of the waistline are determined.Then, the three points are connected into two straight lines, if the angle between the two lines is close to 180.The corresponding limb has no bend, and then the length n of the three-dimensional straight line between the first and the third part nodes is measured, corresponding to the length n 1 of the two joints in the standard human body.The length m of a certain part of the garment in the image is measured, and the length data m 1 of the garment structure restoration are calculated according to the proportional relationship n/n 1 = m/m 1 , as shown in Figure 4. We used the relationship between the proportion of the human body to obtain the size data.Firstly, the top of the head, the front neck and the middle of the waistline are determined.Then, the three points are connected into two straight lines, if the angle between the two lines is close to 180.The corresponding limb has no bend, and then the length  of the three-dimensional straight line between the first and the third part nodes is measured, corresponding to the length  of the two joints in the standard human body.The length  of a certain part of the garment in the image is measured, and the length data  of the garment structure restoration are calculated according to the proportional relationship / / , as shown in Figure 4.

Garment Pattern-Making
This 2D-to-3D garment virtual modeling forms the basis of garment restoration.As the style drawing can be directly extracted from the tomb murals, this paper directly constructs the costume model through an outline of the style drawing.The costume pattern is obtained by unfolding the model surface, and the pattern is used as the basis when restoring the garment.According to the Tang Dynasty tomb garment mural image, the garment's line drawing is directly extracted in the CAD drawing software (see Figure 5a).The front and back outline patterns of the garment are drawn, and combined with the determined garment size (see Figure 5b).Through an analysis of the garment style modeling in the restoration object, the restoration object's upper body wears a half-arm shawl.Therefore, different contour patterns are needed to build models, and the size data of ae, a f and f g are measured and calculated using the relationship of human body proportion.These serve as the horizontal basis for drawing the front and rear contour patterns, respectively.The vertical basis is obtained by measuring and calculating the size data of h.The purpose of this process is to obtain the garment's shape pattern without needing an accurate size.This would mean that there is no need to master professional garment pattern-making skills.

3D Garment Model Establishment
The purpose of constructing a costume model is to expand the surface of the costume model and obtain the costume structure diagram, which is a necessary condition when restoring clothing.At present, there are many methods for garment modeling, such as using a camera or scanner to build the model, garment modeling based on a 2D sketch, garment modeling based on a 3D sketch, and garment modeling based on an image.According to the structural characteristics of costume modeling in Tang Dynasty tomb mural costumes, this paper combines geometric modeling and image modeling to complete the establishment of the restored object model.Geometric modeling is also contour modeling.First, the contours of the object are drawn, and then the virtual model is constructed on the object.Geometric modeling can visually and clearly modify the outer contour of the object in the application process to change the shape of the object, and is suitable for complex and small patterns, patterns, and other objects.Image modeling is directly realized by the camera, and the original image is obtained by taking photos.This method is more realistic and easier to implement than geometric modeling.
The virtual simulation restoration of Tang Dynasty tomb mural costumes is based on images, so its 3D model is directly obtained by stitching a 2D garment pattern in the virtual environment using virtual fitting technology (see Figure 5c).Then, the 3D clothing model is adjusted until its shape is consistent with the clothing in the mural (see Figure 5d).

Garment Pattern-Making
This 2D-to-3D garment virtual modeling forms the basis of garment restoration.As the style drawing can be directly extracted from the tomb murals, this paper directly constructs the costume model through an outline of the style drawing.The costume pattern is obtained by unfolding the model surface, and the pattern is used as the basis when restoring the garment.According to the Tang Dynasty tomb garment mural image, the garment's line drawing is directly extracted in the CAD drawing software (see Figure 5a).The front and back outline patterns of the garment are drawn, and combined with the determined garment size (see Figure 5b).Through an analysis of the garment style modeling in the restoration object, the restoration object's upper body wears a halfarm shawl.Therefore, different contour patterns are needed to build models, and the size data of ,  and  are measured and calculated using the relationship of human body proportion.These serve as the horizontal basis for drawing the front and rear contour patterns, respectively.The vertical basis is obtained by measuring and calculating the size data of h.The purpose of this process is to obtain the garment's shape pattern without needing an accurate size.This would mean that there is no need to master professional garment pattern-making skills.

3D Garment Model Establishment
The purpose of constructing a costume model is to expand the surface of the costume model and obtain the costume structure diagram, which is a necessary condition when restoring clothing.At present, there are many methods for garment modeling, such as using a camera or scanner to build the model, garment modeling based on a 2D sketch, garment modeling based on a 3D sketch, and garment modeling based on an image.According to the structural characteristics of costume modeling in Tang Dynasty

3D Garment Model Adjustment
The 3D costume model is constructed by virtually stitching the costume contour line of the Tang dynasty tomb mural, as shown in Sections 2.4 and 2.5.As the costume outline is not the real dress pattern, there will be a big gap between the costume model and the expectation.It is necessary to adjust the costume contour until the costume model is consistent with the costumes in the Tang dynasty tomb murals.Moreover, due to the influence of physical properties, such as the gravity of the fabric itself and the distance between the position of the arrangement point of the pattern and the human body, the 3D garment may not be smooth enough, and there may be creases or folds in the details.The existence of these creases and folds affects the accuracy of the structure curve drawn on the garment surface, and the 3D garment surface should be as smooth as possible.
To avoid the above uncertainties, we stretched the generated 3D garment model without changing the area and edge of any triangle mesh, and made the garment surface smooth by further fine-tuning (see Figure 5e).The stretching rules of the 3D garment surface are given as follows: . ., a) (rule of mesh edge invariance) (1) where l B i is the length of the ith triangular edge before stretching; l A i is the length of the ith triangular edge after stretching; s B i is the area of the ith triangular mesh before stretching; s A i is the area of the ith triangular mesh after stretching; a is the number of triangular edges of the 3D garment; b is the number of triangular meshes of the 3D garment.
After that, we freeze the stretched garment to maintain its shape (see Figure 5f).In the process of 3D garment adjustment, the shape and size of the 3D garment contour pattern do not need too many restrictions; the visual effect only needs to meet the requirements.

3D Garment Surface Construction
The 3D garment model of the Tang Dynasty tomb mural garment uses the tomb mural as the basic material, and the 2D garment pattern obtained from the 3D garment model is more suitable for the reality.According to an analysis of the Tang Dynasty tomb mural garment style, the surface flattening technology is used to draw the structure curve on the surface of the 3D garment model after stretching and freezing (see Figure 5g).As the human body shape has an irregular surface, it is necessary to adjust and modify the curves repeatedly to obtain the most accurate pattern.These structural curves divide the 3D garment surface into several adjacent different surfaces (see Figure 5h).

3D Garment Surface Flattening
There are three kinds of 2D flattening techniques for a 3D garment model: geometric unfolding, mechanical unfolding and geometric unfolding mechanics' correction [33].The 3D garment model of the Tang Dynasty tomb costumes adopted the geometric expansion method, which aims to expand the different 3D garment areas that were subdivided in the previous section into 2D garment patterns (see Figure 5i).This process should be combined with the previous step to minimize the change in triangle mesh edge on 3D garment surface and the corresponding change in the 2D pattern.In addition, all intersecting structural curves on the garment surface should always be associated with the 2D pattern.The unfolding rules of the 3D garment surface are given as follows: a B m = a A m (m = 1, 2, . . ., c) (rule of invariance for angle of intersecting curves) (5) where l B i is the length of the ith triangular edge before stretching; l A i is the length of the ith triangular edge after stretching; s B j is the area of the ith triangular mesh before stretching; s A j is the area of the ith triangular mesh after stretching; a B m is the angle between two intersecting construction curves before stretching; a A m is the angle between two intersecting construction curves after stretching; ls B n is the length of the ith 3D contour lines before stretching; ls A n is the length of the ith 3D contour lines after stretching; a is the number of triangular edges of the 3D garment surface; b is the number of triangular meshes of the 3D garment surface; c is the number of angles of all intersecting construction curves; d is the number of contour lines of the 3D garment surface.

2D Garment Pattern Optimization
The flattening process from a 3D garment model to a 2D pattern does not consider the fabric elasticity.However, fabric elasticity is an important factor affecting the accuracy of the garment pattern.The elastic fabric shrinkage should be fully considered in the pattern obtained by unfolding the three-dimensional garment surface.Finally, we need to use pattern-making technology to smooth the edge of the unfolded 2D pattern (see Figure 5j).

3D Garment Virtual Simulation
Interactive costume pattern design and restoration of the Tang Dynasty tomb mural adopts a 3D virtual fitting technology to simulate and display the automatically generated 2D pattern.According to the Tang Dynasty tomb mural garment style, the physical properties of the garment, such as its pattern, technology, fabric color, thickness, elasticity and hardness, are set in the parameters.Firstly, the modified 2D garment pattern is imported into the virtual simulation software, and the imported pattern simultaneously appears in the 2D and 3D interface in the form of a plane.The pattern is accurately matched and attached to the corresponding body parts through the set arrangement points.Then, virtual stitching is carried out, using the methods for actual piece stitching.The upper and lower position of the cut piece are considered before stitching to avoid overlap and cross-stitching.To accurately create the simulation effect, the patterns must be placed in the 3D window close to the human body and meet the requirements of the suture part.As the upper body of the restoration object wears a half-arm shawl, it is necessary to simulate the stitching of the Ru Shan skirt first, then arrange the position of the skirt, the half-arm shawl and the Wei Shang, respectively, and sew them again.The fabric performance is set in the physical window according to the garment style.Finally, the virtual garment is displayed for fitting, and the details of the 3D model are adjusted by rotating the virtual human body.In this way, the virtual simulation of the maid's costume in the Tang tomb mural was completed (see Figure 6).skirt, the half-arm shawl and the Wei Shang, respectively, and sew them again.The fabric performance is set in the physical window according to the garment style.Finally, the virtual garment is displayed for fitting, and the details of the 3D model are adjusted by rotating the virtual human body.In this way, the virtual simulation of the maid's costume in the Tang tomb mural was completed (see Figure 6).

Results
The object of this restoration was the costumes of the characters in Tang Dynasty tomb murals.As the style, color and pattern of each garment are different, it is necessary to analyze and judge each garment.For garments with a distinctive style and color characteristics, we used image processing, pattern flattening and virtual fitting software for pattern development and virtual simulation restoration.For the garment image without pattern and color matching, we inferred the fabric through the painting style of the portrait, the texture of the garment, the drape feeling, etc.For incomplete images of the figure garment, the article concluded with the tomb, contemporaries, and other image data, such as scroll painting, and finally completed the virtual simulation restoration.Using the 3D interactive pattern-making technology and visual virtual simulation restoration proposed in the third part, the development of the Tang Dynasty tomb mural costume pattern and the effects of virtual simulation restoration are shown in Figure 7.

Results
The object of this restoration was the costumes of the characters in Tang Dynasty tomb murals.As the style, color and pattern of each garment are different, it is necessary to analyze and judge each garment.For garments with a distinctive style and color characteristics, we used image processing, pattern flattening and virtual fitting software for pattern development and virtual simulation restoration.For the garment image without pattern and color matching, we inferred the fabric through the painting style of the portrait, the texture of the garment, the drape feeling, etc.For incomplete images of the figure garment, the article concluded with the tomb, contemporaries, and other image data, such as scroll painting, and finally completed the virtual simulation restoration.Using the 3D interactive pattern-making technology and visual virtual simulation restoration proposed in the third part, the development of the Tang Dynasty tomb mural costume pattern and the effects of virtual simulation restoration are shown in Figure 7.
to analyze and judge each garment.For garments with a distinctive style and color characteristics, we used image processing, pattern flattening and virtual fitting software for pattern development and virtual simulation restoration.For the garment image without pattern and color matching, we inferred the fabric through the painting style of the portrait, the texture of the garment, the drape feeling, etc.For incomplete images of the figure garment, the article concluded with the tomb, contemporaries, and other image data, such as scroll painting, and finally completed the virtual simulation restoration.Using the 3D interactive pattern-making technology and visual virtual simulation restoration proposed in the third part, the development of the Tang Dynasty tomb mural costume pattern and the effects of virtual simulation restoration are shown in Figure 7.

Determine Evaluation Item Set
Garment virtual restoration is the reproduction of the garment's original appearance based on pictures and documents.Therefore, it is necessary to restore the structure, style, color, pattern and other information of clothing when performing garment virtual restoration.At present, there is no unified evaluation standard for virtual garment restoration.After consulting the relevant literature, we finally determined the evaluation index for garment restoration effect U, U = (u1, u2, u3, u4), where u1 = overall shape, u2 = color pattern, u3 = fabric performance, u4 = structural details.The evaluation index of garment restoration effect is U = (overall shape, color pattern, fabric performance, detail structure).

Determine the Recovery Effect Evaluation Set
The evaluation set is the set of evaluation results that the evaluators can make for each factor, and the evaluation of different evaluation indicators is different.According to the restoration effect, a five-level evaluation standard C = (c1, c2, c3, c4, c5) is adopted, where c1 = very poor, c2 = poor, c3 = average, c4 = good, c5 = very good.In other words, the evaluation standard of garment restoration effect is C = (very poor, poor, average, good, very good).

Determine the Weight Coefficient of Each Index
Different indicators have different effects on the evaluation of virtual restoration effect, so it is very important to determine the weight of each indicator.We used the priority chart method to determine the weight of each item in the evaluation project set, and a

Validation 4.1. Determine Evaluation Item Set
Garment virtual restoration is the reproduction of the garment's original appearance based on pictures and documents.Therefore, it is necessary to restore the structure, style, color, pattern and other information of clothing when performing garment virtual restoration.At present, there is no unified evaluation standard for virtual garment restoration.After consulting the relevant literature, we finally determined the evaluation index for garment restoration effect U, U = (u 1 , u 2 , u 3 , u 4 ), where u 1 = overall shape, u 2 = color pattern, u 3 = fabric performance, u 4 = structural details.The evaluation index of garment restoration effect is U = (overall shape, color pattern, fabric performance, detail structure).

Determine the Recovery Effect Evaluation Set
The evaluation set is the set of evaluation results that the evaluators can make for each factor, and the evaluation of different evaluation indicators is different.According to the restoration effect, a five-level evaluation standard C = (c 1 , c 2 , c 3 , c 4 , c 5 ) is adopted, where c 1 = very poor, c 2 = poor, c 3 = average, c 4 = good, c 5 = very good.In other words, the evaluation standard of garment restoration effect is C = (very poor, poor, average, good, very good).

Determine the Weight Coefficient of Each Index
Different indicators have different effects on the evaluation of virtual restoration effect, so it is very important to determine the weight of each indicator.We used the priority chart method to determine the weight of each item in the evaluation project set, and a jury group composed of eight experts in the field of garment digital technology.They compare two of the four indicators according to their professional experience.If the index Xi is more important than the index Xj, Xi receives 1 point; if it is equally important, Xi receives 0.5 points; if the index Xj is more important than the index Xi, Xi will receive 0 point.The results are shown in Table 1.According to the score, we calculated the importance weight for each influencing factor, and the calculated weight is as follows: The weight of each index calculated by equation ( 1) is A = (α 1 , α 2 , α 3 , α 4 ) = (0.41, 0.28, 0.09, 0.22).According to the membership degree, we can see the corresponding weight of each index, and obtain the importance of each index: overall shape > color pattern > detail structure > fabric performance.

Establish Fuzzy Evaluation Matrix
After determining the evaluation items, evaluation scale and evaluation item weight, the recognition degree of the virtual garment is evaluated in the form of questionnaire survey.The survey objects are college students with a relevant understanding of the virtual garment.A total of 325 questionnaires were collected, including 309 valid questionnaires, with an effective rate of 95.1%.The survey's statistical results are shown in Table 2.According to the statistical results in Table 2, the comprehensive evaluation matrix is as follows: E =     0 0 0.11 0.41 0.48 0 0 0.09 0.52 0.39 0 0 0.38 0.34 0.28 0 0 0.46 0.41 0.13     (8)

Fuzzy Comprehensive Effect Evaluation
Each line in E i indicates that, when evaluating the effect of digital garment restoration, the subordinate degree of each item index is investigated using different factors, and the corresponding evaluation item weight is used to synthesize E i .Finally, the comprehensive effect evaluation B can be obtained.We use formula B = A•E to calculate B as follows: B = 0.41 0.28 0.09 0.22 •     0 0 0.11 0.41 0.48 0 0 0.09 0.52 0.39 0 0 0.38 0.34 0.28 0 0 0.46 0.41 0.13     = 0 0 0.21 0.43 0.36 (9) The comprehensive evaluation results show 21% of the evaluators think that the restoration effect is "general", 43% think the restoration effect is "good", and 36% think the restoration effect is "very good".According to the principle of maximum subordination, the restoration effect of the character costumes in the Tang Dynasty tomb mural is "good".

Discussion
Various research methods and practical application cases of garment restoration have appeared over time.Researchers mostly worked in the reproduction of garment cultural relics, but were rarely involved in the restoration of traditional garments without physical preservation.On the one hand, there is no real object for direct research and comparison; we can only rely on images and the literature records for reference, so the difficulty and accuracy of restorations are difficult to grasp.Most researchers engaged in the study of garment history and the existing research results have limitations regarding the practical production of experience and research methods, and the restored objects are difficult to preserve over a long period of time.This paper applies the concept of 3D reverse engineering to the process of garment restoration in virtual space, and puts forward general steps of garment virtual restoration, using the image as the base material.The new methods used in the process of garment virtual restoration and the new space that is not involved are obtained.

Conclusions
In this paper, 3D technology, image technology and various software are used to simulate the costumes of characters in the murals in Tang Dynasty tombs, and the development of a garment pattern according to the murals of Tang Dynasty tombs is completed.On this basis, the 3D simulation restoration of costumes seen in portraits in Tang Dynasty tombs is realized, and the feasibility of this method is verified.
(1) In this paper, the development of the pattern for the maid in the tomb mural, which was used as an example, makes up for the lack of a complete record of the costume pattern of the Tang tomb mural.For garment without a basic pattern, the pattern can be automatically generated without repetitive modifications of the pattern, which is useful for the study of the Tang Dynasty costume modeling structure.At the same time, it provides a direction for deepening and expanding this research area; (2) This paper reproduces Tang Dynasty tomb mural costumes, and establishes a simulation restoration system of tomb mural costumes in a virtual environment, using images as the main material.It is easy to operate, with high fidelity, and can truly reflect the 3D model simulation effect of Tang Dynasty tomb mural costumes.
(3) The restored costumes do not need to be preserved on the spot.This removes the time constraints and geographical conditions regarding the transmission of ancient costume culture, and provides a new approach to the inheritance and development of traditional Chinese costume culture.
Future research can be carried out, looking at the following three aspects: (1) Applying artificial intelligence technology, such as Generative Adversarial Network (GAN), to automatically repair costume images on damaged murals;

Figure 1 .
Figure 1.General Scheme of this study.

Figure 2 .
Figure 2. The second maid from the left in the middle of the east wall of the Princess of Xincheng's tomb.

Figure 2 .
Figure 2. The second maid from the left in the middle of the east wall of the Princess of Xincheng's tomb.

Sustainability 2022 ,
14, x FOR PEER REVIEW 7 of 16units, with the waistline as the node.The upper and lower parts are three heads and four heads, respectively.

Figure 3 .
Figure 3.The size data can be directly measured.

Figure 3 .
Figure 3.The size data can be directly measured.

Figure 3 .
Figure 3.The size data can be directly measured.

Figure 4 .
Figure 4. Determination of garment size data using the human body proportion method.Figure 4. Determination of garment size data using the human body proportion method.

Figure 4 .
Figure 4. Determination of garment size data using the human body proportion method.Figure 4. Determination of garment size data using the human body proportion method.

Figure 7 .
Figure 7. Dress pattern and 3D simulation of Tang tomb murals.

Table 1 .
Restoration effect index importance ranking.

Table 2 .
Statistical results of restoration effect recognition evaluation.