Clothing simulation method and device
By adding edge meshes to garment patterns and mapping yarn vertices, and combining the physical property data and deformation state parameters of knitted garments, rendering information of knitted garments is generated, solving the problem of inaccurate simulation of knitted garments in existing technologies and realizing accurate simulation of garment design.
Patent Information
- Application Number
- CN202580002614.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-06-20
- Filing Date
- 2025-07-18
- Publication Date
- 2026-03-06
AI Technical Summary
Existing clothing simulation technologies struggle to accurately reflect the true performance of knitted garments under different deformation states, especially since the shape changes caused by the softness and various physical properties of knitted garments are difficult to accurately represent in computer simulations.
By adding edge meshes to garment patterns and mapping yarn vertices onto the extended mesh, and combining the physical property data and deformation state parameters of knitted garments, rendering information of knitted garments is generated to simulate the shape of garments under different deformation states.
It enables accurate simulation of knitted garments under different deformation states, improving the realism and reliability of garment design, and is applicable to garment development in the fashion industry.
Smart Images

Figure CN121620780A_ABST
Abstract
Description
Technical Field
[0001] The following embodiments relate to a clothing simulation method and apparatus, and more specifically, to a knitted clothing simulation method and apparatus. Background Technology
[0002] Although clothing worn on the body appears in 3D, it is actually closer to 2D because it corresponds to a combination of fabrics cut from 2D patterns. Fabrics, as clothing materials, are relatively soft and flexible, allowing their shape to change according to the wearer's body shape or movement. Furthermore, fabrics can possess various physical properties such as strength, elasticity, and shrinkage; even with the same design, differences in these properties will result in different appearances and feels. In the fashion industry, computer-based clothing simulation technology is widely used to develop practical clothing designs. Therefore, the demand for clothing simulation technology that can realistically represent clothing based on its material properties is growing. Summary of the Invention
[0003] Technical methods for solving problems
[0004] A method for simulating knitted garments according to an embodiment includes the following steps: expanding the garment pattern by adding a margin mesh to the garment pattern corresponding to the knitted garment; mapping the vertices of the yarn corresponding to the knitted garment onto the mesh of the expanded garment pattern; and generating rendering information of the knitted garment by simulating the garment pattern where the yarn is located based on the mapping relationship between the vertices and the mesh of the garment pattern.
[0005] The step of mapping the vertex onto the mesh of the extended garment pattern may include the following steps: obtaining parameters corresponding to the deformation state of the material space corresponding to the garment pattern; obtaining the displacement of the vertex corresponding to the parameters by interpolating a pre-calculated displacement based on the parameters corresponding to the deformation state sample; and determining the position of the vertex in the material space corresponding to the deformation state based on the obtained displacement.
[0006] The step of generating rendering information for the knitted garment may include the following steps: obtaining the position of the vertex in the world space corresponding to the knitted garment based on the position of the vertex in the material space corresponding to the deformation state; and generating rendering information for the knitted garment based on the obtained position in the world space.
[0007] The edge grid, with a certain width, can be added to the area outside the boundary line of the garment pattern.
[0008] The step of expanding the garment pattern may include the following steps: adding the edge grid with a certain curvature to the garment pattern corresponding to the knitted garment.
[0009] The step of expanding the garment pattern may include the following steps: adding the edge grid to the garment pattern based on the physical property data of the knitted garment.
[0010] The physical property data of the knitted garment may include at least one of the following: setting information on whether the edge mesh is added or not, size information of the area where the edge mesh is generated, and curvature information of the edge mesh.
[0011] The vertex may include at least one vertex located on the centerline of the yarn.
[0012] The steps for generating rendering information for the knitted garment may include the following steps: tessellation of the center line of the yarn into a cylindrical mesh; and, based on the mapping relationship between the vertices and the mesh of the garment pattern, generating rendering information for the knitted garment by simulating the garment pattern with the tessellated yarn placed on it.
[0013] The step of mapping the vertices onto the grid of the extended garment pattern may include the following steps: copying the vertices of the yarn mapped to the overlapping area of the first and second grids in the garment pattern, and mapping each copied vertex to the first and second grids.
[0014] The edge grid may include the first grid and the second grid.
[0015] The step of mapping the vertices onto the grid of the extended garment pattern may include the following steps: moving the vertices of the yarn located outside the extended garment pattern to the boundary line of the extended garment pattern.
[0016] The step of mapping the vertices onto the grid of the extended garment pattern may include the following steps: rotating the yarn based on the orientation information of the knitted structure corresponding to the knitted garment; and mapping the vertices of the rotated yarn onto the grid of the extended garment pattern.
[0017] An electronic device according to one embodiment includes: at least one processor including processing circuitry; and a memory storing instructions, wherein, when the at least one processor executes the instructions individually or collectively, the instructions cause the electronic device to perform the following operations: expanding a garment pattern by adding edge meshes to a garment pattern corresponding to a knitted garment; mapping vertices of yarns corresponding to the knitted garment onto the mesh of the expanded garment pattern; and generating rendering information of the knitted garment by simulating the garment pattern in which the yarns are located, based on the mapping relationship between the vertices and the mesh of the garment pattern.
[0018] The operation of mapping the vertex onto the mesh of the extended garment pattern may include the following operations: obtaining parameters corresponding to the deformation state of the material space corresponding to the garment pattern; obtaining the displacement of the vertex corresponding to the parameters by interpolating a pre-calculated displacement based on the parameters corresponding to the deformation state sample; and determining the position of the vertex in the material space corresponding to the deformation state based on the obtained displacement.
[0019] The operation of generating rendering information for the knitted garment may include the following operations: obtaining the position of the vertex in the world space corresponding to the knitted garment based on the position of the vertex in the material space corresponding to the deformation state; and generating rendering information for the knitted garment based on the obtained position in the world space.
[0020] The operation of expanding the garment pattern may include the following operation: adding the edge grid with a certain curvature to the garment pattern corresponding to the knitted garment.
[0021] The operation of expanding the garment pattern may include the following operation: adding the edge grid to the garment pattern based on the physical property data of the knitted garment.
[0022] The physical property data of the knitted garment may include at least one of the following: setting information on whether the edge mesh is added or not, size information of the area where the edge mesh is generated, and curvature information of the edge mesh.
[0023] The operation of generating rendering information for the knitted garment may include the following operations: inlaying the center line of the yarn into a cylindrical mesh; and generating rendering information for the knitted garment by simulating the garment pattern with the inlaid yarn placed on it, based on the mapping relationship between the vertices and the mesh of the garment pattern.
[0024] The operation of mapping the vertices onto the grid of the extended garment pattern may include the following operations: copying the vertices of the yarn mapped to the overlapping area of the first and second grids in the garment pattern, and mapping each copied vertex to the first and second grids. Attached Figure Description
[0025] Figure 1 This is a flowchart illustrating the operation of a knitted garment simulation method according to one embodiment.
[0026] Figure 2a and Figure 2b The accompanying drawing illustrates an area where a margin mesh is added to a garment pattern according to one embodiment.
[0027] Figures 3a to 3c The accompanying drawings illustrate the operation of mapping each copied vertex to an overlapping first and second mesh according to one embodiment.
[0028] Figure 4a and Figure 4b The accompanying drawing illustrates the operation of adjusting the position of the yarn vertices mapped onto the outside of a garment pattern according to one embodiment.
[0029] Figures 5a to 5c The accompanying drawings illustrate an example of the shape of a knitted garment based on orientation information of the knit structure according to one embodiment.
[0030] Figure 6 The accompanying drawing illustrates a user interface screen for setting physical property data of a knitted garment according to an embodiment.
[0031] Figures 7a to 12 The accompanying drawings illustrate a yarn-based knitted fabric simulation method according to one embodiment.
[0032] Figure 13 This is a schematic diagram illustrating the configuration of an electronic device according to one embodiment. Detailed Implementation
[0033] The specific structural or functional descriptions of the disclosed embodiments are for illustrative purposes only, and various modifications can be made to the embodiments. Therefore, the embodiments are not limited or restricted to the specific form of disclosure, and all variations, equivalents, or substitutions of the embodiments are included within the scope of the claims.
[0034] In the description of the accompanying drawings, similar reference numerals may be used to denote similar or related parts. Unless the context clearly indicates otherwise, the singular form of the noun corresponding to an item may include one or more of the items described.
[0035] In this specification, expressions such as “A or B”, “at least one of A and B”, “at least one of A or B”, “A, B or C”, “at least one of A, B and C”, and “at least one of A, B or C” may include any one of the listed items together, or all possible combinations thereof.
[0036] The terms "first" or "second" can be used solely to distinguish one constituent element from others, and do not limit that constituent element in any other way (e.g., in terms of importance or order). For example, a first constituent element can be named a second constituent element, and similarly, a second constituent element can also be named a first constituent element.
[0037] When describing a component (e.g., the first) as being "coupled" or "connected" to another component (e.g., the second), whether or not the terms "functionally" or "communically" are used, it means that the components can be connected to the other component directly (e.g., wired), wirelessly, or via a third component.
[0038] Unless otherwise specified in the text, singular expressions include plural meanings. In this specification, terms such as "comprising" or "having" are used to indicate the presence of the features, numbers, steps, operations, constituent elements, accessories, or combinations thereof described in the specification, and do not exclude the presence of one or more other features, numbers, steps, operations, constituent elements, accessories, or combinations thereof, or additional functions.
[0039] Unless otherwise defined, all terms used herein, including technical or scientific terms, shall have the ordinary meaning as understood by one of ordinary skill in the art. Terms that are commonly used and are identical to their dictionary definitions shall be understood to have a meaning consistent with the general content of the relevant art, and shall not be overly idealized or interpreted as having a formal meaning unless expressly stated in this application.
[0040] The embodiments will now be described in detail with reference to the accompanying drawings. In the description with reference to the drawings, the same reference numerals are used for the same constituent elements, and repeated descriptions thereof are omitted.
[0041] Figure 1 This is a flowchart illustrating the operation of a knitted garment simulation method according to one embodiment.
[0042] Figure 1 The operations of steps 110 to 130 in the knitted garment simulation method described herein can be performed sequentially, but not necessarily in that order. For example, the order of steps 110 to 130 can be changed, or at least two steps can be performed in parallel.
[0043] Figure 1The knitted garment simulation method described herein can be executed by an electronic device. The detailed configuration of the electronic device hardware structure is as follows.
[0044] Hereinafter, the knitted garment simulation method according to one embodiment may be simply referred to as the "method" or "garment simulation method".
[0045] Generally, a garment pattern refers to a paper template used for cutting fabric when making a garment. In this specification, a garment pattern may correspond to a two-dimensional (2D) garment pattern virtually generated by a computer program. For example, a garment pattern may be used to create a virtual garment that a user wishes to drape over a three-dimensional (3D) doll. A garment can be made using one or more garment patterns.
[0046] According to one embodiment, a garment pattern can be a virtual 2D garment pattern, modeled as a combination of multiple polygonal meshes to simulate a 3D virtual garment. Each vertex of the mesh is a point mass, and each edge of the mesh can be represented as an elastic spring connecting the vertex masses. The garment can be modeled using a mass-spring model. Here, the springs can have their own resistance values in terms of stretching, shearing, and bending, depending on the physical properties of the fabric used. Each vertex can move under the influence of external forces such as gravity and internal forces such as stretching, shearing, and bending. By calculating the external and internal forces, the force applied to each vertex can be obtained, thus obtaining the velocity and displacement of each vertex. Furthermore, the movement of the virtual garment can be simulated by the movement of the vertices of the mesh in each time step. By overlaying a 3D clone with a 2D pattern formed by a triangular mesh, a physically based, seemingly natural-looking 3D virtual garment can be presented.
[0047] The complex geometry of knitted fabric can lead to visual and physical complexity during rendering or simulation. A method according to one embodiment may include a method for simulating virtual clothing, which comprises knitted fabric made of interwoven or crossed yarns. Virtual clothing comprising knitted fabric may be referred to as knitwear.
[0048] A garment simulation method according to one embodiment may include step 110: expanding a garment pattern by adding a margin mesh to a garment pattern corresponding to a knitted garment. The margin mesh may include a mesh added to the outer region of the boundary line of the garment pattern. For example, the margin mesh may be added to the outer region of the boundary line of the garment pattern with a certain width. The addition of the margin mesh can expand the edge region of the garment pattern.
[0049] For example, refer to Figure 2a An edge grid can be added to the outer area 220 of the boundary line of the garment pattern 210. The outer area 220 to which the edge grid is added can have a certain size. Alternatively, the size of the outer area 220 to which the edge grid is added can be determined based on user input.
[0050] According to one embodiment, an edge grid can be added to the outer area of the garment pattern and the edge line to be sewn, which is different from the boundary line of the garment pattern. In other words, an edge grid can be added to the seam allowance area along the seam line of the garment pattern. For example, see reference... Figure 2b When the first boundary line 231, the second boundary line 232, and the third boundary line 233 of the garment pattern 230 correspond to the sewing lines for sewing with another garment pattern, while the fourth boundary line 234 does not correspond to a sewing line, an edge grid can be added to the outer area 240 of the first boundary line 231, the second boundary line 232, and the third boundary line 233. The edge area of the fourth boundary line 234 can remain unextended.
[0051] Adding edge meshes can prevent gaps or blank areas from appearing at the seams where clothing patterns connect in virtual clothing.
[0052] Refer again Figure 1 According to one embodiment, step 110 of expanding a garment pattern may include adding an edge mesh with a certain curvature to the garment pattern corresponding to the knitted garment. The edge mesh added to the garment pattern may have a certain curvature. When rendering or simulating a garment including the garment pattern, the curvature of the edge mesh can be set so that the fabric corresponding to the edge mesh curls inward toward the garment. For example, the curvature of the edge mesh can be set to bend in a direction opposite to the normal vector of the garment pattern in the simulated virtual garment.
[0053] According to one embodiment, step 110 of expanding a garment pattern may include adding an edge grid to the garment pattern based on the physical properties data of the knitted garment. The physical properties data of the knitted garment may refer to information indicating the physical properties of the knitted garment. For example, the physical properties data of the knitted garment may include at least one of the following: knitting type information, knitting density (gauge) information, knitting direction information, yarn thickness information, yarn color information, whether or not an edge grid is added to the knitted garment, size information of the area (or seam area) where the edge grid is generated, and curvature information of the edge grid. The physical properties data of the knitted garment will be described in detail below.
[0054] A garment simulation method according to one embodiment may include step 120: mapping the vertices of the yarn corresponding to the knitted garment onto a grid of an extended garment pattern. The vertices of the yarn may include at least one vertex located on the centerline of the yarn. For example, the yarn may be modeled as vertices distributed at regular intervals along the yarn centerline and edges of adjacent vertices. For example, the yarn may be modeled as a discrete elastic rod. The modeling of the yarn will be described in detail below.
[0055] The extended garment pattern mesh can include the mesh included in the original garment pattern as well as the edge mesh added in step 110. Mapping the vertices of the yarn onto the extended garment pattern mesh can refer to determining the position of the vertex of each yarn constituting the knitted garment on the garment pattern. Mapping the vertices of the yarn onto the extended garment pattern mesh can refer to storing the position of each yarn vertex in the garment pattern as a positional relationship with the mesh of the garment pattern. Each vertex of the yarn can be arranged at a corresponding mapped position on the garment pattern. As described below, when simulating a garment including the garment pattern, the yarn can be located at the mapped position on the garment pattern and the simulation is based on the mesh.
[0056] According to one embodiment, step 120 of mapping the vertices of the yarn onto the grid of an extended garment pattern may include determining the position of the yarn in the material-space corresponding to the deformation state. More specifically, step 120 of mapping the vertices of the yarn onto the grid of the extended garment pattern may include the following steps: obtaining parameters corresponding to the deformation state of the material space corresponding to the garment pattern; obtaining the displacement of the vertex corresponding to the parameters by interpolating a pre-calculated displacement based on the parameters corresponding to the deformation state sample; and determining the position of the vertex in the material space corresponding to the deformation state based on the obtained displacement. The specific operations of determining the position of the yarn in the material space corresponding to the deformation state will be described in detail below.
[0057] According to one embodiment, step 120 of mapping yarn vertices to an extended garment pattern grid may include the following steps: copying the vertices of the yarn mapped to the overlapping area of the first and second grids in the garment pattern, and mapping each copied vertex to the first and second grids. For example, an edge grid may include the first and second grids. In other words, since adding an edge grid may cause grid overlap in the garment pattern, the overlapping grids may correspond to the edge grids.
[0058] For example, refer to Figure 3a An edge mesh can be added to a first region 311, which serves as the outer region of a first boundary line 301 of the garment pattern, and also to a second region 312, which serves as the outer region of a second boundary line 302. The first region 311 and the second region 312 with added edge meshes can partially overlap. The vertices of the yarn can be located on the garment pattern. The vertices 321 of the yarn can be located in the overlapping area of the first region 311 and the second region 312. Vertex 321 can be duplicated. When one of the duplicated vertices 321 is designated as the first vertex and the other as the second vertex, the first vertex can be mapped to the mesh of the first region 311, and the second vertex can be mapped to the mesh of the second region 312. For example, see the example showing only the first region 311 of the garment pattern. Figure 3b The first vertex 322 may be located in the first region 311; see also the second region 312, which only shows the garment pattern. Figure 3c The second vertex 323 can be located within the second region 312. In a two-dimensional garment pattern, the first region 311 and the second region 312 can overlap, but in a virtual garment, the first region 311 and the second region 312 can not overlap. Since vertex 321 is copied, and each copied vertex 321 is mapped to the mesh of the first region 311 and the mesh of the second region 312, yarn can be simulated in the first region 311 and the second region 312 of the virtual garment.
[0059] Refer again Figure 1 According to one embodiment, step 120 of mapping vertices onto the grid of an extended garment pattern may include moving vertices of yarns located outside the extended garment pattern to the boundary of the extended garment pattern. For example, in knitted garments, the yarns may have a periodically repeating shape. When yarn vertices with periodically repeating shapes are arranged in a garment pattern, some vertices may be located outside the garment pattern.
[0060] For example, refer to Figure 4a When the yarn 401 has a periodically repeating shape, among the vertices distributed at regular intervals along the center line of the yarn 401, the first vertex 420 can be located outside the garment pattern 410. The first vertex 420 located outside the garment pattern 410 can be moved to the boundary of the garment pattern 410. For example, the position of the first vertex 420 can be changed to the intersection of the edge 430 connecting the first vertex 420 and the boundary of the garment pattern. For example, refer to... Figure 4b The position of the first vertex can be changed to the position of the intersection point 440 between the edge connected to the first vertex and the boundary of the garment pattern.
[0061] Refer again Figure 1 According to one embodiment, step 120 of mapping vertices onto the grid of an extended garment pattern may include the following steps: rotating the yarn based on orientation information of the knitted structure corresponding to the knitted garment, and mapping the vertices of the rotated yarn onto the grid of the extended garment pattern. For example, the orientation information of the knitted structure may be included in the physical property data of the knitted garment. The orientation information of the knitted structure is information indicating the positioning direction of the yarn in the garment or garment pattern; for example, it may include a specific angle, direction vector, or rotation value. For example, the orientation information of the knitted structure may include information indicating the degree and / or direction of rotation of the yarn relative to its default state. The yarn can be rotated from its default state according to the orientation information of the knitted structure and then placed in the garment pattern. For example, when the orientation information of the knitted structure indicates 0 degrees or a horizontal direction, the yarn can be arranged in its default direction in the garment pattern. For example, when the orientation information of the knitted structure indicates a vertical direction or 90 degrees, the yarn can be rotated 90 degrees from its default state and then arranged in the garment pattern.
[0062] For example, refer to Figures 5a to 5c It can render garments with knitted structures of different shapes based on the direction information of the knitted structure. For example, Figure 5a The knitted structure 510 of the garment shown can have a shape corresponding to the orientation information of the knitted structure 510 (indicating the default state or 0 degrees of the yarn). (Refer to...) Figure 5b When the orientation information of the knitted structure 520 indicates a 45-degree rotation, Figure 5a The knitted structure 510 can be rendered as a knitted structure 520 with a shape rotated 45 degrees. (See reference...) Figure 5c When the orientation information of the knitted structure 530 indicates a 90-degree rotation, Figure 5a The knitted structure 510 can be rendered as a knitted structure 530 with a shape rotated 90 degrees.
[0063] According to one embodiment, the garment simulation method may include step 130: generating rendering information for a knitted garment by simulating the garment pattern containing the yarn, based on the mapping relationship between vertices and the mesh of the garment pattern. The rendering information for the knitted garment may include information for outputting the shape of the 3D knitted structure by draping the garment pattern containing the yarn onto a 3D object.
[0064] According to one embodiment, step 130 of generating rendering information for a knitted garment may include tessellating the center lines of the yarn into a cylindrical mesh, and generating rendering information for the knitted garment by simulating the garment pattern containing the tessellated yarns based on the mapping relationship between the vertices and the mesh of the garment pattern. The center lines of the yarn, which have no volume, can be tessellated into a cylindrical mesh with volume. The center lines of the yarn can be tessellated into a cylindrical mesh with a certain thickness. For example, the thickness of the cylindrical mesh can be determined based on the physical property data of the knitted garment.
[0065] According to one embodiment, step 130 of generating rendering information for a knitted garment may include simulating the yarn in a garment pattern in a world space corresponding to the deformed state. More specifically, the step of simulating the yarn in the garment pattern in the world space corresponding to the deformed state may include: obtaining the position of the knitted garment in the world space corresponding to the yarn vertices based on the vertex positions in the material space corresponding to the deformed state, and generating rendering information for the knitted garment based on the obtained world space position. The world space may correspond to a 3D garment obtained by superimposing a 2D garment pattern onto a 3D object. Through garment simulation, 2D mesh information in the material space corresponding to the garment pattern and mesh information in the 3D world space can be obtained. The specific operation of simulating the yarn on the garment pattern corresponding to the deformed state in the world space is described below.
[0066] Figure 6 The accompanying drawing illustrates a user interface screen for setting physical property data of a knitted garment according to an embodiment.
[0067] Reference Figure 6On screen 600, users can input settings for the physical properties of knitted garments through a user interface. For example, users can input settings for the physical properties of knitted garments through the user interface on the terminal.
[0068] For example, the physical properties of knitted garments can include yarn thickness information. The yarn thickness value can be set through the yarn thickness input window 610 in the user interface. Knitted garments containing yarn with the set thickness value can be simulated.
[0069] For example, the physical property data of knitted garments may include settings for whether or not edge meshes are added (e.g., generating seams). Whether or not edge meshes are added can be set through the edge mesh addition / distraction settings window 620. When edge meshes are set to be added, they can be added to the garment pattern as described above.
[0070] For example, the physical properties data of a knitted garment may include dimensional information (e.g., seam length) of the area where an edge grid is added (e.g., the seam area). The size of the area where the edge grid is added can be set through the size input window 630. The size of the area where the edge grid of the garment pattern is added can be determined based on the size entered through the input window 630.
[0071] For example, the physical property data of a knitted garment may include curvature information of the edge mesh (e.g., seam curvature). The curvature of the edge mesh can be set through the input window 640 for the edge mesh curvature. The curvature of the edge mesh added to the garment pattern can be determined based on the value entered through the input window 640.
[0072] For example, the physical property data of knitted garments may include orientation information of the knit structure (e.g., knitting direction). The orientation of the knit structure can be set through the knit structure orientation input window 650. Knitted garments can be simulated by inputting the knit structure orientation through the input window 650.
[0073] Furthermore, the physical property data of knitted garments may include information indicating the characteristics of the knitted garments. For example, the physical property data of knitted garments may include information on the type of knit structure (e.g., knit type), density information (e.g., stitch pitch), and color information (e.g., ply color). The interface may include a knit structure type setting window 660, a density input window 670, and a color input window 680.
[0074] Figures 7a to 12 The accompanying drawings illustrate a yarn-based knitted fabric simulation method according to one embodiment.
[0075] Hereinafter, the yarn-based knitted fabric simulation method according to one embodiment may be simply referred to as the knitted fabric simulation method. The yarn-based knitted fabric simulation method may correspond to steps 120 to 130 described above. More specifically, it may correspond to the step of determining the position of the yarn in the material space corresponding to the above-described deformation state, and the step of simulating the yarn in the garment pattern in the world space corresponding to the deformation state.
[0076] A knitted fabric simulation method according to one embodiment may include a method of animate (or simulate) the yarn-level fabric (or knitted fabric) geometry on a deforming underlying mesh in a mechanics-aware manner. A knitted fabric simulation method according to one embodiment may be a method of reproducing phenomena such as the tightening of knitted loops during stretching by interpolating pre-calculated yarn geometry using triangle strain. For example, referring to… Figure 7a This shows an example of the yarn geometry of a knitted fabric before deformation. The simulation results of the knitted fabric when stretched, without considering yarn-level deformation, are as follows... Figure 7b As shown. (Refer to...) Figure 7b This can simulate knitted fabrics, ensuring that yarn stretching occurs uniformly due to the stretching of the fabric, unaffected by the yarn's geometry. Furthermore, simulation results of knitted fabrics considering yarn-level deformation when stretched are as follows: Figure 7c As shown. In other words, Figure 7c The simulation results can be simulation results of knitted fabrics generated using a knitted fabric simulation method according to one embodiment. (Refer to...) Figure 7c Considering the geometry of the yarn, it is possible to simulate knitted fabric, so that the yarn loops tighten when the knitted fabric is stretched.
[0077] According to one embodiment, the knitted fabric simulation method can be a simulation method that adds yarn-level deformation to a mesh-based fabric simulation. The behavior of the periodic yarn pattern can be pre-calculated based on the large-scale deformation of the underlying fabric. The yarn pattern can refer to the garment pattern in which the yarn is located. By interpolating the deformed yarn pattern at runtime based on the deformation state of the fabric mesh, the geometry of the yarn level rearranged according to the yarn-level mechanism can be generated in real time.
[0078] According to one embodiment, the knitted fabric simulation method can receive an undeformed yarn pattern and large-scale surface deformation as inputs for simulating the geometry of yarn pattern deformation. The large-scale surface deformation can correspond to data encoded via a first fundamental form I and a second fundamental form II. As will be described in detail below, the large-scale surface deformation can be used to define boundary conditions and optimize the elastostatic equilibrium configuration of the yarn pattern.
[0079] As mentioned above, yarn can be modeled as a discrete elastic rod. Yarn can be modeled as a linked list of vertices, where each vertex has a position x along a centerline. Each edge connecting the vertices can include a twist angle θ and a reference director vector d1. Each vertex can be represented as a four-dimensional vector q = (x... T , θ) T This includes positional and torsional information. Here, θ represents the torsional angle associated with a single adjacent edge. The reference direction vector d1 may not be included in the degrees of freedom. In other words, the reference direction vector d1 of an edge can be freely changed during optimization or simulation, or it may not be included in the calculated variables.
[0080] The kinematics of the yarn vertex position during the optimization process can be represented by the following mathematical formulas 1 and 2.
[0081] [Mathematical Expression 1]
[0082] [Mathematical Expression 2]
[0083] In mathematical expressions 1 and 2, X = (X1, X2, X3) T X1 represents the material-space coordinates of the undeformed yarn pattern, X2 represents the orthogonal and periodic directions along the yarn pattern, and X3 represents the height coordinates. This represents large-scale deformation composed of the first fundamental form I and the second fundamental form II. The first fundamental form can be simply referred to as I, and the second fundamental form as II. I represents in-plane deformation, and II represents bending deformation. The midsurface can be obtained from I and II. and the normal n of the intermediate surface, where I = ▽ T▽ , II=-▽ T▽n.
[0084] intermediate surface It can be defined by I and II. From the perspective of least-squares, It can be calculated as ≈RS. For example, for a single curvature. =RS can be true. To calculate The rotation matrix R, which indicates curvature, and the in-plane deformation matrix S, can be calculated based on two basic forms, I and II. The 3×2 matrix S can be calculated using the principal square root of I, as shown in Equation 3 below.
[0085] [Mathematical Expression 3]
[0086] To calculate the rotation matrix R, we can calculate the derivative of the normal vector. n, as shown in mathematical formula 4 below.
[0087] [Mathematical Expression 4]
[0088] As shown in mathematical formula 5, a, b, and r can be calculated.
[0089] [Mathematical Expression 5]
[0090] As shown in mathematical formula 6, R(X1, X2) can be calculated.
[0091] [Mathematical Expression 6]
[0092] Poisson equation 2 = RS can be discretized on a grid with natural boundary conditions, thus enabling computation. According to the constraints of mathematical formula 7, it can be set as follows: .
[0093] It is possible to calculate the yarn configuration that minimizes elastic energy. Optimization variables include fluctuations representing local displacements during large-scale deformation. And torsion θ. (Refer to...) Figure 8 When the undeformed torsion value is represented by Θ, the concatenated coordinates are the undeformed Q=(X T ,Θ) T Large-scale deformation and optimized q=(x T , θ) T In the case of pure-plane deformation, it is assumed that Θ is not affected by large-scale mapping. Bending deformation may also cause local twist, depending on the yarn relative to the second basic form II and the direction of curvature.
[0094] For example, refer to Figure 8 By applying various large-scale surface deformations to the undeformed yarn pattern Q 810, a deformed yarn pattern can be obtained. 820. Using optimization techniques, the elastostatic rest shape q 830 can be optimized for each deformation. q 830 can be pulled back to the undeformed material space to obtain... 840. By means of... Subtracting Q 810 from the undeformed initial state from 840 yields the displacement. Q850. Due to displacement. Q850 indicates localized yarn-level deformation corresponding to large-scale deformation, therefore it can be based on Q850 establishes a mapping relationship between large-scale deformation and corresponding local yarn-level deformation. As will be described in detail below, it is possible to pre-calculate and store the corresponding deformation states (hereinafter referred to as "deformation state samples") to be sampled. Q850.
[0095] The optimization process according to one embodiment may include the null space along which the yarn can slide. In other words, the elastic energy E of the periodic yarn curve x(s), represented by parameter s, remains unchanged even if it slides by a parametric shift Δ. In other words, E(x(s)) = E(x(s + ... Geometrically, a sliding displacement corresponds to tangential sliding of the yarn while maintaining the same periodic shape. The optimizer can treat all sliding displacement states as identical and can arbitrarily choose the actual result based on the internal parameters of the numeric solver. By definition, null space may not affect homogenized energies. Interpolation between two states via a sliding displacement may produce completely different yarn shapes.
[0096] For example, Figure 9a and Figure 9c The two curves 910 and 930 shown represent yarns of the same shape. Figure 9c The curve 930 shown can be obtained by... Figure 9a The curve 910 shown is obtained by moving its starting position a certain distance. When... Figure 9a The curves 910 and 910 shown Figure 9c When interpolating curve 930 as shown, a line can be generated that is similar to... Figure 9a The curves 910 and 910 shown Figure 9c The new curve 920 shown is significantly different from curve 930, as... Figure 9b As shown. The reason for this phenomenon is that, although Figure 9a and Figure 9c The two curves 910 and 930 shown have the same shape mathematically, but their representation (or parameterization) is different, which leads to distortion in the interpolation process.
[0097] Even under nearly identical deformation states, null space can lead to the introduction of distracing interpolation artifacts. By adding constraints during the optimization process, parametric yarn sliding can be eliminated, effectively eliminating null space. More specifically, constraints can include fixing a single vertex of each periodic yarn to the boundary of the garment pattern, as shown in Equation 7.
[0098] [Mathematical Expression 7]
[0099] In mathematical formula 7, N represents the undeformed normal vector of the boundary of the garment pattern, which is N = (1, 0). T Or N = (0, 1) T One of them. Sparse vertex constraint combinations can effectively eliminate interpolation artifacts. Through constraints, physically realistic yarn shapes can be obtained for large-scale deformations described by the first and second basic forms I and II.
[0100] For example, if tangential sliding of the yarn is not considered during the interpolation of the yarn's geometry, unrealistic deformations of the yarn may occur in the knitted fabric, such as... Figure 9d As shown. For example, twisting may occur, such as yarn self-collision or floating loops. Additionally, by introducing a sliding constraint, natural and physically plausible interpolation results can be obtained, such as... Figure 9e As shown.
[0101] The geometry of the yarn corresponding to a representative deformation state sample can be pre-calculated, and the geometry of the yarn corresponding to the actual deformation state can be obtained at runtime by interpolating between the pre-calculated geometries. Since I and II are both 2×2 symmetric tensors, directly parameterizing the deformation using I and II will generate a 6D function, which can be very time-consuming during pre-computation, storage, and runtime retrieval. Therefore, the dimensionality of the deformation can be reduced by parameterizing the deformation with as few variables as possible.
[0102] Using in-plane strains, the first fundamental form I can be reparameterized into a three-dimensional function, as shown in Equation 8.
[0103] [Mathematical Expression 8]
[0104] While II can be parameterized similarly to Equation 4 by introducing additional curvature variables and increasing the dimension of the dataset, it will be shown below that bending deformation can be reasonably approximated using only stretching variables. The entire large-scale deformation space can be represented using only s x s a and s y Sampling is performed on three variables, which significantly reduces memory and computational overhead. Deformation state samples can be collected on a regular 3D grid.
[0105] At runtime, the geometry of the yarn obtained through interpolation can be mapped onto a deformed mesh (e.g., a triangle mesh). The deformation of the mapped mesh can be naturally transferred to the geometry of the yarn. During the precomputation phase, samples of the deformed state can be stored as material-space displacements.
[0106] In order to pull back or deform the optimized yarn geometry q into the yarn geometry in material space It is necessary to apply large-scale deformation Find the corrected material space coordinates to generate the required world space deformation x. In other words, the optimized yarn geometry q is pulled back to the yarn geometry in material space. The problem can correspond to finding a satisfying of The problem.
[0107] Seeking satisfaction of The problem can be solved using Newton's method or Newton iteration. Newton iteration can be applied to functions... In this case, a gradient is needed. f.
[0108] Mapping It can be defined using mathematical formula 9.
[0109] [Mathematical Expression 9]
[0110] In mathematical expression 9, Let n represent the midsurface of the deformation, and n represent the normal vector of the midsurface.
[0111] The gradient can be defined using mathematical formula 10.
[0112] [Mathematical Expression 10]
[0113] According to the definition, It can be represented by mathematical formula 11.
[0114] [Mathematical Expression 11] n can be calculated using mathematical formula 4. Newton's iteration can be represented using mathematical formula 12, with initial values... It can be a rest configuration. X That is, it can be .
[0115] [Mathematical Expression 12]
[0116] The results of Newton's iteration converge to values within the yarn radius within three iterations. Compared to elastostatic optimization, the computational cost of Newton's iteration is negligible. For pure in-plane deformations, since II=0, R=Id and In this case, the pullback can be simplified to a constant expression, as shown in mathematical formula 13.
[0117] [Mathematical Expression 13]
[0118] Will After concatenation, it can be accessed from... The displacement ΔQ is obtained by subtracting the initial material state from the initial state. In other words, ΔQ can be expressed by mathematical formula 14.
[0119] [Mathematical Expression 14]
[0120] In the rest pose, I=Id, II=0, and ΔQ=0.
[0121] For each vertex i in the yarn pattern, and for various in-plane stress deformation state samples j: ΔQi(s) xj ,s aj ,s yj This allows the construction of a database of yarn displacements ΔQ in material space. The ΔQ database can correspond to a grid of esample deformations. Alternatively, it can correspond to a 3D displacement texture for each vertex of the yarn. After interpolating the displacements of the deformation state samples, a database can be constructed for a given in-plane deformation s. xj ,s aj ,s yj Obtain a yarn-level displacement map. For deformation rates sampled directly from the ΔQ database, an accurate yarn pattern can be reconstructed; while for intermediate deformation rates between the sampled deformation rates, an approximate pattern can be generated.
[0122] The yarn pattern displacement database corresponding to various deformation states can be applied to the tiling yarn patterns on the animation triangular mesh.
[0123] For example, refer to Figure 10 Q1010 can correspond to the undeformed coordinates in material space. 1030 can correspond to the coordinates after deformation through local displacement, and q 1040 can correspond to the final world space coordinates. The deformed yarn-level geometry... 1030 can be achieved by measuring material displacement. Q1020 is obtained by applying an undeformed yarn-level geometry Q1010 to a triangular mesh laid flat in material space. 1030 can be mapped onto a mesh and converted to a deformation q 1040 in world space.
[0124] For example, Figure 11 Algorithm 1 shown may include algorithms based on mesh animation, yarn pattern, and displacement. The process of rendering q based on the input of Q.
[0125] An initial undeformed yarn mesh corresponding to an undeformed mesh (e.g., a triangular mesh) can be generated through pre-computation. A 2D background mesh can be generated in the UV coordinate system of the mesh, where the cell size is equal to the size of the periodic pattern. For example, the yarn geometry can be replicated on all cells that overlap with the undeformed mesh. For example, yarn vertices outside the mesh can be removed. For example, yarn segments shorter than the user-specified length can be removed for aesthetic reasons. The barycentric coordinates of each yarn vertex in material space can be pre-computed.
[0126] Discrete fundamental forms I and II can be computed for each mesh in each animation frame, as shown in Equation 15.
[0127] [Mathematical Expression 15]
[0128] In Equation 15, F represents the mesh deformation gradient, and Λ represents the triangle-averaged shape operator. Modified Shepard weights can be used to assign I and II to the vertices of the triangular mesh. Finally, by interpolating the I and II values of the triangular mesh containing the yarn vertex, the actual deformation state of the yarn vertex can be estimated.
[0129] According to one embodiment, the effect of bending behavior can be approximated by adding stretching and compression based on surface curvature.
[0130] The mid-surface with normal vector n The full domain of the thin shell x is shown in mathematical formula 16 below.
[0131] [Mathematical Expression 16]
[0132] In equation 16, h∈[-H / 2,H / 2] is the normal coordinate with respect to the thickness H of the shell. In this case, the Cauchy-Green deformation tensor can be represented by the following equation 17.
[0133] [Mathematical Expression 17]
[0134] Equation 17 can be interpreted as the first fundamental form I(h) that is quadratically related to h. The quadratic terms in Equation 17 are generally negligible. Furthermore, The basic form is T =I, similarly, is T n= n T =-II. Therefore, the linearized expression is shown in mathematical formula 18.
[0135] [Mathematical Expression 18]
[0136] Furthermore, using pre-calculated in-plane deformation data ΔQ s (s), the linearized bending model can be represented by the following mathematical formula 19.
[0137] [Mathematical Expression 19]
[0138] In other words, as described in mathematical formula 18, the first fundamental form I can be enhanced by changing the direction along the surface normal, as shown in mathematical formula 20 below.
[0139] [Mathematical Expression 20]
[0140] For example, refer to Figure 12 The extruded volume 1220 around the curved intermediate surface 1210 can be approximated by a linearized volume 1230, in which the upper part of the intermediate surface 1210 is stretched and the lower part is compressed.
[0141] Like most elastic materials, fabrics can exhibit out-of-plane buckling (or twisting) upon compression. To prevent abnormal deformation (buckling) of the yarn due to compression, the eigenvalue λ of the first basic form I can be constrained to a lower limit before querying the yarn displacement. This allows for the reduction of buckling in a user-controllable manner.
[0142] For example, a minimum value λ can be set for the eigenvalues of I(Z). min (For example, 0.8). An eigenvalue λ < 1 indicates a compressed state. When I converges to the identity matrix Id, Q converges to 0. Therefore, the clmaping technique can reduce only local deformation while preserving the overall large-scale deformation defined by the triangular mesh.
[0143] After clamping I, it can be converted into the deformation rate s according to mathematical formula 8. x s a and s z Yarn displacement Q(s) x s a The coordinates of the yarn (sz) can be obtained through trilinear interpolation. The coordinates of the yarn in the deformed material space can be calculated according to the following mathematical formula 21.
[0144] [Mathematical Expression 21]
[0145] Deformation rates outside the sampling range can be clamped to Q(s) x s a The nearest neighbor in the dataset (sz). Similar to compression clamping, constant extrapolation can restrict local deformation while still allowing large-scale deformation to be inherited from the mesh embedding.
[0146] Mathematical expression 22 can be used to map yarn vertices to world space x.
[0147] [Mathematical Expression 22]
[0148] Equation 22 can be interpreted as a mesh surface squeezed into world space along the normal vector n. To avoid piecewise linear embedding artifacts, a smoother generation can be achieved by applying Phong deformation and using interpolated vertex normals. And shell-volume.
[0149] The mapping of yarn twist can be achieved by copying the updated twist value. To simplify this, we can use the approximate mapping of the Jacobian matrix from Equation 22 to the edge normal. Perform a co-transform.
[0150] Since the deformation calculations of yarn vertices and the mapping of world space can be easily parallelized, they can be implemented using GPU compute shaders. ΔQ interpolation can be achieved by performing a single 3D texture interpolation operation on each yarn vertex.
[0151] The deformed yarn can be tessellated into a cylindrical mesh in the geometry shader. Ply and fiber-level details can be approximated by sequentially using twistable normal maps and ambient occlusion maps. Volume conservation can be approximated by locally readjusting the yarn radius during stretching.
[0152] Figure 13 This is a schematic diagram illustrating the configuration of an electronic device according to one embodiment.
[0153] Reference Figure 13 An electronic device 1300 according to one embodiment may include a processor 1301, a memory 1303, and an input / output (I / O) device 1305. An electronic device 1300 according to one embodiment may include components for performing the functions described above. Figures 1 to 12 The apparatus for the described knitted garment simulation method. For example, electronic device 1300 may include at least one of a server and a user terminal (e.g., a personal computer, mobile phone, tablet computer, wearable device, etc.).
[0154] According to one embodiment, processor 1301 may include at least one processor containing processing circuitry.
[0155] According to one embodiment, processor 1301 can perform the above-described references. Figures 1 to 12The described knitted garment simulation method includes at least one operation. For example, the processor 1301 may perform at least one of the following operations: expanding the garment pattern by adding a margin mesh to the garment pattern corresponding to the knitted garment; mapping the vertices of the yarn corresponding to the knitted garment onto the mesh of the expanded garment pattern; and generating rendering information of the knitted garment by simulating the garment pattern with the yarn configured, based on the mapping relationship between the vertices and the mesh of the garment pattern.
[0156] According to one embodiment, the memory 1303 can be a volatile memory or a non-volatile memory, and can store data as described above. Figures 1 to 12 Data related to the knitted garment simulation method described above. For example, memory 1003 may store data related to the execution of the above-described reference method. Figures 1 to 12 The data generated during the knitted garment simulation method described above, or the data generated during the execution of the above parameters. Figures 1 to 12 The data required for the knitted garment simulation method described herein.
[0157] According to one embodiment, the memory 1303 may not be a component of the electronic device 1300, but may be included in an external device accessible to the electronic device 1300. In this case, the electronic device 1300 can receive data from the memory 1303 included in the external device via a communication device, and can also send data to be stored in the memory 1303.
[0158] According to one embodiment, memory 1303 can store implementations of the above-described reference. Figures 1 to 12 The program for the knitted garment simulation method is described above. The processor 1301 can execute the program stored in the memory 1303 and control the electronic device 1300. The program code executed by the processor 1301 can be stored in the memory 1303.
[0159] For example, memory 1303 can store instructions. When processor 1301 executes the instructions stored in memory 1303 individually or collectively, these instructions can cause electronic device 1300 to perform the following operations: expand a garment pattern by adding a margin mesh to the garment pattern corresponding to the knitted garment; map the vertices of the yarn corresponding to the knitted garment onto the mesh of the expanded garment pattern; and generate rendering information of the knitted garment by simulating the garment pattern with the yarn configured based on the mapping relationship between the vertices and the mesh of the garment pattern.
[0160] According to one embodiment, the I / O device 1305 may include an input device and an output device. For example, the I / O device 1305 may receive user input related to the physical property data of a knitted garment. For example, the I / O device 1305 may output rendering information of the knitted garment.
[0161] The electronic device 1300 according to one embodiment may also include other components not shown. For example, the electronic device 1300 may also include a communication device for communicating with other devices (e.g., servers, terminals, networks, etc.). As another example, the electronic device 1300 may also include other components such as transceivers, various sensors, and databases.
[0162] The embodiments described above can be implemented using hardware components, software components, and / or combinations of hardware and software components. For example, the apparatus and components described in the embodiments can be implemented using, for example, a processor, controller, arithmetic logic unit (ALU), digital signal processor, microcomputer, field-programmable array (FPA), programmable logic unit (PLU), microprocessor, or any other device capable of executing and responding to instructions, and can be embodied using more than one general-purpose computer or special-purpose computer. The processing device can execute an operating system (OS) and more than one application software running within said operating system. Furthermore, the processing device responds to the execution of the software, thereby accessing, storing, manipulating, processing, and generating data. For ease of understanding, the description is presented as having only one processing device, but those skilled in the art will understand that a processing device can include multiple processing elements and / or multiple types of processing elements. For example, a processing device can include multiple processors, or one processor and one controller. Furthermore, other processing configurations, such as parallel processors, are also possible.
[0163] Software can include computer programs, code, instructions, or a combination of more than one of these, enabling a processing device to operate in a desired manner, or to individually or collectively command the processing device. For interpretation by the processing device or to provide commands or data to the processing device, software and / or data can be permanently or temporarily embodied in any type of device, component, physical device, virtual equipment, computer storage medium, or device. Software is distributed across computer systems connected via a network and can be stored or executed in a distributed manner. Software and data can be stored on more than one computer read / write storage medium.
[0164] The method according to the embodiments is embodied in the form of program instructions executable by various computer means and recorded in a computer read / write medium. The computer read / write medium may include program instructions, data files, data structures, etc., individually or in combination. The program instructions recorded on the medium may be instructions specifically designed and configured to implement the embodiments, or instructions that can be used by a person skilled in the art of computer software based on commonly known methods. The computer read / write recording medium may include magnetic media such as hard disks, floppy disks, and magnetic tapes; optical media such as CD-ROMs and DVDs; magneto-optical media such as floppy disks; and hardware devices specifically configured to store and execute program instructions, such as read-only memory (ROM), random access memory (RAM), and flash memory. Examples of program instructions include not only machine language code generated by a compiler, but also high-level language code executable by a computer using an interpreter or similar means.
[0165] To perform the operations of the embodiments, the hardware device can be configured to implement the operations with one or more software modules, or vice versa.
[0166] In summary, the embodiments have been described with reference to the limited accompanying drawings. Those skilled in the art can make various modifications and variations based on the description. For example, appropriate results can be obtained by performing the described techniques in a different order than the described methods, and / or by combining or integrating the described systems, structures, devices, circuits, and other constituent elements in a different manner than the described methods, or by replacing or substituting them with other constituent elements or equivalents.
[0167] Therefore, other embodiments, other implementations, and equivalents within the scope of the claims are all within the scope of the claims of this invention.
Claims
1. A method for simulating a knitted garment, the method comprising: extending a garment pattern corresponding to the knitted garment by adding an edge mesh to the garment pattern; mapping vertices of a yarn corresponding to the knitted garment onto a mesh of the extended garment pattern; and generating rendering information of the knitted garment by simulating the garment pattern on which the yarn is placed based on a mapping relationship between the vertices and the mesh of the garment pattern. 2.The method of claim 1, wherein the step of mapping the vertices onto the mesh of the extended garment pattern comprises: obtaining a parameter corresponding to a deformation state of a material space corresponding to the garment pattern; obtaining a displacement of the vertices corresponding to the parameter by interpolating a pre-computed displacement based on parameters corresponding to deformation state samples; and determining positions of the vertices in the material space corresponding to the deformation state based on the obtained displacement. 3.The method of claim 2, wherein the step of generating the rendering information of the knitted garment comprises: obtaining positions of the vertices in a world space corresponding to the knitted garment based on the positions of the vertices in the material space corresponding to the deformation state; and generating the rendering information of the knitted garment based on the obtained positions in the world space. 4.The method of claim 1, wherein the edge mesh is added to an area outside a boundary line of the garment pattern with a certain width. 5.The method of claim 1, wherein the step of extending the garment pattern comprises: adding the edge mesh with a certain curvature to the garment pattern corresponding to the knitted garment. 6.The method of claim 1, wherein the step of extending the garment pattern comprises: adding the edge mesh to the garment pattern based on physical property data of the knitted garment, wherein the physical property data of the knitted garment comprises at least one of setting information of whether to add the edge mesh, size information of an area in which the edge mesh is generated, and curvature information of the edge mesh. 7.The method of claim 1, wherein the vertices include at least one vertex located on a center line of the yarn. 8.The method of claim 1, wherein the step of generating the rendering information of the knitted garment comprises: tessellating the center line of the yarn into a cylindrical mesh; and generating the rendering information of the knitted garment by simulating the garment pattern on which the tessellated yarn is placed based on the mapping relationship between the vertices and the mesh of the garment pattern. 9.The method of claim 1, wherein the step of mapping the vertices onto the mesh of the extended garment pattern comprises: copying vertices of the yarns that are mapped to an overlapping area of the first mesh and the second mesh in the garment pattern, and mapping each of the copied vertices to the first mesh and the second mesh.
10. The method of claim 9, wherein, the edge mesh comprises the first mesh and the second mesh.
11. The method of claim 1, wherein, the step of mapping the vertices onto the mesh of the extended garment pattern comprises the steps of: moving vertices of the yarns that are located outside of the extended garment pattern to a boundary line of the extended garment pattern.
12. The method of claim 1, wherein, the step of mapping the vertices onto the mesh of the extended garment pattern comprises the steps of: rotating the yarns based on direction information of a knit structure corresponding to the knit garment; and mapping vertices of the rotated yarns onto the mesh of the extended garment pattern.
13. A computer program stored on a computer readable medium for performing the method of claim 1 in conjunction with hardware.
14. An electronic device, comprising: at least one processor comprising processing circuitry; and a memory storing instructions, wherein when the at least one processor executes the instructions alone or collectively, the instructions cause the electronic device to perform operations of: extending a garment pattern corresponding to a knit garment by adding an edge mesh to the garment pattern; mapping vertices of yarns corresponding to the knit garment onto a mesh of the extended garment pattern; and generating rendering information of the knit garment by simulating the garment pattern with the yarns based on mapping relationships between the vertices and the mesh of the garment pattern.
15. The electronic device of claim 14, wherein, the operation of mapping the vertices onto the mesh of the extended garment pattern comprises the operations of: obtaining a parameter corresponding to a deformation state of a material space corresponding to the garment pattern; obtaining a displacement of the vertices corresponding to the parameter by interpolating pre-computed displacements based on parameters corresponding to deformation state samples; and determining positions of the vertices in the material space corresponding to the deformation state based on the obtained displacements.
16. The electronic device of claim 15, wherein, the operation of generating the rendering information of the knit garment comprises the operations of: obtaining positions of the vertices in a world space corresponding to the knit garment based on the positions of the vertices in the material space corresponding to the deformation state; and generating the rendering information of the knit garment based on the obtained positions in the world space.
17. The electronic device of claim 14, wherein, the operation of extending the garment pattern comprises the operation of: adding the edge mesh with a certain curvature to the garment pattern corresponding to the knit garment.
18. The electronic device of claim 14, wherein, The operation of expanding the garment pattern includes the following operations: adding the edge mesh to the garment pattern based on the property data of the knitted garment, wherein the property data of the knitted garment includes at least one of setting information of whether to add the edge mesh, size information of a region where the edge mesh is generated, and curvature information of the edge mesh.
19. The electronic device of claim 14, wherein the operation of generating the rendering information of the knitted garment includes the following operations: tessellating the center line of the yarn into a cylindrical mesh; and generating the rendering information of the knitted garment by simulating the garment pattern with the tessellated yarn placed thereon based on the mapping relationship between the vertices and the mesh of the garment pattern.
20. The electronic device of claim 14, wherein the operation of mapping the vertices to the mesh of the expanded garment pattern includes the following operations: copying the vertices of the yarn that are mapped to an overlapping region of a first mesh and a second mesh in the garment pattern, and mapping each copied vertex to the first mesh and the second mesh.