Method and device for realizing skeleton skinning animation

By setting multiple root bones and vertex weight tables for the target object's skeletal model, the skeletal skin animation is generated, which solves the problem in the existing technology that multiple actions require multi-skeletal skin animation, and achieves resource saving and animation flexibility.

CN112598773BActive Publication Date: 2024-10-18ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011631542.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-31
Publication Date
2024-10-18
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

In the existing technology, when making skeletal skin animation, multiple skeletal skin animations need to be produced for each action, resulting in a waste of computing resources and large memory usage, and it is difficult to flexibly adjust the movements of the target object.

Method used

By creating a skeletal model of the target object and setting at least two root bones, configuring a vertex weight table for each root bone, determining the actual position of each vertex in the skinning network in the world coordinate system, and then generating a skeletal skinning animation.

Benefits of technology

It reduces the waste of computing resources and the occupation of memory space, provides a more flexible animation adjustment method, and achieves richer animation effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112598773B_ABST
    Figure CN112598773B_ABST
Patent Text Reader

Abstract

The present specification provides a method and device for implementing skeletal skinning animation, wherein the method for implementing skeletal skinning animation includes: creating a skeletal model of a target object, and setting at least two root bones in the skeletal model; configuring a vertex weight table for each root bone, and obtaining at least two vertex weight tables, wherein the vertex weight table of each root bone includes vertex information of vertices in a skinning network corresponding to the skeletal model, and each vertex information includes a vertex identifier of the vertex and an influence weight of the root bone on the vertex; obtaining skeletal animation data stored in a model file of the target object, and determining the actual position of each vertex in the skinning network in a world coordinate system based on the skeletal animation data and at least two vertex weight tables; rendering the target object based on the actual position of each vertex in the skinning network in a world coordinate system, and obtaining a skeletal skinning animation of the target object. In this way, the actions of different parts of the target object can be flexibly adjusted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet technology, and in particular to a method, device, computing device and storage medium for implementing skeletal skinning animation. Background Art

[0002] The basic principle of skeletal skinning animation is to calculate the vertices of the skinning network through a vertex blending dynamic algorithm under the control of the bones, and the child bones move relative to the root bones and are driven by animation keyframe data.

[0003] In the prior art, a skeleton model includes a root skeleton, which corresponds to a skeleton skin animation, and the skeleton skin animation corresponds to an action of the target object. If you need to make a skeleton skin animation of a target object flying in the air, and the target object's hand has a small movement during the flight, you need to make two skeleton skin animations, one is the animation of the overall state of the target object during the flight, and the other is the animation of the small movement of the target object's hand, and then merge the two animations together to get the required skeleton skin animation.

[0004] However, in the above method, as many animations as the actions of a target object need to be produced, which not only wastes computing resources, but also takes up memory space, and it is difficult to flexibly adjust the actions of the target object. Therefore, a simpler and more convenient method is needed to realize skeletal skinning animation. Summary of the invention

[0005] In view of this, the embodiment of this specification provides a method for implementing skeleton skinning animation. This specification also relates to a skeleton skinning animation implementation device, a computing device, and a computer-readable storage medium to solve the technical defects existing in the prior art.

[0006] According to a first aspect of an embodiment of this specification, a method for implementing a skeleton skinning animation is provided, comprising:

[0007] Creating a skeleton model of the target object, and setting at least two root bones in the skeleton model;

[0008] Configure a vertex weight table for each root bone to obtain at least two vertex weight tables, wherein the vertex weight table of each root bone includes vertex information of vertices in the skin network corresponding to the skeleton model, each vertex information includes a vertex identifier of the vertex and an influence weight of the root bone on the vertex, and each influence weight is used to characterize the influence degree of the root bone on the vertex;

[0009] Acquire the skeletal animation data stored in the model file of the target object, and determine the actual position of each vertex in the skinning network in the world coordinate system based on the skeletal animation data and the at least two vertex weight tables;

[0010] The target object is rendered based on the actual position of each vertex in the skinning network in the world coordinate system to obtain the skeletal skinning animation of the target object.

[0011] Optionally, obtaining skeletal animation data stored in a model file of the target object, and determining an actual position of each vertex in the skinning network in a world coordinate system based on the skeletal animation data and the at least two vertex weight tables, comprises:

[0012] Obtaining a sub-skeletal model corresponding to each root bone from the skeletal model to obtain at least two sub-skeletal models;

[0013] Determine, based on the skeletal animation data, a reference position of each vertex in a sub-skin network corresponding to each sub-skeletal model in the at least two sub-skeletal models in a world coordinate system;

[0014] Based on the at least two vertex weight tables and the reference position of each vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system, the actual position of each vertex in the skin network in the world coordinate system is determined.

[0015] Optionally, the skeletal animation data includes a skeletal offset matrix, a skeletal initial position, and skeletal key frame data, and determining a reference position of each vertex in a sub-skin network corresponding to each sub-skeletal model of the at least two sub-skeletal models in a world coordinate system based on the skeletal animation data includes:

[0016] Obtaining initial position information of each vertex in the sub-skin network corresponding to the reference sub-skeletal model, wherein the initial position information of each vertex is the position information of each vertex in the world coordinate system, and the reference sub-skeletal model is any one of the at least two sub-skeletal models;

[0017] Based on the bone offset matrix, the initial position information of each vertex in the sub-skin network corresponding to the reference sub-skeletal model, the initial position of each bone in the reference sub-skeletal model and the bone key frame data of each bone, the reference position of each vertex in the sub-skin network corresponding to the reference sub-skeletal model in the world coordinate system is determined.

[0018] Optionally, based on the bone offset matrix, the initial position information of each vertex in the sub-skin network corresponding to the reference sub-skeletal model, the initial position of each bone in the reference sub-skeletal model and the bone key frame data of each bone, determining the reference position of each vertex in the sub-skin network corresponding to the reference sub-skeletal model in the world coordinate system, comprising:

[0019] Based on the bone offset matrix and the initial position information of each vertex in the sub-skin network corresponding to the reference sub-skeletal model, determine the intermediate position information of each vertex in the bone coordinate system of the reference root bone, wherein the reference root bone corresponds to the reference sub-skeletal model, and the reference root bone is any one of the at least two root bones;

[0020] Based on the intermediate position information of each vertex in the bone coordinate system of the reference root bone, the initial position of each bone in the reference sub-skeletal model and the bone key frame data of each bone, the reference position of each vertex in the sub-skin network corresponding to the reference sub-skeletal model in the world coordinate system is determined.

[0021] Optionally, determining the actual position of each vertex in the skin network in the world coordinate system based on the at least two vertex weight tables and the reference position of each vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system comprises:

[0022] Based on the reference position of the reference vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system and the vertex weight table corresponding to each root bone, the actual position of the reference vertex in the skin network in the world coordinate system is determined, wherein the reference vertex is any vertex included in the skin network.

[0023] Optionally, determining the actual position of the reference vertex in the skin network in the world coordinate system based on the reference position of the reference vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system and the vertex weight table corresponding to each root bone includes:

[0024] Acquire the vertex information of the reference vertex from the vertex weight table of each root bone, and obtain the influence weight of each root bone on the reference vertex;

[0025] Based on the influence weight of each root bone on the reference vertex, determine a new influence weight of each root bone on the reference vertex;

[0026] Based on the new influence weight of each root bone on the reference vertex and the reference position of the reference vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system, the actual position of the reference vertex in the skin network in the world coordinate system is determined.

[0027] Optionally, rendering the target object based on the actual position of each vertex in the skinning network in a world coordinate system includes:

[0028] Material data is obtained, and the target object is rendered based on the material data and the actual position of each vertex in the world coordinate system.

[0029] According to a second aspect of an embodiment of this specification, a device for implementing a skeleton skinning animation is provided, comprising:

[0030] A creation module, configured to create a skeleton model of the target object and set at least two root bones in the skeleton model;

[0031] A configuration module is configured to configure a vertex weight table for each root bone to obtain at least two vertex weight tables, wherein the vertex weight table of each root bone includes vertex information of vertices in the skin network corresponding to the skeleton model, each vertex information includes a vertex identifier of the vertex and an influence weight of the root bone on the vertex, and each influence weight is used to characterize the influence degree of the root bone on the vertex;

[0032] A determination module is configured to obtain the skeletal animation data stored in the model file of the target object, and determine the actual position of each vertex in the skinning network in the world coordinate system based on the skeletal animation data and the at least two vertex weight tables;

[0033] The rendering module is configured to render the target object based on the actual position of each vertex in the skinning network in the world coordinate system to obtain the skeleton skinning animation of the target object.

[0034] According to a third aspect of an embodiment of this specification, a computing device is provided, including:

[0035] Memory and processor;

[0036] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions:

[0037] Creating a skeleton model of the target object, and setting at least two root bones in the skeleton model;

[0038] Configure a vertex weight table for each root bone to obtain at least two vertex weight tables, wherein the vertex weight table of each root bone includes vertex information of vertices in the skin network corresponding to the skeleton model, each vertex information includes a vertex identifier of the vertex and an influence weight of the root bone on the vertex, and each influence weight is used to characterize the influence degree of the root bone on the vertex;

[0039] Acquire the skeletal animation data stored in the model file of the target object, and determine the actual position of each vertex in the skinning network in the world coordinate system based on the skeletal animation data and the at least two vertex weight tables;

[0040] The target object is rendered based on the actual position of each vertex in the skinning network in the world coordinate system to obtain the skeletal skinning animation of the target object.

[0041] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the steps of the above-mentioned method for implementing skeletal skinning animation are implemented.

[0042] The implementation method of the skeleton skinning animation provided in this specification creates a skeleton model of a target object, and sets at least two root bones in the skeleton model; configures a vertex weight table for each root bone, and obtains at least two vertex weight tables, wherein the vertex weight table of each root bone includes the vertex information of the vertex in the skinning network corresponding to the skeleton model, and each vertex information includes the vertex identification of the vertex and the influence weight of the root bone on the vertex, and each influence weight is used to characterize the influence degree of the root bone on the vertex; obtains the skeleton animation data stored in the model file of the target object, and determines the actual position of each vertex in the skinning network in the world coordinate system based on the skeleton animation data and the at least two vertex weight tables; renders the target object based on the actual position of each vertex in the skinning network in the world coordinate system, and obtains the skeleton skinning animation of the target object. Through the method of the embodiment of the present application, it is not necessary to make skeleton skinning animation for each action of the target object, which reduces the waste of computing resources and the occupation of memory space, and by adjusting the influence weight of the root bone on the vertex, the actions of different parts of the target object can be flexibly adjusted, thereby achieving richer animation effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a flow chart of a method for implementing a skeleton skinning animation provided in an embodiment of this specification;

[0044] Figure 2 is a schematic diagram of a vertex weight table provided in an embodiment of this specification;

[0045] Figure 3 is a schematic diagram of another vertex weight table provided in an embodiment of this specification;

[0046] Figure 4 It is a schematic diagram of a sub-skin network provided in an embodiment of this specification;

[0047] Figure 5 It is a processing flow chart of a method for implementing a skeletal skinning animation applied to a game scene provided in an embodiment of this specification;

[0048] Figure 6 is a schematic diagram of another vertex weight table provided in an embodiment of this specification;

[0049] Figure 7It is a structural schematic diagram of a device for realizing skeleton skinning animation provided in an embodiment of this specification;

[0050] Figure 8 It is a structural block diagram of a computing device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0051] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0052] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0053] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, 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 one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. 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".

[0054] First, the terms involved in one or more embodiments of this specification are explained.

[0055] Skeletal skinned animation: specifically refers to skinned mesh, also known as skeletal animation. Its basic principle is to calculate the vertices of the skin network through vertex blending dynamics under the control of bones, and the child bones move relative to the root bone, and are driven by animation keyframe data. In skeletal skinned animation, a target object consists of a skin network as the skin and bones organized in a certain hierarchy.

[0056] Skinning: It means attaching (binding) the vertices in the Mesh to the bones, and each vertex can be controlled by multiple bones, so that the vertices at the joints change their positions due to the pulling of the parent and child bones at the same time, thus eliminating the cracks.

[0057] Keyframe: Records bone transformation information including time, displacement, rotation, scaling, and transition interpolation.

[0058] Target object: The target object can be a game object or a game character in the virtual scene. For example, the target object can be a person, animal, plant, etc. in the virtual scene.

[0059] In this specification, a method for implementing skeletal skinning animation is provided. This specification also relates to an implementation device for skeletal skinning animation, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.

[0060] Figure 1 A flowchart of a method for implementing a skeleton skinning animation according to an embodiment of the present specification is shown, which specifically includes the following steps:

[0061] Step 102: Create a skeleton model of the target object and set at least two root bones in the skeleton model.

[0062] In implementation, a skeleton model can be created for a target object. The skeleton model includes two types of skeletons, root skeletons and non-root skeletons, and there is a certain hierarchy between the root skeleton and the non-root skeleton, and the hierarchy of the skeleton describes the structure of the target object. In some embodiments, all the skeletons in the skeleton model form a tree according to the parent-child relationship, the trunk represents the entire skeleton, and each of the remaining nodes represents a skeleton.

[0063] As an example, poser software or 3ds MAX (3D Studio Max) software may be used to create a skeleton model for the target object, but this embodiment of the present application does not limit this.

[0064] Among them, poser software is a software that can be used for 3D animal and human modeling and 3D human animation. 3ds MAX software is a software that can be used for 3D animation rendering and production based on PC (Personal Computer) system.

[0065] As an example, unlike the existing skeleton model, the skeleton model may include at least two root bones. Specifically, the bones corresponding to the parts of the skeleton model that will move can be set as root bones. For example, assuming that the target object is a ninja in the game, the skeleton model of the ninja may include five root bones, namely, the initial root bone, the left hand bone, the right hand bone, the left foot bone and the right foot bone.

[0066] Step 104: Configure a vertex weight table for each root bone to obtain at least two vertex weight tables, wherein the vertex weight table of each root bone includes vertex information of vertices in the skinning network corresponding to the skeleton model, each vertex information includes the vertex identifier of the vertex and the influence weight of the root bone on the vertex, and each influence weight is used to characterize the degree of influence of the root bone on the vertex.

[0067] The vertex identifier is used to uniquely identify a vertex. As an example, the vertex identifier can be a number, a label, a letter, etc.

[0068] In the embodiment of the present specification, when different root bones are used as reference root bones, different sub-bone models can be derived from the created bone model, and different sub-bone models can correspond to different sub-skin networks. Therefore, the position of the vertex in the skin network of the target object can be obtained by merging the positions of the vertices in different sub-skin networks. Therefore, it is necessary to configure a vertex weight table for each root bone to determine the influence weight of the root bone on each vertex.

[0069] As an example, the vertex weight table of each root bone may be set by modeling software, or the vertex weight table of each root bone may be set manually.

[0070] In practice, the greater the weight of the root bone's influence on the vertex, the greater the influence of the root bone on the vertex. If the position of the root bone changes significantly, the position of the vertex will also change significantly. The smaller the weight of the root bone's influence on the vertex, the smaller the influence of the root bone on the vertex. If the position of the root bone changes significantly, the position of the vertex may change slightly.

[0071] As an example, assuming that the target object is a ninja, taking root bone A as an example, and the skin network includes 100 vertices, the vertex weight table of root bone A includes vertex identifiers of 100 vertices, and each vertex identifier corresponds to an influence weight, which indicates the influence of root bone A on the vertex indicated by the vertex identifier. For example, for any vertex a, the influence weight corresponding to the vertex a is the influence of root bone A on the vertex a.

[0072] For example, assuming that the target object includes 5 root bones, and a vertex weight table is configured for each root bone, then 5 vertex weight tables can be configured. In this way, for any vertex in the skinning network, the vertex can correspond to 5 influence weights, and the 5 influence weights respectively represent the degree of influence of the 5 root bones on the vertex. Assume that the bone identifiers of the five root bones are A, B, C, D and E respectively, and for the reference vertex a, the five root bones all affect the reference vertex a, then in the vertex weight table of the root bone A, the vertex information of the reference vertex a includes the vertex identifier a and the influence weight W1 of the root bone A on the vertex; in the vertex weight table of the root bone B, the vertex information of the reference vertex a includes the vertex identifier a and the influence weight W2 of the root bone B on the vertex; in the vertex weight table of the root bone C, the vertex information of the reference vertex a includes the vertex identifier a and the influence weight W3 of the root bone on the vertex; in the vertex weight table of the root bone D, the vertex information of the reference vertex a includes the vertex identifier a and the influence weight W4 of the root bone D on the vertex; in the vertex weight table of the root bone E, the vertex information of the reference vertex a includes the vertex identifier a and the influence weight W5 of the root bone E on the vertex.

[0073] For example, see Figure 2 , Figure 2 It is a schematic diagram of a vertex weight table shown in an exemplary embodiment of this specification. Figure 2 The vertex weight table shown is the vertex weight table of the root bone A, and in Figure 2 The middle skin network includes 15 vertices, and the value of each vertex is the influence weight of the root bone A on the vertex. i represents vertex i, w Ai Represents the influence weight of the root bone A on vertex i. For example, the influence weight corresponding to vertex I1 is w A1 , the influence weight corresponding to vertex I2 is w A2 etc.

[0074] For example, see Figure 3 , Figure 3 is a schematic diagram of another vertex weight table shown in an exemplary embodiment of this specification, and Figure 3 is the vertex weight table obtained by merging the five vertex weight tables. Figure 3 The skin network consists of 15 vertices I, where I irepresents vertex i, and each vertex corresponds to 5 influence weights, and the 5 influence weights of each vertex are the influence of the 5 root bones on the vertex. Assuming that the skeletal model includes 5 root bones, namely A, B, C, D, and E, the value in the upper left corner of each vertex can represent the influence weight of the root bone A on the vertex, the value in the upper right corner of each vertex can represent the influence weight of the root bone B on the vertex, the value in the lower left corner of each vertex can represent the influence weight of the root bone C on the vertex, and the value in the lower right corner of each vertex can represent the influence weight of the root bone D on the vertex. That is, w ji represents the influence weight of root bone j on vertex i. For example, w A1 Indicates the influence weight of root bone A on vertex 1, w B1 Indicates the influence weight of the root bone B on vertex 1, w C1 Indicates the influence weight of the root bone C on vertex 1, w D1 Represents the influence weight of the root bone D on vertex 1, w E1 Indicates the influence weight of the root bone E on vertex 1, w A3 Represents the influence weight of root bone A on vertex 3, and so on.

[0075] Step 106: Obtain the skeletal animation data stored in the model file of the target object, and determine the actual position of each vertex in the skinning network in the world coordinate system based on the skeletal animation data and the at least two vertex weight tables.

[0076] As an example, the stored skeletal animation data may be obtained by parsing the model file of the target object.

[0077] In implementation, the specific implementation of determining the actual position of each vertex in the skin network in the world coordinate system based on the skeletal animation data and the at least two vertex weight tables may include: obtaining a sub-skeletal model corresponding to each root bone from the skeletal model to obtain at least two sub-skeletal models; determining the reference position of each vertex in the sub-skin network corresponding to each of the at least two sub-skeletal models in the world coordinate system based on the skeletal animation data; determining the actual position of each vertex in the skin network in the world coordinate system based on the at least two vertex weight tables and the reference position of each vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system.

[0078] That is to say, at least two root bones can be used as root bones, and the sub-skeletal model corresponding to each root bone can be derived from the skeletal model to obtain at least two sub-skeletal models. Each sub-skeletal model can correspond to a sub-skin mesh. The reference position of each vertex in each sub-skinning network in the world coordinate system can be determined based on the skeletal animation data, and then the actual position of each vertex in the skinning network in the world coordinate system can be determined based on the vertex weight table and the reference position of each vertex in each sub-skinning network.

[0079] As an example, when a certain root bone is used as a reference root bone, all bones in the skeleton model except the reference root bone are sub-bones of the reference root bone. Moreover, different sub-bone models can be obtained from the skeleton model by using different root bones as reference root bones, and the sub-bone model may include all bones in the skeleton model, or may include some bones in the skeleton model. For example, taking the left hand bone as the reference root bone, the sub-bone model obtained from the skeleton model may include bones corresponding to the arm and hand, but may not include bones of the body, right hand, right foot, left leg and other parts.

[0080] Since the relative positions between the bones in the skeletal model and the vertices in the skin network are determined, and the bones that affect the vertices are also determined, the sub-skeletal model may not include bones that affect certain vertices. Therefore, the sub-skeletal model corresponds to a sub-skin network, which may include some vertices in the skin network.

[0081] For example, see Figure 4 , Figure 4 It is a sub-skin network corresponding to a sub-skeletal model derived from a skeletal model with root bone A as a reference root bone. The sub-skin network includes four vertices, namely I1, I2, I3 and I4.

[0082] In one embodiment of the present application, the skeletal animation data includes a skeletal offset matrix, a skeletal initial position, and skeletal key frame data. The specific implementation of determining the reference position of each vertex in the sub-skin network corresponding to each sub-skeletal model of the at least two sub-skeletal models in the world coordinate system based on the skeletal animation data may include: obtaining the initial position information of each vertex in the sub-skin network corresponding to the reference sub-skeletal model, wherein the initial position information of each vertex is the position information of each vertex in the world coordinate system, and the reference sub-skeletal model is any one of the at least two sub-skeletal models; determining the reference position of each vertex in the sub-skin network corresponding to the reference sub-skeletal model in the world coordinate system based on the skeletal offset matrix, the initial position information of each vertex in the sub-skin network corresponding to the reference sub-skeletal model, the initial position of each bone in the reference sub-skeletal model, and the skeletal key frame data of each bone.

[0083] As an example, the bone offset matrix may be a matrix that transforms vertices from the skin mesh space to the bone space, and may be called a Bone Offset Matrix. The bone initial position may be the position of the bone in the world coordinate system before the movement.

[0084] In some embodiments, taking the reference sub-skeletal model as an example, the initial position information of each vertex in the sub-skin network corresponding to the reference sub-skeletal model before the skeleton moves can be obtained.

[0085] In some embodiments, based on the bone offset matrix, the initial position information of each vertex in the sub-skin network corresponding to the reference sub-skeletal model, the initial position of each bone in the reference sub-skeletal model and the bone key frame data of each bone, the specific implementation of determining the reference position of each vertex in the sub-skin network corresponding to the reference sub-skeletal model in the world coordinate system may include: based on the bone offset matrix and the initial position information of each vertex in the sub-skin network corresponding to the reference sub-skeletal model, determining the intermediate position information of each vertex in the bone coordinate system of the reference root bone, wherein the reference root bone corresponds to the reference sub-skeletal model, and the reference root bone is any one of the at least two root bones; based on the intermediate position information of each vertex in the bone coordinate system of the reference root bone, the initial position of each bone in the reference sub-skeletal model and the bone key frame data of each bone, determining the reference position of each vertex in the sub-skin network corresponding to the reference sub-skeletal model in the world coordinate system.

[0086] In one possible implementation, taking the reference vertex as an example, the initial position information of the reference vertex in the sub-skin network can be converted into the intermediate position information in the bone coordinate system according to the bone offset matrix, and the reference position of the reference vertex in the sub-skin network corresponding to the reference sub-skin model in the world coordinate system can be determined based on the intermediate position information of the reference vertex in the bone coordinate system of the reference root bone, the initial position of the bone that affects the reference vertex in the reference sub-skin model, and the bone key frame data of each bone that affects the reference vertex.

[0087] As an example, the initial position information of the reference vertex in the sub-skinning network can be multiplied by the bone offset matrix to obtain the intermediate position information of the reference vertex in the bone coordinate system.

[0088] As an example, the skeleton key frame data may include skeleton displacement data (translation), skeleton rotation data (rotation) and skeleton scaling data (scale). Furthermore, the three sets of data may be used as elements to form a 4×4 skeleton key frame matrix. Specifically, a 3×3 matrix is ​​first obtained through the skeleton rotation data and the skeleton scaling data, and then the skeleton displacement data is added to the 3×3 matrix to obtain a 4×4 skeleton key frame matrix.

[0089] Exemplarily, the displacement data in the x-direction of the bone displacement data can be used as the element of the fourth row and first column in the 3×3 matrix, the displacement data in the y-direction can be used as the element of the fourth row and second column in the 3×3 matrix, the displacement data in the z-direction can be used as the element of the fourth row and third column in the 3×3 matrix, and 0 can be used as the element of the fourth row and fourth column in the 3×3 matrix, so as to obtain a 4×4 bone key frame matrix. Alternatively, exemplarily, the displacement data in the x-direction of the bone displacement data can be used as the element of the first row and fourth column in the 3×3 matrix, the displacement data in the y-direction can be used as the element of the second row and fourth column in the 3×3 matrix, the displacement data in the z-direction can be used as the element of the third row and fourth column in the 3×3 matrix, and 0 can be used as the element of the fourth row and fourth column in the 3×3 matrix, so as to obtain a 4×4 bone key frame matrix.

[0090] As an example, assume that bones P and bones Q are two bones in the child skeleton model J that have an influence on the reference vertex c. For the reference vertex c, based on the intermediate position information of the reference vertex c in the bone coordinate system of the root bone A of the child skeleton model J, the initial position of the bone P and the influence weight of the bone P on the reference vertex c, the first position of the reference vertex c under the influence of the bone P can be determined, based on the intermediate position information of the reference vertex c in the bone coordinate system of the root bone A and the initial position of the bone P, the initial position of the bone Q and the influence weight of the bone Q on the reference vertex c, the first position of the reference vertex c under the influence of the bone Q can be determined, and by superimposing the first position of the reference vertex c under the influence of the bone P and the second position of the reference vertex c under the influence of the bone Q, the reference position of the reference vertex c in the sub-skin network corresponding to the child skeleton model J in the world coordinate system can be determined.

[0091] Through the above method, the reference position of each vertex in the sub-skin network corresponding to the sub-skeletal model J in the world coordinate system can be determined, and then the reference position of each vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system can be determined.

[0092] For example, taking the left hand bone as the reference root bone, the sub-bone model corresponding to the reference root bone may include bones of the arm and hand. Therefore, the reference position of each vertex in the sub-skin network corresponding to the sub-bone model in the world coordinate system can be obtained.

[0093] In one embodiment of the present application, based on the at least two vertex weight tables and the reference position of each vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system, the specific implementation of determining the actual position of each vertex in the skin network in the world coordinate system may include: based on the reference position of the reference vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system and the vertex weight table corresponding to each root bone, determining the actual position of the reference vertex in the skin network in the world coordinate system, wherein the reference vertex is any vertex included in the skin network.

[0094] That is to say, taking the reference vertex as an example, after determining the reference position of the reference vertex in each sub-skeletal model in the world coordinate system, the actual position of the reference vertex in the skinning network in the world coordinate system can be determined based on the influence weight of each root bone on the reference vertex.

[0095] In some embodiments, the specific implementation of determining the actual position of the reference vertex in the skin network in the world coordinate system based on the reference position of the reference vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system and the vertex weight table corresponding to each root bone may include: obtaining the vertex information of the reference vertex from the vertex weight table of each root bone to obtain the influence weight of each root bone on the reference vertex; determining the new influence weight of each root bone on the reference vertex based on the influence weight of each root bone on the reference vertex; determining the actual position of the reference vertex in the skin network in the world coordinate system based on the new influence weight of each root bone on the reference vertex and the reference position of the reference vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system.

[0096] That is to say, for the reference vertex, the influence weight of each root bone on the reference vertex can be determined from the vertex weight table of each root bone. Since the sum of the influence weights of at least two root bones on the same vertex is 1, the new influence weight of each root bone on the reference vertex can be determined based on the influence weight of each root bone on the reference vertex, and the sum of the new influence weights of at least two root bones is 1. Then, based on the new influence weight of each root bone and the reference position of the reference vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system, the actual position of the reference vertex in the skin network in the world coordinate system can be determined.

[0097] That is, for the vertices in the skinning network, each vertex includes at least two reference positions in the world coordinate system, and the at least two reference positions correspond to the sub-skinning network. It is necessary to determine the actual position of each vertex in the skinning network based on the at least two reference positions and the influence weight of each root bone on the vertex.

[0098] For example, see Figure 3 , taking vertex I1 as the reference vertex, the influence weight of root bone A on vertex I1 is w A1 , the influence weight of the root bone B on vertex I1 is w B1 , the influence weight of the root bone C on vertex I1 is w C1 , the influence weight of the root bone D on vertex I1 is w D1 , the influence weight of the root bone E on vertex I1 is w E1 , we can determine that the new influence weight of the root bone A on the vertex I1 is w A1 ÷(w A1 +w B1 +w C1 +w D1 +w E1 )=w A1 ', determine the new influence weight of the root bone B on the vertex I1 is w B1 ÷(w A1 +w B1 +w C1 +w D1 +w E1 )=w B1 ', determine the new influence weight of the root bone C on the vertex I1 is w C1 ÷(w A1 +w B1 +w C1 +w D1 +w E1 )=w C1 ', determine the new influence weight of the root bone D on the vertex I1 is w D1 ÷(w A1 +w B1 +w C1 +w D1 +w E1 )=w D1 ', determine the new influence weight of the root bone E on the vertex I1 is w E1 ÷(w A1 +w B1 +w C1 +w D1 +w E1 )=w E1'. Assuming that the position of the vertex I1 in the sub-skin mesh corresponding to the sub-skeletal model with root bone A as the root bone in the world coordinate system is L1, the position of the vertex I1 in the sub-skin mesh corresponding to the sub-skeletal model with root bone B as the root bone in the world coordinate system is L2, the position of the vertex I1 in the sub-skin mesh corresponding to the sub-skeletal model with root bone C as the root bone in the world coordinate system is L3, the position of the vertex I1 in the sub-skin network corresponding to the sub-skeletal model with root bone D as the root bone in the world coordinate system is L4, and the position of the vertex I1 in the sub-skin network corresponding to the sub-skeletal model with root bone E as the root bone in the world coordinate system is L5, then it can be determined that the actual position of the vertex I1 in the skin network in the world coordinate system is w A1 '×L1+w B1 '×L2+w C1 '×L3+w D1 '×L4+w E1 '×L5.

[0099] The above method can be used to determine the actual position of each vertex in the skin network in the world coordinate system.

[0100] In the embodiment of the present application, the influence weight of the root bone on the vertex can be adjusted to thereby adjust the movement of the bone, so that the actions of different parts of the target object can be flexibly adjusted.

[0101] Step 108: Render the target object based on the actual position of each vertex in the skin network in the world coordinate system to obtain the skeletal skin animation of the target object.

[0102] In some embodiments, the specific implementation of this step may include: acquiring material data, and rendering the target object based on the material data and the actual position of each vertex in the world coordinate system.

[0103] As an example, the material data may include the map path, lighting parameters, and drawing blending parameter information corresponding to each mesh in the skinned mesh.

[0104] Exemplarily, the target object may be rendered by a rendering tool according to the material data and the actual position of each vertex in each frame in the world coordinate system, and the skeleton skinning animation of the target object may be obtained.

[0105] The implementation method of the skeleton skinning animation provided in this specification creates a skeleton model of a target object, and sets at least two root bones in the skeleton model; configures a vertex weight table for each root bone, and obtains at least two vertex weight tables, wherein the vertex weight table of each root bone includes the vertex information of the vertex in the skinning network corresponding to the skeleton model, and each vertex information includes the vertex identification of the vertex and the influence weight of the root bone on the vertex, and each influence weight is used to characterize the influence degree of the root bone on the vertex; obtains the skeleton animation data stored in the model file of the target object, and determines the actual position of each vertex in the skinning network in the world coordinate system based on the skeleton animation data and the at least two vertex weight tables; renders the target object based on the actual position of each vertex in the skinning network in the world coordinate system, and obtains the skeleton skinning animation of the target object. Through the method of the embodiment of the present application, it is not necessary to make skeleton skinning animation for each action of the target object, which reduces the waste of computing resources and the occupation of memory space, and by adjusting the influence weight of the root bone on the vertex, the actions of different parts of the target object can be flexibly adjusted, thereby achieving richer animation effects.

[0106] The following combination Figure 5 , taking the application of the implementation method of the skeleton skinning animation provided in this specification in the game scene as an example, the implementation method of the skeleton skinning animation is further explained. Among them, Figure 5 A processing flow chart of a method for implementing a skeletal skinning animation applied to a game scene provided by an embodiment of this specification is shown, which may specifically include the following steps:

[0107] Step 502, create a skeleton model of the game character, and set five root bones A, B, C, D and E in the skeleton model.

[0108] For example, assuming that the game character is a human, you can create a skeleton model for the human, and in addition to the original root bone E, you can also set the left hand bone A, right hand bone B, left foot bone C and right foot bone D as root bones.

[0109] In the embodiment of the present application, the number of root bones of the skeleton model is not limited. This embodiment only takes the number of five root bones as an example to illustrate the implementation method of skeleton skinning animation.

[0110] It should be noted that the implementation of step 502 is the same as that of step 102. For details, please refer to the relevant description of step 102, which will not be repeated in this embodiment.

[0111] Step 504, configure a vertex weight table for each root bone to obtain five vertex weight tables.

[0112] Among them, the vertex weight table of each root bone includes vertex information of vertices in the skinning network corresponding to the skeleton model, each vertex information includes the vertex identifier of the vertex and the influence weight of the root bone on the vertex, and each influence weight is used to characterize the degree of influence of the root bone on the vertex.

[0113] For example, see Figure 6 , Figure 6 is the vertex weight table obtained by merging the five vertex weight tables. i Represents vertex i, the value in the upper left corner of each vertex represents the influence weight of root bone A on the vertex, the value in the upper right corner represents the influence weight of root bone B on the vertex, the value in the lower left corner represents the influence weight of root bone C on the vertex, and the value in the lower right corner represents the influence weight of root bone D on the vertex. As can be seen from the figure, the influence weight of root bone A on vertex I2 is 0.5, the influence weight of root bone B on vertex I2 is 0.5, the influence weight of root bone E on vertex I2 is 1, and the influence weight of other root bones on vertex I1 is 0, and so on, the influence weight of each root bone on each vertex can be obtained.

[0114] It should be noted that the implementation of step 502 is the same as that of step 104. For details, please refer to the relevant description of step 104, which will not be repeated in this embodiment.

[0115] Step 506, obtaining the sub-skeletal model corresponding to each root bone from the skeleton model, and obtaining five sub-skeletal models.

[0116] For example, the five skeleton models are the sub-skeleton models M corresponding to the root skeleton A. A , the child skeleton model M corresponding to the root skeleton B B , the child skeleton model M corresponding to the root skeleton C C , the child skeleton model M corresponding to the root skeleton D D , the child skeleton model M corresponding to the root skeleton E E .

[0117] Step 508: Using the child skeleton model M A For example, get the child skeleton model M A The initial position information of each vertex in the corresponding sub-skin network.

[0118] Step 510, based on the bone offset matrix and the child bone model M A The initial position information of each vertex in the corresponding sub-skin network determines the intermediate position information of each vertex in the bone coordinate system of the root bone A.

[0119] Step 512, based on the intermediate position information of each vertex in the skeleton coordinate system of the root skeleton A, the sub-skeleton model M AThe initial position of each bone and the bone key frame data of each bone in the sub-bone model M are determined. A The reference position of each vertex in the corresponding sub-skin network in the world coordinate system.

[0120] For example, suppose the middle position information of vertex I2 in the bone coordinate system of root bone A is L 2A .

[0121] Step 514, taking vertex I2 as an example, obtain the vertex information of vertex I2 from the vertex weight table of each root bone, and obtain the influence weight of each root bone on vertex I2.

[0122] Continuing with the above example, see Figure 6 , we can get that the influence weight of root bone A on vertex I2 is 0.5, the influence weight of root bone B on vertex I2 is 0.5, the influence weight of root bone C on vertex I2 is 0, the influence weight of root bone D on vertex I2 is 0, and the influence weight of root bone E on vertex I2 is 1.

[0123] Step 516, based on the influence weight of each root bone on vertex I2, determine the new influence weight of each root bone on vertex I2.

[0124] Continuing with the above example, we can determine that the new influence weight of root bone A on vertex I2 is 0.5÷(0.5+0.5+1)=0.25, the new influence weight of root bone B on vertex I2 is 0.5÷(0.5+0.5+1)=0.25, the new influence weight of root bone C on vertex I2 is 0, the new influence weight of root bone D on vertex I5I2 is 0, and the new influence weight of root bone E on vertex I2 is 1÷(0.5+0.5+1)=0.5.

[0125] It should be noted that the reference position of each vertex in each sub-skin network in the world coordinate system can be determined through the above steps 506 to 516.

[0126] Step 518, based on the new influence weight of each root bone on vertex I2 and the reference position of vertex I2 in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system, determine the actual position of vertex I2 in the skin network in the world coordinate system.

[0127] For example, suppose the middle position information of I2 in the bone coordinate system of the root bone A is L 2A , the middle position information of I2 in the bone coordinate system of the root bone B is L 2B , the middle position information of I2 in the bone coordinate system of the root bone C is L 2C , the middle position information of I2 in the bone coordinate system of the root bone D is L 2D, the middle position information of I2 in the bone coordinate system of the root bone E is L 2E , the new influence weight of root bone A on vertex I2 is 0.25, the new influence weight of root bone B on vertex I2 is 0.25, the new influence weight of root bone C on vertex I2 is 0, the new influence weight of root bone D on vertex I2 is 0, and the new influence weight of root bone E on vertex I2 is 0.5. It can be determined that the actual position of vertex I2 in the skinning network in the world coordinate system is 0.25×L 2A +0.25×L 2B +0×L 2C +0×L 2D +1×L 2E .

[0128] It should be noted that the above steps 506 to 518 are subordinate descriptions of step 106. For specific implementation, please refer to the relevant description of step 106, which will not be repeated in this embodiment.

[0129] Step 520: Acquire material data, and render the target object based on the material data and the actual position of each vertex in the world coordinate system.

[0130] In some embodiments, the specific implementation of this step may include: acquiring material data, and rendering the target object based on the material data and the actual position of each vertex in the world coordinate system.

[0131] As an example, the material data may include the map path, lighting parameters, and drawing blending parameter information corresponding to each mesh in the skinned mesh.

[0132] Exemplarily, the target object may be rendered by a rendering tool according to the material data and the actual position of each vertex in each frame in the world coordinate system, and the skeleton skinning animation of the target object may be obtained.

[0133] The implementation method of the skeleton skinning animation provided in this specification creates a skeleton model of a target object, and sets at least two root bones in the skeleton model; configures a vertex weight table for each root bone, and obtains at least two vertex weight tables, wherein the vertex weight table of each root bone includes the vertex information of the vertex in the skinning network corresponding to the skeleton model, and each vertex information includes the vertex identification of the vertex and the influence weight of the root bone on the vertex, and each influence weight is used to characterize the influence degree of the root bone on the vertex; obtains the skeleton animation data stored in the model file of the target object, and determines the actual position of each vertex in the skinning network in the world coordinate system based on the skeleton animation data and the at least two vertex weight tables; renders the target object based on the actual position of each vertex in the skinning network in the world coordinate system, and obtains the skeleton skinning animation of the target object. Through the method of the embodiment of the present application, it is not necessary to make skeleton skinning animation for each action of the target object, which reduces the waste of computing resources and the occupation of memory space, and by adjusting the influence weight of the root bone on the vertex, the actions of different parts of the target object can be flexibly adjusted, thereby achieving richer animation effects.

[0134] Corresponding to the above method embodiment, this specification also provides an implementation device embodiment of skeleton skinning animation. Figure 7 FIG. 1 is a schematic diagram showing a structure of a device for implementing a skeleton skinning animation provided by an embodiment of the present specification. Figure 7 As shown, the device may include:

[0135] A creation module 702 is configured to create a skeleton model of a target object and set at least two root bones in the skeleton model;

[0136] The configuration module 704 is configured to configure a vertex weight table for each root bone to obtain at least two vertex weight tables, wherein the vertex weight table of each root bone includes vertex information of vertices in the skin network corresponding to the skeleton model, each vertex information includes a vertex identifier of the vertex and an influence weight of the root bone on the vertex, and each influence weight is used to characterize the influence degree of the root bone on the vertex;

[0137] The determination module 706 is configured to obtain the skeletal animation data stored in the model file of the target object, and determine the actual position of each vertex in the skin network in the world coordinate system based on the skeletal animation data and the at least two vertex weight tables;

[0138] The rendering module 708 is configured to render the target object based on the actual position of each vertex in the skinning network in the world coordinate system to obtain the skeleton skinning animation of the target object.

[0139] Optionally, the determination module 706 is configured to:

[0140] Obtaining a sub-skeletal model corresponding to each root bone from the skeletal model to obtain at least two sub-skeletal models;

[0141] Determine, based on the skeletal animation data, a reference position of each vertex in a sub-skin network corresponding to each sub-skeletal model in the at least two sub-skeletal models in a world coordinate system;

[0142] Based on the at least two vertex weight tables and the reference position of each vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system, the actual position of each vertex in the skin network in the world coordinate system is determined.

[0143] Optionally, the determination module 706 is configured to:

[0144] The skeleton animation data includes a skeleton offset matrix, a skeleton initial position and skeleton key frame data, and obtains the initial position information of each vertex in the sub-skin network corresponding to the reference sub-skeletal model, wherein the initial position information of each vertex is the position information of each vertex in the world coordinate system, and the reference sub-skeletal model is any one of the at least two sub-skeletal models;

[0145] Based on the bone offset matrix, the initial position information of each vertex in the sub-skin network corresponding to the reference sub-skeletal model, the initial position of each bone in the reference sub-skeletal model and the bone key frame data of each bone, the reference position of each vertex in the sub-skin network corresponding to the reference sub-skeletal model in the world coordinate system is determined.

[0146] Optionally, the determination module 706 is configured to:

[0147] Based on the bone offset matrix and the initial position information of each vertex in the sub-skin network corresponding to the reference sub-skeletal model, determine the intermediate position information of each vertex in the bone coordinate system of the reference root bone, wherein the reference root bone corresponds to the reference sub-skeletal model, and the reference root bone is any one of the at least two root bones;

[0148] Based on the intermediate position information of each vertex in the bone coordinate system of the reference root bone, the initial position of each bone in the reference sub-skeletal model and the bone key frame data of each bone, the reference position of each vertex in the sub-skin network corresponding to the reference sub-skeletal model in the world coordinate system is determined.

[0149] Optionally, the determination module 706 is configured to:

[0150] Based on the reference position of the reference vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system and the vertex weight table corresponding to each root bone, the actual position of the reference vertex in the skin network in the world coordinate system is determined, wherein the reference vertex is any vertex included in the skin network.

[0151] Optionally, the determination module 706 is configured to:

[0152] Acquire the vertex information of the reference vertex from the vertex weight table of each root bone, and obtain the influence weight of each root bone on the reference vertex;

[0153] Based on the influence weight of each root bone on the reference vertex, determine a new influence weight of each root bone on the reference vertex;

[0154] Based on the new influence weight of each root bone on the reference vertex and the reference position of the reference vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system, the actual position of the reference vertex in the skin network in the world coordinate system is determined.

[0155] Optionally, the rendering module 708 is configured to:

[0156] Material data is obtained, and the target object is rendered based on the material data and the actual position of each vertex in the world coordinate system.

[0157] The implementation method of the skeleton skinning animation provided in this specification creates a skeleton model of a target object, and sets at least two root bones in the skeleton model; configures a vertex weight table for each root bone, and obtains at least two vertex weight tables, wherein the vertex weight table of each root bone includes the vertex information of the vertex in the skinning network corresponding to the skeleton model, and each vertex information includes the vertex identification of the vertex and the influence weight of the root bone on the vertex, and each influence weight is used to characterize the influence degree of the root bone on the vertex; obtains the skeleton animation data stored in the model file of the target object, and determines the actual position of each vertex in the skinning network in the world coordinate system based on the skeleton animation data and the at least two vertex weight tables; renders the target object based on the actual position of each vertex in the skinning network in the world coordinate system, and obtains the skeleton skinning animation of the target object. Through the method of the embodiment of the present application, it is not necessary to make skeleton skinning animation for each action of the target object, which reduces the waste of computing resources and the occupation of memory space, and by adjusting the influence weight of the root bone on the vertex, the actions of different parts of the target object can be flexibly adjusted, thereby achieving richer animation effects.

[0158] The above is a schematic scheme of a device for implementing skeletal skinned animation of this embodiment. It should be noted that the technical scheme of the device for implementing skeletal skinned animation and the technical scheme of the method for implementing skeletal skinned animation described above belong to the same concept, and the details of the technical scheme of the device for implementing skeletal skinned animation that are not described in detail can all be referred to the description of the technical scheme of the method for implementing skeletal skinned animation described above.

[0159] Figure 8 The structure block diagram of a computing device 800 provided according to an embodiment of the present specification is shown. The components of the computing device 800 include but are not limited to a memory 810 and a processor 820. The processor 820 is connected to the memory 810 via a bus 830, and a database 850 is used to store data.

[0160] The computing device 800 also includes an access device 840 that enables the computing device 800 to communicate via one or more networks 860. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 840 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0161] In one embodiment of the present specification, the above components of the computing device 800 and Figure 8 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 8 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0162] The computing device 800 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 800 may also be a mobile or stationary server.

[0163] The processor 820 is used to execute the following computer executable instructions:

[0164] Creating a skeleton model of the target object, and setting at least two root bones in the skeleton model;

[0165] Configure a vertex weight table for each root bone to obtain at least two vertex weight tables, wherein the vertex weight table of each root bone includes vertex information of vertices in the skin network corresponding to the skeleton model, each vertex information includes a vertex identifier of the vertex and an influence weight of the root bone on the vertex, and each influence weight is used to characterize the influence degree of the root bone on the vertex;

[0166] Acquire the skeletal animation data stored in the model file of the target object, and determine the actual position of each vertex in the skinning network in the world coordinate system based on the skeletal animation data and the at least two vertex weight tables;

[0167] The target object is rendered based on the actual position of each vertex in the skinning network in the world coordinate system to obtain the skeletal skinning animation of the target object.

[0168] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned method for implementing skeletal skinning animation belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be found in the description of the technical scheme of the above-mentioned method for implementing skeletal skinning animation.

[0169] An embodiment of the present specification further provides a computer-readable storage medium storing computer instructions, which are used when executed by a processor to:

[0170] Creating a skeleton model of the target object, and setting at least two root bones in the skeleton model;

[0171] Configure a vertex weight table for each root bone to obtain at least two vertex weight tables, wherein the vertex weight table of each root bone includes vertex information of vertices in the skin network corresponding to the skeleton model, each vertex information includes a vertex identifier of the vertex and an influence weight of the root bone on the vertex, and each influence weight is used to characterize the influence degree of the root bone on the vertex;

[0172] Acquire the skeletal animation data stored in the model file of the target object, and determine the actual position of each vertex in the skinning network in the world coordinate system based on the skeletal animation data and the at least two vertex weight tables;

[0173] The target object is rendered based on the actual position of each vertex in the skinning network in the world coordinate system to obtain the skeletal skinning animation of the target object.

[0174] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned method for implementing skeletal skinning animation belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be found in the description of the technical scheme of the above-mentioned method for implementing skeletal skinning animation.

[0175] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0176] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0177] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that this specification is not limited by the order of the actions described, because according to this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this specification.

[0178] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0179] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A method for implementing skeleton skinning animation, characterized in that: The method comprises: Creating a skeleton model of the target object, and setting at least two root bones in the skeleton model; Configure a vertex weight table for each root bone to obtain at least two vertex weight tables, wherein the vertex weight table of each root bone includes vertex information of vertices in the skin network corresponding to the skeleton model, each vertex information includes a vertex identifier of the vertex and an influence weight of the root bone on the vertex, and each influence weight is used to characterize the influence degree of the root bone on the vertex; Obtain the skeletal animation data stored in the model file of the target object, and determine the actual position of each vertex in the skin network in the world coordinate system based on the skeletal animation data and the at least two vertex weight tables, wherein the step of obtaining the skeletal animation data stored in the model file of the target object and determining the actual position of each vertex in the skin network in the world coordinate system based on the skeletal animation data and the at least two vertex weight tables comprises: obtaining a sub-skeletal model corresponding to each root bone from the skeletal model to obtain at least two sub-skeletal models, determining a reference position of each vertex in the sub-skin network corresponding to each of the at least two sub-skeletal models in the world coordinate system based on the skeletal animation data, and determining the actual position of each vertex in the skin network in the world coordinate system based on the at least two vertex weight tables and the reference position of each vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system; The target object is rendered based on the actual position of each vertex in the skinning network in the world coordinate system to obtain the skeletal skinning animation of the target object.

2. The method for realizing skeleton skinning animation according to claim 1, characterized in that: The skeletal animation data includes a skeletal offset matrix, a skeletal initial position, and skeletal key frame data. Determining a reference position of each vertex in a sub-skin network corresponding to each sub-skeletal model of the at least two sub-skeletal models in a world coordinate system based on the skeletal animation data includes: Obtaining initial position information of each vertex in the sub-skin network corresponding to the reference sub-skeletal model, wherein the initial position information of each vertex is the position information of each vertex in the world coordinate system, and the reference sub-skeletal model is any one of the at least two sub-skeletal models; Based on the bone offset matrix, the initial position information of each vertex in the sub-skin network corresponding to the reference sub-skeletal model, the initial position of each bone in the reference sub-skeletal model and the bone key frame data of each bone, the reference position of each vertex in the sub-skin network corresponding to the reference sub-skeletal model in the world coordinate system is determined.

3. The method for realizing skeleton skinning animation according to claim 2, characterized in that: Based on the bone offset matrix, the initial position information of each vertex in the sub-skin network corresponding to the reference sub-skeletal model, the initial position of each bone in the reference sub-skeletal model and the bone key frame data of each bone, the reference position of each vertex in the sub-skin network corresponding to the reference sub-skeletal model in the world coordinate system is determined, including: Based on the bone offset matrix and the initial position information of each vertex in the sub-skin network corresponding to the reference sub-skeletal model, determine the intermediate position information of each vertex in the bone coordinate system of the reference root bone, wherein the reference root bone corresponds to the reference sub-skeletal model, and the reference root bone is any one of the at least two root bones; Based on the intermediate position information of each vertex in the bone coordinate system of the reference root bone, the initial position of each bone in the reference sub-skeletal model and the bone key frame data of each bone, the reference position of each vertex in the sub-skin network corresponding to the reference sub-skeletal model in the world coordinate system is determined.

4. The method for realizing skeleton skinning animation according to claim 1, characterized in that: Determining the actual position of each vertex in the skin network in the world coordinate system based on the at least two vertex weight tables and the reference position of each vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system, comprising: Based on the reference position of the reference vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system and the vertex weight table corresponding to each root bone, the actual position of the reference vertex in the skin network in the world coordinate system is determined, wherein the reference vertex is any vertex included in the skin network.

5. The method for realizing skeleton skinning animation according to claim 4, characterized in that: The determining the actual position of the reference vertex in the skin network in the world coordinate system based on the reference position of the reference vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system and the vertex weight table corresponding to each root bone comprises: Acquire the vertex information of the reference vertex from the vertex weight table of each root bone, and obtain the influence weight of each root bone on the reference vertex; Based on the influence weight of each root bone on the reference vertex, determine a new influence weight of each root bone on the reference vertex; Based on the new influence weight of each root bone on the reference vertex and the reference position of the reference vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system, the actual position of the reference vertex in the skin network in the world coordinate system is determined.

6. The method for realizing skeleton skinning animation according to claim 1, characterized in that: The rendering of the target object based on the actual position of each vertex in the skinning network in the world coordinate system includes: Material data is obtained, and the target object is rendered based on the material data and the actual position of each vertex in the world coordinate system.

7. A device for realizing skeleton skinning animation, characterized in that: The device comprises: A creation module, configured to create a skeleton model of the target object and set at least two root bones in the skeleton model; A configuration module is configured to configure a vertex weight table for each root bone to obtain at least two vertex weight tables, wherein the vertex weight table of each root bone includes vertex information of vertices in the skin network corresponding to the skeleton model, each vertex information includes a vertex identifier of the vertex and an influence weight of the root bone on the vertex, and each influence weight is used to characterize the influence degree of the root bone on the vertex; A determination module is configured to obtain the skeletal animation data stored in the model file of the target object, and determine the actual position of each vertex in the skin network in the world coordinate system based on the skeletal animation data and the at least two vertex weight tables, wherein the obtaining the skeletal animation data stored in the model file of the target object, and determining the actual position of each vertex in the skin network in the world coordinate system based on the skeletal animation data and the at least two vertex weight tables, comprises: obtaining a sub-skeletal model corresponding to each root bone from the skeletal model to obtain at least two sub-skeletal models, determining a reference position of each vertex in the sub-skin network corresponding to each of the at least two sub-skeletal models in the world coordinate system based on the skeletal animation data, and determining the actual position of each vertex in the skin network in the world coordinate system based on the at least two vertex weight tables and the reference position of each vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system; The rendering module is configured to render the target object based on the actual position of each vertex in the skinning network in the world coordinate system to obtain the skeleton skinning animation of the target object.

8. A computing device, characterized in that include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the following method: Creating a skeleton model of the target object, and setting at least two root bones in the skeleton model; Configure a vertex weight table for each root bone to obtain at least two vertex weight tables, wherein the vertex weight table of each root bone includes vertex information of vertices in the skin network corresponding to the skeleton model, each vertex information includes a vertex identifier of the vertex and an influence weight of the root bone on the vertex, and each influence weight is used to characterize the influence degree of the root bone on the vertex; Obtain the skeletal animation data stored in the model file of the target object, and determine the actual position of each vertex in the skin network in the world coordinate system based on the skeletal animation data and the at least two vertex weight tables, wherein the step of obtaining the skeletal animation data stored in the model file of the target object and determining the actual position of each vertex in the skin network in the world coordinate system based on the skeletal animation data and the at least two vertex weight tables comprises: obtaining a sub-skeletal model corresponding to each root bone from the skeletal model to obtain at least two sub-skeletal models, determining a reference position of each vertex in the sub-skin network corresponding to each of the at least two sub-skeletal models in the world coordinate system based on the skeletal animation data, and determining the actual position of each vertex in the skin network in the world coordinate system based on the at least two vertex weight tables and the reference position of each vertex in the sub-skin network corresponding to each sub-skeletal model in the world coordinate system; The target object is rendered based on the actual position of each vertex in the skinning network in the world coordinate system to obtain the skeletal skinning animation of the target object.

9. A computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the method for implementing skeletal skinning animation as claimed in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Implementation method of skinned skeletal animation

    CN104021584A

  • Method for manufacturing computer skin animation based on high-precision three-dimensional scanning model

    CN111369649A