# Research on National Costume Design Based on Virtual Reality Technology

Authors: Chunnan Cao; Yiping Gao
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

Cheongsam has the unique costume culture characteristics of the Chinese nation and is a classic style of traditional Chinese costumes. At the same time, with the rapid development of science and technology, 3D virtual technology plays an increasingly important role in the garment intelligent manufacturing industry. Therefore, how to combine 3D virtual technology with the development of women’s cheongsam clothing products is of great significance, which can overcome the limitations of time and space and effectively improve the efficiency of clothing pattern design. To solve this problem, a design method for national costume based on virtual reality technology is proposed. First of all, the modeling and structural characteristics of cheongsam are analyzed. Secondly, different curve fitting methods are applied to human body feature recognition, and cubic polynomial fitting is selected to complete the feature recognition of the human body model in a virtual environment. Then, in order to prevent the penetration between clothing and the human body, the collision detection function based on the AABB bounding box is added, and a method based on linear sensitivity is used to map 2D to 3D. Finally, the model of a cheongsam costume is created by using the clothing simulation Marvelous Designer software, and the effectiveness of the proposed virtual cheongsam costume simulation design method is verified by subjective evaluation indexes.


---

## Body

## 1. Introduction

The traditional cheongsam in the Republic of China plays an important role in the history of Chinese national costume. It reflects the evolution from tradition to modernity in the modeling structure of Chinese traditional national costume and is a typical representative of Chinese women’s traditional costume. With the progress of the times, people pay more attention to the cultural heritage of costumes, and national costumes gradually show vigorous vitality. In recent years, the booming development of the Hanfu industry and high-end customization industry in China is the best example. However, with the popularity of COVID-19 in the world, fashion designers cannot communicate face-to-face with customers in the real world. In this situation, people have an unprecedented demand for virtual fitting and virtual dynamic display of clothing [1–6].For fashion designers, reliable and real 3D clothing simulation can accurately convey the details and wearing styles of clothing and make consumers more intuitive to understanding the shape of clothing. Clothing manufacturing mode based on a 3D model is also helpful for enterprises to realize flexible production and reduce inventory pressure and capital chain tension. For consumers, a more intuitive clothing display can help them accurately judge whether the clothing is suitable for their own conditions, which greatly promotes clothing consumption [7–10]. For schools, 3D clothing simulation can serve teaching well. For the museum, 3D costume simulation can help the inheritance and development of traditional national costume culture.In the aspect of 3D modeling, Poser, Marvelous Designer (MD), CLO3D, Style 3D, and other software which are more suitable for human body modeling and virtual clothing design simulation in the clothing industry have been born since the traditional Maya and 3Dmax [11–14]. In the field of anthropometry, the popularization and application of phase grating technology, 3d scanner, and reverse engineering technology have laid a good foundation for accurate anthropometry [15–17]. In two-dimensional plate making, pattern design, and fabric design, various advanced systems also provide support for small-scale, flexible customized production of clothing. Each link of virtual clothing design can be completed more accurately and quickly by new technology step by step. Virtual garment last section system can greatly reduce the cycle and cost of garment design. The key problems of virtual clothing design can be classified into three aspects: feature recognition of the human body model, real-time interaction, and fabric model. This paper mainly studies the first two problems.First of all, the recognition of human body features is a key link in the process of virtual clothing design. The accuracy of feature point recognition is directly related to the progress of digital clothing research and development and the quality of products. How to obtain the position of human feature points accurately and quickly at the same time with low cost is the research content of many scholars and scientific research institutions. Li et al. [18] used the improved Canny algorithm to identify feature points and combined it with subjective artificial marking points to accurately identify human feature points. Zhang et al. [19] proposed to recognize 3D human feature points by a random forest algorithm. Zou et al. [20] proposed to obtain human body parameters by fitting the distance between feature points. At present, the types of functions that can be used for curve fitting include polynomial, exponential function, parametric spline curve, B spline curve, Gaussian function, Fourier function, and interpolation function. In this paper, different curve fitting methods are applied to human feature recognition. Through the comparison of different effects, the advantages, disadvantages, and adaptation surfaces of different ways are discussed, and finally, cubic polynomial fitting is selected for human feature recognition.Secondly, the real-time interaction between the human body and clothing is another difficult problem that clothing design needs to face in the virtual environment. In order to avoid the situation where the cloth penetrates the human body when the cloth collides with the human body, it is necessary to add real-time interaction of collision detection and response. Park et al. [21] combined multilevel modeling methods to improve the accuracy of collision detection and solved the problem of low collision detection efficiency caused by the complexity of multilevel modeling. Nakai et al. [22] used a two-stage filtering algorithm to realize the continuous collision detection of objects, aiming at detecting the continuous collision state and collision feedback so as to improve the detection efficiency of continuous collision of objects.Therefore, aiming at these two problems, this paper designs a cheongsam clothing simulation method based on virtual reality technology. Due to the powerful technology of MD clothing simulation, it is gradually being favored by fashion designers. As a new 3D clothing software, MD has plenty of room for innovation and development in the clothing field. Therefore, this research will use the Marvelous Designer 9 platform and Unity engine to realize virtual clothing design. The main work includes the following: (1) Aiming at the problem of human model recognition, different curve fitting methods are applied to human feature recognition, and different effects are compared; (2) Aiming at the real-time interaction problem, the collision detection method based on AABB bounding box is adopted to prevent the penetration phenomenon between clothing and the human body, and a method based on linear sensitivity is adopted to map 2D to 3D, which can more truly simulate the influence of mouse drag on 3D clothing state.The rest of the paper is organized as follows: In Section2, the structural analysis of traditional cheongsam clothing is studied in detail, while Section 3 provides the human feature point recognition in virtual environments. Section 4 provides the collision detection techniques in virtual interaction. Section 5 provides the virtual clothing design presentation and evaluation. Finally, the paper is concluded in Section 5.


## 2. Structural Analysis of Traditional Cheongsam Clothing

The modeling structure features of cheongsam are analyzed, including cheongsam standup, cheongsam sleeve, cheongsam body piece, and cheongsam slit. First of all, whether it is a traditional cheongsam or a modern cheongsam, standup up is its representative feature and an important modeling language of cheongsam. Standup is a subtle detail that plays a finishing role in the whole cheongsam. By measuring the standing up of 25 cheongsams in the Republic of China, it is found that the circumference of the standing up is about 34 cm, and the maximum value is no more than 37 mm. The greater the rise of the standup, the tighter the standup will be to the top of the neck, creating a small amount of space, which is not conducive to human movement. Therefore, there is a certain limit to the amount of rise, generally between 1 cm and 2.5 cm. In short, the internal structural features of the cheongsam standup, although varying slightly, are directly related to the modeling features of the collar, reflecting people’s dress code and aesthetic requirements.Secondly, the sleeves of the cheongsam are roughly divided from a structural perspective into loose sleeves, modest sleeves, and semiwestern sleeves. As the sleeves and body pieces of the traditional cheongsam are flat, this shape requires that the sleeves and the body piece of the garment must become a single unit.The fabric of the cheongsam in the Republican period was mainly silk fabric, which was soft and delicate and not easy to fix when cutting. In order to ensure the accuracy of the values when cutting, a two-dimensional flat structure was adopted. The front and back body is symmetrical in the horizontal direction with the shoulder and sleeve line, and the left and right body are symmetrical in the vertical direction with the front and back centerline.Finally, in terms of construction, the slash is mainly to facilitate the body's movement. The height of the slash depends on the length of the cheongsam and the distance that the legs can travel when the body is in motion. The slash does not need to be too high to allow for movement. Depending on the height of the hemline, the cheongsam can be divided into long and short cheongsams, as shown in Figure1.Figure 1
Cheongsam costume slashes. (a) Long Cheongsam and (b) Short Cheongsam.
(a)(b)


## 3. Human Feature Point Recognition in Virtual Environments

### 3.1. Experimental Analysis of Human Bust Line Curve Fitting

In the process of garment design and manufacturing, the bust line is a key part of human body shape analysis, and the curve structure is complex and difficult to fit, so the right section of the 160/84A bust line is selected as the experimental object for curve fitting in this paper. By comparing the fitting effects of different fitting methods, the fitting equations suitable for calculating the curvature and circumference of the human body at a later stage are sought [23–25].In terms of the selection of the fitted functions, the spline curve, although a good fit, has a large number of equations and high complexity, so the spline curve was not part of the examination for this experiment. The types of functions finally chosen for the experiment were polynomial, Gaussian, sine, and Fourier functions. Due to the relatively even distribution of the point cloud data, the bust line was divided roughly equally into 10 segments, the effect of which is shown in Figure2.Figure 2
Bust line point cloud map.In this experiment, 12 fitting methods (4 functions, multiple orders) were applied to the 10-segment bust sample data for a total of 140 fitting trials, and the accuracy of each order of the different fitting functions is shown in Table1.Table 1
Fitting accuracy of various fitting functions in 10 curves.
Fitting methodOrdersABCDEFGHIJPolynomial functions20.99430.99890.99920.99990.998510.99950.99770.9760.991930.99980.99980.999911110.99960.9862140.99980.99981111110.998715111111111161111111111Gaussian function10.97560.99970.9980.99970.99820.99990.99930.99690.97590.94820.99970.9982111110.999911Sine function10.99430.99930.99890.99980.998410.99940.99750.9760.94420.999810.999310.99980.9999110.99790.9957Fourier function10.99430.99970.99920.99990.998510.99950.99770.9760.999920.99980.99981111110.999213ErrorErrorErrorErrorErrorErrorErrorError11The polynomial of the 3rd order was not only fitted with an accuracy mostly above 0.99 but also with a relatively simple equation and a small number of parameters, making it easy to carry out the subsequent derivative integration operation. In combination with the analysis of human characteristics in the subsequent operation, the amount of data selected was moderate and evenly distributed, so the final choice was to fit a 3rd order polynomial for the calculation of curvature, tangent point, slope, arc length, etc.


### 3.2. Human Feature Point Localisation in Virtual Environments

There is a certain variability between people because of regional differences caused by different growing environments, height differences caused by different age stages, and the influence of genetic material on human body shape. The object of this research is the individualized female body shape in the production of clothing design. For the identification of the main feature points, firstly, according to the proportional relationship between human feature points and height (assuming a height of 1.00), the human torso is divided into regions consisting of the neck, shoulders, underarms, chest, waist, and hips. For computational convenience, the three-dimensional human body is projected onto the YZ and XZ planes in this paper.


#### 3.2.1. Breast Point (BP)

The BP is the highest point of the breast and is the reference point for measuring bust circumference and one of the most important reference points in garment construction. The absolute value of the coordinatex is obtained from the data of the gallery in the area where the breast point is located on the side view of the body. The point with the largest absolute value is then used as the BP, so the detection area ΩBP for the BP can be expressed as follows:(1)ΩBP=P∈GZX|0.67H<zp<0.77H,where GZX denotes the set of all points on the chest in the side view and H denotes height.


#### 3.2.2. Scapular Point (SP)

The SP is the most convex point of the human scapula and is the key point of the posterior garment piece. In the real human body, it has a more ambiguous amount of projection compared to the BP point and is more difficult to locate. It is analyzed by means of the coordinates of the 3D human body point cloud data. As the measurement unit is millimeters, even small bumps can cause significant changes in the coordinates. The detection areaΩSP of the SP can be expressed as follows:(2)ΩSP=P∈GZx|0.70H<zp<0.80H.First extract the gurney data for the region, i.e., extract the data with the smallestx-value for each layer on the region in the side view. As with BP, for the obtained human back corridor data, the absolute value of each coordinate x is found, and the maximum value is selected as the SP.


#### 3.2.3. Posterior Neck Point (BNP)

The BNP is the seventh cervical protrusion point and is the reference point for measuring dorsal length. This point is highlighted when the neck is bent forward. This effect is particularly evident in the 3D body point cloud data map. The detection areaΩBNP of the BNP can be represented as follows:(3)ΩBNP=P∈GZX|0.81H<zp<0.91H.


#### 3.2.4. Side Waist Node (SWP)

The SWP is located in the middle of the side waist area of the body. It is the division between the front waist and the back waist and is also the reference point for measuring the size of the side seam of the garment. It is in the waist area of the front view of the body and has a distinctive concave feature. The detection areaΩSWP of the SWP can be expressed as follows:(4)ΩSWP=P∈Gzy|0.58H<zp<0.68H.


#### 3.2.5. Side Neck Point (SNP)

The SNP is at the intersection of the anterior aspect of the trapezius muscle of the neck with the shoulder. The curvature of the data of the rotunda on the front view of the body in the area where the SNP is located is found and the point of maximum curvature is found as the SNP. The detection areaΩSNP of the SNP can be expressed as follows:(5)ΩSNP=P∈Gzy|0.80H<zp<0.90H.The Cftool tool in the Matlab toolbox was used to perform the 3-polynomial fit. To facilitate the fit, the z-coordinate values were used as the horizontal coordinates and the y-coordinate values were used as the vertical coordinates in the SNP fit.


## 3.1. Experimental Analysis of Human Bust Line Curve Fitting

In the process of garment design and manufacturing, the bust line is a key part of human body shape analysis, and the curve structure is complex and difficult to fit, so the right section of the 160/84A bust line is selected as the experimental object for curve fitting in this paper. By comparing the fitting effects of different fitting methods, the fitting equations suitable for calculating the curvature and circumference of the human body at a later stage are sought [23–25].In terms of the selection of the fitted functions, the spline curve, although a good fit, has a large number of equations and high complexity, so the spline curve was not part of the examination for this experiment. The types of functions finally chosen for the experiment were polynomial, Gaussian, sine, and Fourier functions. Due to the relatively even distribution of the point cloud data, the bust line was divided roughly equally into 10 segments, the effect of which is shown in Figure2.Figure 2
Bust line point cloud map.In this experiment, 12 fitting methods (4 functions, multiple orders) were applied to the 10-segment bust sample data for a total of 140 fitting trials, and the accuracy of each order of the different fitting functions is shown in Table1.Table 1
Fitting accuracy of various fitting functions in 10 curves.
Fitting methodOrdersABCDEFGHIJPolynomial functions20.99430.99890.99920.99990.998510.99950.99770.9760.991930.99980.99980.999911110.99960.9862140.99980.99981111110.998715111111111161111111111Gaussian function10.97560.99970.9980.99970.99820.99990.99930.99690.97590.94820.99970.9982111110.999911Sine function10.99430.99930.99890.99980.998410.99940.99750.9760.94420.999810.999310.99980.9999110.99790.9957Fourier function10.99430.99970.99920.99990.998510.99950.99770.9760.999920.99980.99981111110.999213ErrorErrorErrorErrorErrorErrorErrorError11The polynomial of the 3rd order was not only fitted with an accuracy mostly above 0.99 but also with a relatively simple equation and a small number of parameters, making it easy to carry out the subsequent derivative integration operation. In combination with the analysis of human characteristics in the subsequent operation, the amount of data selected was moderate and evenly distributed, so the final choice was to fit a 3rd order polynomial for the calculation of curvature, tangent point, slope, arc length, etc.


## 3.2. Human Feature Point Localisation in Virtual Environments

There is a certain variability between people because of regional differences caused by different growing environments, height differences caused by different age stages, and the influence of genetic material on human body shape. The object of this research is the individualized female body shape in the production of clothing design. For the identification of the main feature points, firstly, according to the proportional relationship between human feature points and height (assuming a height of 1.00), the human torso is divided into regions consisting of the neck, shoulders, underarms, chest, waist, and hips. For computational convenience, the three-dimensional human body is projected onto the YZ and XZ planes in this paper.


### 3.2.1. Breast Point (BP)

The BP is the highest point of the breast and is the reference point for measuring bust circumference and one of the most important reference points in garment construction. The absolute value of the coordinatex is obtained from the data of the gallery in the area where the breast point is located on the side view of the body. The point with the largest absolute value is then used as the BP, so the detection area ΩBP for the BP can be expressed as follows:(1)ΩBP=P∈GZX|0.67H<zp<0.77H,where GZX denotes the set of all points on the chest in the side view and H denotes height.


### 3.2.2. Scapular Point (SP)

The SP is the most convex point of the human scapula and is the key point of the posterior garment piece. In the real human body, it has a more ambiguous amount of projection compared to the BP point and is more difficult to locate. It is analyzed by means of the coordinates of the 3D human body point cloud data. As the measurement unit is millimeters, even small bumps can cause significant changes in the coordinates. The detection areaΩSP of the SP can be expressed as follows:(2)ΩSP=P∈GZx|0.70H<zp<0.80H.First extract the gurney data for the region, i.e., extract the data with the smallestx-value for each layer on the region in the side view. As with BP, for the obtained human back corridor data, the absolute value of each coordinate x is found, and the maximum value is selected as the SP.


### 3.2.3. Posterior Neck Point (BNP)

The BNP is the seventh cervical protrusion point and is the reference point for measuring dorsal length. This point is highlighted when the neck is bent forward. This effect is particularly evident in the 3D body point cloud data map. The detection areaΩBNP of the BNP can be represented as follows:(3)ΩBNP=P∈GZX|0.81H<zp<0.91H.


### 3.2.4. Side Waist Node (SWP)

The SWP is located in the middle of the side waist area of the body. It is the division between the front waist and the back waist and is also the reference point for measuring the size of the side seam of the garment. It is in the waist area of the front view of the body and has a distinctive concave feature. The detection areaΩSWP of the SWP can be expressed as follows:(4)ΩSWP=P∈Gzy|0.58H<zp<0.68H.


### 3.2.5. Side Neck Point (SNP)

The SNP is at the intersection of the anterior aspect of the trapezius muscle of the neck with the shoulder. The curvature of the data of the rotunda on the front view of the body in the area where the SNP is located is found and the point of maximum curvature is found as the SNP. The detection areaΩSNP of the SNP can be expressed as follows:(5)ΩSNP=P∈Gzy|0.80H<zp<0.90H.The Cftool tool in the Matlab toolbox was used to perform the 3-polynomial fit. To facilitate the fit, the z-coordinate values were used as the horizontal coordinates and the y-coordinate values were used as the vertical coordinates in the SNP fit.


## 3.2.1. Breast Point (BP)

The BP is the highest point of the breast and is the reference point for measuring bust circumference and one of the most important reference points in garment construction. The absolute value of the coordinatex is obtained from the data of the gallery in the area where the breast point is located on the side view of the body. The point with the largest absolute value is then used as the BP, so the detection area ΩBP for the BP can be expressed as follows:(1)ΩBP=P∈GZX|0.67H<zp<0.77H,where GZX denotes the set of all points on the chest in the side view and H denotes height.


## 3.2.2. Scapular Point (SP)

The SP is the most convex point of the human scapula and is the key point of the posterior garment piece. In the real human body, it has a more ambiguous amount of projection compared to the BP point and is more difficult to locate. It is analyzed by means of the coordinates of the 3D human body point cloud data. As the measurement unit is millimeters, even small bumps can cause significant changes in the coordinates. The detection areaΩSP of the SP can be expressed as follows:(2)ΩSP=P∈GZx|0.70H<zp<0.80H.First extract the gurney data for the region, i.e., extract the data with the smallestx-value for each layer on the region in the side view. As with BP, for the obtained human back corridor data, the absolute value of each coordinate x is found, and the maximum value is selected as the SP.


## 3.2.3. Posterior Neck Point (BNP)

The BNP is the seventh cervical protrusion point and is the reference point for measuring dorsal length. This point is highlighted when the neck is bent forward. This effect is particularly evident in the 3D body point cloud data map. The detection areaΩBNP of the BNP can be represented as follows:(3)ΩBNP=P∈GZX|0.81H<zp<0.91H.


## 3.2.4. Side Waist Node (SWP)

The SWP is located in the middle of the side waist area of the body. It is the division between the front waist and the back waist and is also the reference point for measuring the size of the side seam of the garment. It is in the waist area of the front view of the body and has a distinctive concave feature. The detection areaΩSWP of the SWP can be expressed as follows:(4)ΩSWP=P∈Gzy|0.58H<zp<0.68H.


## 3.2.5. Side Neck Point (SNP)

The SNP is at the intersection of the anterior aspect of the trapezius muscle of the neck with the shoulder. The curvature of the data of the rotunda on the front view of the body in the area where the SNP is located is found and the point of maximum curvature is found as the SNP. The detection areaΩSNP of the SNP can be expressed as follows:(5)ΩSNP=P∈Gzy|0.80H<zp<0.90H.The Cftool tool in the Matlab toolbox was used to perform the 3-polynomial fit. To facilitate the fit, the z-coordinate values were used as the horizontal coordinates and the y-coordinate values were used as the vertical coordinates in the SNP fit.


## 4. Collision Detection Techniques in Virtual Interaction

### 4.1. Enclosure Intersection for Collision Detection

In order to avoid the situation where the fabric penetrates the body when it is colliding with it, collision detection is incorporated into the virtual simulation process. Collision detection in virtual reality generally uses the method of enclosure [26]. Figure 3 shows the AABB fenestration collision detection method.Figure 3
AABB enclosure collision detection method. (a) No crossing and no collision, (b) crossing and collision, and (c) crossing and no collision.
(a)(b)(c)Figure3 has 2 objects A and B. The objects are projected onto the 2D plane as a rhombus and an octagon, respectively. The blue color indicates the enclosure of the 2 objects and the red S part indicates the intersection of the 2 enclosures. In Figure 3(a), there is no intersection between the enclosures of A and B. It is straightforward to decide that A and B will not collide. When object A in Figure 3(a) is rotated 90° clockwise to the state in Figure 3(b), there is an enclosure crossover S between A and B. In Figure 3(b), objects A and B collide, but the enclosure crossover does not necessarily mean that the 2 objects will collide. In Figure 3(c), A and B appear to be enclosed by the crossover S, but they do not collide. In summary, it is not possible to determine whether an object has collided based on the enclosure intersection alone, and further identification is required by other methods. In this paper, we take the enclosing intersection part as the starting point and perform mesh feature extraction on the enclosing intersection part.


### 4.2. Mathematical Description of Object Collision Detection

Let objectsA and B in the enclosing intersection space. ai and bj denote the features of objects A and B, respectively. i takes the value [1, M] and j takes the value [1, N]. i and j denote the feature number of object A and the feature number of object B, respectively. M and N are the total number of features, respectively. Fp is the set of distances of similar features of objects A and B. If FP≤δ , then it means that A and B will collide, where δ is the collision threshold [27].Assume that the velocity and position of an object have 2 components.(6)X=Xa,Xb=xa,ya,za,xb,yb,zb,V=Va,Vb=vax,vay,vaz,vbx,vby,vbz.The fitness function can be expressed as follows:(7)FXa,Xb=xa−xb2+ya−yb2+za−zb2.After each update, the spatial distribution of the object's state is determined by both its velocityVand its position X.


### 4.3. Collision Detection Based on AABB Bounding Boxes

The bounding box technique is a common method for collision detection in virtual reality environments, with simple algorithms and fast detection speeds. Commonly used bounding boxes are bounding sphere, AABB and OBB.The bounding sphere is used to enclose the object and is suitable for objects with rounded edges.(8)R=x,y,z|x−Ox2+y−Oy2+z−Oz2<r2,where the three-dimensional coordinates of the centre of the sphere are Ox=xmax+xmin/2, Oy=ymax+ymin/2, Oz=zmax+zmin/2 and the radius of the sphere is as follows:(9)r=12xmax−xmin2+ymax−ymin2+zmax−zmin2,where xmin,xmax, ymin,ymax and zmin,zmax represent the minimum and maximum values of the projection of all edge points of the object onto the x, y, and z axes, respectively.The AABB bounding box uses a rectangle parallel to the coordinate axes to enclose the object. The equation relating the center point of the rectangle to the radius is as follows:(10)R=x,y,zxc−x2≤rx,|yc−y|2≤ry|zc−z|2≤rz,where xc,yc,zc is the 3D coordinate center of the bounding box. rx,ry,rz is the 3D radius.The OBB bounding box uses a hexahedral form for object bounding. Compared to spheres and AABB boxes, the OBB is able to surround objects more closely to their edges, with a mathematical representation of the region as follows:(11)R=O+ar1v1+ar2v2+ar3v3|a,b,c∈−1,1,where O is the centre of the OBB. r1, r2 and r3 are the radii on the directional axes, respectively. v1, v2 and v3 are vectors orthogonal to each other and to the regular coordinate axes. Compared to the sphere and AABB, the OBB is slightly more complex to create and calculate than the sphere and AABB, although it can wrap around the edges of the object more closely. This paper uses the AABB to implement the bounding box for collision detection between the fabric and the human body.


### 4.4. Interactive Mapping Based on Linear Sensitivity

Most current virtual clothing systems use physical models for fabric simulation, requiring a large number of calculations to obtain the convergence process of the garment. Such calculations are more than computationally intensive, so the real-time simulation cannot be achieved when using physical modeling. In this paper, therefore, a linear sensitivity-based approach is used for 2D to 3D mapping.In the determination of the garment model, it is assumed that the 2D garment piece isx and the 3D garment piece is X. Both can be represented using a mesh of n vertices. Setting F as the combined external force and Q as the combined internal force, the equations for the equilibrium forces on the virtual garment system are shown as follows:(12)Rx,X=Fx,X−Qx,X=0.The determination solution for this dynamic simulation method is very computationally intensive and time consuming. Sensitivity analysis is a frequently used analysis method in the engineering field and can be used to mathematically establish a sensitivity mapping function. The position of the mouse,Δxmouse, is set as the independent variable and ΔX represents the value of the function in the static draped state of the fabric. If the static function is set to be an approximately linear function, the derivative of the amount of change in mouse position can be used to derive the rate of change of the 3D fabric as the mouse moves.(13)ΔX≈∂X∂xmouseΔxmouse.The relationship between a change in the 3D fabric state and a change in the 2D garment mesh can be represented by a sensitivity response. Setting S to denote linear sensitivity, the change from 2D to 3D can then be represented by an approximate linear mapping as follows:(14)ΔX=SΔx=∂R∂xΔx+∂R∂XΔX.As can be seen, this method allows a more realistic simulation of the effect of mouse dragging on the state of a 3D costume, which is close to the real results.


## 4.1. Enclosure Intersection for Collision Detection

In order to avoid the situation where the fabric penetrates the body when it is colliding with it, collision detection is incorporated into the virtual simulation process. Collision detection in virtual reality generally uses the method of enclosure [26]. Figure 3 shows the AABB fenestration collision detection method.Figure 3
AABB enclosure collision detection method. (a) No crossing and no collision, (b) crossing and collision, and (c) crossing and no collision.
(a)(b)(c)Figure3 has 2 objects A and B. The objects are projected onto the 2D plane as a rhombus and an octagon, respectively. The blue color indicates the enclosure of the 2 objects and the red S part indicates the intersection of the 2 enclosures. In Figure 3(a), there is no intersection between the enclosures of A and B. It is straightforward to decide that A and B will not collide. When object A in Figure 3(a) is rotated 90° clockwise to the state in Figure 3(b), there is an enclosure crossover S between A and B. In Figure 3(b), objects A and B collide, but the enclosure crossover does not necessarily mean that the 2 objects will collide. In Figure 3(c), A and B appear to be enclosed by the crossover S, but they do not collide. In summary, it is not possible to determine whether an object has collided based on the enclosure intersection alone, and further identification is required by other methods. In this paper, we take the enclosing intersection part as the starting point and perform mesh feature extraction on the enclosing intersection part.


## 4.2. Mathematical Description of Object Collision Detection

Let objectsA and B in the enclosing intersection space. ai and bj denote the features of objects A and B, respectively. i takes the value [1, M] and j takes the value [1, N]. i and j denote the feature number of object A and the feature number of object B, respectively. M and N are the total number of features, respectively. Fp is the set of distances of similar features of objects A and B. If FP≤δ , then it means that A and B will collide, where δ is the collision threshold [27].Assume that the velocity and position of an object have 2 components.(6)X=Xa,Xb=xa,ya,za,xb,yb,zb,V=Va,Vb=vax,vay,vaz,vbx,vby,vbz.The fitness function can be expressed as follows:(7)FXa,Xb=xa−xb2+ya−yb2+za−zb2.After each update, the spatial distribution of the object's state is determined by both its velocityVand its position X.


## 4.3. Collision Detection Based on AABB Bounding Boxes

The bounding box technique is a common method for collision detection in virtual reality environments, with simple algorithms and fast detection speeds. Commonly used bounding boxes are bounding sphere, AABB and OBB.The bounding sphere is used to enclose the object and is suitable for objects with rounded edges.(8)R=x,y,z|x−Ox2+y−Oy2+z−Oz2<r2,where the three-dimensional coordinates of the centre of the sphere are Ox=xmax+xmin/2, Oy=ymax+ymin/2, Oz=zmax+zmin/2 and the radius of the sphere is as follows:(9)r=12xmax−xmin2+ymax−ymin2+zmax−zmin2,where xmin,xmax, ymin,ymax and zmin,zmax represent the minimum and maximum values of the projection of all edge points of the object onto the x, y, and z axes, respectively.The AABB bounding box uses a rectangle parallel to the coordinate axes to enclose the object. The equation relating the center point of the rectangle to the radius is as follows:(10)R=x,y,zxc−x2≤rx,|yc−y|2≤ry|zc−z|2≤rz,where xc,yc,zc is the 3D coordinate center of the bounding box. rx,ry,rz is the 3D radius.The OBB bounding box uses a hexahedral form for object bounding. Compared to spheres and AABB boxes, the OBB is able to surround objects more closely to their edges, with a mathematical representation of the region as follows:(11)R=O+ar1v1+ar2v2+ar3v3|a,b,c∈−1,1,where O is the centre of the OBB. r1, r2 and r3 are the radii on the directional axes, respectively. v1, v2 and v3 are vectors orthogonal to each other and to the regular coordinate axes. Compared to the sphere and AABB, the OBB is slightly more complex to create and calculate than the sphere and AABB, although it can wrap around the edges of the object more closely. This paper uses the AABB to implement the bounding box for collision detection between the fabric and the human body.


## 4.4. Interactive Mapping Based on Linear Sensitivity

Most current virtual clothing systems use physical models for fabric simulation, requiring a large number of calculations to obtain the convergence process of the garment. Such calculations are more than computationally intensive, so the real-time simulation cannot be achieved when using physical modeling. In this paper, therefore, a linear sensitivity-based approach is used for 2D to 3D mapping.In the determination of the garment model, it is assumed that the 2D garment piece isx and the 3D garment piece is X. Both can be represented using a mesh of n vertices. Setting F as the combined external force and Q as the combined internal force, the equations for the equilibrium forces on the virtual garment system are shown as follows:(12)Rx,X=Fx,X−Qx,X=0.The determination solution for this dynamic simulation method is very computationally intensive and time consuming. Sensitivity analysis is a frequently used analysis method in the engineering field and can be used to mathematically establish a sensitivity mapping function. The position of the mouse,Δxmouse, is set as the independent variable and ΔX represents the value of the function in the static draped state of the fabric. If the static function is set to be an approximately linear function, the derivative of the amount of change in mouse position can be used to derive the rate of change of the 3D fabric as the mouse moves.(13)ΔX≈∂X∂xmouseΔxmouse.The relationship between a change in the 3D fabric state and a change in the 2D garment mesh can be represented by a sensitivity response. Setting S to denote linear sensitivity, the change from 2D to 3D can then be represented by an approximate linear mapping as follows:(14)ΔX=SΔx=∂R∂xΔx+∂R∂XΔX.As can be seen, this method allows a more realistic simulation of the effect of mouse dragging on the state of a 3D costume, which is close to the real results.


## 5. Virtual Clothing Design Presentation and Evaluation

### 5.1. Development Environment and Running Hardware Requirements

The development environment of the virtual cheongsam costume design system and the hardware conditions for system operation are shown in Table2. The hardware environment for system development is highly configured, which helps to meet the operation rate requirements for system development.Table 2
System development environment.
System compositionSpecification parameterDevelopment platformWindows 10Development toolsMarvelous designer 9, Photoshop CC2017, Unity 2017.2.0f3, Visual studio 2017, MATLAB 2019bDevelopment languageC#, MATLABHardware environmentCPU: AMD ryzen 7 4800H with radeon graphics, GPU:NVIDIA GeForce RTX 2060, 2.90 GHz, 16.0GBIn the traditional garment industry model, when the customer proposes changes to the design, the designer needs to make repeated design changes and produce sample garments. This not only increases the turnaround time but is also a less than ideal user experience for the customer. The virtual cheongsam costume design system is able to recreate the design file according to the customer’s needs and present it in real time. Virtual cheongsam costume design is the technology used to virtually try on cheongsams on the computer. The interface of the virtual cheongsam design is shown in Figure4.Figure 4
Interface of the virtual cheongsam costume design.


### 5.2. Collision Detection Performance Analysis

The collision detection of garments was performed on a set of 1000 human samples, with the number of sampled feature pairs being 100∗100, 300∗300, 500∗500, and 700∗700. The virtual cheongsam garment samples were simulated using the bounding sphere, OBB, and AABB algorithms, respectively. The detection accuracy RMSE and detection time of the three algorithms were compared, as shown in Table 3.Table 3
Collision detection time and RMSE under different sampling scales.
AlgorithmCharacteristic quantityRMSETesting time (ms)Bounding sphere100∗1008.163E−02131.211300∗3007.643E−02198.712500∗5006.229E−02313.739700∗7005.728E−02481.661OBB100∗1007.671E−02152.374300∗3005.294E−02246.244500∗5004.426E−02388.860700∗7003.211E−02633.525AABB100∗1006.502E−02161.588300∗3004.128E−02262.643500∗5003.081E−02410.183700∗7002.764E−02722.241As can be seen from Table3, the collision detection accuracy RMSE of all three algorithms decreases as the amount of sampled features increases. This is mainly because the more the amount of features sampled, the better the collision detection of object edges. The comparison of the 3 algorithms reveals that the AABB algorithm has the best RMSE performance, with an RMSE of only 2.764 E−02 when the feature pair is 700∗700.In terms of detection time, the bounding sphere technique takes the least time to detect the same sampled feature pairs, followed by OBB and AABB. This is mainly due to the fact that the secondary detection of AABB takes more time and that improving the step size increases the calculation time of the rate of change. The number of features has the greatest impact on the detection time of the three algorithms, as the increase in the number of features sampled causes the amount of computation involved in collision detection to increase. When selecting the feature pairs to be involved in training, the collision detection accuracy requirements and the detection time requirements should be fully considered, and the feature sampling frequency should be set according to the actual situation.


### 5.3. Costume Model Simulation Effect Evaluation

To ensure the validity of the experimental data, the evaluation was completed by 30 students majoring in clothing. The respondents had all used the apparel virtual design system and had a professional foundation in the concept of virtual clothing, thus being able to improve the accuracy of the evaluation results. The evaluation questionnaire was based on a 10-point Likert scale, where 1 means that the virtual costume is very unlike the real costume and 10 means that the virtual costume is very similar to the real costume. The observer scores the simulation effect of each element of the virtual costume based on the pictures. The final display of the virtual cheongsam is shown in Figure5.Figure 5
The final display effect of virtual cheongsam.The percentage and statistical mean results of each evaluation score in the simulation evaluation index are shown in Table4.Table 4
Evaluation scores of each index for the cheongsam simulation effect.
IndexRating score (%)Average score45678910Overall profile006.73.323.346.7208.7Standup structure03.36.76.736.733.313.38.3Closure structure001040401007.5Sleeve structure003.313.34036.76.78.3Body piece structure03.33.32016.746.7108.3Fabric texture06.713.330302007.433Slash0016.726.736.72007.6Fabric drapability3.3013.323.333.323.33.37.667Hue03.31036.7401007.433Color saturation0016.736.7406.707.367Color value002046.726.76.707.2Attachment1026.73013.320006.067Facing3.36.76.743.3306.73.37.233Looking at the mean values of each evaluation indicator, the number of those with mean values above 6 is high, indicating that the overall level of each evaluation is above the middle level. The evaluation of each indicator shows that the overall profile is rated high. The evaluation scores of each section were multiplied and aggregated with the corresponding weights to obtain the overall evaluation scores. The histogram of the distribution of evaluation scores is shown in Figure6.Figure 6
Score distribution histogram of cheongsam evaluation.The mean value of the total score is 7.931 with a standard deviation of 0.732. The results show that the total score of all the evaluators is mainly distributed on the right side of the 7-point scale. The total score was compared to a medium score level of “5” using a one-samplet-test. The results showed at-value of 21.95, p<0.001, which means that the mean score for the virtual cheongsam design was significantly higher than 5, indicating that the virtual simulation was generally better.


## 5.1. Development Environment and Running Hardware Requirements

The development environment of the virtual cheongsam costume design system and the hardware conditions for system operation are shown in Table2. The hardware environment for system development is highly configured, which helps to meet the operation rate requirements for system development.Table 2
System development environment.
System compositionSpecification parameterDevelopment platformWindows 10Development toolsMarvelous designer 9, Photoshop CC2017, Unity 2017.2.0f3, Visual studio 2017, MATLAB 2019bDevelopment languageC#, MATLABHardware environmentCPU: AMD ryzen 7 4800H with radeon graphics, GPU:NVIDIA GeForce RTX 2060, 2.90 GHz, 16.0GBIn the traditional garment industry model, when the customer proposes changes to the design, the designer needs to make repeated design changes and produce sample garments. This not only increases the turnaround time but is also a less than ideal user experience for the customer. The virtual cheongsam costume design system is able to recreate the design file according to the customer’s needs and present it in real time. Virtual cheongsam costume design is the technology used to virtually try on cheongsams on the computer. The interface of the virtual cheongsam design is shown in Figure4.Figure 4
Interface of the virtual cheongsam costume design.


## 5.2. Collision Detection Performance Analysis

The collision detection of garments was performed on a set of 1000 human samples, with the number of sampled feature pairs being 100∗100, 300∗300, 500∗500, and 700∗700. The virtual cheongsam garment samples were simulated using the bounding sphere, OBB, and AABB algorithms, respectively. The detection accuracy RMSE and detection time of the three algorithms were compared, as shown in Table 3.Table 3
Collision detection time and RMSE under different sampling scales.
AlgorithmCharacteristic quantityRMSETesting time (ms)Bounding sphere100∗1008.163E−02131.211300∗3007.643E−02198.712500∗5006.229E−02313.739700∗7005.728E−02481.661OBB100∗1007.671E−02152.374300∗3005.294E−02246.244500∗5004.426E−02388.860700∗7003.211E−02633.525AABB100∗1006.502E−02161.588300∗3004.128E−02262.643500∗5003.081E−02410.183700∗7002.764E−02722.241As can be seen from Table3, the collision detection accuracy RMSE of all three algorithms decreases as the amount of sampled features increases. This is mainly because the more the amount of features sampled, the better the collision detection of object edges. The comparison of the 3 algorithms reveals that the AABB algorithm has the best RMSE performance, with an RMSE of only 2.764 E−02 when the feature pair is 700∗700.In terms of detection time, the bounding sphere technique takes the least time to detect the same sampled feature pairs, followed by OBB and AABB. This is mainly due to the fact that the secondary detection of AABB takes more time and that improving the step size increases the calculation time of the rate of change. The number of features has the greatest impact on the detection time of the three algorithms, as the increase in the number of features sampled causes the amount of computation involved in collision detection to increase. When selecting the feature pairs to be involved in training, the collision detection accuracy requirements and the detection time requirements should be fully considered, and the feature sampling frequency should be set according to the actual situation.


## 5.3. Costume Model Simulation Effect Evaluation

To ensure the validity of the experimental data, the evaluation was completed by 30 students majoring in clothing. The respondents had all used the apparel virtual design system and had a professional foundation in the concept of virtual clothing, thus being able to improve the accuracy of the evaluation results. The evaluation questionnaire was based on a 10-point Likert scale, where 1 means that the virtual costume is very unlike the real costume and 10 means that the virtual costume is very similar to the real costume. The observer scores the simulation effect of each element of the virtual costume based on the pictures. The final display of the virtual cheongsam is shown in Figure5.Figure 5
The final display effect of virtual cheongsam.The percentage and statistical mean results of each evaluation score in the simulation evaluation index are shown in Table4.Table 4
Evaluation scores of each index for the cheongsam simulation effect.
IndexRating score (%)Average score45678910Overall profile006.73.323.346.7208.7Standup structure03.36.76.736.733.313.38.3Closure structure001040401007.5Sleeve structure003.313.34036.76.78.3Body piece structure03.33.32016.746.7108.3Fabric texture06.713.330302007.433Slash0016.726.736.72007.6Fabric drapability3.3013.323.333.323.33.37.667Hue03.31036.7401007.433Color saturation0016.736.7406.707.367Color value002046.726.76.707.2Attachment1026.73013.320006.067Facing3.36.76.743.3306.73.37.233Looking at the mean values of each evaluation indicator, the number of those with mean values above 6 is high, indicating that the overall level of each evaluation is above the middle level. The evaluation of each indicator shows that the overall profile is rated high. The evaluation scores of each section were multiplied and aggregated with the corresponding weights to obtain the overall evaluation scores. The histogram of the distribution of evaluation scores is shown in Figure6.Figure 6
Score distribution histogram of cheongsam evaluation.The mean value of the total score is 7.931 with a standard deviation of 0.732. The results show that the total score of all the evaluators is mainly distributed on the right side of the 7-point scale. The total score was compared to a medium score level of “5” using a one-samplet-test. The results showed at-value of 21.95, p<0.001, which means that the mean score for the virtual cheongsam design was significantly higher than 5, indicating that the virtual simulation was generally better.


## 6. Conclusions

This paper presents a virtual reality-based approach to the design of national costumes. Different curve fitting methods are applied to the recognition of human features, and an AABB box-based collision detection method is used to prevent penetration between the garment and the body. The virtual costume design is implemented using the Marvelous Designer 9 platform and the Unity engine. The results of the subjective simulation effect evaluation show that the mean score of the virtual cheongsam design is 7.931 with a standard deviation of 0.732, which verifies the effectiveness of the virtual simulation effect. This paper uses hierarchical analysis to achieve the subjective evaluation of the virtual costume simulation effect, which may have the problem of imprecise weight distribution. Subsequently, we will try to use principal component analysis or factor analysis to find out the weights and establish more accurate and effective evaluation indexes for the virtual costume simulation effect.



---

*Source: 7503167-2022-05-20.xml*