CN117173338A - Model processing method and device, readable storage medium and electronic device - Google Patents

Model processing method and device, readable storage medium and electronic device Download PDF

Info

Publication number
CN117173338A
CN117173338A CN202311162388.0A CN202311162388A CN117173338A CN 117173338 A CN117173338 A CN 117173338A CN 202311162388 A CN202311162388 A CN 202311162388A CN 117173338 A CN117173338 A CN 117173338A
Authority
CN
China
Prior art keywords
model
target
vertex
original
body type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311162388.0A
Other languages
Chinese (zh)
Inventor
关耀荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202311162388.0A priority Critical patent/CN117173338A/en
Publication of CN117173338A publication Critical patent/CN117173338A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The application discloses a model processing method and device, a readable storage medium and an electronic device. The method comprises the following steps: determining an original body type model of the virtual character and at least one original clothing model to be matched with the original body type model; determining a second normal vector of a second vertex on the original garment model based on the first normal vector of the first vertex on the original body model; mapping the original skin information of the original body type model to the original clothing model based on the second normal vector to obtain target skin information of the original clothing model; binding the bone to the apparel model based on the target skin information such that the original apparel model moves following the movement of the bone. The application solves the technical problem of low binding efficiency of the body model and the clothing model.

Description

Model processing method and device, readable storage medium and electronic device
Technical Field
The present disclosure relates to the field of computer graphics, and in particular, to a method and apparatus for processing a model, a readable storage medium, and an electronic apparatus.
Background
At present, no matter the virtual clothes of the virtual film and television roles or the virtual game roles are virtual clothes, a model is bound through bones so that the motions of the bones control the synchronous motions of the virtual roles and the virtual clothes on the virtual roles, but as each virtual role has a plurality of sets of virtual clothes which can be replaced, the same set of virtual clothes and the models such as decoration accessories thereof are also required to be adapted to different virtual roles, the binding work generally needs to be automatically bound, and then the skin weight is manually adjusted so that the virtual clothes are adapted to different body types, and the binding effect is difficult to meet the requirements in the adjustment process by manually scaling, moving or rotating the vertexes of all parts, and the manual adjustment is long in time and low in efficiency.
Aiming at the problem of low binding efficiency of the body type model and the clothing model, no effective solution is proposed at present.
Disclosure of Invention
At least some embodiments of the present disclosure provide a method, an apparatus, a readable storage medium, and an electronic device for processing a model, so as to at least solve a technical problem of low binding efficiency between a body model and a clothing model.
According to one embodiment of the present disclosure, a method for processing a model is provided. The method comprises the following steps: determining an original body type model of the virtual character and at least one original clothing model to be matched with the body type model; determining a second normal vector of a second vertex on the original garment model based on the first normal vector of the first vertex on the original body model, wherein the first vertex corresponds to the second vertex, and the second normal vector points to a third vertex in the original body model; mapping the original skin information of the original body type model to the original clothing model based on the second normal vector to obtain target skin information of the original clothing model, wherein the original skin information is used for binding bones of virtual roles to the original body type model so that the original body type model moves along with the movement of the bones; binding the bone to the apparel model based on the target skin information such that the apparel model moves following the movement of the bone.
According to one embodiment of the disclosure, a processing device of the model is also provided. The device comprises: the first determining unit is used for determining an original body type model of the virtual character and at least one original clothing model to be matched with the body type model; a second determining unit configured to determine a second normal vector of a second vertex on the original clothing model based on a first normal vector of a first vertex on the original body model, wherein the first vertex corresponds to the second vertex, and the second normal vector points to a third vertex in the original body model; the mapping unit is used for mapping the original skin information of the original body type model to the original clothing model based on the second normal vector to obtain target skin information of the original clothing model, wherein the original skin information is used for binding bones of virtual roles to the original body type model so that the original body type model moves along with the movement of the bones; and a binding unit for binding the skeleton to the clothing model based on the target skin information so that the clothing model moves along with the movement of the skeleton.
According to one embodiment of the present disclosure, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to execute the method of processing the model in any one of the above-mentioned claims when run.
According to one embodiment of the present disclosure, there is also provided an electronic device including a memory in which a computer program is stored, and a processor configured to run the computer program to perform the method of processing the model in any one of the above.
In at least some embodiments of the present disclosure, original skin information of an original body type model may be mapped onto an original clothing model through a normal vector to obtain target skin information of the original clothing model, since the original skin information is used to bind bones of virtual characters to the original body type model so that the original body type model moves along with movements of the bones, binding bones to the original clothing model based on the target skin information may enable the original clothing model to move along with movements of the bones, accurately mapping skin information on an original body type template onto various clothing models, and enabling the clothing model to move closely along with body parts corresponding to the body type model.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure, illustrate and explain the present disclosure, and together with the description serve to explain the present disclosure. In the drawings:
fig. 1 is a hardware block diagram of a mobile terminal according to a processing method of a model according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of a method of processing a model according to one embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a control module of a model according to one embodiment of the present disclosure;
FIG. 4 is a flow chart of a method of acquiring a point of penetration on an original body model according to one embodiment of the present disclosure;
FIG. 5 is a schematic cross-sectional view of an original body type model and an original apparel model in accordance with one embodiment of the present disclosure;
FIG. 6 is a flowchart of a method of mapping skin information of an original body type template model onto an original apparel model, according to an embodiment of the present disclosure;
FIG. 7 is a normal correction contrast schematic according to one embodiment of the present disclosure;
FIG. 8 is a schematic diagram of a contrast of normal modification on a first target apparel model in accordance with an embodiment of the present disclosure;
FIG. 9 is a flowchart of a method of adapting an original apparel template to an original body type model, according to one embodiment of the present disclosure;
FIG. 10 is a block diagram of a processing device of a model according to an embodiment of the present disclosure;
fig. 11 is a schematic diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
In order that those skilled in the art will better understand the present disclosure, a technical solution in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present disclosure, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure, shall fall within the scope of the present disclosure.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In one possible implementation, when the body model and the clothing model are bound, after the body model and the clothing model are usually bound automatically, the skin weight is manually adjusted, so that the virtual clothing is adapted to different body models, the vertices of each part need to be manually zoomed, moved or rotated in the adjustment process, the situation that the binding effect is difficult to meet the requirement may exist, and the manual adjustment takes longer and has lower efficiency.
However, in the embodiment of the present application, a method for processing a model is provided, by determining an original body type model of a virtual character and at least one original clothing model to be matched with the body type model; determining a second normal vector of a second vertex on the original garment model based on the first normal vector of the first vertex on the original body model, wherein the first vertex corresponds to the second vertex, and the second normal vector points to a third vertex in the original body model; mapping the original skin information of the original body type model to the original clothing model based on the second normal vector to obtain target skin information of the original clothing model, wherein the original skin information is used for binding bones of virtual roles to the original body type model so that the original body type model moves along with the movement of the bones; binding the bone to the apparel model based on the target skin information such that the apparel model moves following the movement of the bone. That is, in the embodiment of the application, the original skin information of the original body type model can be mapped to the original clothing model to obtain the target skin information of the original clothing model, and the original skin information is used for binding bones of virtual roles to the original body type model so that the original body type model moves along with the movements of the bones, so that the skin information on the body type template can be accurately mapped to various clothing models based on the target skin information to bind the bones to the clothing model, the clothing model can be moved along with the body parts corresponding to the body type model, in addition, a set of clothing models can be automatically adapted to different body type models, and the skin binding information of the clothing models is reserved, so that time and labor are saved, the model binding efficiency is improved, and the technical problem of low binding efficiency of the body type model and the clothing model is solved.
The above-described method embodiments to which the present disclosure relates may be performed in a mobile terminal, a computer terminal or similar computing device. Taking the mobile terminal as an example, the mobile terminal can be a smart phone, a tablet computer, a palm computer, a mobile internet device, a PAD, a game machine and other terminal devices. Fig. 1 is a block diagram of a hardware structure of a mobile terminal according to a processing method of a model according to an embodiment of the present disclosure. As shown in fig. 1, a mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a Central Processing Unit (CPU), a Graphics Processor (GPU), a Digital Signal Processing (DSP) chip, a Microprocessor (MCU), a programmable logic device (FPGA), a neural Network Processor (NPU), a Tensor Processor (TPU), an Artificial Intelligence (AI) type processor, etc.) and a memory 104 for storing data, and in one embodiment of the present disclosure, may further include: input output device 108 and display device 110.
In some optional embodiments, which are based on game scenes, the device may further provide a human-machine interaction interface with a touch-sensitive surface, where the human-machine interaction interface may sense finger contacts and/or gestures to interact with a Graphical User Interface (GUI), where the human-machine interaction functions may include the following interactions: executable instructions for performing the above-described human-machine interaction functions, such as creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving electronic mail, talking interfaces, playing digital video, playing digital music, and/or web browsing, are configured/stored in a computer program product or readable storage medium executable by one or more processors.
It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
According to one embodiment of the present disclosure, there is provided an embodiment of a method of processing a model, it being noted that the steps shown in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order different from that herein.
In one possible implementation manner, the embodiment of the present disclosure provides a method for processing a model, and fig. 2 is a flowchart of a method for processing a model according to one embodiment of the present disclosure, as shown in fig. 2, and the method includes the following steps:
step S201, determining an original body type model of the virtual character and at least one original clothing model to be matched with the original body type model.
In the technical solution provided in the above step S201 of the present application, an original body type model is used to indicate a body type model corresponding to a virtual character in a virtual game or a virtual animation, and an original clothing model is used to indicate virtual clothing worn by the virtual character, where one original body type model may be adapted to multiple sets of original clothing models, and one set of original clothing model may also be adapted to multiple sets of original body type models.
In this embodiment, an original body type model of the virtual character may be determined, and at least one original apparel model to be matched with the original body type model,wherein the determined original body model of the virtual character can be used as M source Representing and using C to determine at least one original clothing model to be matched with the original body type model target Wherein the original body model may be a polygonal model and the original body model has skin information.
Step S202, a second normal vector of a second vertex on the original clothing model is determined based on the first normal vector of the first vertex on the original body model.
In the technical solution provided in the above step S202 of the present application, since the original body model may be a polygonal model, the original body model has a plurality of vertices, each vertex may be corresponding to a vertex number, based on which, after determining the original body model and at least one original clothing model to be matched with the original body model, a second normal vector of a second vertex on the original clothing model may be determined based on a first normal vector of a first vertex on the original body model, where the first vertex corresponds to the second vertex, and the second normal vector points to a third vertex in the original body model. It should be noted that the first vertex and the third vertex on the original body model may be the same vertex or different vertices.
In this embodiment, as can be seen from the description of step S201, the original body model can be obtained by M source The original clothing model to be adapted with the original body type model can be represented by C target Expressed, wherein the original body model M source Original clothing model C target Can be a polygonal model, the model can comprise a plurality of vertexes, each vertex is corresponding to a vertex number, and the original body model M can be traversed based on the vertex numbers source And determining a second normal vector of a second vertex on the original clothing model, which corresponds to the first vertex on the original body model, according to the first normal vector of the first vertex traversed on the original body model.
For example, one can derive from the original body model M source The top vertex number 1 starts traversing, and the top vertex can be regarded as the first top vertexWherein the first vertex can be denoted Vm i After determining the first vertex to be traversed, the first vertex Vm may be further determined i Is the first normal vector of (1)The first normal vector may intersect the original clothing model C to be matched with the original body type model target And obtaining a plurality of penetration points, and selecting a distance from the traversed first vertex Vm on the original body model i Nearest to and its normal direction is +.>Through points with included angles within the set included angle threshold range, and leading the first vertex Vm on the original body model to be i Position coordinate shifted to the penetration point +.>The first vertex on the original body type model is moved to the surface of the original clothing model according to the normal vector direction of the first vertex, so that when the normal vector of each vertex on the original clothing model is calculated subsequently, the normal vector of the vertex on the original body type model after the periphery of each vertex is moved can be used as a calculation basis. For example, the second vertex Vc on the original apparel model may be traversed starting with i=1 i And starting soft selection, calculating a second vertex Vc on the original clothing model according to normal vectors of all penetration points (namely, each vertex on the original body model after the movement) around the second vertex i Is>The normal vector of each vertex on the original clothing model can be calculated according to the method.
Optionally, it may also be based on a second normal vectorIs used for determining the second normal vector/>And acquiring vertexes around the penetration points on the original body model based on the penetration points on the original body model, and calculating the skin weights of the vertexes on the original clothing model according to the determined skin weights of the vertexes on the original body model.
Optionally, each vertex on the original clothing model may establish a mapping relationship with a plurality of vertices on the original body model, and further, the skin weight of each vertex on the original clothing model may be calculated according to the skin weights of the plurality of vertices on the original body model having a mapping relationship with each vertex on the original clothing model.
In this embodiment, after the normal vector of each vertex on the original body type model penetrates through the original clothing model, the obtained penetration point may be obtained, and the vertex of the original body type model may be moved to the position of the penetration point, where the direction of the normal vector remains unchanged. Then, in the process of traversing the vertexes on the original clothing model, the direction of the normal vector corresponding to the traversed vertexes on the original clothing model can be calculated according to the directions of the normal vectors of all the penetrating points around the traversed vertexes, namely, the directions of the normal vectors of the vertexes on the original body type model after the movement.
Step S203, mapping the original skin information of the original body type model to the original clothing model based on the second normal vector to obtain the target skin information of the original clothing model.
In the technical solution provided in the above step S203 of the present application, after determining the second normal vector of the second vertex on the original clothing model, the original skin information of the original body type model may be mapped to the original clothing model to obtain the target skin information of the original clothing model, where the original skin information is used to bind the skeleton of the virtual character to the original body type model so that the original body type model moves along with the movement of the skeleton, and the target skin information is used to bind the skeleton of the virtual character to the original clothing model so that the original clothing model moves along with the movement of the skeleton.
In this embodiment, the original skin information of the original body type model is used to indicate a process of connecting the surface of the original body type model with the skeleton, so that the original skin information of the original body type model is mapped onto the original clothing model, and target skin information of the original clothing model can be obtained, where the target skin information is used to bind the skeleton of the virtual character to the original clothing model, so that the original clothing model moves following the operation of the skeleton.
For example, as can be seen from the foregoing description, the second normal vectorThe method comprises the steps of identifying the vertexes on the original body type model according to the penetrating points on the original clothing model after moving the first vertexes on the original body type model to the penetrating points of the first normal vector on the original clothing model, and calculating according to the normal vectors of the vertexes of the original body type model. In determining the second normal vector->After that, it is possible to pass the second normal vector +.>And (3) identifying the polygon on the surface of the original body model where the penetration point on the original body model is located, and marking the polygon as F. Then, the vertex sequence numbers of the vertices forming the polygon F may be counted into the set VmSurr, and the influence weights of the vertices in the set VmSurr on the penetration points may be calculated, where the closer a certain vertex in the set VmSurr is to the penetration point, the smaller the distance between the vertex and the penetration point, and the larger the weight occupied by the vertex.
Optionally, the larger the sum of the angles of the penetration point on the original body model and a common-edge included angle formed by a certain vertex in the set VmSurr and two vertices adjacent to the vertex, the larger the weight of the vertex.
Optionally, aThe original body model is correspondingly provided with a skeleton weight table skenTableW and an accumulated weight coefficient cSum, and the skeleton weight table skenTableW and the accumulated weight coefficient cSum can be initialized. Let csum=0, traverse the set VmSurr starting from k=1, where k is used to indicate the vertices VmSurr in the set VmSurr k Reads the traversed vertex VmSurr k And all relevant bones of the vertex are recorded into the first column in the initialized bone weight table skeltableW, and the corresponding skin weight value c of the vertex is recorded k And vertex VmSurr k The corresponding vertex weight Wf k Product c of (2) k ′(c′ k =c k *Wf k ) Record a new column of the row in the skeltew corresponding to the bone, and store c' k +csum is denoted as the new weight coefficient cSum for that vertex.
It should be noted that, for an existing skeleton, there is no need to create a row in the skeleton weight table, because when traversing each vertex in the set VmSurr, the skin weights of the same skeleton are all attributed to the same row, and then normalization processing is performed on all weight values of the integrated skeleton weight table, if an existing skeleton is newly created in a row, the normalization processing will result in that the obtained normalized value will have an error after the weight values of the same skeleton in the skeleton weight table are normalized. According to the method, after traversing each vertex on VmSurr, the product of bones and corresponding skin information associated with each vertex and vertex weights can be obtained, and all weights in a bone weight table skelteW are normalized, namely, the weight c 'of each vertex is obtained' k Recording replacement ofThen, summing the values from the second column to all columns in each row to obtain vertex skin information corresponding to all relevant bones with skin weight sum of 1, and finally binding the skin information in the skin table to the original clothing model C according to the skin information in the bone weight table target Upper corresponding vertex Vc i Vertex Vc' i Then the calculation of the next vertex is started. According to the method, the original body model can be determinedAnd (3) covering information with vertexes, and then, mapping the original covering information on the original body type model to the original clothing model to obtain target covering information of the original clothing model.
Step S204, binding bones to the original clothing model based on the target skin information so that the original clothing model moves along with the movement of the bones.
In the technical solution provided in the above step S204 of the present application, after determining the target skin information, the skeleton may be bound to the original clothing model based on the target skin information, so that the clothing model moves following the movement of the skeleton.
In this embodiment, the target skin information is used to indicate a process of connecting the surface of the original clothing model with the bone, and thus, the original clothing model may be bound with the bone based on the target skin information, so that the original clothing model may move following the movement of the bone, since the original body type model may also move following the movement of the bone, that is, the original clothing model may move following the movement of the original body type model, to achieve the binding of the original body type model with the original clothing model.
According to the method, the original skin information of the original body type model can be mapped to the original clothing model to obtain the target skin information of the original clothing model, and the original skin information is used for binding bones of virtual roles to the original body type model so that the original body type model moves along with the movements of the bones, so that the bones are bound to the clothing model based on the target skin information, the skin information on the body type template can be accurately mapped to various clothing models, the clothing model can be enabled to move along with the body part corresponding to the body type model, in addition, a set of clothing models can be automatically adapted to different body type models, the skin binding information of the clothing models is reserved, time and labor are saved, the model binding efficiency is improved, and the technical problem that the binding efficiency of the body type model and the clothing model is low is solved.
The above-described method of this embodiment is further illustrated below.
As an optional implementation, step S202, determining, based on the first normal vector of the first vertex on the original body model, the second normal vector of the second vertex on the original garment model includes: copying the original body type model to obtain a first target body type model, and copying the original clothing model to obtain a first target clothing model; adjusting the first target body type model according to a first normal vector of a first vertex on the first target body type model, wherein the adjusted first target body type model is matched with the surface of the first target clothing model; and determining a second normal vector of a second vertex on the first target clothing model based on the adjusted first normal vector of the first vertex on the first target body type model, wherein the second normal vector points to a third vertex in the first target body type model.
In this embodiment, the original body type model may be copied to obtain a first target body type model, and similarly, the original clothing model may be copied to obtain a first target clothing model, and the copied first target body type model and first target clothing model may be used as reference models for calculating data. Because the original body model can be a polygonal model, the polygonal model is provided with a plurality of vertexes, based on the polygonal model, the first target body model is also provided with a plurality of vertexes, and each vertex is correspondingly provided with a normal vector, the first target body model can be moved to the surface of the first target clothing model according to the normal vector of the vertex on the first target body model, so that when the normal vector of each vertex on the first target clothing model is calculated subsequently, the vertex normal on the first target body model around the position of the vertex is taken as the calculation basis.
For example, as can be seen from the foregoing description, the original body model can be written as M source The original clothing model can be marked as C target Based on this, for convenience of explanation, the copied first target body type model may be referred to as M ref The first target clothing model obtained by copying is marked as C ref . First target body model M ref Comprises multiple vertexes, each vertex corresponds to a vertex number, and based on this, the first target body model M can be traversed from i=1 ref A plurality of vertices thereon, wherein i is used to indicate the first target body type model M ref The vertex numbers corresponding to the plurality of vertices may be referred to as a first vertex and the first vertex may be referred to as Vm for convenience of description i And traversed first vertex Vm i Can be written asFirst normal vector->Can penetrate through the first target clothing model C ref Obtaining a plurality of penetration points which are positioned on the surface of the first target clothing model and can enable the first target clothing model C to be ref The coordinates of the penetration point on the upper are marked +.>Selecting a first vertex Vm from the first target body model in the penetration point i A penetration point closest to the first vertex Vm i To the nearest penetration point to realize the first target body type model M ref The first vertex Vm i Moving to the first target clothing model C according to the normal vector direction ref Traversing the first target body model M according to the above method ref Each vertex on the model can model the first target body type M ref Each vertex on the first target clothing model C moves to the first target clothing model C according to the corresponding normal vector direction ref To realize the first object body type model M ref Move to first target apparel model C ref Is a surface of the substrate.
Alternatively, after the first target body type model is moved to the surface of the first target clothing model, a second normal vector of a corresponding second vertex on the first target clothing model may be determined based on the first normal vector of the first vertex on the moved first target body type model, for example, the second normal vector may be obtained according to a normal vector of a vertex on the first target body type model after the vertex on the first target clothing model is moved around, and according to a method of a normal automatic smoothing tool.
In this embodiment, the vertex on the first target body type model is moved to the surface of the first target clothing model according to the normal vector direction, so that the vertex on the first target clothing model more accurately inherits the normal of the corresponding vertex on the first target body type model. For example, a portion of the underarm clothing should follow arm movements and correspond to the model vertices on the arms. The second normal vector on the first target clothing model points to the vertex in the first target body type model, so that the normal of the vertex of the model, such as buttons, decorative brooches and the like, of the folds, the undulations or accessories carried by the model on the first target clothing model are all mappings of the normal direction of the corresponding position on the first target body type model.
As an alternative embodiment, determining a second normal vector for a second vertex on the first target apparel model based on the adjusted first normal vector for the first vertex on the first target body model includes: in response to the adjusted first target body type model having a target vertex associated with a second vertex on the first target apparel model, a second normal vector is determined based on the first normal vector of the target vertex, wherein the target vertex and the second vertex are within a target area.
In this embodiment, after moving the first target body model to the surface of the first target garment model, vertices on the first garment model may be traversed and a look-up may be made as to whether there are target vertices on the first body model associated with corresponding vertices on the first garment model, and if there are target vertices on the first body model associated with second vertices on the first garment model, a second normal vector for the second vertices on the first garment model may be determined based on a first normal vector for the target vertices on the first body model, wherein the target vertices on the first body model and the second vertices on the first garment model are within a target area range, which may be determined based on a distance between the second vertices on the first garment model and the target vertices on the first body model.
For example, due to first target apparel model C ref Multiple vertexes are arranged on the first target clothing model C, and each vertex corresponds to a vertex number ref Each vertex above, wherein traversal may begin with i=1, wherein i may be used to represent first target apparel model C ref The vertex numbers of the vertices may be used to describe the first target apparel model C ref The vertex traversed up is called the second vertex, and the second vertex is marked as Vc i And let the second vertex Vc i Moving a section far beyond the first target clothing model C towards any axis ref Distance of dimension.
It should be noted that, the above method may be performed by three-dimensional software, but the three-dimensional software is required to have a soft selection function, and with the soft selection function, a part of the vertices may be selected on the first target body model, and the selected vertices on the first target body model may be selected according to the vertices Vc and the vertices themselves i The inverse of the distance of (a) is the weight to move along with the second vertex, and then the coordinate of the vertex on the first target body model can be read to judge the coordinate of the vertex and the vertex Vc i Is a positional relationship of (a) to (b). Taking X-axis as an example, the first target body type model M can be found ref The vertex coordinates of each vertex are used for obtaining the first target body model M after the current movement in the X-axis direction ref The closest shifted vertex Vc of the upper vertices i And determining the n vertices as corresponding vertices Vc on the first model of the first body type and the first model of the first garment i The n vertices can be written into the set VmSurr, and then the second normal vector of the corresponding vertex on the first target garment model can be calculated by using the automatic normal smoothing tool according to the first normal vector of the n vertices
As an alternative embodiment, the method further comprises: moving a second vertex on the first target clothing model according to the target coordinate axis, wherein the distance of the movement of the second vertex is larger than the size of the first target clothing model; and determining at least one vertex with a difference value between the coordinate value on the target coordinate axis and the coordinate value on the target coordinate axis of the moved second vertex being smaller than a first distance threshold value and/or a plurality of vertices allowed to be connected with the moved second vertex as the target vertex, wherein the included angle between the plurality of connecting lines between the moved second vertex and the plurality of vertices is smaller than a first included angle threshold value.
In this embodiment, the target coordinate axis may be any axis, and here, taking the X axis as an example, the second vertex on the first target clothing model may be moved according to the X axis, where the distance that the second vertex on the first target clothing model moves in the X axis direction is greater than the size of the first target clothing model.
After the second vertex on the first target model is moved according to the target coordinate axis, the coordinate value on the target coordinate axis of the vertex on the first target body type model can be determined, the difference between the coordinate value on the target coordinate axis of the vertex on the first target body type model and the coordinate value on the target coordinate axis of the second vertex on the moved first target clothing model can be further determined, the difference is compared with a first distance threshold, at least one vertex on the first target body type model corresponding to the difference smaller than the first distance threshold is selected from the difference, and the at least one vertex is determined to be the target vertex, wherein the first distance threshold can be preset, for example, the first distance threshold can be 3cm or 5cm, and the first distance threshold is not particularly limited.
Optionally, an angle between a normal vector of the vertex on the first target body model and a normal vector of a polygon surface where the penetration point is located is smaller than a first angle threshold, the penetration point and the composition are penetrated by the polygon F R The included angle between the lines of connection of the vertices of (a) is used by the automatic normal smoothing tool to calculate the second normal vector. The first angle threshold is used for limiting an angle between a normal vector of a vertex on the body model and a normal vector of a surface of a polygon where the penetration point is located, for example, the first angle threshold may be 90 degrees, and specific setting of the first angle threshold is not limited here.
As an alternative embodiment, determining the second normal vector based on the first normal vector of the target vertex includes: determining a smooth normal vector of a second vertex on the first target apparel model based on the first normal vector of the target vertex; the smoothed normal vector is determined as the second normal vector.
In this embodiment, after a plurality of target vertices are determined from the first target body model, the plurality of target vertices may be counted into a set, after which an automatic normal smoothing tool is utilized to determine a second normal vector for a second vertex on the first target apparel model based on the first normal vector for the target vertices.
For example, multiple target vertices may be posted to the set VmSurr, after which a second vertex Vc on the first target apparel model is posted i As internal vertexes in the automatic normal smoothing tool, each target vertex in the set VmSurr is used as a peripheral vertex and a normal vector source, and according to the vertex Vc i The distance between the connecting lines and the peripheral vertexes and the included angle between the connecting lines are used for obtaining the weights of the peripheral vertexes, so as to calculate the weight of each peripheral vertex and the corresponding first normal vector thereof and further calculate the vertex Vc i Is the optimized second normal vector of (1)
As an alternative embodiment, adjusting the first target body model according to the first normal vector of the first vertex on the first target body model includes: determining, on a first target apparel model, a first target location intersected by a first normal vector; and moving the first vertex on the first target body type model to a first target position so that the surfaces of the adjusted first target body type model and the first target clothing model are matched.
In this embodiment, as can be seen from the foregoing description, the normal vector of the vertex on the first target body type model may penetrate through the first target clothing model, and generate a plurality of penetration points on the surface of the first target clothing model, based on this, taking the first vertex in the first target body type model as an example, a plurality of penetration points where the first normal vector of the first vertex penetrates through may be determined on the first target clothing model, and a point where the angle between the normal vector of the polygon surface where the penetration point is located and the first normal vector is smaller than the first angle threshold is directly selected, that is, a point where the distance within the angle threshold is the smallest is directly selected, and the position where the penetration point closest to the vertex distance on the first target body type model is located is taken as the first target position, so that the first vertex on the first target body type model is moved to the first target position, so as to achieve the movement of the first target body type model to the surface of the first target clothing model.
For example, taking a first vertex on the first target body model as an example, assuming that the vertex number of the first vertex is i=1, the first target body model M may be traversed from i=1 ref Multiple vertices on the graph, the traversed vertices can be denoted Vm i And traversed vertex Vm i Can be written asFirst normal vector->Can penetrate through the first target clothing model C ref Obtaining a plurality of penetration points which are positioned on the surface of the first target clothing model and can enable the first target clothing model C to be ref The coordinates of the penetration point on the upper are marked +.>Selecting vertex Vm on the first target body model from the penetration points i The closest penetration point and the vertex Vm i And moving to the first target position corresponding to the nearest penetration point. Thus, the first target body type model M ref The upper vertex Vm i Moving to the first target clothing model C according to the normal vector direction ref Traversing the first target body model M according to the above method ref Each vertex on the first object can be used for connecting the first objectModel M ref Each vertex on the first target clothing model C moves to the first target clothing model C according to the corresponding normal vector direction ref To realize the first object body type model M ref Move to first target apparel model C ref Is a surface of the substrate.
As an alternative embodiment, determining a first target location intersected by a first normal vector on a first target apparel model comprises: a first target location is determined on the first target apparel model based on an original location of the first vertex on the first target body model, the first normal vector, and a second distance threshold, wherein a distance between the first target location and the original location of the first vertex is less than the second distance threshold.
In this embodiment, the original position of the first vertex on the first target body type model is used to indicate the position of the first vertex on the first target body type model when the first vertex on the first target body type model is not moving, a position of a penetration point obtained when the first normal vector of the first vertex on the first target body type model penetrates through the first target clothing model may be determined, distances between the positions of the respective penetration points and the position of the first vertex on the first target body type model are determined, the distances are compared with a second distance threshold, and a position of the penetration point on the first target clothing model smaller than the second distance threshold is determined as the first target position.
For example, for convenience of explanation, the first vertex Vm on the first target body type model may be i Is recorded as the corresponding coordinates of the original position of (a)And the first normal vector corresponding to the first vertex is marked as +.>The second distance threshold is recorded as dmax, and the vertex Vm on the first target body type model can be obtained i Is>Obtaining through the first target apparel modelAnd determining the coordinates of the multiple penetration points +.>Counting the multiple penetration points into a collection posF, traversing each penetration point in the collection posF, taking one penetration point in the collection posF as an example, and acquiring a normal vector +.>If the normal vector->Vector->If the included angle is smaller than the first included angle threshold value, further calculating the position +.>And vertex Vm i Is +.>And comparing the distance d with a second distance threshold dmax, if the distance d is smaller than the second distance threshold dmax, updating the second distance threshold dmax to d, marking the sitting of the passing-through point as a first target position, and repeating the traversing process until each passing-through point in the set posF is traversed.
As an alternative embodiment, mapping the original skin information of the original body type model onto the original clothing model based on the second normal vector to obtain the target skin information of the original clothing model, including: determining a second target position penetrated by a second normal vector and a polygon where the second target position is located on the original body model; determining a first weight of a vertex corresponding to a second target position on the polygon, wherein the first weight is used for representing the importance degree of the vertex corresponding to the second target position on the polygon; and adjusting the original skin information of the vertexes on the polygon based on the first weight to obtain target skin information.
In this embodiment, the second normal vector of the vertex on the first target garment model may intersect the original body model, and a plurality of intersecting points may be obtained, based on which a second target position intersected by the second normal vector and a polygon in which the second target position is located may be determined on the original body model.
For example, taking any vertex on the first target apparel model as an example, for convenience of explanation, the vertex is denoted as Vc i The second normal vector of the vertex is recorded asThe second normal vector->Can penetrate through the original body model M source And in the original body model M source The surface generates a plurality of penetration points, based on which an original body model M can be obtained source The surface is surrounded by a second normal vector>Second target position +.>Second target position->And the polygon F is located.
For example, each penetration point on the original body model can be traversed and the position and the vertex Vc of each penetration point can be calculated i Comparing the distance d with a second distance threshold dmax, if the distance d is smaller than the second distance threshold dmax, updating the second distance threshold dmax to d, and marking the sitting position of the passing point as a second target position, repeating the process And (5) traversing the process until all the penetration points on the original body model are traversed.
Optionally, after determining the second target position where the second normal vector penetrates and the polygon where the second target position is located, a first weight of the vertex on the polygon corresponding to the second target position may be further determined, where the first weight is used to represent an importance degree of the vertex on the polygon corresponding to the second target position.
For example, vertices on the original body model included in the polygon F may be determined, the determined vertices may be written into the set VmSurr, and then, the influence weight of each vertex in the set VmSurr on the penetration point corresponding to the polygon F may be calculated by using the neighboring point weight calculation method in the automatic normal smoothing toolAnd determining the first weight of the peripheral vertexes to the penetration point, namely determining the first weight of each vertex in the set VmSurr to the penetration point. It should be noted that, the closer a vertex in the set VmSurr is to the penetration point, the smaller the distance between the vertex and the penetration point is, and the larger the weight corresponding to the vertex is; in addition, taking a certain vertex in the set VmSurr as an example, the penetration point +. >The larger the sum of the angles of the common-edge included angles formed by the vertex in the set VmSurr and the two vertices adjacent to the vertex, the larger the weight of the vertex in the set VmSurr. According to the method, the first weight of each vertex pair penetrating point in the set VmSurr can be determined. After determining the first weights of the vertices in the set VmSurr for the penetration points, the determined first weights may be logged into the weight set Wf.
Optionally, after determining the weight of the vertex on the polygon to the vertex corresponding to the second target position, the original skin information of the vertex on the polygon may be adjusted based on the first weight, so as to obtain the target skin information.
As an optional implementation manner, adjusting the original skin information of the vertices on the polygon based on the first weight to obtain the target skin information includes: and carrying out normalization processing on the product between the first weight and the original skin information to obtain target skin information corresponding to the skeleton.
In this embodiment, as can be seen from the foregoing description, the first weight is used to represent the importance degree of the vertex on the polygon corresponding to the second target position, the original skin information is used to bind the skeleton of the virtual character to the original body model, and based on this, the product between the first weight and the original skin information may be normalized to obtain the target skin information corresponding to the skeleton.
For example, taking any vertex in the set VmSurr as an example, assume that the vertex is VmSurr k The vertex VmSurr k The first weight of Wf is recorded as k The vertex VmSurr k The corresponding original skin weight is c k The first weight Wf of the vertex can be determined k Original skin weight c to the vertex k Performing a product operation (c' k =c k *Wf k ) Obtaining a product c 'between the first weight and the original skin information' k And c' k And (c) marking the +cSum as a target accumulated weight coefficient of the vertex, and further determining the target accumulated weight coefficient as target skin information corresponding to the skeleton, wherein cSum is an original accumulated weight coefficient corresponding to the vertex.
As an alternative embodiment, determining, on the original body model, the second target position intersected by the second normal vector and the polygon at which the second target position is located includes: and determining a second target position and a polygon on the original body type model based on the original position of the second vertex on the first target clothing model, the second normal vector and a second distance threshold, wherein the distance between the second target position and the original position of the second vertex is smaller than the second distance threshold.
In this embodiment, the second normal vector of the second vertex on the first target garment model may intersect the original body model, and generate a plurality of intersecting points on the surface of the original body model, where the position of the intersecting point closest to the corresponding vertex on the first target garment model is the second target position, and the polygon on the original body model is the polygon where the intersecting point is located.
For example, the original location of the second vertex on the first target apparel model may be determined by the location coordinatesAfter determining the penetration point on the original body model, the position coordinates of the penetration point and the position coordinates of the original position of the corresponding vertex on the first target clothing model can be calculated>And comparing the calculated distance d with a second distance threshold dMax, if the distance d is smaller than the second distance threshold dMax, updating the second distance threshold dMax to d, and marking the sitting mark of the penetration point as a second target position.
As an alternative embodiment, the method further comprises: the original clothing model bound to the bone is matched to at least one second target body model based on the first target body model.
In this embodiment, the original garment model bound to the bone may also be matched to at least one second target body type model based on the first target body type model such that the original garment model fits the new body type model.
For example, the original apparel model of the bound bone may be denoted as C source The second target body type model is denoted as M source The original clothing model C source The bound bone is bound to at least one second target body model M source And matching the original clothing model bound with the bones to at least one second target body type model.
As an alternative embodiment, the method further comprises: determining a second weight of a corresponding bone in a first bone hierarchy bound by the original body model based on original skin information of a first vertex on the original body model, and determining a first coordinate vector of a vertex associated with the corresponding bone in the first bone hierarchy based on the second weight; determining a third weight of a corresponding bone in a second bone hierarchy bound by the second target body type model based on skin information of a fourth vertex on the second target body type model, and determining a second coordinate vector of a vertex associated with the second bone based on the third weight, wherein the fourth vertex corresponds to the first vertex; matching the original garment model of the bound bone to at least one second target body model based on the first target body model, comprising: the original apparel model of the bound bone is matched to a second target body model based on the first coordinate vector, the second coordinate vector, and the first target body model.
In this embodiment, all vertices on the original body model may be obtained and the obtained vertices may be posted in the set Vms, where the vertices in the set Vms correspond to vertex numbers, and each vertex in the set Vms may be traversed starting with i=1, where i is used to indicate the vertex number of the traversed vertex. The traversed vertices Vms can be read i Wherein the skin information of a vertex may comprise skin weights of a plurality of bones, and the sum of the skin weights of all bones corresponding to the vertex is 1. After the original skin information of the first vertex on the original body type model is obtained, a second weight of the corresponding skeleton in the first skeleton hierarchy bound by the original body type model can be determined, and a first coordinate vector of the vertex associated with the corresponding skeleton in the first skeleton hierarchy is determined based on the second weight.
For example, bones bound by vertices traversed in set Vms may be posted to bone set J ref And the skinning weights of each bone are written into the set WV, traversing the bone set J starting from i=1 ref Each bone J of (3) refi Acquiring traversed skeleton J refi The current locationReading all vertexes recorded in the ith row of the vertex comparison table skinTableV, recording as a set Vj, initializing an accumulated weight coefficient cSum, enabling cSum to be 0, traversing the ith row of the set skinTableW from k=1, and reading the kth column vertex Vj k To the bone J refi Skin weight c of (2) k And weight the skin c k A second weight is determined for the corresponding bone in the first bone hierarchy.
Optionally, the vertex associated with the corresponding bone in the first bone hierarchy is bone J refi All the corresponding vertexes, and the first coordinate vector of the vertex associated with the corresponding skeleton in the first skeleton hierarchy structure is skeleton J refi Average weighted coordinate vector of all vertexes corresponding to the vertex
Optionally, a third weight of a corresponding bone in the second bone hierarchy bound by the second target body type model may be determined based on skin information of a fourth vertex on the second target body type model, and a second coordinate vector of a vertex associated with the second bone may be determined based on the third weight. The method for determining the third weight of the corresponding bone in the second bone hierarchy bound to the second target body type model may refer to the method for determining the second weight described above, and will not be described herein. In addition, the method for determining the second coordinate vector of the vertex associated with the second bone based on the third weight may refer to the method for determining the first coordinate vector described above, which is not described herein.
Optionally, after determining the first coordinate vector, the second coordinate vector, and the first target body type model, the original garment model of the bound bone may be matched to the second target body type model based on the first coordinate vector, the second coordinate vector, and the first target body type model.
As an alternative embodiment, the second skeletal hierarchy is identical to the first skeletal hierarchy, wherein matching the original garment model of the bound bone to the second target body model based on the first coordinate vector, the second coordinate vector, and the first target body model comprises: obtaining a deviation vector between the second coordinate vector and the first coordinate vector; moving a corresponding bone in the first bone hierarchy based on the bias vector; and moving a first vertex on the corresponding first target body type model based on the corresponding bone in the moved first bone hierarchy structure so as to match the original clothing model bound with the bone to the second target body type model.
In this embodiment, when the original garment model of the bound bone is matched to the second target body model based on the first coordinate vector, the second coordinate vector, and the first target body model, a bias vector between the second coordinate vector and the first coordinate vector may be first obtained.
For example, assume that a second coordinate vector is availableThe first coordinate vector may be represented byThe representation may then determine the deviation vector between the second coordinate vector and the first coordinate vector by the following formula.
Wherein,may be used to represent a deviation vector between the second coordinate vector and the first coordinate vector.
After determining the deviation vector between the second coordinate vector and the first coordinate vector, the corresponding bone in the first bone hierarchy may be moved based on the deviation vector. For example, it can be arbitrarily according toDirection and distance movement of (2)Skeleton J refi Wherein, the skeleton J is moved refi When it is necessary to arrange not to affect the lower bones, according to which method all movements of bones in the first bone hierarchy can be accomplished.
Optionally, after all bones corresponding to the first bone hierarchy are moved, a first vertex on the corresponding first target body model may be moved based on the corresponding bones in the moved first bone hierarchy to match the original garment model of the bound bones to the second target body model.
As an alternative embodiment, moving the first vertex on the corresponding first target body type model based on the corresponding bone in the moved first bone hierarchy to match the original garment model of the bound bone to the second target body type model, includes: and moving the first vertex on the corresponding first target body type model to a position with a distance smaller than a third distance threshold value from the second target body type model based on the corresponding skeleton in the moved first skeleton hierarchy structure so as to match the original clothing model bound with the skeleton to the second target body type model, wherein the similarity between the moved first target body type model and the second target body type model is higher than the similarity threshold value.
In this embodiment, after moving the corresponding bone in the first bone hierarchy, the first vertex on the first target body type model corresponding to the bone may be moved to a position where the distance between the first vertex and the second target body type model is smaller than the third distance threshold based on the corresponding bone in the moved first bone hierarchy, so as to move the vertex corresponding to the corresponding bone in the first bone hierarchy to a position close to the second target body type model, and matching the original clothing model bound to the bone to the second target body type model is achieved, where the similarity between the moved first target body type model and the second body type model is higher than the similarity threshold, that is, the first target body type model is similar to the second body type model.
For example, upon completion of bone J ref After all bones move, the first object model M ref And boneIliac J ref Bind, thus bone J ref First target body type model M corresponding to each bone ref Each vertex of the model is moved to the second target body type model M target The first target body type model M is set at the approximate position ref And a second target body model M target Similarly, bind bone J ref First target apparel model C of (1) ref And a second target apparel model C target Will also follow the first target body model M ref And (5) deformation.
As an alternative embodiment, the method further comprises: determining, on the second target body model, a third target position intersected by a second normal vector of a second vertex on the first target apparel model, and a target distance between the second vertex and a penetration point on the original body model at the second target position intersected by the second normal vector; moving a vertex corresponding to the second vertex on the second target clothing model based on the second normal vector, the third target position and the target distance, wherein the second target clothing model is obtained by copying the first target clothing model; matching the original garment model of the bound bone to at least one second target body model based on the first target body model, comprising: and matching the vertexes of the second target clothing model corresponding to the second vertexes after the movement to bones bound by the second target body type model based on the first target body type model.
In this embodiment, the second normal vector of the second vertex on the first target apparel model penetrates through the second target body model, and a plurality of penetration points are obtained on the surface of the second target body model, where the penetration points are used to indicate the intersection points of the second normal vector and the surface of the second target body model, based on which, on the second target body model, a third target position where the penetration points penetrated by the second normal vector of the second vertex on the first target apparel model are located, and a target distance between the corresponding vertex and the penetration points on the second target position penetrated by the second normal vector on the original body model can be determined.
For example, a second vertex on the first target apparel model may be inscribedAs Vc i The second vertex Vc i Is the second normal vector of (2)And the second target body type model can be penetrated, and a penetration point is generated on the surface of the second target body type model, wherein the position of the penetration point is a third target position. In addition, the corresponding vertex Vc on the first target clothing model i Is>The method may also include penetrating through the original body model, generating a penetrating point on the surface of the original body model, where the penetrating point is located at a second target position, and calculating a target distance between the penetrating point at the third target position and the penetrating point at the second target position after determining the penetrating point at the third target position on the second target body model and the penetrating point at the second target position on the original body model.
Optionally, after determining the target distance between the penetration point at the third target location and the penetration point at the second target location, moving a vertex on the second target clothing model corresponding to the second vertex on the first target body type model based on the second normal vector, the third target location, and the target distance, wherein the second target clothing model is obtained by copying the first target clothing model, and the second target clothing model may be denoted as M target The corresponding vertex on the first target body model may be denoted Vm i Corresponding vertex Vm on the second target dress model to the first target body type model i The apex of the curve can be designated Vc' i
For example, a second target apparel model C may be modeled target Upper corresponding vertex Vc i Vertex Vc' i Move toAt and according to the vertex Vc i Rewriting vertex Vc 'to skin weight of skeleton set' i For bone set J target Is to be covered by the skin weight of (a)Heavy.
Optionally, when the original clothing model bound to the bone is matched to the at least one second target body model based on the first target body model, the vertex corresponding to the vertex on the first target body model on the moved second target clothing model may be matched to the bone bound by the second target body model based on the first target body model, so as to achieve the matching of the bound original clothing model to the at least one second target body model.
As an alternative embodiment, the method further comprises: responding to the target distance between the second vertex and a penetrating point on a second target position, which is penetrated by a second normal vector, on the original body type model, wherein the target distance is larger than or equal to a fourth distance threshold value, and/or the included angle between the normal on the surface of the first target clothing model and the normal on the surface of the original body type model is larger than or equal to a second included angle threshold value, and acquiring a fourth target position of the vertex with the smallest distance from the second vertex in the second target body type model; acquiring an original position of a second vertex, and pointing to a target vector of the position of a vertex with the minimum distance between the original body model and the second vertex; moving a vertex corresponding to the second vertex on the second target clothing model based on the fourth target position and the target vector, wherein the second target clothing model is obtained by copying the first target clothing model; matching the original garment model of the bound bone to at least one second target body model based on the first target body model, comprising: and matching the vertexes of the second target clothing model corresponding to the second vertexes after the movement to bones bound by the second target body type model based on the first target body type model.
In this embodiment, since the second normal vector of the second vertex on the first target clothing model may intersect the original body model, and a plurality of intersecting points may be generated on the surface of the original body model, based on this, a target distance between the second vertex on the first target clothing model and the intersecting point on the second target position intersected by the second normal vector on the original body model may be determined, and the target distance may be compared with a fourth distance threshold, and in response to the target distance being greater than or equal to the subordinated distance, a fourth target position of the vertex in the second target body model having the smallest distance from the second vertex may be obtained.
For example, each vertex Vs on the set skip may be traversed starting with i=1 i Wherein, recorded in the set skip is a penetration point on the first target clothing model, and a second target body type model M is obtained target Upper and the vertex Vs i Vertex coordinates of closest vertices
Optionally, the fourth target position of the vertex in the second target body type model with the smallest distance from the second vertex may also be obtained by an angle between a normal on the surface of the first target apparel model and a normal on the surface of the original body type model.
For example, a first target apparel model C may be determined ref Normal on the surface of (c) and original body model M source Included angle between normals on the surface of (C) and comparing the determined included angle with a second included angle threshold, in response to the first target apparel model C ref Normal to the surface of (c) and the original body model M source And when the included angle between the normals on the surface of the model is greater than or equal to the second included angle threshold, a fourth target position of the vertex with the smallest distance from the second vertex in the second target body type model can be obtained.
Alternatively, the target vector pointing from the original position of the second vertex to the position of the vertex with the smallest distance from the second vertex on the original body model may be obtained based on the original position of the second vertex on the first target body model.
For example, the second vertex on the first target body model may be denoted as Vs i The vertex coordinates corresponding to the vertex can be written asCan be obtained from the second vertex Vs i Direction to original body model M source Upper and the vertex Vs i Mesh of closest vertexAnd (5) marking the vector.
Optionally, after determining the fourth target position and the target vector, moving the vertex corresponding to the second vertex on the second target clothing model based on the fourth target position and the direction of the target vector, where the second target clothing model is obtained by copying the first target clothing model.
Optionally, when the original clothing model bound to the bone is matched to at least one second target body model based on the first target body model, the vertex of the second target clothing model after the movement corresponding to the second vertex of the first target body model may be matched to the bone bound by the second target body model based on the first target body model.
The technical solution of the embodiment of the present invention is further illustrated below in conjunction with the preferred embodiments.
At present, no matter the virtual clothes of the virtual film and television roles or the virtual game roles are virtual clothes, a model is bound through bones so that the motions of the bones control the motions of the virtual roles and the virtual clothes on the virtual roles, but as each virtual role has a plurality of sets of virtual clothes which can be replaced, the models of the same set of virtual clothes, decoration accessories thereof and the like are also required to be adapted to different virtual roles, the binding work generally needs to be automatically bound, and then the skin weight is manually adjusted so that the virtual clothes are adapted to different body types, and the vertexes of all parts need to be manually scaled, moved or rotated in the adjustment process, so that the binding effect is difficult to meet the requirement, the manual adjustment takes longer time and the efficiency is lower.
In the related art, the effect of automatically binding or mapping the skin weights is poor, an algorithm is dead, the skin weights are usually calculated according to the distance between the vertex of the body model and the skeleton or between the vertex of the body model template, but the wrong vertex or skeleton of the body model, especially a loose garment or accessory model, can be frequently identified according to the vertex distance, the wrong body part is very easy to identify, the binding effect is usually difficult to meet the requirement, the manual adjustment efficiency is low, the binding effect of each set of garment model and different body models is not uniform, the mistakes and the leaks easily occur, and long manufacturing time is required to be consumed; the adaptation dress model can only manually modify each vertex on the model to adapt to different body types, and cannot automatically process, the workload increases in geometric progression along with the increase of the number of roles and the number of dress, and the technical problem of low binding efficiency of the body type model and the dress model exists.
However, the embodiment of the application provides a model processing method, which can accurately map skin information on a body type template to various clothing models after the skeleton is bound with the body type template, so that the clothing can move along with the corresponding body part, and in addition, a set of clothing models can be automatically adapted to different body types, and the skin binding information is reserved, so that time and labor are saved.
The principle of the model processing method provided by the embodiment of the application is described next.
And copying the original body model, moving the vertexes of the original body model to the surface of the original clothing model to be bound or adapted according to the normal direction of the vertexes on the original body model, taking the vertexes as a reference, calculating the weighted normal vector of the vertexes on the original clothing model according to the distance between the vertexes on the original clothing model and the peripheral vertexes on the original body model and the included angle between the vertexes on the original clothing model and the peripheral vertexes on the original body model, and calculating the position coordinates of the vertexes on the original clothing model penetrating through the surface of the original body model template along the vector by taking the vector as the reference.
When the original body type model and the original clothes model are bound, calculating the skin information of the corresponding vertex on the original clothes model according to the skin information of the vertex of the original body type model, and binding bones; when the original body model is adapted, the distance from the coordinate to the vertex of the original clothing model is recorded, the original body model is copied to obtain a target body model, different weighted position coordinates of the vertex of the same skeleton are bound between the original body model and the target body model, the skeleton bound by the original body model is adjusted, the weighted positions of the vertex bound by the same skeleton are the same, the positions of all parts of the original clothing model are approximately adjusted, and then the distance between the recorded vertex of the original clothing model and the original body model template model is adjusted to adjust the distance between the penetrating point of the vertex of the original clothing model penetrating through the surface of the target body model along the normal direction, so that the adaptation of the body type is finally completed.
Next, a control module for executing the processing method of the model of the embodiment of the present application will be described.
Fig. 3 is a schematic diagram of a control module of a model according to one embodiment of the disclosure, and as shown in fig. 3, the control module of the processing method of the model includes a calculation module S1, a control module S2, and a control module S3, where the control module S2 and the control module S3 belong to the control module. The calculation module S1 is adapted to the control module S2 and the control module S3 to implement different functions, wherein the control module S2 is configured to adapt the bound clothing model to different body type models, and the control module S3 is configured to bind the clothing model to the existing body type model.
FIG. 4 is a flowchart of a method for obtaining a penetration point on an original body model according to one embodiment of the present disclosure, as shown in FIG. 4, the method comprising the steps of:
step S401, all penetration points of the original body model and polygons where the penetration points are located are obtained.
In this embodiment, the input original body model M can be arbitrarily set to spatial coordinatesThrough->Is>Inputting a polygonal algorithm, for example, a ray hitresh algorithm to obtain the pass position +.>Radiation of->Coordinates of all penetration points passing through the original body model M and the polygon in which they are located include +. >Two sides (at the left and right)>Because the original clothing model may cross the body model due to the quality problem, the original body model appears outside the clothing, i.e. the negative direction of the inputted normal. FIG. 5 is a schematic cross-sectional view of an original body model and an original garment model, illustrating the coordinates of the points of penetration into the set posF, the polygons to be penetrated into the set F, if rays, according to one embodiment of the present disclosureAnd does not pass through any polygon, a "null" result is returned to the upper level module.
Step S402, the coordinates of all the penetration points of the original body model are obtained.
In this embodiment, since it is possible to pass through the model M a plurality of times because of the rays dir emanating from pos, a plurality of pass-through points are formed, based on which the set posF can be traversed starting from i=1, where i is used to indicate the number of pass-through points in the set posF. Acquiring coordinates of a penetration pointAcquiring a polygon F corresponding to a penetration point from a set F i And obtain its surface normal +.>If the surface normal->Vector->Is small in included angleIn maxA (90 degrees empirically) then calculate +.>To->Distance of (2)If d<dMax, d is denoted as new dMax, +.>Marked as new vector coordinates->Polygon F to be penetrated i Denoted as F R After the traversal of all the penetration points is completed, the ray penetration point coordinates which are closest to the input coordinates on the surface which is in the same direction as the input vector on the original body model are obtained>And its distance d from the input coordinates, and a polygon F to be intersected R And finally, returning the result to the upper-level module.
FIG. 6 is a flowchart of a method of mapping skin information of an original body type template model onto an original apparel model, as shown in FIG. 6, according to one embodiment of the present disclosure, the method including the steps of:
step S601, acquiring a first target body type model and a first target clothing model.
In this embodiment, the original apparel model to be bound is noted as C target The original body model used as the source of skin binding information is recorded as M source Handle M source The bound bone is denoted J source Copy C target And M source Obtaining a first target clothing model C ref And a first target body model M ref The copied first target clothing model C ref And a first target body model M ref Will be used as a reference for calculating the data.
Step S602, moving the vertex on the first target body type model to the first target clothing model.
In this embodiment, the first target body type model M may be traversed starting from i=1 ref Each vertex Vm i To the normal vector thereofCoordinates->First target apparel model C ref And a search distance limit dMax input calculation module S1, wherein the search distance limit dMax is used for indicating the slave coordinate +.>The maximum distance to the penetration point is ignored if the distance exceeds the maximum distance, and dMax is empirically 40, which is used for normal mannequin made in mm, and can be adjusted by the manufacturer according to the degree of loose clothing model. Obtaining a first decoration model C ref Upper zenith Vm i Closest point coordinates intersected by the normal vector of (2)>Vertex Vm i Move to->And (if the calculation module S1 returns a null result, no processing is performed).
In this embodiment, the first target body type model M is obtained by deforming the vertices of the original body type model ref The upper vertex moves to the first target clothing model C according to the normal direction of the upper vertex ref For subsequent calculation of model C ref M around each vertex normal line ref The vertex normals on the model are used as the calculation basis.
Step S603 determines a normal vector of a vertex on the first target garment model that corresponds to the vertex on the first target body model.
In this embodiment, C is traversed starting from i=1 ref Each vertex Vc on the model i Wherein i is used for indicating C ref Vertex number of vertices on the model. Can start soft selection in three-dimensional software, set linear attenuation and make vertex Vc i Move to any axis (e.g., X-axis forward direction) for a period far beyond the current C ref Model size distance and find the first target body model M ref The coordinates of each vertex are used to obtain the first target body model M in the X-axis direction ref The coordinates of each vertex are closest to the vertex Vc i Is denoted as the set VmSurr, where n is used to indicate the vertices on the body model, 4 may be empirically taken, after which the vertices Vc may be smoothed by an automatic normal smoothing tool i As internal vertexes in the automatic normal smoothing tool, each vertex of the set VmSurr is taken as a peripheral vertex, the weight of the peripheral vertex is obtained according to the distance between the connecting line of the vertex Vci and the peripheral vertex and the included angle between the connecting line, the optimized normal vector of the Vci is calculated according to the weight of each vertex of the peripheral and the normal thereof, and the vertex Vc is calculated according to the normal vector of each vertex in the set VmSurr i Is a smooth normal vector of (2)And corrects the normal thereof. Fig. 7 is a normal correction contrast diagram according to one embodiment of the present disclosure.
In this embodiment, M is ref The vertices on the model are moved to the surface of the clothing model according to the normal direction of the vertices, in order to allow C ref Vertices on the model inherit M more accurately ref Normal to the corresponding vertex on the model, rather than M in the initial state ref The normal of the closest vertex of the model (e.g. part of the clothing under the armpit should follow the arm movement and correspond to the model vertex on the arm, but in the initial state its vertex position will usually be closer to the template model M ref Thereby causing the problem of erroneous calculation of the normal) Allowing the normal line of each vertex on the first target clothing model to point to the corresponding position on the first target body type model, at this time, the first target clothing model C ref All model vertex normals, whether wrinkles, undulations, or attachments carried on the model, such as buttons, decorative brooches, are the first target body type model M ref The mapping of the normal direction of the corresponding position can facilitate the subsequent calculation of the first target clothing model C ref And (3) penetrating through points of normal vector between each vertex and the surface of the first target body type model, and taking vertex skins around the template model projection points corresponding to the vertices as sampling basis of skeleton binding skin weights. Fig. 8 is a contrast schematic of normal modification on a first target apparel model in accordance with an embodiment of the present disclosure.
Step S604, binding the skin information of the original body type model to the original clothing model.
In this embodiment, the first model C is traversed starting from i=1 ref Each vertex Vc i And the vertex Vc i Normal vector of (a)Coordinates->First decoration model C ref And a search distance limit dMax is input to the calculation module S1. Obtaining an original body model M source Upper quilt vertex Vc i Penetration point coordinates penetrated by normal vector of (2)>And the polygon F where the vertex is positioned, each vertex on the original body model contained in the polygon F is obtained and recorded into a set VmSurr, and the influence weight of each vertex on the set VmSurr on the penetration point is calculated according to the adjacent point weight calculation method shown in the automatic normal smoothing tool. The principle is as follows: the closer the vertices on the set VmSurr are +.>The vertex is->The smaller the distance between the vertices, the greater the weight corresponding to the vertices; in each vertex on VmSurr, by +.>The larger the sum of the angles of two common-edge included angles formed by a certain vertex and two adjacent vertexes on the corresponding VmSurr is, the larger the weight corresponding to the vertex is, and the weight corresponding to each vertex on the set VmSurr is recorded into the set Wf.
Initializing a skeleton weight table skinTableW and an accumulated weight coefficient cSum, letting cSum=0, traversing the set VmSurr from k=1, and reading the vertex VmSurr k All involved bones are written into column 1 of the skinTableW (no duplication of records is required if the bones are already recorded in the table), and the corresponding skin weight value c k And vertex VmSurr k The corresponding vertex weight Wf k Product c of (2) k ′(c′ k =c k *Wf k ) Record a new column of the row in the skeltew corresponding to the bone, and store c' k +csum is denoted as new cSum. After traversing each vertex on VmSurr, obtaining bones related to all vertexes and products of skin information and weights corresponding to the bones, normalizing all weights in the skinTableW, namely, normalizing each weight c' k Recording replacement ofThen, sum the values of all columns from the second column in each row, and finally bind C according to the skin information in the skinTableW target Upper corresponding vertex Vc i Vertex Vc' i Then the calculation of the next vertex is started. Completion C targe After the skin information of all the top points is written in, the original body model M source The upper skin binding information will be mapped precisely to the target apparel model C target At this time, C copied in the process can be cleaned up ref ,M ref And the like.
Through the steps S601 to S604, the original body type model and the original clothing model can be bound, so that the original clothing model can inherit skin information of the original body type model, and the original body type model can adapt to different original clothing models.
Fig. 9 is a flowchart of a method of adapting an original apparel template to an original body type model, as shown in fig. 9, according to one embodiment of the present disclosure, the method including the steps of:
step S901, a second target clothing model and a second target body type model are acquired.
In this embodiment, the original apparel model may be denoted as C source Is combined with the original clothing model C source The adapted original body model is denoted as M source Marking the second target body type model to be adapted as M target Handle M target The bound bone is denoted J target . Handle C source 、M source Together with the bound bone set J, the replicated clothing model is denoted as the first target clothing model C ref The copied body model is recorded as a first target body model M ref The replicated bones are recorded into the set J according to a hierarchical tree relationship ref Copy C again ref And M ref Obtaining a second target clothing model C target And a second target body model M target . Letting the second target clothing model C target Still with bone J ref Binding, replicated first target apparel model C ref First target body model M ref Skeleton J ref Will be used as a reference for calculating the data.
In this embodiment, the reason for performing the two copies of the original body type model and the original clothing model is that, since the first copy is the intermediate product for calculation, the intermediate product becomes a destroyed state in the process of calculating the final result, and the second copy is the desired target model, the desired target model can be obtained by adjusting the second copy model by the calculation result of the intermediate product.
Step S902, moving the vertex on the first target body type model to the first target clothing model.
In this embodiment, the first target body type model M is moved in the direction of its normal line by the method described in the foregoing steps S602 and S603 ref From the upper vertex to first target apparel model C ref Calculating and correcting C ref Normal line of each vertex, let first target clothing model C ref The normals of all the vertices are the first target body type model M ref Mapping of normal direction of the corresponding position.
Step S903, traversing each vertex on the first target apparel model.
In this embodiment, first target apparel model C is traversed starting with i=1 ref Each vertex Vc i The corrected normal vectorCoordinates->Original body model M source And a search distance limit dMax is input to the calculation module S1. Obtaining the vertex Vc i And original body model M source The distance D of the surface vector penetrating points is recorded into a set D according to the sequence of the vertexes in the first target clothes model dif If the result returned by the calculation module S1 is "null", the vertex Vc is then i Record set skip, repeat this step until C is completed ref The traversal of each vertex. If the result returned by the calculation module S1 is "null", it indicates that there is no penetration point meeting the condition, where the condition is: penetration point and vertex Vc i The distance between the two model surface normal angles is within a set threshold value, and the included angle between the two model surface normal angles does not exceed the set threshold value.
In step S904, each vertex in the set skip is traversed.
In this embodiment, each vertex Vs on the set skip may be traversed starting with i=1 i Acquiring its coordinatesObtaining an original body model M source Upper and the vertex Vs i Nearest vertex coordinates>Steering vector The ith bit of the set skip dir is entered and this step is repeated until the traversal of each vertex in the set skip is completed.
Step S905, the skin weights of all vertices on the original body model are obtained.
In this embodiment, the original body model M can be obtained source All the vertexes are marked as a set Vms, and a blank skin weight table skinTableW, a vertex comparison table skinTableV, a skeleton corresponding vertex position table skinTableD and a vertex position weight table skinTableC are established. Traversing the set Vms starting from i=1 and performing the following: read vertex Vms i Wherein (a vertex may contain the skin weights of a plurality of bones, the sum of the skin weights of all bones corresponding to the vertex being 1), the bones involved are denoted as set JV, the skin weights corresponding to each bone are denoted as set WV, the set JV is traversed starting from k=1, the set J is traversed starting from ref Find skeletal JV k Corresponding number n, vertex Vms i Record a new column of the n-th row of the comparison table skinTableV, and store the corresponding skeleton JV k Skin weight WV of (2) k And (5) recording a new row and a new column of the weight table skinTableW, so as to ensure that the positions of the vertexes, bones and weights in the table are completely matched. After completing the traversal of the vertices in the set Vms, a complete skin weight and vertex lookup table is obtained.
Step S906, obtaining an average weighted coordinate vector set of all vertexes corresponding to each bone in the bone set bound by the second target body type model.
In this embodiment, bone set J may be traversed starting from i=1 ref Each bone of (3)Obtain the current position +.>Reading all vertexes recorded in the ith row of the vertex comparison table skinTableV, recording as a set Vj, initializing an accumulated weight coefficient cSum, enabling cSum to be 0, traversing the ith row of the set skinTableW from k=1, and reading the kth column vertex Vj k For bone->Skin weight c of (2) k Let->To obtain bone->Weighting coefficients of the weighted positions of all the vertices related and c' k +cSum is denoted as new cSum, c k ' record the kth column of the ith row of the vertex position weight table, skinTableC.
After finishing traversing all vertexes recorded on the ith row of the skinTableV, carrying out normalization processing on all numerical values of the ith row of the vertex position weight table skinTableC, namely replacing the value of the kth column of the ith row of the skinTableC with the value of the kth column of the skinTableCThe set Vj is traversed. Reading the ith row vertex Vj on the skintableev again starting from k=1 k Current coordinates->The product of the coordinate vector and the normalized corresponding weight coefficient is +>The ith row and the kth column of the corresponding vertex position table skeltabled of the skeleton are recorded.
After the traversal of all vertices of all ith rows is completed, all vectors of the table skinTableD ith rows are added and recorded asThen->For bone->The average weighted coordinate vector of all vertices corresponding to +.>The ith bit of the weighted coordinate vector set PosSource is entered.
Target body type template model M with same bound skeleton hierarchy structure target All the vertices perform the above operations to obtain the second target body model M target And an average weighted coordinate vector set PosTarget of all vertexes corresponding to each skeleton in the bound skeleton set J.
Step S907 moves the vertices of the first target body type model to the first target apparel model surface.
In this embodiment, set J is traversed starting from i=0 ref Calculating position deviation vectors of vector vertex sets one by oneThere is->Press->Is to move bone +.>(movement)The bones need to be set to be not affected by the lower bones) to complete the collection J ref After all bones move, the first object model M ref And bone J ref Bind, thus J ref M is corresponding to each bone ref The vertices are moved to the second target body type model M target Close position, let M ref Becomes equal to M target Similarly, bind bone J ref First target apparel model C of (1) ref And C target Will also follow M ref Deformed, after deformation, C can be deleted ref 、C target And M ref Binding information on the model enables the model not to be influenced by bones any more, so that subsequent operation is convenient.
Step S908, determining the skin weights of the vertices on the second target apparel model based on the skin weights of the vertices on the first target apparel model.
In this embodiment, first target apparel model C is traversed starting with i=1 ref Each vertex Vc i If the vertex Vc i Belonging to the set skip, temporarily skipping the vertex, otherwise, turning the vertex Vc i Normal vector of (a)New coordinates after deformation->Second target body model M target And a search distance limit dMax input calculation module S1 for obtaining the vertex Vc i Rays along the normal direction and a second target body model M target Intersection coordinates of surfaces>If the calculation result returned by the calculation module S1 is "null", the vertex Vc is skipped i If the returned result is not "null", then find the vertex in set D dif The distance deviation value d between the target clothing model C and the body model surface recorded in the model C target Upper corresponding vertex Vc i Vertex Vc' i Move to->At and according to the vertex Vc i Rewriting vertex Vc 'to skin weight of skeleton set J' i For bone set J target Wherein, the vertex Vc' i For the second target clothing model and the first target clothing model C ref Upper vertex Vc i Vertices with consistent sequence numbers.
Step S909, determining the weight of the vertex to bone set skin on the second target apparel model.
In this embodiment, each vertex Vs on the set skip is traversed starting with i=1 i Acquiring a second target body model M target Upper and the vertex Vs i Closest vertex coordinatesObtaining vertex Vs from the ith bit of the set skip dir i Direction vector->Finally, second target clothing model C target Upper corresponding vertex Vc i Vertex Vc' i Move toAnd according to C source The covering weight of the corresponding vertex on the skeleton set J is rewritten into the vertex Vc' i For bone set J target Is used for the skin weight of the steel sheet.
Step S910, traversing all vertexes on the second target clothing model to obtain a second clothing model adapted to the second target body type model.
In this embodiment, traverse C target After all vertexes, the aptamer model M can be obtained target Is a clothing model C of (2) target And clothing model C target Automatic inheritance and skeleton J target At this point, C copied during the cleaning process ref ,M ref ,J ref Isoskeletons and models.
Through the steps S901 to S910, the original clothing model can be adapted to different body type models, so that the clothing model moves along with the movement of the body type model, the animation effect after the binding of the clothing model and the body type model is improved, and the binding efficiency of the clothing model and the body type model is improved.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present disclosure may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), including several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method described in the embodiments of the present disclosure.
The embodiment also provides a processing device of the model, which is used for implementing the above embodiment and the preferred implementation manner, and the description is omitted. As used below, the terms "unit," "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 10 is a block diagram of a processing apparatus of a model according to an embodiment of the present disclosure, and as shown in fig. 10, a processing apparatus 1000 of the model includes: a first determining unit 1001, a second determining unit 1002, a mapping unit 1003, and a binding unit 1004.
The first determining unit 1001 is configured to determine an original body type model of the virtual character, and at least one original clothing model to be matched with the original body type model.
The second determining unit 1002 is configured to determine, based on a first normal vector of a first vertex on the original body model, a second normal vector of a second vertex on the original clothing model, where the first vertex corresponds to the second vertex, and the second normal vector points to a third vertex in the original body model.
And a mapping unit 1003, configured to map the original skin information of the original body model onto the original clothing model based on the second normal vector, to obtain target skin information of the original clothing model, where the original skin information is used to bind bones of the virtual character to the original body model, so that the original body model moves along with movements of the bones.
A binding unit 1004 for binding the skeleton to the apparel model based on the target skin information such that the original apparel model moves following the movement of the skeleton.
Optionally, the second determining unit 1002 further includes: the copying module is used for copying the original body type model to obtain a first target body type model, and copying the original clothing model to obtain a first target clothing model; the moving module is used for adjusting the first target body type model according to a first normal vector of a first vertex on the first target body type model, wherein the adjusted first target body type model is matched with the surface of the first target clothing model; the first determining module is configured to determine a second normal vector of a second vertex on the first target apparel model according to the adjusted first normal vector of the first vertex on the first target body type model, where the second normal vector points to a third vertex in the first target body type model.
Optionally, the determining module includes: and the first determining submodule is used for determining a second normal vector based on the first normal vector of the target vertex in response to the existence of the target vertex which is associated with the second vertex on the first target clothing model on the adjusted first target body type model, wherein the target vertex and the second vertex are in the target area range.
Optionally, the processing device 1000 of the model further includes: the moving unit is used for moving a second vertex on the first target clothing model according to the target coordinate axis, wherein the moving distance of the second vertex is larger than the size of the first target clothing model; and the third determining unit is used for determining at least one vertex, which is smaller than the first distance threshold, of the difference value between the coordinate value on the target coordinate axis and the coordinate value on the target coordinate axis of the moved second vertex and/or a plurality of vertices, which are allowed to be connected with the moved second vertex, on the first target body type model as the target vertex, wherein the included angle between the moved second vertex and a plurality of connecting lines between the plurality of vertices is smaller than the first included angle threshold.
Optionally, the determining submodule is further used for determining a smooth normal vector of a second vertex on the first target clothing model based on the first normal vector of the target vertex; the smoothed normal vector is determined as the second normal vector.
Optionally, the mobile module further comprises: the second determining submodule is used for determining a first target position penetrated by the first normal vector on the first target clothing model; and the moving sub-module is used for moving the first vertex on the first target body type model to the first target position so as to move the first target body type model to the surface of the first target clothing model.
Optionally, the second determining submodule is further configured to determine a first target position on the first target clothing model based on the original position of the first vertex on the first target body type model, the first normal vector and the second distance threshold, wherein a distance between the first target position and the original position of the vertex is smaller than the second distance threshold.
Optionally, the mapping unit further includes: the second determining module is used for determining a second target position penetrated by a second normal vector and a polygon where the second target position is located on the original body type model; the third determining module is used for determining a first weight of the vertex corresponding to the second target position on the polygon, wherein the first weight is used for representing the importance degree of the vertex corresponding to the second target position on the polygon; the adjusting module is used for adjusting the original skin information of the vertexes on the polygon based on the first weight to obtain target skin information.
Optionally, the adjusting module further includes: and the processing sub-module is used for carrying out normalization processing on the product between the first weight and the original skin information to obtain target skin information corresponding to the skeleton.
Optionally, the second determining module further includes: and a third determining sub-module for determining a second target position and a polygon on the original body type model based on the original position of the second vertex on the first target garment model, the second normal vector and a second distance threshold, wherein a distance between the second target position and the original position of the second vertex is smaller than the second distance threshold.
Optionally, the processing device 1000 of the model further includes: and the matching unit is used for matching the original clothing model bound with the bones to at least one second target body type model based on the first target body type model.
Optionally, the processing device 1000 of the model further includes: a fourth determining unit, configured to determine, based on original skin information of a first vertex on the original body type model, a second weight of a corresponding bone in a first bone hierarchy bound by the original body type model, and determine, based on the second weight, a first coordinate vector of a vertex associated with the corresponding bone in the first bone hierarchy; the fifth determining unit is configured to determine a third weight of a corresponding bone in the second bone hierarchy bound by the second target body type model based on skin information of a fourth vertex on the second target body type model, and determine a second coordinate vector of a vertex associated with the second bone based on the third weight, where the fourth vertex corresponds to the first vertex, and the matching unit further includes a matching module configured to: the original apparel model of the bound bone is matched to a second target body model based on the first coordinate vector, the second coordinate vector, and the first target body model.
Optionally, the matching module further includes: the acquisition sub-module is used for acquiring a deviation vector between the second coordinate vector and the first coordinate vector; a first movement submodule for moving a corresponding bone in the first bone hierarchy based on the bias vector; and the second moving submodule is used for moving the upper vertex of the corresponding first target body type model based on the corresponding skeleton in the moved first skeleton hierarchy structure so as to match the original clothing model of the bound skeleton to the second target body type model.
Optionally, the second moving submodule is further configured to move the first vertex on the corresponding first target body type model to a position where a distance between the first vertex and the second target body type model is smaller than a third distance threshold based on the corresponding bone in the moved first bone hierarchy structure, so as to match the original clothing model of the bound bone to the second target body type model, where the similarity between the moved first target body type model and the second target body type model is higher than the similarity threshold.
Optionally, the processing apparatus 800 of the model further includes: a sixth determining unit, configured to determine, on the second target body type model, a third target position intersected by a second normal vector of a second vertex on the first target clothing model, and a target distance between the second vertex and a penetration point on the original body type model at the second target position intersected by the second normal vector; the moving unit is used for moving the vertex corresponding to the second vertex on the second target clothing model based on the second normal vector, the third target position and the target distance, wherein the second target clothing model is obtained by copying the first target clothing model; the matching unit is also used for: and matching the vertexes of the second target clothing model after movement, which correspond to the vertexes of the first target model, to bones bound by the second target body model based on the first target body model.
Optionally, the processing device 800 of the model further includes: the first obtaining unit is used for responding to the target distance between the second vertex and a penetrating point on a second target position, which is penetrated by a second normal vector, on the original body type model, and is larger than or equal to a fourth distance threshold value, and/or the included angle between the normal on the surface of the first target clothing model and the normal on the surface of the original body type model is larger than or equal to a second included angle threshold value, so as to obtain a fourth target position of the vertex with the smallest distance from the second vertex in the second target body type model; a second acquisition unit configured to acquire a target vector directed from an original position of the second vertex to a position of a vertex on the original body model at which a distance from the second vertex is smallest; the moving unit is used for moving the vertex corresponding to the second vertex on the second target clothing model based on the fourth target position and the target vector, wherein the second target clothing model is obtained by copying the first target clothing model; the matching unit is further configured to match, based on the first target body type model, a vertex on the moved second target clothing model that corresponds to the second vertex to a bone to which the second target body type model is bound.
In the processing device of the model of the embodiment, the original skin information of the original body type model can be mapped onto the original clothing model through the normal vector to obtain the target skin information of the original clothing model, and the original skin information is used for binding bones of virtual roles to the original body type model so that the original body type model moves along with the movement of the bones, so that the clothing model moves along with the movement of the bones based on the binding bones of the target skin information to the clothing model, the skin information on the original body type template can be accurately mapped onto various clothing models to enable the clothing model to move along with body parts corresponding to the body type model, in addition, a set of clothing models can be automatically adapted to different body type models, the skin binding information of the clothing models is reserved, time and labor are saved, the binding efficiency of the model is improved, and the technical problems of low binding efficiency and poor binding effect of the body type model and the clothing model are solved.
It should be noted that each of the above units and modules may be implemented by software or hardware, and the latter may be implemented by, but not limited to: the units and the modules are all positioned in the same processor; alternatively, the units and modules are located in different processors in any combination.
Embodiments of the present disclosure also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described computer-readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Alternatively, in this embodiment, the above-mentioned computer-readable storage medium may be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.
Alternatively, in the present embodiment, the above-described computer-readable storage medium may be configured to store a computer program for performing the steps of:
s1, determining an original body type model of the virtual character and at least one original clothing model to be matched with the body type model.
S2, determining a second normal vector of a second vertex on the original clothing model based on a first normal vector of a first vertex on the original body model, wherein the first vertex corresponds to the second vertex, and the second normal vector points to a third vertex in the original body model.
And S3, mapping the original skin information of the original body type model to the original clothing model based on the second normal vector to obtain target skin information of the original clothing model, wherein the original skin information is used for binding bones of the virtual roles to the original body type model so that the original body type model moves along with the movement of the bones.
And S4, binding bones to the clothing model based on the target skin information so that the original clothing model moves along with the movement of the bones.
In the computer readable storage medium of this embodiment, the original skin information of the original body type model may be mapped onto the original clothing model through the normal vector to obtain the target skin information of the original clothing model, since the original skin information is used to bind the skeleton of the virtual character to the original body type model, so that the original body type model moves along with the movement of the skeleton, binding the skeleton to the clothing model based on the target skin information, so that the clothing model moves along with the movement of the skeleton, the skin information on the original body type template may be precisely mapped onto various clothing models, so that the clothing model moves along with the body part corresponding to the body type model, in addition, a set of clothing models may be automatically adapted to different body type models, and the skin binding information thereof may be retained, so that the time and labor are saved, the model binding efficiency is improved, and the technical problems of low binding efficiency and poor clothing binding effect of the body type model and the clothing model are solved.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a computer readable storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present application, a computer-readable storage medium stores thereon a program product capable of implementing the method described above in this embodiment. In some possible implementations, aspects of the disclosed embodiments may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the disclosure as described in the "exemplary methods" section of the disclosure, when the program product is run on the terminal device.
A program product for implementing the above-described method according to an embodiment of the present disclosure may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the embodiments of the present disclosure is not limited thereto, and in the embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
Any combination of one or more computer readable media may be employed by the program product described above. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It should be noted that the program code embodied on the computer readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Embodiments of the present disclosure also provide an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, determining an original body type model of the virtual character and at least one original clothing model to be matched with the body type model.
S2, determining a second normal vector of a second vertex on the original clothing model based on a first normal vector of a first vertex on the original body model, wherein the first vertex corresponds to the second vertex, and the second normal vector points to a third vertex in the original body model.
And S3, mapping the original skin information of the original body type model to the original clothing model based on the second normal vector to obtain target skin information of the original clothing model, wherein the original skin information is used for binding bones of the virtual roles to the original body type model so that the original body type model moves along with the movement of the bones.
And S4, binding bones to the clothing model based on the target skin information so that the original clothing model moves along with the movement of the bones.
In the electronic device of the embodiment, a technical scheme is provided, original skin information of an original body type model can be mapped onto the original clothing model through a normal vector to obtain target skin information of the original clothing model, and the original skin information is used for binding bones of virtual roles to the original body type model so that the original body type model moves along with movement of the bones, so that the bones are bound to the clothing model based on the target skin information, the clothing model can move along with movement of the bones, skin information on the original body type template can be accurately mapped onto various clothing models, the clothing model can be enabled to move along with body parts corresponding to the body type model, in addition, a set of clothing model can be automatically adapted to different body type models, skin binding information of the clothing model is reserved, time and labor are saved, the binding efficiency of the model is improved, and the technical problems that the binding efficiency of the body type model and the clothing model is low, and the binding effect is poor are solved.
Fig. 11 is a schematic diagram of an electronic device according to an embodiment of the disclosure. As shown in fig. 11, the electronic device 1100 is merely an example, and should not be construed as limiting the functionality and scope of use of the disclosed embodiments.
As shown in fig. 11, the electronic apparatus 1100 is embodied in the form of a general purpose computing device. Components of the electronic device 1100 may include, but are not limited to: the at least one processor 1110, the at least one memory 1120, a bus 1130 connecting the various system components including the memory 1120 and the processor 1110, and a display 1140.
Wherein the memory 1120 stores program code that can be executed by the processor 1110 such that the processor 1110 performs the steps according to various exemplary implementations of the present disclosure described in the above method section of the embodiment of the present application.
The memory 1120 may include a readable medium in the form of a volatile memory unit, such as a Random Access Memory (RAM) 11201 and/or a cache memory 11202, and may further include a Read Only Memory (ROM) 11203, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
In some examples, memory 1120 may also include program/utility 11204 having a set (at least one) of program modules 11205, such program modules 11205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. The memory 1120 may further include memory remotely located relative to the processor 1110, which may be connected to the electronic device 1100 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Bus 1130 may be a local bus representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, and processor 1110 using any of a variety of bus architectures.
Display 1140 may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of electronic device 1100.
Optionally, the electronic apparatus 1100 may also communicate with one or more external devices 1200 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic apparatus 1100, and/or with any device (e.g., router, modem, etc.) that enables the electronic apparatus 1100 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 1150. Also, electronic device 1100 can communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 1160. As shown in fig. 11, the network adapter 1160 communicates with other modules of the electronic device 1100 via the bus 1130. It should be appreciated that although not shown in fig. 11, other hardware and/or software modules may be used in connection with the electronic device 1100, which may include, but are not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The electronic device 1100 may further include: a keyboard, a cursor control device (e.g., a mouse), an input/output interface (I/O interface), a network interface, a power supply, and/or a camera.
It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 11 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, the electronic device 1100 may also include more or fewer components than shown in fig. 11, or have a different configuration than shown in fig. 1. The memory 1120 may be used to store a computer program and corresponding data, such as a computer program and corresponding data corresponding to a method of processing a model in an embodiment of the present disclosure. The processor 1110 executes a computer program stored in the memory 1120 to perform various functional applications and data processing, i.e., a processing method for realizing the above-described model.
The foregoing embodiment numbers of the present disclosure are merely for description and do not represent advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present disclosure, the descriptions of the various embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present disclosure may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present disclosure. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present disclosure, and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present disclosure, which are intended to be comprehended within the scope of the present disclosure.

Claims (19)

1. A method of processing a model, comprising:
determining an original body type model of the virtual character and at least one original clothing model to be matched with the original body type model;
determining a second normal vector of a second vertex on the original clothing model based on a first normal vector of a first vertex on the original body model, wherein the first vertex corresponds to the second vertex, and the second normal vector points to a third vertex in the original body model;
mapping the original skin information of the original body type model onto the original clothing model based on the second normal vector to obtain target skin information of the original clothing model, wherein the original skin information is used for binding bones of the virtual roles to the original body type model so that the original body type model moves along with the movement of the bones;
Binding the bone to the apparel model based on the target skin information such that the original apparel model moves following the movement of the bone.
2. The method of claim 1, wherein determining a second normal vector for a second vertex on the original garment model based on the first normal vector for the first vertex on the original body model comprises:
copying the original body type model to obtain a first target body type model, and copying the original clothing model to obtain a first target clothing model;
adjusting the first target body type model according to the first normal vector of the first vertex on the first target body type model, wherein the adjusted first target body type model is matched with the surface of the first target clothing model;
determining the second normal vector of the second vertex on the first target apparel model based on the adjusted first normal vector of the first vertex on the first target body type model, wherein the second normal vector points to the third vertex in the first target body type model.
3. The method of claim 2, wherein determining the second normal vector for the second vertex on the first target apparel model based on the adjusted first normal vector for the first vertex on the first target body type model comprises:
responsive to the adjusted first target body type model having a target vertex associated with the second vertex on the first target apparel model, determining the second normal vector based on the first normal vector of the target vertex, wherein the target vertex and the second vertex are within a target area.
4. A method according to claim 3, characterized in that the method further comprises:
moving the second vertex on the first target clothing model according to a target coordinate axis, wherein the distance of the movement of the second vertex is larger than the corresponding distance of the size of the first target clothing model on the target coordinate axis;
and determining at least one vertex of which the difference value between the coordinate value on the target coordinate axis and the coordinate value on the target coordinate axis of the moved second vertex is smaller than a first distance threshold value and/or a plurality of vertices which are allowed to be connected with the moved second vertex as the target vertex, wherein the included angle between a plurality of connecting lines between the moved second vertex and the plurality of vertices is smaller than a first included angle threshold value.
5. A method according to claim 3, wherein determining the second normal vector based on the first normal vector of the target vertex comprises:
determining a smoothed normal vector for the second vertex on the first target apparel model based on the first normal vector for the target vertex;
the smoothed normal vector is determined as the second normal vector.
6. The method of claim 2, wherein adjusting the first target body type model according to the first normal vector of the first vertex on the first target body type model comprises:
determining, on the first target apparel model, a first target location intersected by the first normal vector;
and moving the first vertex on the first target body type model to the first target position so as to enable the adjusted first target body type model to be matched with the surface of the first target clothes model.
7. The method of claim 6, wherein determining, on the first target apparel model, a first target location intersected by the first normal vector comprises:
determining the first target location on the first target apparel model based on the original location of the first vertex on the first target body type model, the first normal vector, and a second distance threshold, wherein a distance between the first target location and the original location of the first vertex is less than the second distance threshold.
8. The method of claim 2, wherein mapping the original skin information of the original body model onto the original garment model based on the second normal vector to obtain target skin information of the original garment model comprises:
determining a second target position penetrated by the second normal vector and a polygon where the second target position is located on the original body model;
determining a first weight of the vertex on the polygon to the vertex corresponding to the second target position, wherein the first weight is used for representing the importance degree of the vertex on the polygon to the vertex corresponding to the second target position;
and adjusting the original skin information of the top points on the polygon based on the first weight to obtain the target skin information.
9. The method of claim 8, wherein adjusting the original skin information for vertices on the polygon based on the first weight to obtain the target skin information comprises:
and normalizing the product between the first weight and the original skin information to obtain the target skin information corresponding to the skeleton.
10. The method of claim 8, wherein determining, on the original body model, a second target location intersected by the second normal vector and a polygon at which the second target location is located comprises:
determining the second target location and the polygon on the original body type model based on the original location of the second vertex on the first target apparel model, the second normal vector, and a second distance threshold, wherein a distance between the second target location and the original location of the second vertex is less than the second distance threshold.
11. The method according to any one of claims 2 to 10, characterized in that the method further comprises:
and matching the original clothing model bound to the skeleton to at least one second target body type model based on the first target body type model.
12. The method of claim 11, wherein the method further comprises:
determining a second weight of a corresponding bone in a first bone hierarchy bound by the original body model based on the original skin information of the first vertex on the original body model, and determining a first coordinate vector of a vertex associated with the corresponding bone in the first bone hierarchy based on the second weight;
Determining a third weight of a corresponding bone in a second bone hierarchy bound by the second target body type model based on skin information of a fourth vertex on the second target body type model, and determining a second coordinate vector of a vertex associated with the second bone based on the third weight, wherein the fourth vertex corresponds to the first vertex;
matching the original apparel model bound to the bone to at least one second target body model based on the first target body model, comprising: the original apparel model bound to the bone is matched to the second target body type model based on the first coordinate vector, the second coordinate vector, and the first target body type model.
13. The method of claim 12, wherein the second skeletal hierarchy is the same as the first skeletal hierarchy, wherein matching the original garment model bound to the bone to the second target body model based on the first coordinate vector, the second coordinate vector, and the first target body model comprises:
obtaining a deviation vector between the second coordinate vector and the first coordinate vector;
Moving a corresponding bone in the first bone hierarchy based on the bias vector;
and moving the first vertexes on the corresponding first target body type models based on the corresponding bones in the moved first bone hierarchy structure so as to match the original clothing models bound with the bones to the second target body type models.
14. The method of claim 13, wherein moving the first vertex on the corresponding first target body type model based on the corresponding bone in the moved first bone hierarchy to match the original garment model to which the bone has been bound to the second target body type model comprises:
and moving the first vertex on the corresponding first target body type model to a position where the distance between the first vertex and the second target body type model is smaller than a third distance threshold based on the corresponding skeleton in the moved first skeleton hierarchy structure so as to match the original clothing model bound with the skeleton to the second target body type model, wherein the similarity between the moved first target body type model and the second target body type model is higher than a similarity threshold.
15. The method of claim 11, wherein the method further comprises:
determining, on the second target body model, a third target location intersected by the second normal vector of the second vertex on the first target apparel model, and a target distance between the second vertex and a point of intersection on the original body model at a second target location intersected by the second normal vector;
moving a vertex of a second target clothing model corresponding to the second vertex based on the second normal vector, the third target position and the target distance, wherein the second target clothing model is obtained by copying the first target clothing model;
matching the original apparel model bound to the bone to at least one second target body model based on the first target body model, comprising: and matching the vertex of the second target clothing model corresponding to the second vertex after the movement to a skeleton bound by the second target body type model based on the first target body type model.
16. The method of claim 11, wherein the method further comprises:
Responding to the target distance between the second vertex and a penetrating point on a second target position, which is penetrated by the second normal vector, on the original body type model, wherein the target distance is larger than or equal to a fourth distance threshold value, and/or the included angle between the normal on the surface of the first target clothing model and the normal on the surface of the original body type model is larger than or equal to a second included angle threshold value, and acquiring a fourth target position of a vertex with the smallest distance from the second vertex in the second target body type model;
acquiring an original position of the second vertex, and directing to a target vector of the position of the vertex with the minimum distance between the original body model and the second vertex;
moving a vertex of a second target clothing model corresponding to the second vertex based on the fourth target position and the target vector, wherein the second target clothing model is obtained by copying the first target clothing model;
matching the original apparel model bound to the bone to at least one second target body model based on the first target body model, comprising: and matching the vertex of the second target clothing model corresponding to the second vertex after the movement to a skeleton bound by the second target body type model based on the first target body type model.
17. A model processing apparatus, comprising:
the first determining unit is used for determining an original body type model of the virtual character and at least one original clothing model to be matched with the original body type model;
a second determining unit, configured to determine a second normal vector of a second vertex on the original clothing model based on a first normal vector of a first vertex on the original body type model, where the first vertex corresponds to the second vertex, and the second normal vector points to a third vertex in the original body type model;
the mapping unit is used for mapping the original skin information of the original body type model onto the original clothing model based on the second normal vector to obtain target skin information of the original clothing model, wherein the original skin information is used for binding bones of the virtual roles to the original body type model so that the original body type model moves along with the movement of the bones;
and the binding unit is used for binding the skeleton to the clothing model based on the target skin information so that the original clothing model moves along with the movement of the skeleton.
18. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program, wherein the computer program is arranged to perform the method of any of the claims 1 to 16 when being run by a processor.
19. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of any of the claims 1 to 16.
CN202311162388.0A 2023-09-08 2023-09-08 Model processing method and device, readable storage medium and electronic device Pending CN117173338A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311162388.0A CN117173338A (en) 2023-09-08 2023-09-08 Model processing method and device, readable storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311162388.0A CN117173338A (en) 2023-09-08 2023-09-08 Model processing method and device, readable storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN117173338A true CN117173338A (en) 2023-12-05

Family

ID=88940921

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311162388.0A Pending CN117173338A (en) 2023-09-08 2023-09-08 Model processing method and device, readable storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN117173338A (en)

Similar Documents

Publication Publication Date Title
Arora et al. Symbiosissketch: Combining 2d & 3d sketching for designing detailed 3d objects in situ
CN111492367B (en) Method and apparatus for generating three-dimensional gestures of a hand
Olsen et al. Sketch-based modeling: A survey
US20220189095A1 (en) Method and computer program product for producing 3 dimensional model data of a garment
JP5695758B2 (en) Method, circuit and system for human machine interface with hand gestures
Bourguignon et al. Drawing for illustration and annotation in 3D
Ding et al. A survey of sketch based modeling systems
EP3454302A1 (en) Approximating mesh deformation for character rigs
CN110163942B (en) Image data processing method and device
Li et al. Shape completion from a single rgbd image
US9892485B2 (en) System and method for mesh distance based geometry deformation
Yang Context-aware computer aided inbetweening
US11625900B2 (en) Broker for instancing
Zell et al. ElastiFace: Matching and blending textured faces
CN110176058B (en) Immersive rapid modeling method based on sketch and convolution curved surface
CN117173338A (en) Model processing method and device, readable storage medium and electronic device
Liu et al. High-quality compatible triangulations and their application in interactive animation
EP3798990B1 (en) Method and computer program product for processing model data of a set of garments
CN114581288A (en) Image generation method and device, electronic equipment and storage medium
CN111612874B (en) 3D drawing board for drawing complex model
US11972528B2 (en) Method and computer program product for processing model data of a set of garments
US20130016101A1 (en) Generating vector displacement maps using parameterized sculpted meshes
CN115601512B (en) Interactive three-dimensional reconstruction method and device, computer equipment and storage medium
Zheng et al. Sketching-based skeleton generation
US20230196702A1 (en) Object Deformation with Bindings and Deformers Interpolated from Key Poses

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination