Virtual clothing elasticity simulation method and device, electronic equipment and storage medium

By determining the target path and gradient range in virtual clothing and performing elastic simulation of the simulated objects, the problem of poor elastic gradient simulation effect of virtual clothing is solved, and a more natural and efficient elastic gradient effect is achieved.

CN120198613APending Publication Date: 2025-06-24LINGDI (ZHEJIANG) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311777169.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-21
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

During the modeling of virtual clothing, the gradient effect is poor when simulating the elastic effect of specific areas on certain versions of virtual clothing.

Method used

By determining the grid on the target path in the virtual clothing as the object to be simulated, the object to be simulated is elastically simulated based on the current length and gradient range of the target path, so that the grid within the target gradient range will also undergo gradient expansion and contraction during the expansion and contraction process, and the expansion and contraction amount is less than the expansion and contraction amount of the object to be simulated.

Benefits of technology

The simulation effect of elastic gradient of virtual clothing is improved, making the expansion and contraction effect of the grid around the object to be simulated more natural, and the overall improvement of elastic gradient simulation effect of virtual clothing is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120198613A_ABST
    Figure CN120198613A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual garment elasticity simulation method and device, electronic equipment and a computer readable storage medium, and the method comprises the steps: determining a to-be-simulated object in a virtual garment, the to-be-simulated object being a grid located on a target path in the virtual garment; based on the current length of the target path, determining a target length to which the to-be-simulated object needs to be stretched; determining a target gradual change range based on the target path; and based on the target length and the target gradual change range, performing elastic simulation on the to-be-simulated object, so that the simulation effect of virtual garment elastic gradual change can be improved on the whole.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of virtual clothing, and in particular, to a method, device, electronic device, and computer-readable storage medium for simulating the elasticity of virtual clothing. Background Art

[0002] Virtual clothing refers to digital clothing fabricated by simulating clothing fabrics using computer technology. Virtual clothing is obtained through comprehensive consideration of clothing patterns, fabric characteristics, body movements of a three-dimensional human model, and the form and its changes when a human wears clothing, and is obtained through computer simulation. It can be applied to fields such as computer image processing, electronic game production, clothing design, clothing education, and e-commerce.

[0003] During the modeling process of virtual clothing, appropriate operations need to be performed on specific areas of certain plates of the virtual clothing, such as stretching, shrinking, etc., so as to simulate the elastic effects of certain areas of the virtual clothing to meet the elastic design requirements of the virtual clothing. However, currently, when simulating the elastic effect of a specific area of certain plates of the virtual clothing, such as the elastic effect of a certain edge, the simulation effect of elastic gradient is poor. Summary of the Invention

[0004] In view of the above technical problems, the present application provides a method, device, electronic device, and computer-readable storage medium for simulating the elasticity of virtual clothing, and the technical solutions are as follows:

[0005] According to a first aspect of the present application, there is provided a method for simulating the elasticity of virtual clothing, the method including:

[0006] Determine an object to be simulated in the virtual clothing, where the object to be simulated is a grid on a target path in the virtual clothing;

[0007] Based on the current length of the target path, determine a target length to which the object to be simulated needs to stretch or shrink;

[0008] Based on the target path, determine a target gradient range;

[0009] Based on the target length and the target gradient range, perform elastic simulation on the object to be simulated.

[0010] According to a second aspect of the present application, there is provided a device for simulating the elasticity of virtual clothing, the device including:

[0011] A determination unit, configured to determine an object to be simulated in the virtual clothing, where the object to be simulated is a grid on a target path in the virtual clothing;

[0012] The determination unit is further configured to determine a target length to which the object to be simulated needs to stretch or shrink based on the current length of the target path;

[0013] The determining unit is further configured to determine a target gradual change range based on the target path;

[0014] An elastic simulation unit, configured to perform elastic simulation on the object to be simulated based on the target length and the target gradual change range.

[0015] According to a third aspect of the present application, there is provided an electronic device, including:

[0016] A processor;

[0017] A memory for storing instructions executable by the processor;

[0018] Wherein, the processor is configured to implement the method described in the first aspect.

[0019] According to a fourth aspect of the present application, there is provided a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the method described in the first aspect are implemented.

[0020] The technical solution provided by the present application, when performing elastic simulation on the object to be simulated in the virtual clothing, determines a target gradual change range based on the target path that needs to be stretched and contracted in the object to be simulated, so that the meshes within the target gradual change range can also undergo gradual stretching and contraction during the stretching and contraction process of the object to be simulated, and the amount of stretching and contraction is less than that of the object to be simulated, to ensure the gradual change effect, make the stretching and contraction effect of the surrounding meshes of the object to be simulated more natural, and overall improve the simulation effect of elastic gradual change of the virtual clothing.

[0021] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. Description of the Drawings

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only some embodiments recorded in the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.

[0023] Figure 1 is a schematic diagram of a virtual clothing application scenario in related technologies;

[0024] Figure 2 is a schematic diagram of a virtual clothing pattern piece in related technologies;

[0025] Figure 3 is a schematic diagram of virtual clothing elastic simulation in related technologies;

[0026] Figure 4 is a schematic flowchart of a virtual clothing elasticity simulation method according to an embodiment of the present application;

[0027] Figure 5 is a schematic diagram of a virtual clothing elasticity simulation scenario according to an embodiment of the present application;

[0028] Figure 6 is a schematic structural diagram of a virtual clothing elasticity simulation device according to an embodiment of the present application;

[0029] Figure 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Detailed implementation manners

[0030] In order to enable those skilled in the art to better understand the technical solutions in the present application, the following will describe in detail the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art shall fall within the protection scope of the present application.

[0031] A virtual clothing refers to a digital clothing made by simulating clothing fabrics using computer technology. The virtual clothing is obtained by comprehensively considering the clothing pattern, fabric characteristics, body movements of the three-dimensional human model, and the shape and its changes when a person is wearing clothes, and is simulated by a computer. It can be applied to fields such as computer image processing, electronic game production, clothing design, clothing education, and e-commerce.

[0032] In the modeling process of virtual clothing, it is necessary to perform appropriate operations on specific areas on certain plates of the virtual clothing, such as stretching, shrinking, etc., so as to simulate the elastic effects of certain areas of the virtual clothing to meet the elastic design requirements of the virtual clothing. However, currently, when simulating the elastic effects of specific areas on certain plates of virtual clothing, such as the elastic effect of a certain edge, the simulation effect of elastic gradient is poor.

[0033] Please refer to Figures 1 - 3 , and the following makes an exemplary introduction to the application scenarios of virtual clothing, the plates of virtual clothing, and elastic simulation in related technologies:

[0034] Such as Figure 1As shown, a virtual garment can be designed using 3D modeling, and a 3D human body model can be constructed. This 3D human body model can be a preset model or a model constructed in real time based on the actual human body data of the user. The designed virtual garment can be simulated on the 3D human body model to achieve a virtual try-on effect. For the same virtual garment, there may be multiple different pattern pieces. A pattern piece can be the smallest division unit when the virtual garment is divided into regions. For example, Figure 2 As shown, taking a T-shirt as an example of a virtual garment, the T-shirt can be divided into different pattern pieces according to different human body parts. For example, Figure 2 the front pattern piece, the back pattern piece, the left sleeve pattern piece, the right sleeve pattern piece, and the collar pattern piece in Figure 3 . During the modeling process of the virtual garment, appropriate operations need to be performed on specific regions of certain pattern pieces of the virtual garment, such as stretching, shrinking, etc., so as to simulate the elastic effect of certain regions of the virtual garment to meet the elastic design requirements of the virtual garment. For example, Figure 3 as shown in Figure 3 , in the related art, by performing operations such as stretching and shrinking on a specific region (such as a certain line segment in

[0035]

[0036] Figure 4

[0037]

[0038] S401. Determine the object to be simulated in the virtual garment, where the object to be simulated is the mesh on the target path in the virtual garment;

[0038] As an example, the above target path can be a straight path, a curved path, or a path of other shapes, and specific limitations are not made here.

[0039] As an example, the above target path can be a closed path or a non-closed path, and specific limitations are not made here.

[0040] The object to be simulated in the virtual clothing above can be determined in various ways. As an example, one determination method may include: determining the width of the above target path, and determining the object to be simulated in the virtual clothing based on the target path after the width is determined. The width of the target path itself can be customized, so as to make the shape selection of the object to be simulated more flexible.

[0041] It should be noted that the above introduction to the method for determining the object to be simulated in the virtual clothing is only an exemplary display. In practical applications, there may be other determination methods, which are not specifically limited herein.

[0042] The width of the above target path can be determined in various ways. As an example, one determination method may include: obtaining a first user input instruction, and determining the width of the above target path based on the first user input instruction. The first user input instruction may include width information input by the user. Being able to determine the width of the target path through the width information specified by the user can better meet the design requirements of the user.

[0043] As another example, another method for determining the width of the above target path may include: obtaining the type information of the plate in the virtual clothing where the above target path is located, and determining the width of the above target path based on the type information of the plate. The widths of the target paths of the objects to be simulated corresponding to different types of plates may be different, and the appropriate width of the target path can be automatically determined by identifying the plate type.

[0044] It should be noted that the above introduction to the method for determining the width of the target path is only an exemplary display. In practical applications, there may be other determination methods, which are not specifically limited herein.

[0045] S402. Determine the target length to which the object to be simulated needs to stretch based on the current length of the target path;

[0046] The target length to which the above object to be simulated needs to stretch can be determined in various ways. As an example, one determination method may include: determining a stretching ratio, and determining the target length to which the object to be simulated needs to stretch based on the stretching ratio and the current length of the above target path. The stretching ratio is used to represent the ratio of the target length to which the object to be simulated needs to stretch to the current length of the above target path.

[0047] As another example, another method for determining the target length to which the above object to be simulated needs to stretch may include: directly setting a length value based on the current length of the above target path, as long as the length value is not equal to the current length, and using the length value as the target length to which the above object to be simulated needs to stretch.

[0048] As another example, another way to determine the target length to which the object to be simulated needs to stretch and contract may include: obtaining the type information of the pattern piece in the virtual clothing where the target path is located, and determining the target length to which the object to be simulated needs to stretch and contract based on the obtained type information and the current length of the target path. Different pattern piece types in the virtual clothing may correspond to preset lengths to which different objects to be simulated need to stretch and contract, and the length to which the object to be simulated needs to stretch and contract can be automatically determined according to the pattern piece type.

[0049] It should be noted that the above introduction to the method for determining the target length to which the object to be simulated needs to stretch and contract is only an exemplary display. In actual applications, there may be other determination methods, and specific limitations are not made in this regard.

[0050] S403. Determine the target gradual change range based on the target path;

[0051] As an example, the grids within the target gradual change range can gradually stretch and contract during the stretching and contracting process of the object to be simulated, and the amount of stretching and contracting of the grids within the target gradual change range is less than the amount of stretching and contracting of the object to be simulated.

[0052] The above target gradual change range can be determined in various ways. As an example, one determination method may include: determining the gradual change width, and determining the above target gradual change range based on the determined gradual change width and the above target path. The gradual change width is used to represent the maximum vertical distance between the grids that gradually stretch and contract in the virtual clothing and the above target path.

[0053] As an example, the above target gradual change range can be distributed on one side of the above target path or on both sides of the above target path. For example: assuming the target path is a horizontal straight line, the target gradual change range can be above the straight line, or below the straight line, or can be distributed on both the upper and lower sides of the straight line at the same time, and specific limitations are not made in this regard.

[0054] It should be noted that the above introduction to the method for determining the target gradual change range is only an exemplary display. In actual applications, there may be other determination methods, and specific limitations are not made in this regard.

[0055] The above gradual change width can be determined in various ways. As an example, one determination method may include: determining the above gradual change width based on a preset association relationship and the target length to which the object to be simulated needs to stretch and contract. The preset association relationship is used to represent the association relationship between the path length and the gradual change width. The appropriate gradual change width can be automatically determined according to the preset corresponding relationship between the length and the gradual change width.

[0056] S404. Perform elastic simulation on the object to be simulated based on the target length and the target gradual change range.

[0057] As an example, the grid expansion / contraction amount within the above-mentioned target gradual change range is determined according to the vertical distance between the grid and the above-mentioned target path.

[0058] For example: Assume that the current length of the target path is 10 cm, and the target length to which the object to be simulated needs to expand / contract is 20 cm. Then the expansion / contraction amount of the object to be simulated is 10 cm. Assume that the gradual change width is 5 cm. Then the maximum vertical distance between the grid in the virtual clothing where the gradual change expansion / contraction occurs and the target path is 5 cm. The grid expansion / contraction amount within the target gradual change range is determined according to the vertical distance between the grid and the above-mentioned target path. For example, when the vertical distance between the grid and the target path is 1 cm, the expansion / contraction amount is 8 cm; when the vertical distance between the grid and the target path is 2 cm, the expansion / contraction amount is 6 cm; when the vertical distance between the grid and the target path is 3 cm, the expansion / contraction amount is 4 cm; when the vertical distance between the grid and the target path is 4 cm, the expansion / contraction amount is 2 cm; when the vertical distance between the grid and the target path is 5 cm, the expansion / contraction amount is 1 cm. That is, within the target gradual change range, the gradual change expansion / contraction is achieved through the change of the vertical distance between the grid and the above-mentioned target path.

[0059] It should be noted that the above introduction to the determination method of the target gradual change range is only an exemplary display. In actual applications, it is not excluded that there are other determination methods, and specific details are not limited here.

[0060] Please refer to Figure 5 , Figure 5 shown in the specific application scenario of virtual clothing elasticity simulation in an embodiment of the present application. Figure 5 Taking the virtual clothing as a skirt as an example, the elastic simulation is carried out on the hem of the skirt. Regarding the hem as the above-mentioned object to be simulated, the target path is located on the hem. A certain gradual change width is set based on the hem. The gradual change range is determined according to the hem and the gradual change width. When the hem expands / contracts, the grids within the gradual change range above the hem also undergo corresponding gradual change expansion / contraction, which better expresses the simulation effect of the elastic gradual change of the hem and restores the actual clothing process.

[0061] It should be noted that the above introduction to the specific application scenario of virtual clothing elasticity simulation is only an exemplary display. In actual applications, it is not excluded that there are other application scenarios, and specific details are not limited here.

[0062] The technical solution provided by the present application, when performing elastic simulation on the object to be simulated in the virtual clothing, determines the target gradual change range based on the target path that needs to expand / contract in the object to be simulated, so that the grids within the target gradual change range can also undergo gradual change expansion / contraction during the expansion / contraction process of the object to be simulated, and the expansion / contraction amount is less than that of the object to be simulated to ensure the gradual change effect, making the expansion / contraction effect of the surrounding grids of the object to be simulated more natural, and overall improving the simulation effect of virtual clothing elastic gradual change.

[0063] Corresponding to the above method embodiments, an embodiment of the present application further provides a virtual clothing elasticity simulation device, as shown in Figure 6 shown, the device may include:

[0064] A determination unit 601, configured to determine an object to be simulated in the virtual clothing, where the object to be simulated is a grid on the target path in the virtual clothing;

[0065] The determination unit 601 is further configured to determine a target length to which the object to be simulated needs to stretch based on the current length of the target path;

[0066] The determination unit 601 is further configured to determine a target gradient range based on the target path;

[0067] An elasticity simulation unit 602, configured to perform elasticity simulation on the object to be simulated based on the target length and the target gradient range.

[0068] As an example, the target path includes a straight path.

[0069] As an example, the determination unit 601 is specifically configured to determine the width of the target path and determine the object to be simulated based on the target path after the width is determined.

[0070] As an example, the determination unit 601 is specifically configured to obtain a first user input instruction and determine the width of the target path based on the first user input instruction, where the first user input instruction includes width information input by the user.

[0071] As an example, the determination unit 601 is specifically configured to obtain type information of a plate in the virtual clothing where the target path is located and determine the width of the target path based on the type information.

[0072] As an example, the grids within the target gradient range can undergo gradient stretching during the stretching process of the object to be simulated, and the stretching amount of the grids within the target gradient range is less than the stretching amount of the object to be simulated.

[0073] As an example, the determination unit 601 is specifically configured to determine a gradient width and determine the target gradient range based on the gradient width and the target path, where the gradient width is used to characterize the maximum vertical distance between the grids that undergo gradient stretching in the virtual clothing and the target path.

[0074] As an example, the determination unit 601 is specifically configured to determine the gradient width based on a preset association relationship and the target length, where the preset association relationship is used to characterize the association relationship between the path length and the gradient width.

[0075] As an example, the determination unit 601 is specifically configured to determine a scaling ratio, and determine the target length based on the scaling ratio and the current length, where the scaling ratio is used to represent the ratio of the target length to the current length.

[0076] As an example, the determination unit 601 is specifically configured to obtain type information of a pattern piece in the virtual garment where the target path is located, and determine the target length based on the type information and the current length.

[0077] As an example, the amount of grid scaling within the target gradual change range is determined according to the perpendicular distance between the grid and the target path.

[0078] The present application also provides an electronic device, as Figure 7 shown, the electronic device includes:

[0079] A processor 701;

[0080] A memory 702 for storing instructions executable by the processor;

[0081] Wherein, the processor 701 is configured to implement the virtual garment elasticity simulation method described in any one of the above embodiments.

[0082] The present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the virtual garment elasticity simulation method described in any one of the above embodiments.

[0083] The above are only specific embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.

Claims

1. A method for simulating the elasticity of virtual clothing, characterized in that, Including: Determine the object to be simulated in the virtual clothing, where the object to be simulated is the grid on the target path in the virtual clothing; Based on the current length of the target path, determine the target length to which the object to be simulated needs to stretch; Based on the target path, determine the target gradient range; Based on the target length and the target gradient range, perform elastic simulation on the object to be simulated.

2. The method according to claim 1, characterized in that, The target path includes a straight path.

3. The method according to claim 1, characterized in that, The determining the object to be simulated in the virtual clothing includes: Determine the width of the target path, and based on the target path after the width is determined, determine the object to be simulated.

4. The method according to claim 3, wherein The determining the width of the target path includes: Obtain a first user input instruction, and based on the first user input instruction, determine the width of the target path, where the first user input instruction includes width information input by the user.

5. The method according to claim 3, characterized in that, The determining the width of the target path includes: Obtain the type information of the pattern piece in the virtual clothing where the target path is located, and based on the type information, determine the width of the target path.

6. The method according to claim 1, wherein The grids within the target gradient range can undergo gradient stretching during the stretching process of the object to be simulated, and the stretching amount of the grids within the target gradient range is less than the stretching amount of the object to be simulated.

7. The method according to claim 6, characterized in that, The based on the target path determining the target gradient range includes: Determine the gradient width, and based on the gradient width and the target path, determine the target gradient range, where the gradient width is used to represent the maximum vertical distance between the grids undergoing gradient stretching in the virtual clothing and the target path.

8. The method according to claim 7, characterized in that, The determining the gradient width includes: Based on a preset association relationship and the target length, determine the gradient width, where the preset association relationship is used to represent the association relationship between the path length and the gradient width.

9. The method according to claim 1, characterized in that, The determining the target length to which the object to be simulated needs to stretch includes: Determine the stretching ratio, and based on the stretching ratio and the current length, determine the target length, where the stretching ratio is used to represent the ratio of the target length to the current length.

10. The method according to claim 1, characterized in that, The determining the target length to which the object to be simulated needs to stretch includes: Obtain the type information of the pattern piece in the virtual clothing where the target path is located, and based on the type information and the current length, determine the target length.

11. The method according to claim 6, characterized in that The stretching amount of the grids within the target gradient range is determined according to the vertical distance between the grids and the target path.

12. A virtual clothing elasticity simulation device, characterized in that, Including: A determining unit, configured to determine the object to be simulated in the virtual clothing, where the object to be simulated is the grid on the target path in the virtual clothing; The determining unit is further configured to, based on the current length of the target path, determine the target length to which the object to be simulated needs to stretch; The determining unit is further configured to determine the target gradient range based on the target path; An elastic simulation unit, configured to perform elastic simulation on the object to be simulated based on the target length and the target gradient range.

13. An electronic device, characterized in that, Including: A processor; A memory for storing instructions executable by the processor; Wherein, the processor is configured to implement the method according to any one of claims 1 to 11.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps in the method according to any one of claims 1 to 11.