Clothing 3D virtual fabric texture dynamic simulation method, device and equipment and medium
By performing mathematical modeling and physics engine calculations on multi-layer fabrics, a dynamic transmittance field and light transmission matrix are generated, solving the problems of light transmission distortion and texture misalignment in the dynamic simulation of multi-layer fabrics, and achieving a highly realistic dynamic simulation effect.
Patent Information
- Application Number
- CN202510812475.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-10-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies for dynamic simulation of multi-layered fabrics suffer from distorted light transmission characteristics and misaligned interlayer textures, resulting in insufficient realism in dynamic simulation.
By acquiring multi-layer fabric data, mathematical modeling is performed to construct a hierarchical material model. A physics engine is used to calculate vertex displacement and interlayer contact pressure, generating vertex coordinates and deformation gradient data after deformation. A dynamic transmittance field is established, and a light transmission matrix is generated through a ray tracing algorithm. Dynamic displacement compensation of UV coordinates is performed, and finally, multi-channel optical property fusion calculation is performed.
The adaptive and accurate calculation of the transmittance of the microstructure in the dynamic simulation of multi-layer fabrics is achieved, which improves the optical realism and physical consistency of the dynamic simulation.
Smart Images

Figure CN120807749A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of image data processing, and particularly relates to a 3D virtual fabric texture dynamic simulation method for clothes, a device, equipment and a medium. BACKGROUND
[0002] With the rapid development of three-dimensional virtual clothes simulation technology, physically based simulation and high-precision material rendering technology have gradually matured. Through finite element analysis, particle-spring model and other physical engines, dynamic deformation simulation of single-layer fabric is realized, and the optical properties of static materials are restored by using bidirectional reflectance distribution function (BRDF) and normal map technology. However, in the field of advanced fashion digitization and functional clothing design, the simulation demand of multi-layer fabric superposition scene is increasingly prominent, and the mechanical interaction and optical superposition effect of inner and outer layers of fabric in dynamic deformation need to be processed synchronously. In the traditional technology, multi-layer fabric simulation mainly adopts the processing mode of layered modeling and independent rendering: in the mechanical simulation aspect, each layer of cloth is simulated by discretizing the grid, and the interlayer collision response is calculated based on the preset contact stiffness coefficient, but the micro-fiber structure parameters are not included in the macro-mechanical model; in the optical rendering aspect, the fixed transmittance parameter is used to Alpha blend the multi-layer texture, or the shadow map is pre-baked to simulate the light transmission effect, and there is a lack of real-time feedback on the change of microstructure light transmission characteristics caused by dynamic deformation; in the texture mapping aspect, independent UV coordinate mapping technology is used to process each layer of texture, and a dynamic calculation mechanism of interlayer occlusion relationship is not established.
[0003] At present, the fixed transmittance parameter and the layered independent processing mechanism are used in the dynamic simulation of multi-layer fabric, which leads to distortion of the light transmission characteristics in the deformation process and misalignment of the interlayer texture superposition, and the dynamic simulation is not realistic enough. SUMMARY
[0004] Therefore, it is necessary to provide a 3D virtual fabric texture dynamic simulation method, device, equipment and medium for clothes, which can realize accurate calculation of the light transmission rate of the microstructure of multi-layer fabric adapting to deformation, and improve the realism of dynamic simulation.
[0005] In a first aspect, the application provides a 3D virtual fabric texture dynamic simulation method for clothes, comprising:
[0006] Obtaining multi-layer fabric data, mathematically modeling the microstructure characteristics and macroscopic physical properties of the multi-layer fabric data to obtain a hierarchical material model, and the hierarchical material model comprises UV coordinates of multi-layer texture;
[0007] Based on the hierarchical material model, vertex displacement data and interlayer contact pressure of each layer of fabric data in the dynamic deformation process are calculated through the physical engine to generate the deformed vertex coordinates and deformation gradient data;
[0008] According to the deformation gradient data and the hierarchical material model, a dynamic light transmittance field is constructed, and a light transfer matrix representing the interlayer light attenuation relationship is generated through a ray tracing algorithm;
[0009] Based on the deformed vertex coordinates and the light transfer matrix, dynamic displacement compensation is performed on the UV coordinates to generate a corrected UV coordinate set;
[0010] The dynamic light transmittance field and the corrected UV coordinate set are input into a rendering pipeline for multi-channel optical property fusion calculation to output virtual rendering data.
[0011] In a second aspect, the present application also provides a garment 3D virtual fabric texture dynamic simulation device, comprising:
[0012] A hierarchical modeling module is configured to obtain multi-layer fabric data, mathematically model the microstructure characteristics and macroscopic physical properties of the multi-layer fabric data, and obtain a hierarchical material model, wherein the hierarchical material model includes UV coordinates of multiple layers of textures.
[0013] A physical deformation module is configured to calculate vertex displacement data and interlayer contact pressure of each layer of fabric data in the dynamic deformation process based on the hierarchical material model through a physical engine to generate deformed vertex coordinates and deformation gradient data.
[0014] An optical perspective module is configured to construct a dynamic light transmittance field according to the deformation gradient data and the hierarchical material model, and generate a light transfer matrix representing the interlayer light attenuation relationship through a ray tracing algorithm.
[0015] A dynamic correction module is configured to perform dynamic displacement compensation on the UV coordinates based on the deformed vertex coordinates and the light transfer matrix to generate a corrected UV coordinate set.
[0016] A dynamic rendering module is configured to input the dynamic light transmittance field and the corrected UV coordinate set into a rendering pipeline for multi-channel optical property fusion calculation to output virtual rendering data.
[0017] In a third aspect, the present application also provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned garment 3D virtual fabric texture dynamic simulation method when executing the computer program.
[0018] In a fourth aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the above-mentioned garment 3D virtual fabric texture dynamic simulation method.
[0019] The garment 3D virtual fabric texture dynamic simulation method, device, equipment and medium, by obtaining multi-layer fabric data and modeling the microstructure characteristics and macro physical properties, a hierarchical material model containing multi-layer texture UV coordinates is constructed, providing a cross-scale physical parameter basis for dynamic calculation of light transmittance; based on the hierarchical material model, the physical engine is used to calculate the vertex displacement data and interlayer contact pressure in the dynamic deformation process of each layer of fabric, generate the deformed vertex coordinates and deformation gradient data, and establish the mapping relationship between the microstructure deformation quantization index and the mechanical response; according to the deformation gradient data and the hierarchical material model, a dynamic light transmittance field is constructed, and a light transfer matrix representing the interlayer light attenuation relationship is generated through a ray tracing algorithm, realizing the dynamic adjustment of the light transmittance parameter with the deformation gradient; further based on the deformed vertex coordinates and the light transfer matrix, dynamic displacement compensation is performed on the UV coordinates, and a corrected UV coordinate set is generated to eliminate the interlayer texture misalignment; the dynamic light transmittance field and the corrected UV coordinate set are input into the rendering pipeline for multi-channel optical property fusion calculation, through the real-time coupling of mechanical deformation data and optical rendering parameters, the light transmittance field update and texture accurate fitting are synchronously driven, so as to realize the accurate calculation of the microstructure light transmittance self-adaptation with deformation in the multi-layer fabric dynamic simulation, effectively improving the optical reality and physical consistency of the dynamic simulation. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the following will briefly introduce the drawings needed to be used in the embodiment or related art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creating any creative labor.
[0021] Figure 1 A flowchart of a garment 3D virtual fabric texture dynamic simulation method provided by an embodiment of the present application is shown in the figure.
[0022] Figure 2 A flowchart of a physical deformation simulation method provided by an embodiment of the present application is shown in the figure.
[0023] Figure 3 A structural diagram of a garment 3D virtual fabric texture dynamic simulation device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solutions and advantages of the present application more clear, the following will further describe the present application in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0025] Firstly, the terms involved in the embodiments of the present application are briefly introduced.
[0026] 3D virtual technology is a core method for constructing a dynamic three-dimensional digital environment through computer graphics, physical simulation and real-time rendering technology. It realizes high-fidelity visual expression of virtual objects in shape change, lighting and interactive scene through geometric modeling, material property mapping and dynamic behavior simulation. Based on multi-source data fusion architecture, the technology performs hierarchical modeling on the geometric topology structure, physical property parameters and optical characteristics of an object, and relies on a physical engine to drive dynamic deformation calculation and real-time rendering pipeline to generate continuous frame sequences, so as to accurately reproduce the morphological change law and optical response characteristics of a real object in a virtual space. The technology is widely used in industrial design verification, virtual reality interaction, digital twin system and other fields, and significantly improves the physical accuracy and visual immersion of traditional two-dimensional visualization technology in three-dimensional space dynamic simulation.
[0027] The UV coordinates of multi-layer texture are a spatial positioning parameter system in computer graphics for accurately mapping multi-level texture images on the surface of a three-dimensional model. The UV coordinate system (U is the horizontal texture coordinate and V is the vertical texture coordinate) defines the distribution relationship of each independent texture layer on the surface of a three-dimensional grid. The coordinate system is associated through the topological structure in the hierarchical material model, ensuring that different texture layers (such as the basic color layer, the normal layer and the transparent layer) maintain geometric alignment and physical property matching during the dynamic deformation process of the model, thereby supporting the synchronous displacement compensation and superposition rendering of multi-layer texture based on the deformation state, and realizing high-precision visual expression of complex materials in three-dimensional space.
[0028] A scanning electron microscope image is a digital image obtained by scanning electron microscope (SEM) for high-resolution microscopic imaging of the surface of a material. Based on the secondary electron or backscattered electron signals generated by the interaction between the electron beam and the sample surface, the image is received by a detector and converted into a gray-scale or pseudo-color image, which can clearly present the micro-topography, composition distribution and crystal structure characteristics of the material surface and near-surface region. The image technology has high depth of field and nanoscale resolution characteristics, and can non-destructively obtain three-dimensional topographic details and microstructure parameters (such as fiber orientation, pore distribution, etc.) of materials. It is widely used in microstructure characterization and quality detection in the fields of materials science, biomedicine and industry.
[0029] According to the above name explanation, the implementation environment of the garment 3D virtual fabric texture dynamic simulation method provided in the embodiment of the application is explained. Illustratively, the implementation environment includes a sensor, a terminal, and a processor. The processor and the sensor and the terminal are connected through a network signal. The sensor includes but is not limited to an optical scanning sensor, a fiber deformation sensor, or an interlayer pressure sensor array. The processor can be a central processing unit, a multi-core processor, or an artificial intelligence chip, and the like, which is not limited here.
[0030] In combination with the above name explanation and implementation environment, the application scenario of the embodiment of the application is explained. The garment 3D virtual fabric texture dynamic simulation method provided in the embodiment of the application can be applied to scenarios including but not limited to the following scenarios:
[0031] In a virtual fitting or an online virtual fitting system of e-commerce, through real-time coupling calculation of the dynamic light transmittance field and the corrected UV coordinate set, the technical solution can accurately simulate the light transmittance change and texture fitting effect of multi-layer fabric (such as a windproof film outer layer of a down jacket and a warm lining inner layer) in the human motion process, so that consumers can intuitively perceive the real optical performance of the garment under the dynamic deformation state in virtual fitting, and significantly improve the immersion and decision accuracy of the online shopping experience.
[0032] In film and television special effects and virtual character design, for the physical simulation needs of complex costumes in film and television animation, the technology based on the hierarchical material model and the ray tracing algorithm can efficiently generate the dynamic light transmittance effect and texture detail change of multi-layer historical costume (such as silk outer gown and embroidery lining) in wind, motion, and other scenes, support high-fidelity character animation production, and reduce the repetitive work of traditional manual material drawing.
[0033] In high-end fashion digitization and virtual showrooms, for the field of high-end custom fashion, the microstructure light transmittance of complex fabrics such as lace and gauze can be modeled using the dynamic light transmittance field, and the dynamic fitting of multi-layer texture can be realized in combination with the corrected UV coordinate set, so as to construct the light and shadow flow effect of costumes generated by the model motion in the virtual show, and provide a digital creative expression platform for designers.
[0034] Illustratively, the garment 3D virtual fabric texture dynamic simulation method provided in the embodiment of the application can also be applied to other application scenarios, which are only exemplified here and are not limited to specific application scenarios.
[0035] In an exemplary embodiment, as Figure 1As shown, a garment 3D virtual fabric texture dynamic simulation method is provided, and in this embodiment, the method is applied to the terminal in the foregoing implementation environment for example. It can be understood that the method can also be applied to the server, and can also be applied to the system including the terminal and the server, and is realized through the interaction of the terminal and the server. In this embodiment, the method includes the following steps 101 to step 105:
[0036] Step 101, obtaining multi-layer fabric data, modeling the microstructure characteristics and macroscopic physical properties of the multi-layer fabric data, obtaining a hierarchical material model, and the hierarchical material model includes the UV coordinates of the multi-layer texture.
[0037] Specifically, the multi-layer fabric data can be retrieved from a professional fabric database, or can be scanned and collected by a 3D scanner. After obtaining the data, the microstructure characteristics and macroscopic physical properties of the multi-layer fabric data are modeled. Further, on the micro level, the structure characteristics of the fabric fiber such as diameter, arrangement density and twist can be modeled; on the macro level, the physical properties of the fabric such as thickness, density, elastic modulus and friction coefficient are modeled. Exemplarily, the microstructure parameters can be embedded into the macroscopic continuum medium mechanics model by using the multi-scale homogenization theory (HOMOGENIZATION), to generate a hierarchical material model containing multi-layer UV coordinates, which covers the UV coordinates of the multi-layer texture. The UV coordinates are used to determine the mapping position of the texture on the surface of the 3D model, and provide a basis for subsequent texture mapping and rendering.
[0038] Step 102, based on the hierarchical material model, calculating the vertex displacement data and interlayer contact pressure of each layer of fabric data in the dynamic deformation process through a physical engine, and generating deformed vertex coordinates and deformation gradient data.
[0039] Exemplarily, the vertex displacement data and interlayer contact pressure of each layer of fabric data in the dynamic deformation process can be calculated by the physical engine. The physical engine can use a soft body dynamics algorithm to simulate the deformation behavior of the fabric under stress. For example, when simulating the tension and pressure generated by the human body action on the garment, the physical engine calculates the displacement of each vertex after being stressed according to the physical properties and geometric shape of the fabric, and at the same time, considers the mutual contact and extrusion between the layers of fabric, and calculates the interlayer contact pressure. After calculation, the deformed vertex coordinates and deformation gradient data are generated, and the deformation gradient data reflects the strain of the fabric in the deformation process, which provides a basis for subsequent light transmittance field construction.
[0040] Step 103, constructing a dynamic light transmittance field according to the deformation gradient data and the hierarchical material model, and generating a light transfer matrix representing the interlayer light attenuation relationship through a ray tracing algorithm.
[0041] Specifically, the light transmittance of different fabrics changes when they are deformed, which is related to the microstructure and macro physical properties of the fabric. For example, when the fabric is stretched, the gap between the fibers may increase, resulting in an increase in light transmittance; when the fabric is compressed, the gap between the fibers decreases, reducing the light transmittance. By analyzing the deformation gradient data and the parameters related to the optical properties of the fabric in the hierarchical material model, the dynamic light transmittance field can reflect the light transmittance distribution of the fabric under different deformation states in real time. At the same time, the light transfer matrix representing the interlayer light attenuation relationship is generated by the ray tracing algorithm. The ray tracing algorithm simulates the process of light propagation between fabric layers, considering phenomena such as reflection, refraction, and absorption of light at different interfaces. The light transfer matrix records the attenuation of light during transmission between layers, providing key parameters for subsequent optical property fusion calculations.
[0042] Step 104, based on the deformed vertex coordinates and the light transfer matrix, the UV coordinates are dynamically displaced and compensated to generate a corrected UV coordinate set.
[0043] Specifically, after the deformation of the fabric, the original UV coordinates may be misaligned or stretched, resulting in inaccurate texture mapping. By analyzing the changes in the deformed vertex coordinates and combining the information about light attenuation in the light transfer matrix, the UV coordinates are adjusted in real time. For example, in the simulation of multi-layer lace fabric, the inner layer UV coordinates are dynamically adjusted according to the deformation of the outer layer wrinkles, ensuring that the embroidery texture remains geometrically aligned after deformation, avoiding phenomena such as texture distortion or repetition. This step realizes the dynamic seamless fitting of multi-layer texture through the dual driving of mechanical deformation and optical shielding.
[0044] Step 105, input the dynamic light transmittance field and the corrected UV coordinate set into the rendering pipeline, and perform multi-channel optical property fusion calculation to output virtual rendering data.
[0045] Specifically, in the rendering pipeline, the optical properties of the fabric are comprehensively calculated based on the information of the dynamic light transmittance field and the corrected UV coordinate set. For example, when simulating multi-layer chiffon fabric, the light transmittance field controls the outer layer's translucent effect, and the corrected UV coordinate set restores the inner layer's pattern details, outputting high-fidelity rendering data with dynamic light and shadow interaction. Through multi-channel optical property fusion calculation, the output virtual rendering data can more realistically represent the visual effects of multi-layer fabric under dynamic deformation, including texture details, light transmittance effects, and light and shadow changes, improving the dynamic realism of fabrics in 3D virtual simulation of clothing.
[0046] The 3D virtual fabric texture dynamic simulation method of the garment 3D virtual fabric texture dynamic simulation method, by obtaining multi-layer fabric data and modeling the microstructure characteristics and macroscopic physical properties, a hierarchical material model containing multi-layer texture UV coordinates is constructed, which provides a cross-scale physical parameter basis for dynamic calculation of transmittance; based on the hierarchical material model, the vertex displacement data and interlayer contact pressure during the dynamic deformation process of each layer of fabric are calculated in real time by using the physical engine, the deformed vertex coordinates and deformation gradient data are generated, and the mapping relationship between the microstructure deformation quantization index and the mechanical response is established; according to the deformation gradient data and the hierarchical material model, a dynamic transmittance field is constructed, and a light transfer matrix representing the interlayer light attenuation relationship is generated by a ray tracing algorithm, realizing the dynamic adjustment of the transmittance parameter with the deformation gradient; further based on the deformed vertex coordinates and the light transfer matrix, the UV coordinates are dynamically displaced to generate a corrected UV coordinate set to eliminate the interlayer texture misalignment; the dynamic transmittance field and the corrected UV coordinate set are input into the rendering pipeline for multi-channel optical property fusion calculation, through the real-time coupling of mechanical deformation data and optical rendering parameters, the transmittance field update and texture accurate fitting are simultaneously driven, so as to realize the accurate calculation of the microstructure transmittance self-adaptation with the deformation in the multi-layer fabric dynamic simulation, effectively improving the optical reality and physical consistency of the dynamic simulation.
[0047] As shown in Figure 2 In one embodiment, multi-layer fabric data is obtained, the microstructure characteristics and macroscopic physical properties of the multi-layer fabric data are modeled, and a hierarchical material model is obtained, including:
[0048] Step 201, the scanning electron microscope image of the multi-layer fabric data is subjected to fiber gap feature extraction, and the fiber diameter, gap rate and interlacing density of each layer of fabric data are obtained.
[0049] Specifically, the cross-sectional image of the multi-layer fabric can be collected by a scanning electron microscope (SEM), and the fiber gap feature can be extracted by using an edge detection algorithm and a morphological segmentation technique. Illustratively, the fiber boundary is identified based on the Canny operator in the OpenCV library, and the fiber diameter, gap rate and interlacing density parameters are calculated by a region growing algorithm. For example, when scanning silk fabric, the outer fiber diameter (about 5-10 microns) and the inner interlacing density (number of fiber intersection points per unit area) can be quantified to form a microstructure feature set of each layer of fabric. By replacing traditional manual measurement with automated image processing, the feature extraction efficiency and accuracy are improved.
[0050] Step 202, based on the material mechanics experimental data, the Young's modulus is calculated according to the fiber diameter and the interlacing density through a proportional coefficient, wherein the proportional coefficient is calibrated by a tensile test.
[0051] Specifically, the proportional coefficients are calibrated based on the tensile test data, the micro-macro mechanical relationship is established, and the Young's modulus is calculated, and the specific expression is as follows:
[0052] E=k1·d+k2·p
[0053] wherein E is the Young's modulus, d is the fiber diameter, p is the interweaving density, and the proportional coefficients k1 and k2 are exemplarily calibrated by a uniaxial tensile test: an axial load is applied to a sample of the same material, a stress-strain curve is recorded, and k1 and k2 are fitted by the least square method. This step drives the mechanical modeling by the microstructure parameters, and solves the limitation of the traditional empirical formula which ignores the interaction of fibers.
[0054] In step 203, the initial transmittance is calculated according to the porosity by a nonlinear function, wherein the nonlinear function is fitted by an optical transmission experiment.
[0055] Specifically, the initial transmittance can be calculated based on the porosity by fitting the nonlinear transmittance function with the optical transmission experiment data, and the specific expression is as follows:
[0056] τ=τ0·e -β·g
[0057] wherein τ is the initial transmittance, τ0 is the reference transmittance (theoretical maximum value without gaps), g is the porosity, and β is the attenuation coefficient fitted by the transmittance curve of the sample with different g values measured under the standard light source. For example, the transmittance function of chiffon fabric with high porosity (>30%) shows a rapid rising trend, while the transmittance function of denim fabric with low porosity (<10%) follows a gentle decay law. This step breaks through the limitation of the traditional fixed transmittance parameter by dynamic transmittance modeling driven by experiments.
[0058] In step 204, the UV coordinates of each layer of fabric data are generated based on a preset UV unfolding algorithm, and the UV coordinates are used to map two-dimensional textures to the surface of three-dimensional meshes.
[0059] Specifically, the minimum deformation unfolding algorithm is used to generate the UV coordinates: conformal mapping is applied to the vertices of the three-dimensional mesh, and the texture stretching distortion is minimized. Exemplarily, the initial unfolding result is obtained by solving the Laplace equation, and the UV distribution is optimized based on the deformation constraint. For example, fixed UV boundary conditions are applied to the vertices of the wrinkle area to ensure that the texture remains continuous in dynamic deformation. This step improves the deformation adaptability of the UV coordinates by topology optimization, and provides high-quality initial mapping for subsequent dynamic correction.
[0060] In step 205, the fiber diameter, porosity, interweaving density, Young's modulus, and initial transmittance are mapped to the attribute table of the hierarchical material model.
[0061] Exemplarily, the fiber diameter, porosity, interlacing density, Young's modulus and initial light transmittance parameters are encoded as a hierarchical relationship into a structured attribute table. Specifically, the physical properties of each layer of fabric are stored in JSON or binary format, and are associated with the material ID of the three-dimensional grid through key-value pairs. For example, the silk outer layer material ID is associated with a high Young's modulus (1.5 GPa) and a low porosity (15%), while the cotton inner layer is associated with a low modulus (0.8 GPa) and a high porosity (25%). This step organizes the data through standardization and hierarchy, ensuring efficient access of the physics engine and rendering pipeline to multiple source parameters.
[0062] In one embodiment, based on the hierarchical material model, the vertex displacement data and interlayer contact pressure of each layer of fabric data during dynamic deformation are calculated by the physics engine to generate post-deformation vertex coordinates and deformation gradient data, including:
[0063] According to the Young's modulus, a corresponding constitutive equation is matched for each layer of fabric data, wherein the constitutive equation is used to describe the stress-strain relationship of the material.
[0064] Specifically, according to the Young's modulus, a corresponding constitutive equation is matched for each layer of fabric data. Specifically, the constitutive equation is used to describe the stress-strain relationship of the material. For example, for fabrics with a low Young's modulus, a constitutive equation suitable for high-elasticity materials, such as the Neo-Hookean equation, can accurately describe their nonlinear elastic behavior under large deformation; for fabrics with a high Young's modulus, a linear elastic constitutive equation, such as Hooke's law, can meet the description requirements of their stress-strain relationship. By matching appropriate constitutive equations for fabrics with different Young's moduli, the deformation characteristics of each layer of fabric after being subjected to force can be accurately reflected, ensuring the accuracy and reliability of the physics engine calculation and laying a solid foundation for subsequent dynamic deformation simulation.
[0065] Based on the interlacing density, a contact friction coefficient model is used to calculate the contact friction coefficient between each layer of fabric data, wherein the friction coefficient model is used to represent the sliding resistance between fabric data with different interlacing densities.
[0066] Specifically, for fabrics with a high interlacing density, the contact between fibers is tight, the sliding resistance is large, and the contact friction coefficient is correspondingly high; for fabrics with a low interlacing density, the contact between fibers is relatively loose, the sliding resistance is small, and the contact friction coefficient is low. For example, for a canvas fabric with a very high interlacing density, its contact friction coefficient can reach 0.4-0.5; while for a silk fabric with a lower interlacing density, the contact friction coefficient is about 0.1-0.2. Through the establishment and calculation of the friction coefficient model, the interaction between each layer of fabric during dynamic deformation can be truly reflected, avoiding simulation errors caused by neglecting friction factors, and improving the authenticity and credibility of the simulation results.
[0067] Based on the constitutive equation and the contact friction coefficient, the displacement field of each layer of fabric data vertex and the interlayer contact pressure are solved by an implicit integration algorithm to generate the vertex coordinates after deformation.
[0068] Specifically, based on the constitutive equation and the contact friction coefficient, the displacement field of each layer of fabric data vertex and the interlayer contact pressure are solved by an implicit integration algorithm to generate the vertex coordinates after deformation. The implicit integration algorithm has good numerical stability, and is particularly suitable for solving nonlinear problems in complex dynamic deformation processes. Specifically, within each time step, the stress distribution inside the fabric is calculated according to the constitutive equation, and the interaction force between the layers of fabric is considered by combining the contact friction coefficient. By establishing a system of mechanical equilibrium equations, the implicit integration algorithm is used for iterative solution to gradually obtain the displacement field of each vertex and the interlayer contact pressure. For example, the Newton-Raphson iteration method is used, the vertex displacement prediction value is initially set, the displacement prediction value is corrected according to the residual of the current iteration, and the vertex coordinates after deformation are obtained until the convergence condition is met. This process can accurately simulate the complex mechanical behavior of the fabric in dynamic deformation, ensure the physical authenticity and stability of the simulation results, and avoid the problems of calculation divergence or result distortion.
[0069] The deformation gradient tensor and the curvature tensor are extracted from the displacement field to obtain the deformation gradient data, wherein the deformation gradient tensor is used to represent the local stretching or compression degree, and the curvature tensor is used to describe the surface bending degree.
[0070] Specifically, the deformation gradient tensor is used to represent the local stretching or compression degree, and the curvature tensor is used to describe the surface bending degree. For example, in the wrinkle area of the fabric, the deformation gradient tensor can reflect the stretching and compression changes when the wrinkle is unfolded or contracted, and the curvature tensor can finely describe the bending shape and curvature change of the wrinkle. By mathematical calculation method, these two types of key data are extracted from the displacement field to provide accurate deformation information for subsequent construction of dynamic light transmittance field, ensure that the light transmittance change is highly consistent with the fabric deformation, and further improve the accuracy and reliability of the simulation results.
[0071] In one embodiment, the dynamic light transmittance field is constructed according to the deformation gradient data and the hierarchical material model, and the light transfer matrix representing the interlayer light attenuation relationship is generated by the ray tracing algorithm, including:
[0072] According to the interlayer contact pressure and the gap rate, the dynamic correction gap rate is calculated, wherein the dynamic correction gap rate is used to represent the real-time change of the fiber gap in the deformation process.
[0073] Specifically, according to the interlayer contact pressure and the gap rate, the dynamic correction gap rate is calculated by a pressure-deformation coupling model, and the specific expression is as follows:
[0074]
[0075] where g d is the dynamic corrected gap ratio, g0 is the gap ratio, a is the deformation sensitive coefficient calibrated by compression experiment, p is the interlaminar contact pressure, p max is the maximum compressive strength of the fabric. For example, when the fabric is subjected to a compressive force, the interlaminar contact pressure increases, resulting in a decrease in fiber gap, and the dynamic corrected gap ratio decreases accordingly; conversely, when the fabric is subjected to a tensile force, the interlaminar contact pressure decreases, the fiber gap increases, and the dynamic corrected gap ratio increases. This step breaks through the traditional static gap ratio assumption by linking mechanics and optical parameters, and accurately reflects the microstructure changes caused by deformation.
[0076] Based on the dynamic corrected gap ratio and the deformation gradient tensor, the dynamic light transmittance is calculated by the scattering model.
[0077] Further, based on the dynamic corrected gap ratio and the deformation gradient tensor, the dynamic light transmittance is calculated by the improved scattering model, and the specific expression is as follows:
[0078]
[0079] where τ d is the dynamic light transmittance, τ0 is the reference light transmittance, β is the attenuation coefficient, τ d is the dynamic corrected gap ratio, γ is the deformation coupling coefficient for controlling the gain effect of tensile deformation on light transmittance, and ||F-I|| F is the stretch ratio, which represents the Frobenius norm of the deformation gradient tensor F to the unit matrix I, and is used to quantify the degree of stretching. This step realizes the adaptive adjustment of light transmittance with dynamic deformation through the synergistic effect of deformation gradient and gap ratio.
[0080] Based on the dynamic light transmittance, the attenuation coefficient of the outer layer of deformation grid to the incident light is calculated layer by layer by the ray tracing algorithm, and the light transfer matrix is generated.
[0081] Exemplarily, the Monte Carlo path tracing algorithm can be used to calculate the attenuation coefficient of incident light in the deformed grid layer by layer based on the dynamic light transmittance, to generate the light transfer matrix. Specifically, a random light path is emitted for each layer of fabric grid vertex, the transmittance cumulative value of the light when passing through each layer is counted, and the interlayer attenuation weight is calculated in combination with the scattering effect. Further, by multiplying the dynamic light transmittance of each layer and superimposing the scattering attenuation effect, the element value of the light transfer matrix is generated, wherein the scattering coefficient and the light propagation path length jointly affect the final attenuation result. For example, when the high light transmittance outer layer is superimposed with the low light transmittance inner layer fabric, the light transfer matrix element value comprehensively reflects the cumulative effect of the light transmittance of each layer and the scattering path. This step realizes the physical accurate characterization of the interlayer light attenuation relationship through dynamic light transmittance driven light tracing and scattering modeling. This embodiment realizes the accurate modeling of the light attenuation relationship of the multi-layer fabric in the deformed state through the dynamic light transmittance driven light tracing algorithm and the scattering path cumulative calculation, solves the interlayer optical distortion problem caused by the traditional static light transmittance and the simplified light transmission model, and improves the visual authenticity and physical consistency of the dynamic simulation.
[0082] In one embodiment, based on the dynamic light transmittance, the attenuation coefficient of the outer layer deformed grid to the incident light is calculated layer by layer through the light tracing algorithm to generate the light transfer matrix, including:
[0083] Based on the dynamic light transmittance and the deformed vertex coordinates, a set of light paths passing through the deformed grid of each layer is generated through the path tracing algorithm, wherein each light path contains the sequential number of the light penetrating the outer layer to the inner layer.
[0084] Specifically, based on the dynamic light transmittance and the deformed vertex coordinates, a set of light paths passing through the deformed grid of each layer is generated through the path tracing algorithm. Exemplarily, a random light is emitted from a virtual light source, its penetration path through each layer of fabric is traced, and the penetration sequential number of the outer layer to the inner layer is recorded for each path. For example, when the light penetrates the outer layer silk and the inner layer cotton, the path sequential number is 1, 2 in turn, and the dynamic light transmittance parameters of the corresponding layers are associated. This step ensures that the path distribution covers the dynamic deformation area of the multi-layer fabric through the deformed adaptive light tracing.
[0085] According to the set of light paths, the attenuation ratio of the outer layer deformed grid to the incident light is calculated layer by layer, wherein the attenuation ratio of the i-th layer to the j-th layer is the product of the dynamic light transmittance of the i-th layer and the light transmittance of the i+1-th to j-th layer.
[0086] Exemplarily, the attenuation proportion of the outer layer to the incident light is calculated layer by layer according to the penetration order in the set of light ray paths. Specifically, for the penetration path of the i-th layer to the j-th layer, the dynamic light transmittance of the i-th layer is multiplied by the dynamic light transmittance of the i+1-th layer to the j-th layer in turn to obtain the cumulative attenuation proportion. For example, if the outer layer (the 1st layer) transmittance is 0.8 and the inner layer (the 2nd layer) transmittance is 0.6, then the attenuation proportion of the 1st layer to the 2nd layer is 0.8*0.6=0.48. This step breaks through the traditional linear superposition assumption by transmittance product calculation, and accurately depicts the nonlinear attenuation law of the multi-layer light transmittance effect.
[0087] Based on the attenuation proportion, an inter-layer light attenuation coefficient matrix is constructed, wherein the row index of the matrix element is the outer layer number, the column index is the inner layer number, and the element value is the corresponding inter-layer attenuation proportion.
[0088] Specifically, the inter-layer light attenuation coefficient matrix is constructed based on the attenuation proportion result. Specifically, the matrix row index represents the outer layer number, the column index represents the inner layer number, and the matrix element value is the corresponding inter-layer attenuation proportion. For example, the matrix element M[1][3] represents the cumulative light transmittance attenuation coefficient of the outer layer (the 1st layer) to the third layer (the 3rd layer). This step represents the light attenuation relationship under the multi-layer superposition deformation state through the dynamic matrix structure, and improves the adaptability to dynamic deformation compared with the traditional static matrix.
[0089] The inter-layer light attenuation coefficient matrix is normalized to map the matrix elements to the interval of 0 to 1 to generate a light transfer matrix.
[0090] Specifically, the embodiment solves the distortion problem caused by fixed transmittance and linear attenuation superposition in the traditional multi-layer fabric optical simulation through dynamic transmittance driven light ray path tracking and inter-layer attenuation product calculation, combined with the construction of the normalized light transfer matrix: a dynamic light ray path set is generated based on the deformed vertex coordinates, accurately capturing the nonlinear variation law of the transmittance of each layer with deformation; the cumulative effect of light attenuation is represented by layer-by-layer transmittance product calculation, breaking through the precision limitation of the traditional linear superposition model; the inter-layer light attenuation coefficient matrix is constructed and normalized to ensure the physical consistency of the optical parameters under different light intensities and deformation states. This scheme significantly improves the reality of the light attenuation effect of the multi-layer fabric in the dynamic deformation and the physical accuracy of the rendering result through real-time coupling calculation of dynamic transmittance and deformation data, providing high-fidelity optical simulation support for virtual fitting, film special effects and other scenes.
[0091] In one of the embodiments, based on the deformed vertex coordinates and the light transfer matrix, dynamic displacement compensation is performed on the UV coordinates to generate a corrected UV coordinate set, including:
[0092] Based on the deformed vertex coordinates, a depth map of each layer is generated, wherein the depth map represents the projection distance of the grid vertex in the viewpoint direction.
[0093] Specifically, based on the deformed vertex coordinates, the vertex depth values of each layer of fabric mesh are calculated by projecting along the virtual viewpoint direction to generate a hierarchical depth map. Illustratively, the Z-Buffer algorithm is used to map the three-dimensional mesh vertices to a two-dimensional depth map, where the depth value represents the vertical distance from the vertex to the viewpoint. For example, the depth map of the outer silk fabric presents a continuous gradient, while the inner cotton fabric has local depth jumps due to deformation wrinkles. This step quantifies the spatial positional relationship between layers through a dynamic depth map, providing a geometric data basis for occlusion analysis.
[0094] The adjacent layer depth maps are compared pixel by pixel to generate an occlusion mask for the inner layer UV coordinates, which identifies the UV region of the inner layer that is occluded by the outer layer fabric.
[0095] Illustratively, the adjacent layer depth maps are compared pixel by pixel to identify the UV region of the inner layer that is occluded by the outer layer. Specifically, if the depth value of a certain pixel of the outer layer is less than the corresponding position of the inner layer, the UV region of the inner layer is marked as occluded. For example, the depth value of the outer layer wrinkle region is lower than that of the inner layer flat region, causing the corresponding UV coordinates of the inner layer to be marked as occluded. This step replaces the preset occlusion relationship with dynamic depth comparison, improving the occlusion detection accuracy in complex deformation scenarios.
[0096] According to the light transfer matrix and the deformation gradient tensor, displacement compensation is calculated for the UV region marked by the occlusion mask to generate a corrected UV coordinate set.
[0097] Further, displacement compensation can be performed on the UV region marked by the occlusion mask according to the interlayer attenuation coefficient in the light transfer matrix and the deformation gradient tensor. Specifically, an inverse offset is applied to the UV coordinates of the occluded region along the normal direction, and the offset is calculated by jointly weighting the attenuation coefficient and the deformation gradient amplitude. For example, the inner layer UV coordinates of the outer layer high attenuation region (attenuation coefficient 0.3) are inversely offset by 0.2 units along the normal direction, eliminating the texture misalignment. This step realizes dynamic texture fitting correction of the occluded region by dual driving of mechanical deformation and optical attenuation. This embodiment solves the texture misalignment problem of traditional UV mapping in multi-layer dynamic deformation through the occlusion detection driven by dynamic depth map and the displacement compensation mechanism coordinated with attenuation-deformation: the depth map accurately quantifies the geometric relationship between layers, the occlusion mask dynamically updates to improve detection robustness, and the displacement compensation combines optical attenuation and mechanical deformation parameters to realize adaptive texture correction, enhancing the visual consistency and detail restoration capability of multi-layer fabric dynamic simulation.
[0098] In one embodiment, the dynamic light transmittance field and the corrected UV coordinate set are input into the rendering pipeline for multi-channel optical property fusion calculation, and virtual rendering data is output, including:
[0099] According to the dynamic light transmittance field, the light transmittance parameters of each layer of fabric data are mapped to the transmission channel of the material system to generate transmission light intensity control parameters, wherein the transmission light intensity control parameters are used to adjust the light transmittance in real time.
[0100] Specifically, based on the dynamic light transmittance and the deformed vertex coordinates, a set of light paths passing through each layer of deformed mesh is generated by a path tracking algorithm. Each light path records the sequential number of light penetrating from the outer layer to the inner layer, accurately depicting the propagation trajectory of light in the multi-layer fabric. For example, when simulating the light passing through the multi-layer fabric, the path tracking algorithm determines the incident point of the light entering the fabric according to the deformed vertex coordinates, judges the propagation direction and refraction of the light in each layer according to the dynamic light transmittance, and generates a set of light paths containing complete penetration sequence, providing accurate light propagation information for subsequent attenuation ratio calculation.
[0101] Based on the corrected UV coordinate set, each layer of texture is sampled to obtain texture color data of each layer, and the light intensity attenuation calculation is performed on the inner layer texture color data according to the attenuation coefficients in the light transfer matrix to generate adjusted texture light intensity.
[0102] Specifically, based on the corrected UV coordinate set, each layer of texture is sampled to obtain texture color data of each layer. The corrected UV coordinate set ensures accurate mapping of the texture after the deformation of the fabric, avoiding texture distortion or misplacement. At the same time, the light intensity attenuation calculation is performed on the inner layer texture color data according to the attenuation coefficients in the light transfer matrix to generate adjusted texture light intensity. For example, for the inner layer texture close to the outer layer, its light intensity attenuation is greater due to more obstruction from the outer layer, and its brightness is reduced by multiplying the corresponding attenuation coefficient; while for the texture layer close to the inner side, the light intensity attenuation is smaller due to less obstruction of light penetration, thus retaining more details. This method can more realistically simulate the propagation and attenuation process of light in multi-layer fabric, making the rendering result more realistic.
[0103] According to the curvature tensor, the surface normal offset of the wrinkle area is calculated, and the highlight reflection intensity is enhanced based on the surface normal offset to generate highlight channel data.
[0104] Specifically, the curvature tensor reflects the bending degree of the fabric surface, especially in the wrinkle area, the surface normal will be significantly offset. The highlight reflection intensity is enhanced based on the surface normal offset to generate highlight channel data. For example, in the sharp area of the wrinkle, the curvature tensor shows a higher curvature value, and the surface normal offset is larger, at this time the highlight reflection intensity is enhanced, making these areas present brighter highlight effect, simulating the reflection characteristics of light at the wrinkle; while in the smooth area, the curvature is lower, and the highlight reflection intensity is relatively weak. In this way, the rendered fabric surface highlight can be more in line with the actual light reflection law, enhancing the fabric detail performance and stereoscopic effect.
[0105] The transmission light intensity control parameter, the adjusted texture light intensity, and the highlight channel data are superimposed and fused in multiple channels to output virtual rendering data.
[0106] Specifically, the transmission light intensity control parameter, the adjusted texture light intensity, and the highlight channel data are superimposed and fused in multiple channels to output virtual rendering data. For example, by using a weighted average method, the light penetration effect determined by the transmission light intensity control parameter, the color information provided by the adjusted texture light intensity, and the highlight details enhanced by the highlight channel data are comprehensively processed to organically combine the information of each channel and generate realistic virtual rendering data. This process fully utilizes the advantages of each channel, comprehensively considers various optical properties such as light transmission, texture details, and highlight reflection, and ensures that the virtual rendering data can truly reflect the visual effect of the garment under dynamic deformation. The embodiment realizes accurate simulation of the optical properties of the multi-layer fabric of the garment under dynamic deformation through the steps of generating the transmission light intensity control parameter, performing layer-by-layer sampling and light intensity attenuation calculation, enhancing the highlight reflection intensity, and superimposing and fusing in multiple channels.
[0107] In summary, the method for dynamically simulating 3D virtual fabric texture of a garment provided in the present application obtains multi-layer fabric data, mathematically models microstructure characteristics and macroscopic physical properties to obtain a hierarchical material model, which covers the UV coordinates of the multi-layer texture. Based on this model, a physical engine is used to calculate the vertex displacement data and interlayer contact pressure of each layer of fabric under dynamic deformation to generate deformed vertex coordinates and deformation gradient data. A dynamic light transmittance field is constructed according to the deformation gradient data and the hierarchical material model, and a light transfer matrix representing the interlayer light attenuation relationship is generated by a ray tracing algorithm. Based on the deformed vertex coordinates and the light transfer matrix, dynamic displacement compensation is performed on the UV coordinates to generate a corrected UV coordinate set. The dynamic light transmittance field and the corrected UV coordinate set are input into a rendering pipeline for multi-channel optical property fusion calculation to output virtual rendering data. The above technical method accurately calculates the light transmittance of the microstructure of the multi-layer fabric that adapts to deformation by modeling at the micro and macro levels and using a physical engine and a ray tracing algorithm to simulate dynamic deformation and light propagation, effectively solves the problems of inaccurate light transmittance calculation and unrealistic simulation effect in the prior art, improves the realism and credibility of the light transmittance effect of the fabric in 3D virtual simulation of the garment, and makes the virtual rendering data closer to the dynamic visual effect of the actual garment.
[0108] It should be understood that although the steps in the flowcharts involved in the embodiments described above are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the embodiments described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately or alternately executed with at least part of other steps or steps or stages in other steps.
[0109] Based on the same inventive concept, the embodiments of the present application also provide a garment 3D virtual fabric texture dynamic simulation device for implementing the garment 3D virtual fabric texture dynamic simulation method described above. The problem-solving implementation scheme provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more garment 3D virtual fabric texture dynamic simulation device embodiments provided below can refer to the limitations of the garment 3D virtual fabric texture dynamic simulation method described above, which will not be repeated here.
[0110] In one exemplary embodiment, as shown in Figure 3 A garment 3D virtual fabric texture dynamic simulation device 10 is provided, comprising:
[0111] A hierarchical modeling module 11 is configured to obtain multi-layer fabric data, perform mathematical modeling on the microstructure features and macroscopic physical properties of the multi-layer fabric data, and obtain a hierarchical material model, wherein the hierarchical material model includes UV coordinates of multi-layer textures.
[0112] A physical deformation module 12 is configured to calculate vertex displacement data and interlayer contact pressure of each layer of fabric data in a dynamic deformation process based on the hierarchical material model through a physical engine, and generate deformed vertex coordinates and deformation gradient data.
[0113] An optical perspective module 13 is configured to construct a dynamic light transmittance field according to the deformation gradient data and the hierarchical material model, and generate a light transfer matrix representing the interlayer light attenuation relationship through a ray tracing algorithm.
[0114] A dynamic correction module 14 is configured to perform dynamic displacement compensation on the UV coordinates based on the deformed vertex coordinates and the light transfer matrix, and generate a corrected UV coordinate set.
[0115] A dynamic rendering module 15 is configured to input the dynamic light transmittance field and the corrected UV coordinate set into a rendering pipeline, perform multi-channel optical property fusion calculation, and output virtual rendering data.
[0116] In one embodiment, the hierarchical modeling module 11 comprises:
[0117] a fiber gap feature extraction unit configured to extract fiber gap features from the scanning electron microscope images of the multi-layer fabric data, to obtain fiber diameter, gap ratio and interlacing density of each layer of fabric data.
[0118] a Young's modulus calculation unit configured to calculate the Young's modulus based on material mechanics experimental data, according to the fiber diameter and the interlacing density, through a scaling factor, wherein the scaling factor is calibrated by a tensile test.
[0119] an initial light transmittance calculation unit configured to calculate the initial light transmittance according to the gap ratio, through a nonlinear function, wherein the nonlinear function is fitted by an optical transmission experiment.
[0120] a UV coordinate generation unit configured to generate UV coordinates of each layer of fabric data based on a preset UV unfolding algorithm, wherein the UV coordinates are used to map two-dimensional textures to three-dimensional mesh surfaces.
[0121] an attribute table mapping unit configured to map the fiber diameter, the gap ratio, the interlacing density, the Young's modulus and the initial light transmittance to an attribute table of the hierarchical material model.
[0122] In one embodiment, the physical deformation module 12 comprises:
[0123] a constitutive equation matching unit configured to match a corresponding constitutive equation for each layer of fabric data according to the Young's modulus, wherein the constitutive equation is used to describe the stress-strain relationship of the material.
[0124] a friction coefficient calculation unit configured to calculate the contact friction coefficient between each layer of fabric data based on the interlacing density, through a preset friction coefficient model, wherein the friction coefficient model is used to represent the sliding resistance between fabric data with different interlacing densities.
[0125] an implicit integration solution unit configured to solve the displacement field of the vertex of each layer of fabric data and the interlayer contact pressure based on the constitutive equation and the contact friction coefficient, through an implicit integration algorithm, to generate the vertex coordinates after deformation.
[0126] a deformation gradient extraction unit configured to extract a deformation gradient tensor and a curvature tensor from the displacement field to obtain deformation gradient data, wherein the deformation gradient tensor is used to represent the degree of local stretching or compression, and the curvature tensor is used to describe the degree of surface bending.
[0127] In one embodiment, the optical perspective module 13 comprises:
[0128] A dynamic gap ratio correction unit is configured to calculate a dynamic corrected gap ratio based on the interlayer contact pressure and the gap ratio, wherein the dynamic corrected gap ratio is used to represent the real-time change of the fiber gap during the deformation process.
[0129] A dynamic transmittance calculation unit is configured to calculate a dynamic transmittance based on the dynamic corrected gap ratio and the deformation gradient tensor by using a scattering model.
[0130] A light transfer matrix generation unit is configured to generate a light transfer matrix by calculating the attenuation coefficient of the incident light of the outer layer deformation grid layer by layer based on the dynamic transmittance by using a ray tracing algorithm.
[0131] In one embodiment, the light transfer matrix generation unit comprises:
[0132] A light path generation subunit is configured to generate a set of light paths passing through the deformation grids of each layer based on the dynamic transmittance and the deformed vertex coordinates by using a path tracing algorithm, wherein each light path contains the sequential number of the light penetrating from the outer layer to the inner layer.
[0133] An attenuation ratio calculation subunit is configured to calculate the attenuation ratio of the incident light of the outer layer deformation grid layer by layer based on the set of light paths, wherein the attenuation ratio of the i-th layer to the j-th layer is the product of the dynamic transmittance of the i-th layer and the transmittance of the i+1-th to j-th layers.
[0134] A light attenuation matrix construction unit is configured to construct an interlayer light attenuation coefficient matrix based on the attenuation ratio, wherein the row index of the matrix element is the outer layer number, the column index is the inner layer number, and the element value is the corresponding interlayer attenuation ratio.
[0135] A normalization processing unit is configured to perform normalization processing on the interlayer light attenuation coefficient matrix to map the matrix elements to the interval of 0 to 1, thereby generating the light transfer matrix.
[0136] In one embodiment, the dynamic correction module 14 comprises:
[0137] A depth map generation unit is configured to generate a depth map of each layer based on the deformed vertex coordinates, wherein the depth map represents the projection distance of the grid vertex in the viewpoint direction.
[0138] An occlusion mask generation unit is configured to perform pixel-by-pixel comparison on the depth maps of adjacent layers to generate an occlusion mask of the inner layer UV coordinates, wherein the occlusion mask is used to identify the UV region of the inner layer fabric that is occluded by the outer layer fabric.
[0139] A displacement compensation calculation unit is configured to perform displacement compensation calculation on the UV region marked by the occlusion mask based on the light transfer matrix and the deformation gradient tensor, thereby generating a set of corrected UV coordinates.
[0140] In one embodiment, the dynamic rendering module 15 comprises:
[0141] The transmission light intensity control unit is configured to map the light transmission rate parameter of each layer of fabric data to a transmission channel of the material system according to the dynamic light transmission rate field, to generate a transmission light intensity control parameter, wherein the transmission light intensity control parameter is used to adjust the light transmission rate in real time.
[0142] The texture light intensity adjustment unit is configured to sample each layer of texture based on the corrected UV coordinate set, to obtain texture color data of each layer, and to perform light intensity attenuation calculation on the inner layer texture color data according to the attenuation coefficient in the light transfer matrix, to generate adjusted texture light intensity.
[0143] The highlight enhancement unit is configured to calculate the surface normal offset of the wrinkle area according to the curvature tensor, to enhance the highlight reflection intensity based on the surface normal offset, and to generate highlight channel data.
[0144] The multi-channel fusion unit is configured to perform multi-channel superposition fusion on the transmission light intensity control parameter, the adjusted texture light intensity, and the highlight channel data, and to output virtual rendering data.
[0145] In an embodiment, a computer device is provided, comprising a memory and a processor, the memory stores a computer program, and the processor implements the steps of the garment 3D virtual fabric texture dynamic simulation method as described above when executing the computer program.
[0146] In an embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the steps of the above method embodiments.
[0147] For the device embodiment, since it basically corresponds to the method embodiment, the related parts are described in the method embodiment. The above described device embodiment is only illustrative, and the components described as separate components can be or can not be physically separated, and the components displayed as units can be or can not be physical units, that is, they can be located in one place, or distributed on multiple network units. Some or all of the modules can be selected to achieve the purpose of the present disclosure according to actual needs. Those skilled in the art can understand and implement it without creative labor.
[0148] The above described embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the patent scope of the application. It should be noted that, for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which are all within the protection scope of the present application.
Claims
1. A method for dynamic simulation of 3D virtual fabric texture of clothing, characterized in that: The method comprises: Acquire multi-layer fabric data, perform mathematical modeling on the microstructure characteristics and macroscopic physical properties of the multi-layer fabric data, and obtain a hierarchical material model, wherein the hierarchical material model includes UV coordinates of the multi-layer texture; Based on the hierarchical material model, the physical engine is used to calculate the vertex displacement data and interlayer contact pressure of each layer of the fabric data during the dynamic deformation process, and generate the vertex coordinates and deformation gradient data after deformation; Constructing a dynamic transmittance field based on the deformation gradient data and the hierarchical material model, and generating a light transfer matrix representing the inter-layer light attenuation relationship through a ray tracing algorithm; Based on the deformed vertex coordinates and the light transfer matrix, dynamically compensate the UV coordinates to generate a corrected UV coordinate set; The dynamic transmittance field and the corrected UV coordinate set are input into a rendering pipeline, multi-channel optical property fusion calculation is performed, and virtual rendering data is output.
2. The method according to claim 1, characterized in that The step of acquiring multi-layer fabric data and mathematically modeling the microstructure characteristics and macroscopic physical properties of the multi-layer fabric data to obtain a hierarchical material model includes: Performing fiber gap feature extraction on scanning electron microscope images of the multiple layers of fabric data to obtain the fiber diameter, gap ratio and interweaving density of the fabric data of each layer; Based on material mechanics experimental data, the Young's modulus is calculated by a proportional coefficient according to the fiber diameter and the interweaving density, wherein the proportional coefficient is calibrated by a tensile test; Calculating the initial light transmittance according to the gap ratio by a nonlinear function, wherein the nonlinear function is obtained by fitting an optical transmission experiment; Based on a preset UV unfolding algorithm, generating the UV coordinates of the fabric data of each layer, wherein the UV coordinates are used to map the two-dimensional texture to the three-dimensional mesh surface; The fiber diameter, the gap ratio, the interweaving density, the Young's modulus, and the initial light transmittance are mapped to a property table of the hierarchical material model.
3. The method according to claim 2, characterized in that The method of calculating the vertex displacement data and interlayer contact pressure of each layer of the fabric data during the dynamic deformation process based on the hierarchical material model and generating the post-deformation vertex coordinates and deformation gradient data through a physical engine includes: Matching a corresponding constitutive equation to the fabric data of each layer according to the Young's modulus, wherein the constitutive equation is used to describe the stress-strain relationship of the material; Based on the interweaving density, calculating the contact friction coefficient between the fabric data of each layer using a preset friction coefficient model, wherein the friction coefficient model is used to characterize the sliding resistance between the fabric data with different interweaving densities; Based on the constitutive equation and the contact friction coefficient, the displacement field and interlayer contact pressure of the fabric data vertices of each layer are solved by an implicit integration algorithm to generate the coordinates of the deformed vertices; A deformation gradient tensor and a curvature tensor are extracted from the displacement field to obtain the deformation gradient data, wherein the deformation gradient tensor is used to characterize the degree of local stretching or compression, and the curvature tensor is used to describe the degree of surface curvature.
4. The method according to claim 3, characterized in that The step of constructing a dynamic transmittance field based on the deformation gradient data and the hierarchical material model, and generating a light transfer matrix representing the inter-layer light attenuation relationship through a ray tracing algorithm, includes: Calculating a dynamic correction gap ratio according to the interlayer contact pressure and the gap ratio, wherein the dynamic correction gap ratio is used to characterize the real-time change of the fiber gap during the deformation process; Calculating dynamic light transmittance using a scattering model based on the dynamic corrected gap ratio and the deformation gradient tensor; Based on the dynamic light transmittance, the attenuation coefficient of the outer deformable grid to the incident light is calculated layer by layer through a ray tracing algorithm to generate the light transfer matrix.
5. The method according to claim 4, characterized in that The method of calculating the attenuation coefficient of the outer deformed mesh to the incident light layer by layer through a ray tracing algorithm based on the dynamic light transmittance to generate the light transfer matrix includes: Based on the dynamic transmittance and the deformed vertex coordinates, a set of light paths passing through each layer of the deformed mesh is generated by a path tracing algorithm, wherein each light path includes a sequential number of the light penetrating from the outer layer to the inner layer; According to the set of light paths, the attenuation ratio of the outer deformed mesh to the incident light is calculated layer by layer, where the attenuation ratio of the i-th layer to the j-th layer is the product of the dynamic transmittance of the i-th layer and the transmittance of the i+1 to j-th layers; Based on the attenuation ratio, construct an interlayer light attenuation coefficient matrix, wherein the row index of the matrix element is the outer layer number, the column index is the inner layer number, and the element value is the attenuation ratio between the corresponding layers; The inter-layer light attenuation coefficient matrix is normalized, and the matrix elements are mapped to the range of 0 to 1 to generate the light transfer matrix.
6. The method according to claim 2, characterized in that The step of performing dynamic displacement compensation on the UV coordinates based on the deformed vertex coordinates and the light transfer matrix to generate a corrected UV coordinate set includes: generating a depth map of each layer based on the deformed vertex coordinates, wherein the depth map represents a projection distance of the mesh vertex in the viewpoint direction; Comparing the depth maps of adjacent layers pixel by pixel to generate an occlusion mask of the inner layer UV coordinates, wherein the occlusion mask is used to identify the inner layer fabric UV area occluded by the outer layer fabric; A displacement compensation calculation is performed on the UV area marked by the occlusion mask according to the light transfer matrix and the deformation gradient tensor to generate the corrected UV coordinate set.
7. The method according to claim 3, characterized in that The step of inputting the dynamic transmittance field and the corrected UV coordinate set into a rendering pipeline, performing multi-channel optical property fusion calculation, and outputting virtual rendering data includes: According to the dynamic transmittance field, the transmittance parameters of the fabric data of each layer are mapped to the transmission channel of the material system to generate a transmission light intensity control parameter, wherein the transmission light intensity control parameter is used to adjust the light transmittance in real time; Based on the corrected UV coordinate set, the multi-layer texture is sampled layer by layer to obtain the texture color data of each layer, and the light intensity attenuation calculation is performed on the inner layer texture color data according to the attenuation coefficient in the light transfer matrix to generate the adjusted texture light intensity; Calculating a surface normal offset of the wrinkle area according to the curvature tensor, enhancing highlight reflection intensity based on the surface normal offset, and generating highlight channel data; The transmitted light intensity control parameter, the adjusted texture light intensity and the highlight channel data are subjected to multi-channel superposition and fusion to output the virtual rendering data.
8. A 3D virtual fabric texture dynamic simulation device for clothing, characterized in that: include: A hierarchical modeling module is used to obtain multi-layer fabric data, perform mathematical modeling on the microstructure characteristics and macroscopic physical properties of the multi-layer fabric data, and obtain a hierarchical material model, wherein the hierarchical material model includes UV coordinates of the multi-layer texture; A physical deformation module is used to calculate the vertex displacement data and interlayer contact pressure of each layer of the fabric data during the dynamic deformation process based on the hierarchical material model through a physical engine, and generate the vertex coordinates and deformation gradient data after deformation; An optical perspective module, configured to construct a dynamic transmittance field based on the deformation gradient data and the hierarchical material model, and generate a light transfer matrix representing the inter-layer light attenuation relationship through a ray tracing algorithm; A dynamic correction module, configured to perform dynamic displacement compensation on the UV coordinates based on the deformed vertex coordinates and the light transfer matrix to generate a corrected UV coordinate set; The dynamic rendering module is used to input the dynamic transmittance field and the corrected UV coordinate set into the rendering pipeline, perform multi-channel optical property fusion calculation, and output virtual rendering data.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Furniture material dynamic rendering system based on physical simulation
CN121639891A
Dynamic rendering system for furniture materials based on physical simulation
CN121639891B