Abstract
Fabric simulation and virtual display are crucial for realistic applications in fashion design, virtual try on, and digital garment rendering. Traditional methods often face limitations of inefficiency, reduced accuracy, and difficulty in capturing detailed fabric deformations. This study presents a comprehensive framework that integrates a large scale dataset, mesh refinement algorithms, and optimization strategies for fabric modeling. A dataset containing 38,913 two dimensional samples and 6350 three dimensional samples was established using a segmentation algorithm to capture dynamic postures and global shapes with realistic fold deformations. For geometric representation, dynamic triangular meshes were refined through quadratic error measures, Hausdorff distance evaluation, and tensor based local reconstruction, enabling accurate preservation of wrinkles and fine details. To further enhance efficiency, vertex clustering and subdivision algorithms were introduced, combined with strain optimization and Lagrange multiplier based constraint handling. Experimental results show that the proposed approach improves mesh quality, reduces geometric errors, and achieves accurate and efficient virtual fabric deformation. These findings demonstrate strong potential for advancing virtual reality technologies through high fidelity, data driven fabric display solutions.
Keywords
Introduction
Fabric simulation and rendering based on learning models is an emerging field in computer graphics that has gained significant attention from researchers in recent years. The use of machine learning techniques has revolutionized the way fabric simulation and rendering are performed, leading to more realistic and accurate results.
Researchers have developed various deep learning architectures that can learn the complex physics-based models of fabric behavior and simulate them accurately. Patterns are represented by bitmap images, and a physical model accounts for yarn stretching and bending. Collisions are detected with a discrete sphere-spring model, and energy balance is achieved using the Euler Lagrange theorem. 1 A novel method has been developed to predict the compression behavior of 2D woven fabrics during Liquid Composite Molding processes. It uses a kinematic finite element method to simulate fabric compaction and a hyper-elastic constitutive model for mechanical analysis. The model’s accuracy is validated using 3D scans and experimental data. 2 This simulation method accurately predicts 3D woven fabric behavior by considering its fibrous nature. Yarn is modeled as virtual fibers, capturing microstructure and behavior under tension/shear loading. It accurately captures kinematic and mechanical behavior without complex constitutive laws. Experimental data supports its usability in modeling large unit cell 3D woven fabrics. 3 A deep imitation learning approach has been proposed to develop fabric smoothing policies with high accuracy and efficiency. It trains policies using color and depth images, achieving high coverage rates in physical experiments with a surgical robot. Depth sensing enhances performance alongside color information. 4 An advanced methodology leveraging affordable handheld microscopy in conjunction with machine learning techniques is introduced to refine texture identification and estimate weaving parameters in the textile sector. This approach is designed to elevate product quality while adhering to sustainability objectives. A meticulous labeling process of textile images for texture and essential weaving metrics has been conducted, resulting in a robust dataset. 5 It surveys the characterization and simulation of thermo-stamping for woven fabric reinforced thermoplastics (WFRTPs) to provide a comprehensive understanding of the process. It covers deformation mechanisms, experimental characterization, simulation models for stamping and cooling, and the development of a closed simulation optimization chain for cost reduction in high-performance WFRTPs. 6 By leveraging these correspondences, the study develops policies that can imitate various fabric smoothing and folding tasks. The resulting policies achieve an average task success rate of 80.3% across multiple tasks on physical robotic systems, showcasing their robustness to different fabric characteristics. 7 A deep-learning framework has been proposed to generate frictional signals from fabric images, providing a novel approach for analyzing fabric properties. These signals can be used to simulate tactile feedback on an electrovibration tactile display. Experimental results show that the generated signals closely match the ground-truth signals, and user studies confirm the effectiveness of the model in simulating fabric textures. 8 An innovative approach is presented for 3D modeling and simulating the deformation behavior of weft knitted fabrics. The method uses a loop-mesh unit for the geometric model and a reference frame for yarn surface calculation. 9
Recent advances in context aware virtual try-on networks and fabric adaptive registration highlight the importance of integrating geometric perception with data driven deformation, while emerging reinforcement learning (RL) based clothing models reveal the potential to learn dynamic style behaviors from sequential interactions. However, these approaches rarely address mesh level refinement, anisotropic wrinkle preservation, or the integration of large scale geometric datasets. Furthermore, the significance of accurate fabric deformation modeling is emphasized, particularly its value for real world applications such as virtual try-on, digital garment design, animation production, and interactive virtual-reality systems. The mentioned studies showcase various approaches and techniques used in the field of fabric simulation and rendering using deep learning, yet there are still important limitations. Most existing studies do not sufficiently consider fundamental mesh deformation and optimization. Some methods require extensive training data or heavy manual parameter tuning, making them inefficient or impractical. Others struggle to handle complex fabric shapes or dynamic behaviors. To address these gaps, this paper demonstrates the potential of learning-based approaches in fabric mesh deformation and rendering. By harnessing the power of neural networks, complex patterns, and behaviors of fabric meshes can be learned from data, enabling the generation of realistic simulations that are difficult to achieve using traditional methods. Moreover, the proposed method generalizes well to new fabrics and lighting conditions, enhancing its practical value across diverse scenarios.
Materials and methods
Dataset
A fabric dataset was collected with 38,913 two-dimensional samples and 6350 three-dimensional samples. The samples were obtained independently using a high fidelity physics simulation system. A position based dynamics framework was employed for the generation of samples. This strategy ensures extensive diversity across fabric types and motion sequences. Rigorous calibration procedures were implemented to guarantee reliability. Simulation parameters were initialized using measurements derived from actual fabrics. Furthermore, simulated deformations were benchmarked against captured depth images. The observed high consistency substantiates the physical realism and fidelity of the dataset. The dataset encompasses a broad spectrum of textile categories. Representative samples including silk and cotton alongside denim and polyester are explicitly incorporated. These materials manifest distinct mechanical properties. Significant variance exists in surface density plus bending stiffness and tensile strength. Silk exemplifies substrates with minimal flexural rigidity and high drape. Conversely, denim characterizes fabrics possessing substantial structural stiffness and weight. This material heterogeneity guarantees the diversity of the collected data. Such variance enables the simulation framework to generalize deformation behaviors across a wide range of physical parameters. To avoid duplication, a graphic segmentation algorithm was applied. 10 As shown in Figure 1, partial samples were organized as independent time series, enabling the capture of dynamic fabric postures and global three-dimensional shapes with realistic fold deformations, making the dataset suitable for virtual display of both the human body and fabric. All 38,913 2D samples and 6350 3D samples were generated from controlled cloth simulation sequences and calibrated depth image capture, then processed through segmentation and filtering to remove duplicates and ensure consistent annotation across dynamic deformation states.

Example of fabric data set.
In three-dimensional space, six variables are required to define object pose. Three variables describe spatial position along the x, y, and z axes, and three additional variables describe rotation around these axes, known as roll, pitch, and yaw.11,12 This description applies to rigid bodies but is less appropriate for deformable fabrics. For training and testing, object positions were represented using four-by-four rotation matrices, where the z axis is negative, the x and y axes are aligned with the image plane, and the coordinate center is located at the image center as shown in Figure 2. The number of object occurrences in an image is recorded as N, corresponding to N four-row rotation matrices.

Fabric depth mapping configuration.
Grid division in virtual display of fabrics
A common method for representing three-dimensional surfaces is to approximate them with polygonal meshes. Meshes allow piecewise linear approximation, flexible topology, adaptive optimization, and efficient rendering. In virtual fabric display, triangular meshes are essential for modeling both fabric and the human body. 13 To adaptively refine detailed regions, the quadratic error measure is used to evaluate vertex merging and sort edges, while boundary and normal vector constraints help preserve geometric features. Since most acquisition techniques generate meshes with redundant information, refinement is necessary to retain important details.
For fabric modeling, small triangles capture wrinkles while large triangles represent smooth areas. A dynamic reconstruction algorithm analyzes rough meshes by detecting short edges. The tensor domain in embedding space defines the maximum allowable edge length, guiding local reconstruction to satisfy dimensional constraints. Hausdorff distance measures deviations between grids, while quadratic error evaluates the mean squared surface distance. These tools ensure refined meshes maintain accuracy, with the tensor domain controlling size and shape. For each vertex in the fabric mesh, a tensor field t is assumed to be a dimension field. The size of the edge between two vertices v1 and v2 is defined as:
Where v1 and v2 denote the spatial coordinates of mesh vertices i and j, ti and tj represent their associated tensor descriptors encoding local fabric orientation or stiffness; λ is a scaling coefficient controlling the influence of tensor similarity;

Grid division.
To ensure a smooth transition and coherent connections between adjacent surfaces with varying curvatures, the framework minimizes the global coordinate error of newly generated vertices, thereby improving the overall quality and accuracy of the fabric representation. The quadratic error metric is computed by accumulating per vertex deviation matrices during edge contraction. 14 This approach preserves local geometric structures throughout the simplification process. The Hausdorff distance is evaluated through bidirectional point to surface queries to maintain global accuracy after refinement. In addition, local tensor reconstruction updates edge lengths according to anisotropic stiffness directions learned from the dataset and this process guides adaptive subdivision. Valette clustering iteratively assigns triangles to area weighted centroids and updates cluster representatives to achieve coherent mesh simplification with controlled distortion.
After a hole appears in the fabric mesh, it is triangulated with triangular faces to maintain structure. Vertex removal simplifies connections by deleting points with minimal geometric deviation and recalculating neighbors, reducing complexity while preserving accuracy.15,16 The vertex removal algorithm is efficient for applications requiring topology preservation, though for rendering some holes can be discarded without loss. Edge collapse further simplifies the mesh by selecting the edge with the least deviation, and the placement of new vertices strongly influences surface quality, especially under thinning conditions. Edge splitting and feathering improve efficiency by processing independent edges, followed by validation and vertex state updates. These operations enhance fabric appearance and ensure smooth body–fabric transitions in joint modeling. However, parametric representation is limited in detecting self-collisions and tracking positions, since surface topology changes require parameter updates.
By analyzing neighborhoods in the parameter domain, wireframe detection becomes easier. When fabric is placed on a body mesh, the fabric can be represented as an offset from the underlying body surface. Each fabric vertex is linked to the nearest body vertex, and their difference is calculated. This approach enables the fabric to adapt automatically when the body mesh changes, preventing penetration between models, though it cannot fully reconstruct fabric shape since body-specific details are missing.
In virtual fabric display, mesh refinement is classified as local modification or continuous refinement. Local modification adjusts specific regions, while continuous refinement iteratively improves the entire mesh.17,18 Local methods are particularly effective in preserving details and generating levels of detail, offering higher fidelity in thinning. During body fabric modeling, refinement is especially important in curved and compressed regions or in areas with rapidly changing vertices. Firstly, the size domain on the mesh surface is calculated, and then an area weighted average is used to interpolate the value to the mesh vertex. The curvature of the surface is estimated by calculating the normal error of the mesh vertex. The change in normal between vertices v1 and v2 can be expressed as:
Where ni and nj are unit normal vectors at adjacent vertices i and j; and
Where Wi is the position of vertex i in world coordinates;
For the vertices along the mesh seam, a space coordinate transformation is performed on all adjacent faces using formulas (2) and (3). For unconnected faces, the normal error is calculated to estimate curvature, and the weighted average of face areas combined with linear scaling ensures smooth transitions at seam angles. This method is effective for refining curved or compressed regions and areas with rapidly changing vertices (Figure 4).

The seam surface transforms the tangent space.
A tangent space is constructed by rotating the surface dimension tensor to align with the tangent plane, and average values are computed within this space. The average tensor of each vertex is then transformed back to the fabric space to obtain mesh edge size. 19 Faces with parallel normals are assigned to the same patch, reducing complexity by merging surfaces within a defined tolerance. Patch boundaries are refined through iterative triangulation with an adaptive operator, progressively adding vertices to subdivide larger meshes. In each iteration, the triangle with the smallest weight is replaced by a vertex, and adjacent triangles are deleted, resulting in finer detail while lowering mesh complexity. This refinement is especially effective for surfaces close to planes in virtual fabric display (Figure 5).

Triangulation refinement.
The vertex clustering strategy significantly reduces computational cost in fabric mesh deformation while maintaining acceptable accuracy. By combining clustering with folding and splitting operations, the mesh adapts dynamically to local geometric complexity.20,21 Although clustering may compromise topological fidelity, the integration of thinning algorithms and polygon graph segmentation helps retain essential surface features. This representative vertex is determined as the one with the highest weight within each 3D cell, serving as the folded representative vertex for all vertices within that cell as shown in Figure 6. It also improves stability in simulations where body–fabric interactions must be resolved without penetration. The progressive refinement enabled by clustering and edge segmentation provides a balance between mesh simplicity and structural detail, making the method suitable for large-scale virtual garment simulations and real-time applications.

Collision displacement of triangular mesh.
Figure 7 illustrates the relationship between the distance of the deformed mesh and the original mesh, and the number of subdivisions. The figure demonstrates that when the number of mesh subdivisions is less than 5, there is a significant increase in the distance of the triangular mesh. However, when the number of subdivisions exceeds 5, the distance of the triangular mesh becomes relatively stable and increases at a slower rate.

The number and distance of triangular mesh subdivision.
Mesh refinement combines subdivision and thinning with quantitative error control. A triangle subdivision ratio of 1:5 stabilizes mesh deviation after five iterations while limiting computation. Distance queries use the Proximity Query Package with hierarchical bounding volumes to reduce complexity. Pair contraction merges two vertices, removing associated faces and edges, and is applied only when the Hausdorff distance is below a tolerance. Triangles are weighted by curvature and area, guiding simplification to flatter regions while preserving detail. Quadratic error measures local deviation, and Hausdorff distance ensures global accuracy. Local operators including vertex removal, edge collapse, and vertex splitting are applied iteratively, re-evaluating candidates after each step. The algorithm achieves over 65% thinning with Hausdorff deviations under 0.5 mm, providing efficient and precise mesh refinement suitable for large-scale fabric simulations.
Grid optimization and evaluation in fabric virtual display
Fabric surfaces are typically curved and composed of numerous triangular meshes. Many 3D acquisition methods produce meshes with redundant information, so optimization must preserve geometric details while enabling realistic wrinkle deformation. 22 Vertex displacement is commonly used, aligning the fabric mesh with the underlying human body model. Each fabric vertex is associated with its nearest body vertex, and the positional difference is applied as an offset or rotation to achieve natural fitting. To reduce mesh complexity while maintaining detail, clustering algorithms can generate uniform subdivisions. These algorithms simplify the mesh topology and allow controlled coarsening of triangular elements. In this study, based on the Valette clustering approach, all initial mesh vertices are assigned to clusters, facilitating efficient refinement and simplification without compromising the fidelity of the fabric model, all initial meshes are allocated to clusters as:
Where ft is the centroid of triangle t; ck is the position of cluster center k; dt is the surface area of triangle t; and T is the set of all mesh triangles. This loss facilitates spatially coherent segmentation by assigning triangles to clusters based on proximity and area weighting, which supports localized simulation and parallel rendering strategies.
To create a simulated cluster, an energy minimization algorithm is used iteratively in combination with formula (4). The iterative clustering and energy-based refinement framework ensures that fabric meshes maintain geometric fidelity and topological consistency. Vertex positions are continuously updated according to cluster centroids, while area-weighted triangles smooth surface features and minimize sharp deformations. Dynamic adaptation to body mesh changes prevents penetration and supports realistic fabric behavior as shown in Figure 8. For large-scale meshes, independent patches are refined and merged, enabling scalable processing. Edge collapse operations are guided by quadratic error metrics, and candidate edges are managed in a priority queue to select minimal deviation collapses. This controlled iterative thinning reduces mesh complexity while preserving curvature, surface details, and structural integrity, achieving a balance between computational efficiency and visual accuracy suitable for virtual garment simulation.

Mesh vertex substitution.
Edge folding introduces geometric errors, so edges with minimal deviation are selected. Candidate collapses are simulated, and new vertex positions are computed by minimizing quadratic error relative to the original mesh. Vertices and associated faces are removed, and edge errors are updated iteratively until convergence. This approach reduces mesh complexity while preserving topology and is applicable to manifold and non-manifold meshes. For irregular fabric meshes, strain optimization with nonlinear constraints ensures surface fidelity as shown in Figure 9. Vertex errors are weighted by triangle areas and quadratic error matrices, and normal and texture coordinate adjustments refine topology. Geometric deviation between grids is measured using root mean square error, while external memory algorithms handle large meshes. Vertex positions are constrained within strain limits using the Lagrange method, with positions and velocities iteratively updated at each step.

Fabric grid strain optimization.
The Lagrange generalized multiplier method is used to solve the problem of inequality constraints. The formula is as follows:
Where πθ is the RL policy parameterized by θ; r(x) is the reward function evaluating the quality of simulated fabric states x. Specifically, the reward function is formulated as a weighted sum of three components:
Results and discussion
The RL module provides adaptive control for mesh deformation by learning vertex level adjustment strategies under physical and geometric constraints. The RL agent observes a state vector composed of vertex positions and curvature and strain energy and collision distances, while the action space outputs continuous displacement controls ui as defined in equation (3). The reward integrates geometric accuracy together with strain preservation together with collision avoidance and the constraint terms ensure physical feasibility during deformation. A proximal policy optimization framework is used due to its stability in continuous control tasks. During training, the agent interacts with simulated cloth body environments receives feedback on deformation quality and updates the policy based on trajectory minibatches. The policy network consists of two hidden layers with tanh outputs generating continuous actions. Specific training configuration details are provided here. The network architecture employs two fully connected layers. Each layer contains 256 neurons. ReLU activation functions are utilized for the hidden layers. A Tanh activation bounds the action space at the output layer. The clipping parameter for the proximal policy optimization algorithm is set to 0.2. A discount factor Gamma of 0.99 is applied. The Adam optimizer is employed with a learning rate of 3 × 10−4. Trajectory minibatches of size 64 are utilized during the process. The entire training phase spans 1 million time steps until convergence. Through this learning process, the reinforcement learning module enhances wrinkle realism and improves stability. It also compensates for the limitations of purely geometric operators and enables more accurate dynamic fabric simulation.
After optimization, the mesh surface becomes unconstrained. Figure 10 illustrates the number of vertices and quadratic error of the fabric model decrease as vertex count increases from 6000 to 20,000 in steps of 1000, with error values ranging from 0 to 0.5. Quadratic error initially measures 0.0028 and declines sharply, stabilizing when vertex count exceeds 12,000. This indicates that new vertices align closely with surrounding original vertices, preserving the geometry and topology of the original triangular mesh. The process allows customization of the final vertex count while maintaining mesh fidelity and structural characteristics.

Fabric grid strain optimization.
In fabric virtual display, quadratic error measurement evaluates deformation vertices to minimize deviations between the optimized and original meshes. Symmetrical quadratic error accounts for edge collapses, though it may lose asymmetric details, while standard quadratic error better preserves boundaries. High-precision meshes exceeding 60,000 vertices require significant computation, often over 30 min, but achieve high-fidelity deformation.
Vertex pair contraction simplifies topology and enables local edge closure without altering mesh connectivity, applicable to both manifold and non-manifold meshes. Geometric deviations are computed using a Proximity Query Package that reconstructs bounding volume hierarchies dynamically for local distance evaluations. Vertex placement derived from edge folding is optimized to reduce secondary measurement error, and triangle subdivision is adjusted according to face area to improve distance approximation. GPU acceleration and independent refinement of disconnected mesh regions enable parallel processing and reduce computation time, while boundary integrity is preserved during region recombination to prevent discontinuities.
To validate the effectiveness of the proposed framework, strict comparative experiments and ablation studies were conducted, comparing the full system with baseline refinement methods using quadratic error, Hausdorff distance and computation time as evaluation metrics. The results show that RL-guided refinement achieves lower geometric deviation and faster convergence than traditional operators, and ablation analyses further demonstrate that removing the RL controller or tensor-based reconstruction leads to significant degradation in accuracy and visual realism. To verify the substantive contribution of the RL module, we analyzed the impact of different reward weight configurations. The configuration with wg = 0.5 yields the lowest Root Mean Square Error (RMSE) of 2.12 mm. Removing the strain component (ws = 0) resulted in an increased RMSE of 4.56 mm and visible unnatural stretching. Furthermore, the ablation study confirms the module’s value. Without the RL policy, the average collision depth increased by 15%. These quantitative results demonstrate that the RL module effectively balances geometric accuracy with physical constraints.
Conclusions
This study presents a data driven framework for fabric simulation and virtual display that overcomes key limitations of conventional modeling techniques. By constructing a large scale dataset and integrating advanced mesh refinement, clustering, and strain optimization strategies with a reinforcement learning module, the method achieves more accurate preservation of fabric details and more stable deformation control. The RL agent adaptively regulates vertex level adjustments under physical and geometric constraints, enabling deformation behaviors that traditional deterministic models cannot capture. Experimental results demonstrate that the proposed framework substantially reduces geometric errors while maintaining computational efficiency, providing a robust solution for realistic fabric visualization. The findings underscore the practical value of this approach for digital fashion design, virtual try-on, and immersive virtual environments. Future work will explore real time deployment and develop adaptive RL-enhanced algorithms to further improve scalability and generalization across diverse garment structures and body shapes.
Footnotes
Funding
The authors disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: The authors acknowledge the financial supports from the Jiangsu University Blue Project; Jiangsu Provincial Study Abroad Scholarship (2024079); Jiangsu Province Industry University Research Cooperation Project (2024473). Jiangsu Provincial Vice President of Science and Technology Project (FZ20230577). Jiangsu Advanced Textile Engineering Technology Center Collaborative Innovation Fund (XJFZ202510).
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
