Method for solving three-dimensional human body model and garment model fitting and electronic device
By detecting and fusing the intersecting surfaces of the 3D human body model and the clothing model, the fitting position is automatically determined and repaired, which solves the problem of low efficiency in the existing technology and improves the fitting efficiency of the 3D human body model and the clothing model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JUHAOKAN TECH CO LTD
- Filing Date
- 2022-09-28
- Publication Date
- 2026-06-26
AI Technical Summary
In existing technologies, the clipping phenomenon between 3D human body models and clothing models requires manual adjustment of shape parameters, resulting in low efficiency in solving the problem.
By detecting each human body surface that intersects with the clothing surface in the 3D human body model, a set of intersection pairs is obtained. Adjacent clothing surfaces are then merged to determine the clothing vertices and their types that cause clipping in the intersection area. The vertex positions are then moved using the corresponding target position determination method.
It enables automatic determination and repair of the molding position, improving the molding efficiency of 3D human body models and clothing models.
Smart Images

Figure CN115588077B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of three-dimensional reconstruction technology, and in particular to a method and electronic device for solving the problem of overlapping between three-dimensional human body models and clothing models. Background Technology
[0002] In traditional character animation where 3D human and clothing models are independent, they are typically modeled separately to improve clothing reusability. This is achieved by having artists design multiple hybrid shape parameters when creating the clothing model. For example, different parameters are designed to control the chest circumference, waist circumference, sleeve length, and pant length of the clothing. When adapting the same garment to different human models, the values of multiple shape parameters need to be manually adjusted to ensure a correct fit. However, in actual adaptation, clipping issues can occur between the clothing model and the 3D human model, such as… Figure 1 The image shown is a schematic diagram illustrating the clipping phenomenon in 3D human body models and clothing models.
[0003] In existing technologies, manual adjustments are made to address the clipping issue in 3D human and clothing models. These adjustments include adding more shape parameters, refining the shape parameter definitions, or performing localized manual repairs on each 3D human model. However, these methods are time-consuming and result in low efficiency in resolving clipping problems in 3D human and clothing models. Summary of the Invention
[0004] This application provides a method and electronic device for solving the problem of clipping between a 3D human body model and a clothing model, which improves the efficiency of solving the clipping problem of 3D human body models and clothing models.
[0005] In a first aspect, embodiments of this application provide a method for solving the problem of clipping between a three-dimensional human body model and a clothing model, the method comprising:
[0006] Detect each human body surface in the three-dimensional human body model of the target object that intersects with the clothing surface of the target object, and obtain a set of intersection pairs, wherein any intersection pair in the set of intersection pairs includes a pair of human body surface and clothing surface that intersect;
[0007] By merging adjacent garment panels in the set of intersecting pairs, at least one intersecting region is obtained;
[0008] For any clothing vertex in any intersecting region, obtain all edges in the clothing model connected to the clothing vertex, and based on the positions of these edges and the positions of the human body faces intersecting with the target clothing facet, determine whether the clothing vertex clips through the 3D human body model and the type of clipping, wherein the target clothing facets are the clothing facets constituting the intersecting region; and,
[0009] If it is determined that the garment vertex has clipped through, the target position of the garment vertex is determined using a target position determination method corresponding to the clipping type, and the garment vertex is moved to the target position.
[0010] A second aspect of this application provides an electronic device, including a processor and a memory, wherein the processor and the memory are connected via a bus;
[0011] The memory stores a computer program, and the processor is configured to perform the following operations based on the computer program:
[0012] Detect each human body surface in the three-dimensional human body model of the target object that intersects with the clothing surface of the target object, and obtain a set of intersection pairs, wherein any intersection pair in the set of intersection pairs includes a pair of human body surface and clothing surface that intersect;
[0013] By merging adjacent garment panels in the set of intersecting pairs, at least one intersecting region is obtained;
[0014] For any clothing vertex in any intersecting region, obtain all edges in the clothing model connected to the clothing vertex, and based on the positions of these edges and the positions of the human body faces intersecting with the target clothing facet, determine whether the clothing vertex clips through the 3D human body model and the type of clipping, wherein the target clothing facets are the clothing facets constituting the intersecting region; and,
[0015] If it is determined that the garment vertex has clipped through, the target position of the garment vertex is determined using a target position determination method corresponding to the clipping type, and the garment vertex is moved to the target position.
[0016] According to a third aspect of the present invention, a computer storage medium is provided, the computer storage medium storing a computer program for performing the method as described in the first aspect.
[0017] In the above embodiments of this application, by detecting the human body facets that intersect with the clothing facets of the target object in the 3D human body model, an intersection pair set is obtained. Then, adjacent clothing facets in the intersection pair set are merged to obtain at least one intersection region. Next, the clothing vertices and the clipping type that cause clipping with the clothing model in each intersection region are determined. The target position of the clothing vertices is determined using a target position determination method corresponding to the clipping type, and the clothing vertices are moved to the target position. Therefore, this embodiment can automatically determine the clipping location and automatically repair it, instead of manually repairing the clipping location, thus improving the efficiency of resolving clipping issues between the 3D human body model and the clothing model. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 An exemplary illustration shows a modeling diagram of a three-dimensional human body model and a clothing model provided in an embodiment of this application.
[0020] Figure 2 An exemplary illustration shows one of the application scenarios of the method for solving the problem of fitting three-dimensional human body models and clothing models provided in the embodiments of this application;
[0021] Figure 3 This is an exemplary illustration of a second application scenario of the method for solving the problem of fitting three-dimensional human body models and clothing models provided in the embodiments of this application;
[0022] Figure 4 This is an exemplary illustration of the third application scenario of the method for solving the problem of 3D human body model and clothing model fitting together, provided in an embodiment of this application.
[0023] Figure 5 An exemplary flowchart illustrates one of the methods for solving the problem of fitting a three-dimensional human body model and a clothing model according to an embodiment of this application;
[0024] Figure 6 An exemplary diagram illustrating the fusion of garment panels provided in an embodiment of this application is shown;
[0025] Figure 7 An exemplary illustration shows a flowchart of the process for determining whether a tracing has occurred and the type of tracing provided in an embodiment of this application.
[0026] Figure 8 An exemplary illustration is shown in one of the vertex clipping diagrams provided in an embodiment of this application;
[0027] Figure 9 An exemplary illustration shows a schematic diagram of the edge threading method provided in an embodiment of this application;
[0028] Figure 10 An exemplary illustration shows a flowchart of determining the target position of a garment vertex when the molding type is vertex molding, as provided in an embodiment of this application.
[0029] Figure 11 An exemplary schematic diagram of the process for determining the first position weight provided in an embodiment of this application is shown;
[0030] Figure 12 A second example of a vertex clipping diagram provided in an embodiment of this application is shown;
[0031] Figure 13 The third example of the vertex clipping diagram provided in the embodiments of this application is illustrated.
[0032] Figure 14 An exemplary illustration shows a flowchart of determining the target position of the garment vertex when the garment is of the edge-mating type, as provided in an embodiment of this application.
[0033] Figure 15 An exemplary schematic diagram of the edge-threading mold provided in an embodiment of this application is shown;
[0034] Figure 16 An exemplary schematic diagram of the molding iteration provided in an embodiment of this application is shown;
[0035] Figure 17 This document exemplarily illustrates a second flowchart of a method for resolving the overlay between a 3D human body model and a clothing model, as provided in an embodiment of this application.
[0036] Figure 18 An exemplary schematic diagram of the device for solving the problem of fitting a three-dimensional human body model and a clothing model together, provided in an embodiment of this application, is shown.
[0037] Figure 19 An exemplary hardware structure diagram of the calibration device provided in an embodiment of this application is shown. Detailed Implementation
[0038] To make the objectives, implementation methods and advantages of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the described exemplary embodiments are only some embodiments of this application, and not all embodiments.
[0039] Based on the exemplary embodiments described in this application, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of the appended claims. Furthermore, although the disclosures in this application are presented by way of one or more exemplary examples, it should be understood that each aspect of these disclosures can also constitute a complete implementation on its own.
[0040] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0041] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to be omnipresent but not exclusive; for example, a product or device comprising a series of components is not necessarily limited to those explicitly listed, but may include other components not explicitly listed or inherent to such product or device.
[0042] As used in this application, the term "module" refers to any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code capable of performing the functions associated with that element.
[0043] The following is an overview of the ideas behind the embodiments of this application.
[0044] Current technologies for resolving the clipping issue between 3D human body models and clothing models require manual adjustments. These adjustments might involve adding more shape parameters, redefining those parameters, or performing localized repairs on each individual 3D human body model. This results in a lengthy process and low efficiency in resolving clipping issues between 3D human body models and clothing models.
[0045] Addressing the low efficiency of existing technologies in resolving clipping issues between 3D human body models and clothing models, this application provides a method for resolving clipping between 3D human body models and clothing models. This method involves detecting human body faces that intersect with clothing faces in the 3D human body model of the target object, obtaining a set of intersection pairs, and merging adjacent clothing faces in the intersection pair set to obtain at least one intersection region. Then, the clothing vertices and clipping types that cause clipping within each intersection region are determined. A target position for each clothing vertex is determined using a target position determination method corresponding to the clipping type, and the clothing vertex is moved to the target position. Therefore, this embodiment automatically determines and repairs the clipping location, eliminating the need for manual repair and thus improving the efficiency of resolving clipping issues between 3D human body models and clothing models.
[0046] The embodiments of this application are described in detail below with reference to the accompanying drawings.
[0047] Figure 2 An exemplary illustration shows a schematic diagram of an application scenario for the method for solving the problem of clothing model clipping between a 3D human body model and a clothing model provided in an embodiment of this application; such as Figure 2 As shown, this application scenario uses an electronic device as the server as an example. This application scenario includes server 210 and terminal device 220. Server 210 can be implemented using a single server or multiple servers. Server 210 can be implemented using a physical server or a virtual server.
[0048] In one possible application scenario, server 210 detects the human body faces in the 3D human body model of the target object that intersect with the clothing facets of the target object, obtaining a set of intersection pairs. Each intersection pair in the set includes a pair of human body faces and a clothing facet that intersect. The server then merges adjacent clothing facets in the set to obtain at least one intersection region. For any clothing vertex in any intersection region, server 210 obtains the edges connected to the clothing vertex in the clothing model. Based on the positions of these edges and the positions of the human body faces that intersect with the target clothing facets, server 210 determines whether the clothing vertex clips through the 3D human body model and the clipping type. The target clothing facets are the clothing facets that make up the intersection region. If clipping is determined, the server determines the target position of the clothing vertex using a target position determination method corresponding to the clipping type, moves the clothing vertex to the target position, and displays it through terminal device 220.
[0049] like Figure 3The diagram shown illustrates another application scenario of the method for solving the problem of clothing model clipping between a three-dimensional human body model and a clothing model provided in this application embodiment. This application scenario includes a server 210, a terminal device 220, and a memory 230.
[0050] In one possible application scenario, server 210 retrieves the 3D human body model and clothing facets of the target object from memory 230, and detects each human body facet in the 3D human body model that intersects with the clothing facets of the target object, obtaining a set of intersection pairs. Each intersection pair in the set includes a pair of human body facets and clothing facets that intersect. Then, server 210 merges adjacent clothing facets in the set of intersection pairs to obtain at least one intersection region. Then, for any clothing vertex in any intersection region, server 210 obtains... Take each edge in the clothing model that is connected to the clothing vertex, and based on the position of each edge and the position of each human body face that intersects with the target clothing face, determine whether the clothing vertex has clipped into the three-dimensional human body model and the clipping type, wherein the target clothing face is each clothing face that makes up the intersection area; and if it is determined that the clothing vertex has clipped into the model, determine the target position of the clothing vertex using a target position determination method corresponding to the clipping type, and move the clothing vertex to the target position and display it through the terminal device 220.
[0051] like Figure 4 As shown, this application scenario includes a terminal device 220 and a memory 230. This application scenario is illustrated using an electronic device as the terminal device.
[0052] In one possible application scenario, terminal device 220 retrieves a 3D human body model and a clothing model of the target object from memory 230. Terminal device 220 detects human body faces in the 3D human body model that intersect with the clothing faces of the target object, obtaining a set of intersection pairs. Each intersection pair in the set includes a pair of intersecting human body faces and clothing faces. The terminal device 220 then merges adjacent clothing faces in the set of intersection pairs to obtain at least one intersection region. Finally, for any clothing vertex within any intersection region, terminal device 220... 20. Obtain each edge connected to the garment vertex in the garment model, and based on the position of each edge and the position of each human body face that intersects with the target garment face, determine whether the garment vertex has clipped into the three-dimensional human body model and the clipping type, wherein the target garment face is each garment face that makes up the intersection area; and, if the terminal device 220 determines that the garment vertex has clipped into the model, determine the target position of the garment vertex using a target position determination method corresponding to the clipping type, and move the garment vertex to the target position before displaying it.
[0053] in, Figure 2 as well as Figure 3 The server 210 and the terminal device 220 can exchange information through a communication network. The communication network can be either wireless or wired.
[0054] For example, server 210 can access the network via cellular mobile communication technology and communicate with terminal device 220, and server 210 can access the network via cellular mobile communication technology and communicate with terminal device 220. The cellular mobile communication technology includes, for example, 5th Generation Mobile Networks (5G) technology.
[0055] Optionally, server 210 can access the network and communicate with terminal device 220 via short-range wireless communication, and server 210 can access the network and communicate with terminal device 220 via short-range wireless communication. The short-range wireless communication method may include, for example, Wireless Fidelity (Wi-Fi) technology.
[0056] Furthermore, the description in this application only details a single server 210, a single terminal device 220, and a single memory 230. However, those skilled in the art should understand that the illustrated server 210, terminal device 220, and memory 230 are intended to illustrate the operation of the server 210, terminal device 220, and memory 230 involved in the technical solutions of this application, and are not intended to imply any limitation on the number, type, or location of the server 210, terminal device 220, and memory 230. It should be noted that adding additional modules to or removing individual modules from the illustrated environment will not change the underlying concept of the exemplary embodiments of this application.
[0057] For example, terminal device 220 includes, but is not limited to: large visual screen, tablet computer, laptop computer, handheld computer, mobile Internet device (MID), wearable device, virtual reality (VR) device, augmented reality (AR) device, wireless terminal device in industrial control, wireless terminal device in autonomous driving, wireless terminal device in smart grid, wireless terminal device in transportation safety, wireless terminal device in smart city, or wireless terminal device in smart home, etc.; the terminal device may have a related client installed, which may be software (e.g., browser, short video software, etc.), or web page, mini program, etc.
[0058] It should be noted that the method proposed in this application for solving the problem of clipping between 3D human body models and clothing models is not only applicable to... Figure 2 , Figure 3 and Figure 4 The application scenarios shown are also applicable to any device that can solve the problem of fitting 3D human body models and clothing models together.
[0059] The following describes an exemplary embodiment of the method for solving the problem of 3D human body model and clothing model clipping, in conjunction with the application scenarios described above and with reference to the accompanying drawings. It should be noted that the above application scenarios are only shown to facilitate understanding of the methods and principles of this application, and the implementation of this application is not limited in any way in this respect.
[0060] like Figure 5 The diagram shown illustrates a method for fitting a 3D human body model into a clothing model, which may include the following steps:
[0061] Step 501: Detect each human body surface in the three-dimensional human body model of the target object that intersects with the clothing surface of the target object, and obtain a set of intersection pairs, wherein any intersection pair in the set of intersection pairs includes a pair of human body surface and clothing surface that intersect.
[0062] The method for detecting the human body facets that intersect with the clothing facets of the target object in the three-dimensional human body model can be bounding box detection algorithm, octree, kd-tree (k-dimensional-tree, kd tree), etc. The specific detection method can be set according to the actual situation. This embodiment does not limit the specific detection algorithm.
[0063] Furthermore, in this embodiment, each intersection pair in the intersection pair set is of the form {cloth i body i}, where cloth i For the index of garment panels in the garment model, body i This refers to the index of the human body facet in the 3D human body model. The form of the intersection pair in this embodiment is only for illustrative purposes, and the specific form can be set according to the actual situation. This embodiment does not limit it.
[0064] Step 502: Merge each adjacent garment patch in the set of intersecting pairs to obtain at least one intersecting region;
[0065] In one embodiment, step 502 may be implemented as follows: for any garment patch in the set of intersecting pairs, if the garment patch has the same edge as any other garment patch in the set of intersecting pairs, then the other garment patch is determined to be a garment patch adjacent to the garment patch; and the garment patch is merged with the other garment patch based on the same edge to obtain the intersecting region.
[0066] For example, such as Figure 6 As shown, clothing patch 1 includes edges AB, AC, and BC. Clothing patch 2 includes edges AB, AD, and BD. It is determined that clothing patch 1 and clothing patch 2 share the same edge AB. Therefore, clothing patch 1 and clothing patch 2 can be merged based on edge AB. Figure 6 The intersecting region shown.
[0067] Step 503: For any clothing vertex in any intersecting region, obtain each edge in the clothing model that is connected to the clothing vertex, and based on the position of each edge and the position of each human body face that intersects with the target clothing face, determine whether the clothing vertex has clipped into the three-dimensional human body model and the clipping type, wherein the target clothing face is each clothing face that makes up the intersecting region.
[0068] The following section provides a detailed explanation of how to determine whether clothing vertices clip through a 3D human body model and how to determine the type of clipping. Figure 7 The diagram shown illustrates the specific process, including the following steps:
[0069] Step 701: Traverse each edge, and for any edge that has been traversed, obtain the direction vector of the edge based on the position of each vertex in the edge;
[0070] For example, if the coordinates of the vertices of side AB are A(x1, y1) and B(x2, y2), then the direction vector of the line containing side AB is (x2-x1, y2-y1).
[0071] Step 702: Traverse each human body surface that intersects with the target clothing surface. For any traversed human body surface, determine the normal vector of the human body surface based on the position of each vertex in the human body surface.
[0072] The method for determining the plane normal vector is a method used in the prior art, and will not be described in detail in this embodiment.
[0073] Step 703: Determine whether the human body face and the edge intersect based on the normal vector and the direction vector. If yes, proceed to step 704; otherwise, proceed to step 708.
[0074] In one embodiment, whether the human body face patch and the edge intersect is determined by the following method:
[0075] Multiply the normal vector and the direction vector to obtain a vector product; if the vector product is equal to a first specified threshold, then it is determined that the edge does not intersect the human body face; otherwise, it is determined that the edge intersects the human body face.
[0076] In this embodiment, the first specified threshold is 0. If the product of the normal vector of the human face patch and the direction vector of the edge is 0, it means that the normal vector of the human face patch is perpendicular to the direction vector of the edge. Since the normal vector is perpendicular to the human face patch and the direction vector is parallel to the edge, it is determined that the edge is parallel to the human face patch, that is, the edge does not intersect with the human face patch. Otherwise, it is determined that the edge intersects with the human face patch.
[0077] Step 704: Determine if the clothing vertex clips through the 3D human body model, and update the clipping count of the edge;
[0078] In this embodiment, each edge has a corresponding number of times it passes through a mold. The initial number of times it passes through a mold is 0. Whenever it is determined that the edge passes through a human face, the number of times it passes through a mold is incremented by 1 until all human face pieces have been traversed, and the number of times it passes through a mold is obtained.
[0079] Step 705: Determine whether there are still any human body faces that have not been traversed and intersect with the target clothing face. If yes, return to step 702; otherwise, proceed to step 706.
[0080] Step 706: Determine if there are still edges that have not been traversed. If yes, return to step 701; otherwise, proceed to step 707.
[0081] Step 707: Determine the molding type based on the number of molding passes for each side;
[0082] Among these, clipping types include vertex clipping and edge clipping. Vertex clipping occurs when there are clothing vertices within the 3D human body model that are actually clothing vertices. Figure 8 The diagram shown illustrates vertex clipping. The gray geometry represents the facets of a 3D human body model, with vertex p... i and vertex p j These are all vertices on the clothing model. As can be seen from Figure 8, vertex p i and vertex p j Located in the facet of the 3D human body model, vertex p i and vertex p j The corresponding clipping type is vertex clipping.
[0083] Furthermore, the edges of the clothing model are located outside the 3D human body model, but there are edges of clothing model faces that intersect with the human body faces. For example... Figure 9 As shown, the gray area represents a facet of a 3D human body model, with vertex p. i and vertex p j Let p be a vertex on a face of the clothing model. i and vertex p j Located outside the 3D human body model, but vertex p i and vertex p j The edge e ij Some of the edges are located inside the 3D human body model, from... Figure 9 As can be seen from this, edge e ij Some edges are not visible. Below is a method for determining the clipping type based on the number of clipping occurrences for each edge:
[0084] Vertex clipping: If the number of clippings of each edge intersecting with the human face is the first specified number, then the clipping type is determined to be vertex clipping.
[0085] Edge-through molding: If there is an edge among the edges that intersect with the human body face that has a molding number of the second specified number, then the molding type is determined to be edge-through molding, and the second specified number is greater than the first specified number.
[0086] In this embodiment, the first specified number of times is 1 time, and the second specified number of times is 2 times.
[0087] Step 708: Determine whether there are still any human body faces that have not been traversed and intersect with the target clothing face. If yes, return to step 702; otherwise, proceed to step 709.
[0088] Step 709: Determine if there are still edges that have not been traversed. If yes, return to step 701; otherwise, proceed to step 710.
[0089] Step 710: Determine that the clothing vertex and the three-dimensional human body model have not clipped together.
[0090] If it is determined that there is no clipping between the clothing vertex and the 3D human body model, then no processing is performed on that clothing vertex.
[0091] Step 504: If it is determined that the garment vertex has clipped through, then the target position of the garment vertex is determined using the target position determination method corresponding to the clipping type, and the garment vertex is moved to the target position.
[0092] In one embodiment, the target position of the garment vertex is determined in the following two ways:
[0093] Method 1: If the clipping type is vertex clipping.
[0094] like Figure 10 The diagram shows a flowchart illustrating the process of determining the target position of a garment vertex when the garment is being modeled as vertex modeling. The flowchart includes the following steps:
[0095] Step 1001: Determine the first displacement weight vector based on the positions of the intersection vertices of each edge connected to the clothing vertex in the clothing model and each human body face piece, as well as the position of the clothing vertex;
[0096] The following describes the specific method for determining the weight of the first position, such as... Figure 11 The diagram shown illustrates the process for determining the first displacement weight vector, including the following steps:
[0097] Step 1101: For any intersecting vertex, subtract the position of the intersecting vertex from the position of the clothing vertex to obtain the position difference;
[0098] Step 1102: Multiply the position difference by the transpose of the normal vector of the target human face corresponding to the intersecting vertex to obtain the projection sub-vector, wherein the target human face is the human face where the intersecting vertex is located; wherein the projection sub-vector can be determined by formula (1):
[0099]
[0100] in, x is the projection subvector corresponding to the intersecting vertices. p Let x be the position of the intersecting vertex, and let x be the position of the clothing vertex. is the normal vector of the target human face patch corresponding to the intersecting vertices.
[0101] It should be noted that: x in this embodiment p , x and Both are 3*1 vectors.
[0102] Step 1103: Obtain the projection vector based on the projection sub-vectors corresponding to each intersecting vertex;
[0103] In this embodiment, the intersecting vertices can be one or more, such as... Figure 12 As shown, this is the case where there is only one intersecting vertex, x p Let x be the intersecting vertex and x be the vertex of the clothing. Let F be the normal vector of the human body facet. When there is only one intersecting vertex, the projection subvector of that intersecting vertex is determined as the projection vector.
[0104] like Figure 13 The diagram shows the case where there are multiple intersecting vertices. Figure 13 The diagram illustrates the case where there are four intersecting vertices. The clothing vertex x intersects with the vertices of human body face F1, F2, F3, and Fk. When there are multiple intersecting vertices, the projection vector is determined based on the projection sub-vectors of each intersecting vertex. For example, the projection sub-vectors of the four intersecting vertices are obtained as follows: and The projection vector is then obtained as
[0105] Step 1104: Divide the projection vector by the first target value to obtain the first displacement weight vector, wherein the first target value is obtained based on the normal vector of each human face patch intersecting with each edge and the transpose of the normal vector.
[0106] The first target value can also be determined in the following two ways:
[0107] (1) If there is only one intersecting vertex, the normal vector of the human face corresponding to the intersecting vertex is multiplied by the transpose of the normal vector to obtain the first target value.
[0108] Among them, the human body face corresponding to the intersecting vertex is the human body face where the intersecting vertex is located.
[0109] (2): If there are multiple intersecting vertices, the target normal vector composed of the normal vectors of each human face patch corresponding to each intersecting vertex is multiplied by the target transpose normal vector composed of the transpose vectors of each normal vector to obtain the first target value.
[0110] For example, if the normal vectors of each human face patch corresponding to each intersecting vertex are respectively and And the transpose vectors of each normal vector are respectively and Then the target normal vector is determined as follows: The target transpose normal vector is
[0111] Step 1002: Based on the first displacement weight vector and the normal vector of each human body face patch, obtain the first intermediate position;
[0112] Step 1003: Add the first intermediate position and the position of the garment vertex to obtain the target position of the garment vertex.
[0113] If the number of intersecting vertices is one, the target position of the clothing vertex can be obtained by formula (2):
[0114]
[0115] Where x′ is the target position of the clothing vertex, and x is the position of the clothing vertex. γ is the normal vector of the human face where the vertex of the clothing is located, and γ is the first displacement weight vector.
[0116] If there are multiple intersecting vertices, the target position of the clothing vertex is determined by formula (3):
[0117]
[0118] in, Let be the normal vector of each human face patch containing each intersecting vertex. Let be the first displacement weight vector.
[0119] Method 2: If the clipping type is edge clipping.
[0120] like Figure 14 The diagram shows a flowchart for determining the target position of garment vertices when the garment's molding type is edge molding, including the following steps:
[0121] Step 1401: For any edge with a second specified number of molding attempts, determine a second displacement weight vector based on the position of the edge and the position of the intersection line of each molding human body face piece, wherein the molding human body face piece is each human body face piece that intersects with the edge;
[0122] For example, such as Figure 15 As shown, human body facets F1 and F2 are human body facets that pass through edge AB, that is, human body facets F1 and F2 are passing through human body facets, and edge p1p2 is the intersection line of each passing through human body facet.
[0123] In one embodiment, the second displacement weight vector is determined by: obtaining the shortest distance between the edge and the intersecting line based on the position of the edge and the position of the intersecting line; multiplying the direction vector of the target common perpendicular of the edge and the transpose of the direction vector to obtain a second target value; and dividing the shortest distance by the second target value to obtain the second displacement weight vector.
[0124] Step 1402: Multiply the second displacement weight vector of each side by the direction vector of each target common perpendicular to obtain the second intermediate position, wherein any target common perpendicular is the common perpendicular between any side and the intersection line corresponding to the side; wherein the second intermediate position can be obtained by formula (4):
[0125]
[0126] Where x2 is the second middle position, Let be the direction vector that all the targets covet. Let be the second displacement weight vector for each side.
[0127] Step 1403: Add the second intermediate position and the position of the garment vertex to obtain the target position of the garment vertex.
[0128] It should be noted that the positions of the second middle position and the clothing vertex are both represented by vectors.
[0129] To ensure accuracy, after executing step 504, it is determined whether there are still vertices in each intersecting region where clipping occurs. If not, the process returns to the step of detecting the human body faces in the 3D human body model of the target object that intersect with the clothing face of the target object, and obtaining the set of intersection pairs, until it is determined that there are no human body faces in the 3D human body model that intersect with the face of the target object.
[0130] Because intersection detection can only detect intersecting surfaces, it won't detect clothing surfaces whose three edges are all within the 3D human body model. Therefore, an iterative approach is needed to continuously pull out clothing surfaces that are embedded within the 3D human body model. Figure 16As shown in the figure, the area formed by the solid black lines represents the facets of the 3D human body model, and the dashed lines represent the edges of the clothing facets. As can be seen from image (a) in Figure 16, clothing vertices A, B, C, and D are recessed within the 3D human body model. After executing steps 501-504 in this embodiment once, image (b) is obtained. Then, after executing steps 501-504 again on image (b), image (c) is obtained. Finally, after executing steps 501-504 on image (c), image (d) is obtained. This involves extracting all the recessed clothing vertices.
[0131] To further connect the technical solutions in this application, the following is combined with... Figure 17 A detailed explanation may include the following steps:
[0132] Step 1701: Detect each human body surface in the three-dimensional human body model of the target object that intersects with the clothing surface of the target object, and obtain a set of intersection pairs, wherein any intersection pair in the set of intersection pairs includes a pair of human body surface and clothing surface that intersect.
[0133] Step 1702: For any garment patch in the set of intersecting pairs, if the garment patch has the same edge as any other garment patch in the set of intersecting pairs, then determine that the other garment patch is the garment patch adjacent to the garment patch.
[0134] Step 1703: Based on the same edges, merge the garment panel with the other garment panels to obtain the intersecting area;
[0135] Step 1704: For any clothing vertex in any intersecting region, obtain each edge in the clothing model that is connected to the clothing vertex, and based on the position of each edge and the position of each human body face that intersects with the target clothing face, determine whether the clothing vertex has clipped into the three-dimensional human body model and the clipping type, wherein the target clothing face is each clothing face that makes up the intersecting region.
[0136] Step 1705: If it is determined that the clothing vertex has clipped through, and the clipping type is vertex clipping, then determine the first displacement weight vector based on the position of the intersection vertex of each edge connected to the clothing vertex and each human body face piece in the clothing model, as well as the position of the clothing vertex.
[0137] Step 1706: Based on the first displacement weight vector and the normal vector of each human body face patch, obtain the first intermediate position;
[0138] Step 1707: Add the first intermediate position and the position of the garment vertex to obtain the target position of the garment vertex;
[0139] Step 1708: If it is determined that the clothing vertex has clipped through, and the clipping type is edge clipping, then for any edge with a clipping number of the second specified number, a second displacement weight vector is determined based on the position of the edge and the position of the intersection line of each clipping human face piece, wherein the clipping human face piece is each human face piece that intersects with the edge.
[0140] Step 1709: Multiply the second displacement weight vector of each side with the direction vector of each target common perpendicular to obtain the second intermediate position, wherein any target common perpendicular is the common perpendicular between any side and the intersection line corresponding to the side;
[0141] Step 1710: Add the second intermediate position and the position of the garment vertex to obtain the target position of the garment vertex;
[0142] Step 1711: Move the garment vertex to the target position.
[0143] Based on the same inventive concept, the method for solving the problem of clipping between a three-dimensional human body model and a clothing model as described above can also be implemented by a device for solving the problem of clipping between a three-dimensional human body model and a clothing model. The effect of this device for solving the problem of clipping between a three-dimensional human body model and a clothing model is similar to that of the aforementioned method, and will not be described again here.
[0144] Figure 18 This is a schematic diagram of the structure of an apparatus for solving the problem of fitting a three-dimensional human body model and a clothing model according to an embodiment of the present disclosure.
[0145] like Figure 18 As shown, the apparatus 1800 for solving the problem of clipping between a 3D human body model and a clothing model disclosed herein may include a detection module 1810, a fusion module 1820, a clipping determination module 1830, and a clipping solution module 1840.
[0146] The detection module 1810 is used to detect each human body surface that intersects with the clothing surface of the target object in the three-dimensional human body model of the target object, and obtain an intersection pair set, wherein any intersection pair in the intersection pair set includes a pair of human body surface and clothing surface that intersect.
[0147] The fusion module 1820 is used to fuse each adjacent garment patch in the set of intersecting pairs to obtain at least one intersecting region;
[0148] The clipping determination module 1830 is used to obtain, for any clothing vertex in any intersecting region, each edge in the clothing model connected to the clothing vertex, and based on the position of each edge and the position of each human body face that intersects with the target clothing face, determine whether the clothing vertex clips with the three-dimensional human body model and the clipping type, wherein the target clothing face is each clothing face that makes up the intersecting region;
[0149] The clipping resolution module 1840 is used to determine the target position of the garment vertex using a target position determination method corresponding to the clipping type if it is determined that clipping has occurred at the garment vertex, and to move the garment vertex to the target position.
[0150] In one embodiment, the apparatus further includes:
[0151] The iteration module 1850 is used to determine whether there are still vertices in each intersection region that have clipping after the clothing vertex is moved to the target position. If there are no vertices, the module returns to the step of detecting each human body facet in the three-dimensional human body model of the target object that intersects with the clothing facet of the target object and obtaining a set of intersection pairs, until it is determined that there are no human body facets in the three-dimensional human body model that intersect with the facet of the target object.
[0152] In one embodiment, the fusion module 1820 is specifically used for:
[0153] For any garment patch in the set of intersection pairs, if the garment patch shares an edge with any other garment patch in the set of intersection pairs, then the other garment patch is determined to be an adjacent garment patch to the garment patch; and,
[0154] The garment panel is merged with the other garment panels based on the same edges to obtain the intersecting area.
[0155] In one embodiment, the molding determination module 1830 is specifically used for:
[0156] Traverse each edge, and for any traversed edge, obtain the direction vector of the edge based on the positions of its vertices; and,
[0157] Traverse all human body faces that intersect with the target clothing face. For any traversed human body face, determine the normal vector of the human body face based on the positions of its vertices; and...
[0158] Based on the normal vector and the direction vector of the human body face patch, determine whether the human body face patch and the edge intersect;
[0159] If it is determined that the edge intersects with the human body face, then it is determined that the clothing vertex and the three-dimensional human body model have clipped together, and the clipping count of the edge is updated. The step of traversing each human body face that intersects with the target clothing face is returned until the traversal of each human body face is completed. Then the step of traversing each edge is returned until the traversal of each edge is completed. Then the clipping type is determined based on the clipping count of each edge.
[0160] If the edge does not intersect with the human body face, return to the step of traversing each human body face that intersects with the target clothing face until all human body faces have been traversed. Then return to the step of traversing each edge until it is determined that no human body face intersects with any edge. In this case, it is determined that the clothing vertex and the three-dimensional human body model have not clipped together.
[0161] In one embodiment, the die-cutting determination module 1830 performs the step of determining whether the human body face patch and the edge intersect based on the normal vector and the direction vector of the human body face patch, specifically for:
[0162] Multiply the normal vector and the direction vector to obtain a vector product;
[0163] If the vector product is equal to a first specified threshold, then it is determined that the edge does not intersect with the human body face patch;
[0164] Otherwise, it is determined that the edge intersects with the human body facet.
[0165] In one embodiment, the molding determination module 1830 performs the molding type determination based on the number of moldings on each side, specifically for:
[0166] If the number of times each edge intersects with the human body face is a first specified number, then the type of clipping is determined to be vertex clipping.
[0167] The clipping-through resolution module 1840 is specifically used for:
[0168] The first displacement weight vector is determined based on the positions of the intersection vertices of each edge connected to the vertex of the clothing and each human body face piece in the clothing model, as well as the position of the vertex of the clothing.
[0169] Based on the first displacement weight vector and the normal vector of each human body face patch, the first intermediate position is obtained;
[0170] Add the first intermediate position and the position of the clothing vertex to obtain the target position of the clothing vertex.
[0171] In one embodiment, the clipping resolution module 1840 performs the step of determining a first displacement weight vector based on the positions of the intersection vertices of each edge connected to the garment vertex and each human body face piece in the garment model, as well as the position of the garment vertex, specifically for:
[0172] For any intersecting vertex, subtract the position of the intersecting vertex from the position of the clothing vertex to obtain the position difference; and,
[0173] Multiply the position difference by the transpose of the normal vector of the target human face corresponding to the intersecting vertex to obtain the projection subvector, wherein the target human face is the human face where the intersecting vertex is located.
[0174] Based on the projection sub-vectors corresponding to each intersecting vertex, the projection vector is obtained;
[0175] Divide the projection vector by the first target value to obtain the first displacement weight vector, wherein the first target value is obtained based on the normal vector of each human face patch intersecting each edge and the transpose of the normal vector.
[0176] In one embodiment, the molding determination module 1830 performs the molding type determination based on the number of moldings on each side, specifically for:
[0177] If among the edges intersecting with the human body face, there is an edge with a molding number of the second specified number, then the molding type is determined to be edge molding, and the second specified number is greater than the first specified number;
[0178] The clipping-through resolution module 1840 is specifically used for:
[0179] For any edge that has been pierced a second specified number of times, a second displacement weight vector is determined based on the position of the edge and the position of the intersection line of each pierced human body face piece, wherein the pierced human body face piece is each human body face piece that intersects with the edge;
[0180] Multiply the second displacement weight vector of each side with the direction vector of each target common perpendicular to obtain the second intermediate position, wherein any target common perpendicular is the common perpendicular between any side and the intersection line corresponding to the side;
[0181] Add the second intermediate position and the position of the clothing vertex to obtain the target position of the clothing vertex.
[0182] In one embodiment, the mold-breaking resolution module 1840 performs the determination of a second displacement weight vector based on the intersection line positions of the edges and the molded human body face pieces, specifically for:
[0183] Based on the position of the edge and the position of the intersecting line, the shortest distance between the edge and the intersecting line is obtained; and,
[0184] Multiply the direction vector of the target common perpendicular of the edge and the transpose of the direction vector to obtain the second target value; divide the shortest distance by the second target value to obtain the second displacement weight vector.
[0185] After introducing a method and apparatus for solving the problem of overlapping between a three-dimensional human body model and a clothing model according to an exemplary embodiment of the present invention, the following describes an electronic device according to another exemplary embodiment of the present invention.
[0186] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as "circuit", "module", or "system".
[0187] In some possible implementations, the electronic device according to the present invention may include at least one processor and at least one computer storage medium. The computer storage medium stores program code that, when executed by the processor, causes the processor to perform the steps in the method for solving the problem of fitting a three-dimensional human body model and clothing model according to various exemplary embodiments of the present invention described above. For example, the processor may perform actions such as... Figure 5 Steps 501-504 are shown in the diagram.
[0188] The following reference Figure 19 To describe an electronic device 1900 according to this embodiment of the present invention. Figure 19 The electronic device 1900 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0189] like Figure 19 As shown, the electronic device 1900 is manifested in the form of a general electronic device. The components of the electronic device 1900 may include, but are not limited to: at least one processor 1901, at least one computer storage medium 1902, and a bus 1903 connecting different system components (including the computer storage medium 1902 and the processor 1901).
[0190] Bus 1903 represents one or more of several bus architectures, including computer storage media bus or computer storage media controller, peripheral bus, processor, or local bus using any of the various bus architectures.
[0191] Computer storage medium 1902 may include readable media in the form of volatile computer storage media, such as random access computer storage medium (RAM) 1921 and / or cache storage medium 1922, and may further include read-only computer storage medium (ROM) 1923.
[0192] The computer storage medium 1902 may also include a program / utility 1925 having a set (at least one) of program modules 1924, such program modules 1924 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0193] Electronic device 1900 can also communicate with one or more external devices 1904 (e.g., keyboard, pointing device, etc.), one or more devices that enable a user to interact with electronic device 1900, and / or any device that enables electronic device 1900 to communicate with one or more other electronic devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 1905. Furthermore, electronic device 1900 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 1906. As shown, network adapter 1906 communicates with other modules used in electronic device 1900 via bus 1903. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 1900, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0194] In some possible implementations, various aspects of the method for solving the problem of overlapping three-dimensional human body models and clothing models provided by the present invention can also be implemented in the form of a program product, which includes program code. When the program product is run on a computer device, the program code is used to cause the computer device to perform the steps in the method for solving the problem of overlapping three-dimensional human body models and clothing models according to various exemplary embodiments of the present invention as described above.
[0195] The program product may take the form of any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access computer storage media (RAM), read-only computer storage media (ROM), erasable programmable read-only computer storage media (EPROM or flash memory), optical fibers, portable compact disk read-only computer storage media (CD-ROM), optical computer storage media, magnetic computer storage media, or any suitable combination thereof.
[0196] The program product for solving the problem of fitting three-dimensional human body models and clothing models according to embodiments of the present invention can be a portable compact disk read-only computer storage medium (CD-ROM) and include program code, and can run on an electronic device. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or apparatus.
[0197] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0198] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0199] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's electronic device, partially on the user's device, as a standalone software package, partially on the user's electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In cases involving remote electronic devices, the remote electronic device can be connected to the user's electronic device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external electronic device (e.g., via the Internet using an Internet service provider).
[0200] It should be noted that although several modules of the apparatus have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided and embodied by multiple modules.
[0201] Furthermore, although the operations of the method of the present invention are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0202] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk computer storage media, CD-ROMs, optical computer storage media, etc.) containing computer-usable program code.
[0203] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0204] These computer program instructions may also be stored in a computer-readable computer storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable computer storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0205] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0206] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for solving the problem of overlay between a 3D human body model and a clothing model, characterized in that, The method includes: Detect each human body surface in the three-dimensional human body model of the target object that intersects with the clothing surface of the target object, and obtain a set of intersection pairs, wherein any intersection pair in the set of intersection pairs includes a pair of human body surface and clothing surface that intersect; By merging adjacent garment panels in the set of intersecting pairs, at least one intersecting region is obtained; For any clothing vertex in any intersecting region, obtain all edges in the clothing model connected to the clothing vertex, and based on the positions of these edges and the positions of the human body faces intersecting with the target clothing facet, determine whether the clothing vertex clips through the 3D human body model and the type of clipping, wherein the target clothing facets are the clothing facets constituting the intersecting region; and, If it is determined that the garment vertex has clipped through, the target position of the garment vertex is determined using a target position determination method corresponding to the clipping type, and the garment vertex is moved to the target position.
2. The method according to claim 1, characterized in that, After moving the clothing vertex to the target position, the method further includes: Determine whether there are still vertices in each intersecting region where clipping occurs. If not, return to the step of detecting each human body facet in the 3D human body model of the target object that intersects with the clothing facet of the target object, and obtain the set of intersection pairs, until it is determined that there are no human body facets in the 3D human body model that intersect with the facet of the target object.
3. The method according to claim 1, characterized in that, The step of merging adjacent garment panels in the set of intersecting pairs to obtain at least one intersecting region includes: For any garment patch in the set of intersection pairs, if the garment patch shares an edge with any other garment patch in the set of intersection pairs, then the other garment patch is determined to be an adjacent garment patch to the garment patch; and, The garment panel is merged with the other garment panels based on the same edges to obtain the intersecting area.
4. The method according to claim 1, characterized in that, The determination of whether the garment vertex clips into the 3D human body model and the type of clipping, based on the positions of the edges and the positions of the human body faces that intersect with the target garment face, includes: Traverse each edge, and for any traversed edge, obtain the direction vector of the edge based on the positions of its vertices; and, Traverse all human body faces that intersect with the target clothing face. For any traversed human body face, determine the normal vector of the human body face based on the positions of its vertices; and... Based on the normal vector and the direction vector of the human body face patch, determine whether the human body face patch and the edge intersect; If it is determined that the edge intersects with the human body face, then it is determined that the clothing vertex and the three-dimensional human body model have clipped together, and the clipping count of the edge is updated. The step of traversing each human body face that intersects with the target clothing face is returned until the traversal of each human body face is completed. Then the step of traversing each edge is returned until the traversal of each edge is completed. Then the clipping type is determined based on the clipping count of each edge. If the edge does not intersect with the human body face, return to the step of traversing each human body face that intersects with the target clothing face until all human body faces have been traversed. Then return to the step of traversing each edge until it is determined that no human body face intersects with any edge. In this case, it is determined that the clothing vertex and the three-dimensional human body model have not clipped together.
5. The method according to claim 4, characterized in that, Determining whether the human body face patch and the edge intersect based on the normal vector and the direction vector of the human body face patch includes: Multiply the normal vector and the direction vector to obtain a vector product; If the vector product is equal to a first specified threshold, then it is determined that the edge does not intersect with the human body face patch; Otherwise, it is determined that the edge intersects with the human body facet.
6. The method according to claim 4, characterized in that, The determination of the molding type based on the number of moldings on each side includes: If the number of times each side intersects with the human body face is a first specified number, then the type of clipping is determined to be vertex clipping. Determining the target position of the garment vertex using a target position determination method corresponding to the garment type includes: The first displacement weight vector is determined based on the positions of the intersection vertices of each edge connected to the vertex of the clothing and each human body face piece in the clothing model, as well as the position of the vertex of the clothing. Based on the first displacement weight vector and the normal vector of each human body face patch, the first intermediate position is obtained; Add the first intermediate position and the position of the clothing vertex to obtain the target position of the clothing vertex.
7. The method according to claim 6, characterized in that, The step of determining the first displacement weight vector based on the positions of the intersection vertices of each edge connected to the garment vertex in the garment model and each human body face piece, as well as the position of the garment vertex, includes: For any intersecting vertex, subtract the position of the intersecting vertex from the position of the clothing vertex to obtain the position difference; and, Multiply the position difference by the transpose of the normal vector of the target human face corresponding to the intersecting vertex to obtain the projection subvector, wherein the target human face is the human face where the intersecting vertex is located. Based on the projection sub-vectors corresponding to each intersecting vertex, the projection vector is obtained; Divide the projection vector by the first target value to obtain the first displacement weight vector, wherein the first target value is obtained based on the normal vector of each human face patch intersecting each edge and the transpose of the normal vector.
8. The method according to claim 4, characterized in that, The determination of the molding type based on the number of moldings on each side includes: If among the edges intersecting with the human body face, there is an edge with a molding number of the second specified number, then the molding type is determined to be edge molding, and the second specified number is greater than the first specified number; Determining the target position of the garment vertex using a target position determination method corresponding to the garment type includes: For any edge that has been pierced a second specified number of times, a second displacement weight vector is determined based on the position of the edge and the position of the intersection line between the edge and the pierced human body face piece, wherein the pierced human body face piece is each human body face piece that intersects with the edge; Multiply the second displacement weight vector of each side with the direction vector of each target common perpendicular to obtain the second intermediate position, wherein any target common perpendicular is the common perpendicular between any side and the intersection line corresponding to the side; Add the second intermediate position and the position of the clothing vertex to obtain the target position of the clothing vertex.
9. The method according to claim 8, characterized in that, The determination of the second displacement weight vector based on the intersection line position of the edge and each mannequin face piece includes: Based on the position of the edge and the position of the intersecting line, the shortest distance between the edge and the intersecting line is obtained; and, Multiply the direction vector of the target common perpendicular of the edge and the transpose of the direction vector to obtain the second target value; Divide the shortest distance by the second target value to obtain the second displacement weight vector.
10. An electronic device, characterized in that, It includes a processor and a memory, which are connected via a bus; The memory stores a computer program, and the processor is configured to perform the method according to any one of claims 1-9 based on the computer program.