Human body model skeleton binding method, device and electronic equipment
By determining the transformation relationship between the human model to be bound and the bound model and migrating the bone binding information, the problems of low bone binding efficiency and poor effect in the existing technology are solved, and automatic and efficient bone binding effect is achieved.
Patent Information
- Application Number
- CN202110304218.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-22
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2041-03-22
AI Technical Summary
The existing bone binding technology either consumes a lot of manpower and is inefficient, or the automatic binding effect is poor, and requires art staff to correct it.
By determining the transformation relationship between the first human model of the bone to be bound and the second human model whose bone binding has been completed, the bone binding information of the first human model is determined based on the transformation relationship and the bone binding information of the second human model, and automatic bone binding is realized.
The bone binding of the human body model is automatically completed, and the binding effect is good, reducing the need for manual intervention.
Smart Images

Figure CN113034691B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of human body models, and in particular to a method, device and electronic device for skeletal binding of a human body model. Background Art
[0002] As the basis of human-computer interaction interface, virtual digital human has been gradually applied in many fields. The realization of a virtual digital human includes many aspects, such as character design modeling, animation realization, clothing solution, rendering, etc. Among them, a key link is animation, and bone binding is an indispensable step to realize animation. The current bone binding technology either uses manual binding, which is very labor-intensive and has a low binding efficiency; or it can realize automatic binding, but the binding effect is poor and requires further correction by artists before it can be used. Therefore, it is necessary to provide a solution that can automatically realize the bone binding of human models with good binding effect. Summary of the invention
[0003] Based on this, this specification provides a skeleton binding method, device and electronic device for a human body model.
[0004] According to a first aspect of an embodiment of this specification, a skeleton binding method for a human body model is provided.
[0005] The method comprises:
[0006] Obtain a first human body model of the skeleton to be bound;
[0007] Determining a transformation relationship between the first human body model and the second human body model;
[0008] The skeleton binding information of the first human body model is determined according to the transformation relationship and the skeleton binding information of the second human body model; wherein the skeleton binding information is used to determine the positions of the skeleton joints of the human body model and the influence of each bone on each part of the human body model.
[0009] According to a second aspect of an embodiment of this specification, a skeleton binding device for a human model is provided, the device comprising:
[0010] An acquisition module, used for acquiring a first human body model to be bound with bones;
[0011] A transformation relationship determination module, used to determine the transformation relationship between the first human body model and the second human body model;
[0012] The skeleton binding information determination module is used to determine the skeleton binding information of the first human body model according to the transformation relationship and the skeleton binding information of the second human body model; wherein the skeleton binding information is used to determine the position of the skeleton joint points of the human body model and the influence of each bone on each part of the human body model.
[0013] According to a third aspect of the embodiments of this specification, an electronic device is provided, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method mentioned in the first aspect when executing the computer program.
[0014] By applying the scheme of the embodiments of this specification, when binding bones for a first human body model to be bound, the transformation relationship between the first human body model and the second human body model to which the bones have been bound can be determined, and the bone binding information of the first human body model can be determined based on the transformation relationship and the bone binding information of the second human body model. By migrating the bone binding information of the human body model to which the bones have been bound to the human body model to which the bones are to be bound, the bone binding of the human body model to which the bones are to be bound can be automatically completed, and a better binding effect can be obtained.
[0015] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and, together with the description, serve to explain the principles of the specification.
[0017] Figure 1 It is a schematic diagram of a human body mesh model according to an embodiment of the present specification.
[0018] Figure 2 It is a flow chart of a skeleton binding method of a human body model according to an embodiment of the present specification.
[0019] Figure 3 It is a schematic diagram of a human body model skeleton binding method according to an embodiment of the present specification.
[0020] Figure 4 This is a logical structure block diagram of a human body model skeleton binding device according to an embodiment of the present specification.
[0021] Figure 5 It is a logical structure block diagram of an electronic device according to one embodiment of the present specification. DETAILED DESCRIPTION
[0022] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this specification. Instead, they are merely examples of devices and methods consistent with some aspects of this specification as detailed in the appended claims.
[0023] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. The singular forms "a", "the" and "the" used in this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0024] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0025] As the basis of human-computer interaction interface, virtual digital human has been used in many fields. For example, it can be used in the film and television industry to realize various animation images, or it can be used in various service industries to replace the staff for voice broadcasting and action display, or it can also be used in the clothing industry to complete virtual fitting, etc. The realization of a virtual digital human usually includes multiple aspects, such as character 3D modeling, animation realization, clothing solution, rendering, etc. Among them, a key link is the realization of animation, and bone binding is an indispensable step to realize animation.
[0026] Generally, a 3D human model can be considered as consisting of a skin layer and a bone layer. A human model scanned by a laser scanner or a human model obtained by 3D reconstruction can usually only obtain data of the skin layer of the human model. However, only the data of the skin layer cannot complete the animation control of the human model, because the deformation movement of the skin of various parts of the human body depends on the movement of the human skeleton. For example, taking the commonly used human mesh model as an example, the skin layer of a human model can usually be divided into multiple meshes, such as Figure 1As shown in the figure, knowing the positions of the mesh vertices of these meshes and the connection relationship of the mesh vertices can represent the data of the skin layer of the 3D human model. However, animation cannot be realized by only knowing the positions of the mesh vertices and the connection relationship of the mesh vertices. It is necessary to further determine the positions of the various bone joints of the human body in the human body model and the control range of each bone. Figure 1 As shown in Figure 1, if the bone movement is between the shoulder joint and the elbow joint, it will affect the surface of the bone and the surrounding skin (such as Figure 1 The part selected by the dashed line in the figure has little effect on the skin farther away from it. Therefore, the purpose of the bone binding of the human body model is to determine the position of the bone joints in the human body model and the influence of each bone on various parts of the human body.
[0027] In the related art, when implementing the skeleton binding of the human body model, most of them adopt the manual binding method, that is, manually calibrating the position of the skeleton joint points in the model and determining the influence range of each bone in the human body model. Using this method to bind a high-precision human body model generally takes 1-2 weeks or even longer, which is very inefficient, and the binding effect is also very dependent on the experience and technology of the binder. There are also technologies that realize automatic skeleton binding, but these technologies are for models of any form. For example, in addition to the human body model, they are universal for various other models (such as cats, dogs and other animals). Obviously, this technology has a poor binding effect, and generally cannot directly use the binding result, but requires the artist to make further corrections before use. There are also some technologies that require manual calibration of the position of the skeleton joint points of the human body model, and then automatically determine the influence of each bone on various parts of the human body, that is, to achieve semi-automatic binding, which is still not smart enough. Therefore, the industry urgently needs a solution that can automatically realize the skeleton binding of the human body model, and can achieve a better binding effect.
[0028] Based on this, an embodiment of the present application provides a method for skeletal binding of a human body model, which can determine the transformation relationship between a first human body model to be bound with bones and a second human body model that has completed skeletal binding, determine the skeletal binding information of the first human body model based on the transformation relationship between the two and the skeletal binding information of the second human body model, and automatically complete the skeletal binding of the first human body model.
[0029] The skeleton binding method in the embodiment of the present application can be used in various animation production software that can realize the skeleton binding function or plug-ins for realizing the skeleton binding function, etc. The method can be executed by various electronic devices such as mobile phones, tablets, laptops, cloud servers, etc.
[0030] Specifically, Figure 2 As shown, the skeleton binding method of the human body model includes the following steps:
[0031] S202, obtaining a first human body model to be bound with bones;
[0032] S204, determining a transformation relationship between the first human body model and the second human body model;
[0033] S206. Determine the skeleton binding information of the first human body model according to the transformation relationship and the skeleton binding information of the second human body model; wherein the skeleton binding information is used to determine the positions of the skeleton joints of the human body model and the influence of each bone on each part of the human body model.
[0034] Since the position of the bone joints in the human body model and the influence of each bone on the various parts of the human body model are affected by the shape of the human body model, for example, if the height, weight, and size of the human body model change, the position of its bone joints and the range of influence of each bone will also change. Therefore, if the position of the bone joints of a human body model and the influence of each bone on the various parts of the human body model are known, the position of its bone joints and the difference in the influence range of each bone can be determined based on the differences in body shape, posture, etc. between other human body models and the human body model, and then the position of the bone joints of other human body models and the influence of each bone on the various parts of other human body models can be determined.
[0035] Therefore, in step S202, the first human body model to be bound to the skeleton can be obtained first. The first human body model can be represented by various forms of data. For example, the first human body model can be a human body mesh model, that is, the human body model can be represented by the mesh vertices of each mesh constituting the model and the connection relationship between the mesh vertices. Of course, it can also be a human body model represented by other forms of data. The first human body model can be various types of human body models, for example, a static human body model, for example, different human body models are represented by different mesh vertices and the connection relationship between mesh vertices. Of course, the first human body model can also be a parameterized human body model, such as SMPL (Skinned Multi-Person Linear) parameterized human body model, STAR (Sparse Trained Articulated Human Body Regressor) parameterized human body model, etc. The parameterized human body model can be obtained by learning the human body model data obtained by scanning a large number of three-dimensional human bodies. It can output human body mesh models of different shapes and postures according to different input model parameters.
[0036] In step S204, after obtaining the first human body model to be bound to the skeleton, the transformation relationship between the first human body model and the second human body model can be determined. Wherein, the second human body model can be determined based on a pre-stored static human body model, or can be determined based on a pre-stored parameterized human body model, and the skeleton binding information of the second human body model has been predetermined. The transformation relationship between the first human body model and the second human body model can be various parameters used to characterize how to transform from the first human body model to the second human body model, such as a transformation matrix or other parameters. The skeleton binding information of the second human body model has been predetermined and stored, wherein the skeleton binding information can be various information for determining the position of the skeleton joints of the human body model, and various information for determining the influence of each bone on each part of the human body model. For example, the skeleton binding information can be directly the position information of the joints, the skin weight of each mesh vertex in the human body model relative to each bone, or other parameters for determining the position of the joints or for determining the skin weight. Of course, in addition to the above information, the skeleton binding information can also be other information related to animation control.
[0037] By determining the transformation relationship between a first human body model to be bound bones and a second human body model carrying bone binding information, and then migrating the bone binding information of the second human body model to the first human body model based on the transformation relationship to determine the bone binding information of the first human body model, the bone binding of the human body model can be automatically completed, and a relatively accurate binding result can be obtained.
[0038] Usually, for two human models with roughly the same morphology, the positions of their skeletal joints and the influence range of each bone are often relatively close. Therefore, it is more accurate to determine the skeletal binding information of the other human model based on the transformation relationship between the two models and the skeletal binding information of one of the human models. Therefore, in order to determine that the binding information is as accurate as possible, the second human model can be a model with a morphology that is relatively close to the morphology of the first human model, for example, the body shape and posture of the two are relatively close, for example, the height, weight, etc. of the two are not much different. Therefore, in some embodiments, the deviation between the morphology of the second human model and the morphology of the first human model is less than the preset deviation. For example, the human body characteristic parameters such as height, weight, and posture of the second human model are less than the preset values of the human body characteristic parameters such as height, weight, and posture of the first human model, which can be set according to actual needs, as long as the body shape of the two models is roughly the same and does not differ too much.
[0039] The skeleton binding information may be various information used to complete skeleton binding of a human body model. In some embodiments, the skeleton binding information includes one or more of the following: positions of skeleton joints, skeleton calculation matrices, skin weights, and muscle deformers.
[0040] For example, in some scenarios, if the second human body model can be a pre-stored static human body model, that is, the positions and connection relationships of the mesh vertices of the skin layer of the second human body model are fixed, then the bone binding information can directly include the positions of the bone joints, and the positions of the bone joints can be three-dimensional coordinates that characterize the positions of each bone joint in the human body model. Usually, the human body's bone model is a tree-like model composed of 24 joints, which can be the head, neck joints, shoulder joints, elbow joints, ankle joints, etc.
[0041] In some scenarios, the second human body model can be determined based on a pre-stored parameterized human body model. For a parameterized human body model, if the input model parameters are different, the shape, posture, etc. of the human body model that is finally output are also different, and the positions of its skeletal joints and the influence of each joint on each part of the human body model are also necessarily different. Therefore, for a parameterized human body model, the skeletal binding information may include a skeletal calculation matrix, wherein the skeletal calculation matrix can be used to determine the positions of the skeletal joints of the human body model according to the positions of each mesh vertex of the skin layer of the human body model. That is, when the model parameters are determined, the shape and posture of the human body model can also be determined, that is, the positions and connection relationships of the mesh vertices can be determined, and thus the positions of the skeletal joints can be determined according to the positions and connection relationships of the mesh vertices and the skeletal calculation matrix.
[0042] To achieve animation control, it is necessary to know which parts of the human body model will be affected after each bone moves, and how big the impact is, so as to predict what kind of deformation the skin will undergo. Therefore, when performing bone binding of the human body model, the skin weight used to characterize the influence of each bone on each mesh vertex of the skin layer in the human body model can be determined. For example, assuming that after the bone between the elbow joint and the wrist joint moves, it has a greater impact on the skin of the forearm of the hand, which will drive it to move, so its skin weight is larger, while the impact on the skin of the leg is small, so its skin weight is smaller. Based on the skin weight, it can be determined which skin of the human body model will be driven to move after each bone moves, so as to achieve animation control.
[0043] Of course, in some scenes, in order to make the animation of the human body model achieve a more vivid effect, the human body model may also include a muscle layer, that is, a muscle layer model is added to the surface of the skin layer. By changing the positional relationship between the muscle layer model and the skin layer surface, the human body model can be deformed in various ways to achieve a more realistic effect. The muscle layer model can usually be represented by the positions of multiple mesh vertices and the positional deviations between the multiple mesh vertices and the mesh vertices of the skin layer. After the muscle layer model and the human skin layer model are fused, a more realistic human body model can be obtained. For example, assuming that a human body model with a big belly is to be represented, in addition to using human skin layer data to characterize the model, a local muscle layer model can be added to the belly part. After the muscle layer model and the human skin layer model are fused, the final human body model with a big belly image can be obtained. Therefore, in some embodiments, the skeleton binding information may also include a muscle deformer, which can be used to characterize the positional changes of the muscle layer and the skin layer in the human body model, that is, the positional offsets of the mesh vertices of the muscle layer relative to the mesh vertices of the skin layer. Through the muscle deformer, more complex skin deformation can be achieved.
[0044] Because the body types of the two human models are relatively close, only by migrating the skeleton binding information can a relatively accurate effect be obtained by skeleton binding the human model to be bound to the skeleton. The second human model can be a pre-stored static human model, or it can be determined based on a parameterized human model. In some embodiments, the skeleton binding information of a plurality of human models with different forms (e.g., different heights, weights, and skinnies) can be pre-determined and stored. After obtaining the first human model, a second human model with a form close to the first human model can be selected from the pre-stored static human model, and the skeleton binding information of the second human model can be migrated to the first human model. Of course, in some embodiments, the second human model can be determined based on a parameterized human model, for example, a parameterized human model and the skeleton binding information of the model can be pre-stored. In order to obtain a second human model with a form close to the first human model to be bound to the skeleton, the model parameters of the pre-stored parameterized human model can be continuously adjusted until the form deviation between the first human model and the parameterized human model is less than the preset deviation, and the model parameters at this time are used as the model parameters of the second human model, and are input into the parameterized human model to obtain the second human model. By continuously optimizing the model parameters of the parametric human body model to obtain a second human body model whose shape roughly matches the shape of the first human body model, and then migrating the bone binding information, a more accurate bone binding result can be obtained.
[0045] Since the skin layer of the first human body model and the skin layer of the second human body model can both be represented as human body models composed of multiple meshes, the human body model can be represented by the connection relationship between the mesh vertices of these meshes and the mesh vertices. For the sake of distinction, the mesh vertices of the skin layer of the first human body model are collectively referred to as first mesh vertices, and the mesh vertices of the skin layer of the second human body model are collectively referred to as second mesh vertices.
[0046] In some embodiments, when determining the transformation relationship between the first human body model and the second human body model, the corresponding points of the first mesh vertices of the skin layer of the first human body model in the second human body model can be determined first, and then the transformation relationship between the two models can be determined based on the first mesh vertices in the first human body model and the corresponding points of these first mesh vertices in the second human body model. Among them, when determining the corresponding points of the first mesh vertices of the first human body model in the second human body model, the corresponding points of all mesh vertices of the skin layer of the first human body model in the second human body model can be determined. Of course, only the corresponding points of some mesh vertices of the skin layer of the first human body model in the second human body model can be determined. For example, assuming that the number of first mesh vertices of the skin layer of the first human body model is large, only a part of the more critical first mesh vertices, such as the first mesh vertices that have a greater impact on the model's body shape and posture, need to be taken, and their corresponding points in the second human body model are determined. When determining the transformation relationship between the two models based on the first mesh vertices and the corresponding points of these first mesh vertices in the second human body model, the transformation relationship between the two models can be determined based on the position deviation of the first mesh vertices and their corresponding points or the coordinate transformation relationship. There are many ways to specifically determine the transformation relationship between the two, which can be selected according to actual needs.
[0047] In some embodiments, when determining the corresponding point of the first mesh vertex of the skin layer of the first human body model in the second human body model, for each first mesh vertex in the first human body model, the target mesh vertex closest to the first mesh vertex can be determined from the second mesh vertices of the second human body model as the corresponding point of the first mesh vertex, that is, the corresponding point of the first mesh vertex can be the mesh vertex of the second human body model. Among them, the distance can be the Euclidean distance or other distances, which can be set according to actual needs. This method is more accurate in the scenario where the number of meshes in the first human body model and the second human body model is large and the area of each mesh is small, but the accuracy is relatively low for the scenario where the number of meshes in the first human body model and the second human body model is small and the area of each mesh is large.
[0048] In some embodiments, in order to determine the corresponding point of the first mesh vertex more accurately and with less deviation, for each first mesh vertex in the first human body model, the target mesh surface closest to the first mesh vertex can be determined from the mesh surface of the second human body model, and the point closest to the first mesh vertex in the target mesh surface can be used as the corresponding point of the first mesh vertex. By determining the target mesh surface closest to the first mesh vertex in the second human body model, and then determining the point closest to the first mesh vertex from the target mesh surface as the corresponding point, wherein the corresponding point can be a non-mesh vertex in the second human body model, the determined corresponding point can be more accurate.
[0049] In some embodiments, if the corresponding point is the point closest to the first mesh vertex in the target mesh surface closest to the first mesh vertex, and the target mesh surface is a triangular mesh surface, then when determining the transformation relationship between the two human body models based on the first mesh vertex and its corresponding point, the centroid coordinates of the corresponding point of the first mesh vertex can be determined first, and then a transformation matrix representing the transformation relationship between the two models can be determined based on the centroid coordinates, wherein the transformation matrix can be expressed as a matrix A M×N , where M represents the number of first mesh vertices, and N represents the number of second mesh vertices. Each row of the transformation matrix can correspond to a mesh vertex of the first human body model. For example, the Mth row corresponds to the Mth mesh vertex of the first human body model. The element values of the Mth row, Xth column, and Yth column of the transformation matrix are wx, wy, and wz, respectively, and the element values of the remaining columns are 0, where X, Y, and Z are the sequence numbers of the mesh vertices of the target mesh surface corresponding to the Mth mesh vertex, and wx, wy, and wz are the centroid coordinates of the corresponding point of the Mth mesh vertex. Where M, N, X, Y, and Z are all positive integers.
[0050] In some embodiments, the skeleton binding information includes the skin weight of each mesh vertex of the skin layer of the human body model relative to each bone. When the skeleton binding information of the first human body model is determined according to the transformation relationship between the first human body model and the second human body model and the skeleton binding information of the second human body model, the skin weight of each mesh vertex of the first human body model relative to each bone can be directly determined according to the transformation relationship and the skin weight of each mesh vertex of the second human body model relative to each bone. However, the skin weight directly converted through the change relationship of the two models may not be very accurate. In order to improve the accuracy of the determined skin weight, in some embodiments, after determining the skin weight of each mesh vertex of the first human body model relative to each bone according to the transformation relationship and the skin weight of each mesh vertex of the skin layer of the second human body model relative to each bone, the cosine weight corresponding to each first mesh vertex in the first human body model can be further determined, and then the skin weight is smoothed according to the cosine weight of each first mesh vertex in the first human body model, so as to obtain a more accurate skin weight. Among them, Laplace smoothing can be used for smoothing, and other smoothing can also be used, which is not limited by the embodiments of the present application.
[0051] In the related art, when the skeleton binding is performed for the human body model, usually only the positions of the 24 main skeleton joints of the human body and the influence of the skeleton formed by these 24 main skeleton joints on the various parts of the human body model are determined. The problem is that when performing relatively large movements, such as large rotations, it is still not smooth and natural enough. In order to make the animation of the human body model smoother and more natural, in some embodiments, the skeleton joints may include secondary skeleton key points, wherein the secondary skeleton joints may be newly added joints between two main skeleton joints, such as finger joints, joints added between elbows and wrists, and joints added between knees and ankles. Then the skeleton binding information may include binding information of some secondary skeleton joints, such as binding information of fingers, and binding information of secondary joints added between two main skeleton joints. By adding some secondary skeleton joints between the original skeleton joints and adding the skeleton binding information of these secondary skeleton joints, the human body model can be made smoother and more natural when performing some large animation movements.
[0052] In order to further explain the human body model skeleton binding method in the embodiment of the present application, it is explained below in conjunction with a specific embodiment.
[0053] The skeleton binding of human models is an essential part of the animation process. The current skeleton binding technology is either not intelligent enough, inefficient, or has poor binding accuracy. In order to realize the skeleton binding of human models, it can be completed automatically and achieve a good binding effect. The following provides a skeleton binding method for human models. The specific principle is as follows: Figure 3 As shown, the transformation relationship between the human body model with the skeleton to be bound and the human body model with the skeleton binding information is determined, and based on the transformation relationship between the two, the skeleton binding information of the human body model with the skeleton binding information is transferred to the human body model with the skeleton to be bound, and the skeleton binding of the human body model is completed. The specific process is as follows:
[0054] 1. A parametric human body model can be pre-set, and the parametric human body model can be a STAR parametric model. The reason for choosing a parametric human body model is that for models of different body types to be bound, the model parameters of the parametric human body model can be adjusted to make its shape roughly consistent with the shape of the model to be bound, and then the subsequent migration of the skeleton binding information can obtain a more accurate result. In this way, using a parametric human body model can be applicable to human body models of different body types to be bound.
[0055] The parameterized human body model carries skeleton binding information, wherein the skeleton binding information includes a skeleton calculation matrix. The skeleton calculation matrix K old N1 old ×B1-dimensional matrix, where N1 old N1 represents the number of mesh vertices in the skin layer of the parameterized human body model, and B1 represents the number of bone joints. When the model parameters of the parameterized human body model are determined, the positions and connection relationships of the mesh vertices in the skin layer of the human body model corresponding to the model parameters are also determined, that is, the body shape and posture of the human body model are determined. At this time, the positions of the bone joints of the human body model corresponding to the model parameters can be determined based on the bone calculation matrix. The bone binding information also includes the skinning weight of each mesh vertex in the skin layer of the human body model relative to each bone (the size of the influence of the bone on the vertex of the mesh point), which can be expressed by N1. old ×B2-dimensional matrix M old Indicates that, N1 old Indicates the number of mesh vertices in the skin layer of the parametric human model, and B2 indicates the number of bones. The bone binding information also includes muscle deformers, which indicate the position change of each mesh vertex in the muscle layer of the human model relative to the position change of the mesh vertex in the skin layer, which can be expressed by N1. old ×N2old-dimensional matrix J old Indicates. Among them, N1 old The number of mesh vertices representing the skin layer of the parameterized human model, N2 oldThe number of mesh vertices representing the skin layer of the parameterized human model.
[0056] In order to allow the skeleton-bound human body model to remain natural when performing large rotational movements, the skeleton binding information in the embodiment of the present application adds binding information of fingers and some secondary bones (new secondary bone joints are added between two main bone joints), for example, secondary bones are added at the forearm and calf.
[0057] 2. A first human body model of the skeleton to be bound can be obtained, and then the model parameters of the parameterized human body model can be continuously adjusted so that the body shape of the parameterized human body model roughly fits the body shape of the first human body model. The model corresponding to the model parameters determined at this time is called the second human body model.
[0058] 3. Determine the corresponding points of each mesh vertex of the skin layer of the first human body model on the second human body model.
[0059] For each mesh point of the skin layer of the first human body model, the triangular mesh surface closest to the mesh point can be determined in the triangular mesh surface of the second human body model, and then the point closest to the mesh point in the triangular mesh surface is used as the corresponding point of the mesh point. In this way, even if there are fewer meshes in the human body model and the area of each mesh is large, the corresponding point can be accurately determined.
[0060] 4. Determine the bone calculation matrix K of the first human body model new , based on the skeleton calculation matrix K new The positions of the skeletal joints in the first human body model may be determined.
[0061] The centroid coordinates of the corresponding points of each grid point of the first human body model can be determined, and the transformation matrix A between the first human body model and the second human body model can be determined according to the centroid coordinates of the corresponding points. The dimension of the transformation matrix A is N1 old ×N1 new , where N1 old The number of mesh vertices representing the skin layer of the parameterized human body model (i.e., the second human body model), N1 new Represents the number of mesh vertices of the first human body model. Each mesh vertex of the first human body model corresponds to a row, and each row has a total of N1 old values, assuming that the triangle face of the second human body model that is closest to the nth mesh vertex of the first human body model is triangle face C, the vertex numbers of this triangle face C are x, y, z, and the corresponding center of mass coordinates are wx, wy, wz. Then the value of the xth element of the nth row of the transformation matrix A is wx, the value of the yth element is wy, the value of the zth element is wz, and the rest are 0.
[0062] K new It can be calculated according to the following formula (2):
[0063] K new =AK old Formula (2)
[0064] 5. Find the skin weight of each mesh vertex relative to each bone in the skin layer of the first human model. Assume that the matrix M new If M new It can be calculated according to the following formula (3):
[0065] M new =AM old Formula (3)
[0066] 6. Find the muscle deformer of the first human model, assuming that the matrix J new If J new It can be calculated according to the following formula (4):
[0067] J new =AJ old Formula (4)
[0068] 7. Smooth the skin weight of the first human model.
[0069] The cosine weight of each grid point vertex of the first human body model is determined, and Laplace smoothing is performed on the skin weight based on the cosine weight, wherein the number of smoothing times and the degree of smoothing can be controlled by setting parameters.
[0070] Through the solution of the embodiment of the present application, it is possible to automatically bind the skeleton of a human body model, and the binding result has high accuracy and good effect.
[0071] Correspondingly, the embodiment of the present application also provides a skeleton binding device for a human body model, such as Figure 4 As shown, the device 40 comprises:
[0072] An acquisition module 41 is used to acquire a first human body model of a skeleton to be bound;
[0073] A transformation relationship determination module 42, used to determine a transformation matrix between the first human body model and the second human body model;
[0074] The skeleton binding information determination module 43 is used to determine the skeleton binding information of the first human body model according to the transformation matrix and the skeleton binding information of the second human body model; wherein the skeleton binding information is used to determine the positions of the skeleton joints of the human body model and the influence of each bone on each part of the human body model.
[0075] In some embodiments, the skeleton binding information includes one or more of the following:
[0076] The location information of the skeletal joints;
[0077] A skeleton calculation matrix, used for determining the positions of the skeleton joint points of the human body model according to the positions of the mesh vertices of the skin layer of the human body model;
[0078] Skin weight, used to represent the influence of each bone on each mesh vertex of the skin layer of the human body model;
[0079] The muscle deformer is used to represent the position change of the muscle layer in the human body model relative to the skin layer.
[0080] In some embodiments, a morphological deviation between the first human body model and the second human body model is less than a preset deviation.
[0081] In some embodiments, the second human body model is obtained based on the following method:
[0082] The model parameters of the pre-stored parameterized human body model are adjusted until the morphological deviation between the first human body model and the parameterized human body model is less than a preset deviation, so as to obtain the second human body model, wherein the parameterized human body model carries the skeleton binding information.
[0083] In some embodiments, the transformation relationship determination module is used to determine the transformation relationship between the first human body model and the second human body model, specifically for:
[0084] Determine corresponding points of first mesh vertices of the skin layer of the first human body model in the second human body model;
[0085] The transformation relationship is determined based on the first mesh vertices and the corresponding points.
[0086] In some embodiments, the transformation relationship determination module is used to determine the corresponding point of the first mesh vertex of the skin layer of the first human body model in the second human body model, specifically for:
[0087] For each first mesh vertex of the skin layer of the first human body model, the following operations are performed respectively:
[0088] Determine, from the second mesh vertices of the skin layer of the second human body model, a target mesh vertex that is closest to the first mesh vertex as a corresponding point of the first mesh vertex; or
[0089] A target mesh surface closest to the first mesh vertex is determined from the mesh surface of the skin layer of the second human body model, and a point in the target mesh surface closest to the first mesh vertex is used as a corresponding point of the first mesh vertex.
[0090] In some embodiments, the corresponding point includes a point in the target mesh surface that is closest to the first mesh vertex, the target mesh surface is a triangular mesh surface, and the transformation relationship determination module is used to determine the transformation relationship based on the first mesh vertex and the corresponding point, specifically for:
[0091] Determining the centroid coordinates of the corresponding points;
[0092] Based on the centroid coordinates, a transformation matrix for representing the transformation relationship is determined, and the transformation matrix is A M×N , wherein M represents the number of the first mesh vertices, N represents the number of the second mesh vertices, the Mth row of the transformation matrix corresponds to the Mth mesh vertex of the first human body model, the element values of the Mth row, Xth column, Yth column and Zth column of the transformation matrix are wx, wy, wz respectively, and the element values of the remaining columns are 0, wherein X, Y, Z are the mesh vertex serial numbers of the target mesh surface of the Mth mesh vertex, wx, wy, wz are the centroid coordinates of the corresponding points of the Mth mesh vertex, wherein M, N, X, Y, Z are all positive integers.
[0093] In some embodiments, the skeletal binding information includes skin weights of each mesh vertex of the skin layer of the human body model relative to each bone, and the skeletal binding information determination module is used to determine the skeletal binding information of the first human body model according to the transformation relationship and the skeletal binding information of the second human body model, specifically for:
[0094] Determine the skin weight of the first human body model according to the transformation relationship and the skin weight of the second human body model;
[0095] The skin weight of the first human body model is smoothed based on the cosine weights of the first mesh vertices of the skin layer of the first human body model.
[0096] In some embodiments, the skeletal joints include secondary skeletal joints, and the secondary skeletal joints include one or more of the following: finger joints, added joints between the elbow and wrist, and added joints between the knee and ankle.
[0097] The specific process of the skeleton binding device implementing the skeleton binding is described in the above method embodiment and will not be repeated here.
[0098] Furthermore, the present application also provides an electronic device, such as Figure 5 As shown, the electronic device includes a processor 51, a memory 52, and a computer program stored in the memory 52 and executable by the processor 51. When the processor 51 executes the computer program, the method described in any one of the above embodiments is implemented.
[0099] Correspondingly, an embodiment of the present application further provides a computer storage medium, in which a program is stored, and when the program is executed by a processor, the method described in any of the above embodiments is implemented.
[0100] The embodiments of this specification may take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include but are not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0101] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0102] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the specification disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0103] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
[0104] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the scope of protection of the present disclosure.
Claims
1. A skeleton binding method for a human body model, characterized in that: The method comprises: Obtain a first human body model of the skeleton to be bound; Determine a transformation relationship between the first human body model and the second human body model; wherein the transformation relationship is determined based on a first mesh vertex of a skin layer of the first human body model and a corresponding point of the first mesh vertex in the second human body model; each corresponding point of the first mesh vertex in the second human body model is: a target mesh vertex in the second mesh vertex of the skin layer of the second human body model that is closest to the first mesh vertex, or a point in a target mesh surface in the mesh surface of the skin layer of the second human body model that is closest to the first mesh vertex that is closest to the first mesh vertex; The skeleton binding information of the first human body model is determined according to the transformation relationship and the skeleton binding information of the second human body model; wherein the skeleton binding information is used to determine the positions of the skeleton joints of the human body model and the influence of each bone on each part of the human body model.
2. The method according to claim 1, characterized in that The skeleton binding information includes one or more of the following: The location information of the skeletal joints; A skeleton calculation matrix, used for determining the positions of the skeleton joint points of the human body model according to the positions of the mesh vertices of the skin layer of the human body model; Skin weight, used to represent the influence of each bone on each mesh vertex of the skin layer of the human body model; The muscle deformer is used to represent the position change of the muscle layer in the human body model relative to the skin layer.
3. The method according to claim 1, characterized in that The morphological deviation between the first human body model and the second human body model is less than a preset deviation.
4. The method according to claim 1, characterized in that: The second human body model is obtained based on the following method: The model parameters of the pre-stored parameterized human body model are adjusted until the morphological deviation between the first human body model and the parameterized human body model is less than a preset deviation, so as to obtain the second human body model, wherein the parameterized human body model carries the skeleton binding information.
5. The method according to claim 1, characterized in that The corresponding point includes a point in the target mesh surface that is closest to the first mesh vertex, the target mesh surface is a triangular mesh surface, and the transformation relationship is determined based on the first mesh vertex and the corresponding point, including: Determining the centroid coordinates of the corresponding points; Based on the centroid coordinates, a transformation matrix for representing the transformation relationship is determined, and the transformation matrix is A M×N , wherein M represents the number of the first mesh vertices, N represents the number of the second mesh vertices, the Mth row of the transformation matrix corresponds to the Mth mesh vertex of the first human body model, the element values of the Mth row, Xth column, Yth column and Zth column of the transformation matrix are wx, wy, wz respectively, and the element values of the remaining columns are 0, wherein X, Y, Z are the mesh vertex serial numbers of the target mesh surface of the Mth mesh vertex, wx, wy, wz are the centroid coordinates of the corresponding points of the Mth mesh vertex, wherein M, N, X, Y, Z are all positive integers.
6. The method according to claim 1, characterized in that The skeleton binding information includes skin weights of each mesh vertex of the skin layer of the human body model relative to each bone, and the skeleton binding information of the first human body model is determined according to the transformation relationship and the skeleton binding information of the second human body model, including: Determine the skin weight of the first human body model according to the transformation relationship and the skin weight of the second human body model; The skin weight of the first human body model is smoothed based on the cosine weights of the first mesh vertices of the skin layer of the first human body model.
7. The method according to claim 1, characterized in that The skeletal joints include secondary skeletal joints, and the secondary skeletal joints include one or more of the following: finger joints, joints added between the elbow and wrist, and joints added between the knee and ankle.
8. A skeleton binding device for a human body model, characterized in that: The device comprises: An acquisition module, used for acquiring a first human body model to be bound with bones; A transformation relationship determination module, used to determine the transformation relationship between the first human body model and the second human body model; wherein the transformation relationship is determined based on the first mesh vertex of the skin layer of the first human body model and the corresponding point of the first mesh vertex in the second human body model; the corresponding point of each first mesh vertex in the second human body model is: the target mesh vertex closest to the first mesh vertex in the second mesh vertex of the skin layer of the second human body model, or the point closest to the first mesh vertex in the target mesh surface closest to the first mesh vertex in the mesh surface of the skin layer of the second human body model; The skeleton binding information determination module is used to determine the skeleton binding information of the first human body model according to the transformation relationship and the skeleton binding information of the second human body model; wherein the skeleton binding information is used to determine the position of the skeleton joint points of the human body model and the influence of each bone on each part of the human body model.
9. An electronic device, characterized in that: The electronic device comprises a processor, a memory, and a computer program stored in the memory and executable by the processor, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
Citation Information
Patent Citations
Human-body scanning modeling method
CN109064550A
Object modeling motion method, device and equipment
CN110634177A