Three-dimensional role model shape transformation method, device, equipment, medium and product

By mapping the three-dimensional character bones to the standard human skeleton and adjusting them to T-Pose poses, combining deformation templates and adjustment parameters, the flexible and efficient appearance transformation of the three-dimensional character model is achieved, solving the problems of low efficiency and adaptation difficulties in the existing technology. .

CN118967989AActive Publication Date: 2024-11-15JILIN ANIMATION INST +1
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202410896408.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-11-15
Estimated Expiration
2044-07-05

AI Technical Summary

Technical Problem

The deformation technology of existing three-dimensional character models is inefficient and cannot be realized in real time. It requires modeling of each deformation situation, which is time-consuming and labor-intensive, and there are difficulties in adapting different model standards.

Method used

By mapping the target three-dimensional character bones to the standard human body skeleton and adjusting them to T-Pose postures, deforming templates and adjustment parameters are determined, and flexible adjustment of skin and bones are achieved, achieving free transformation of character appearance.

Benefits of technology

It realizes flexible and efficient appearance transformation of the three-dimensional character model, lowers the technical threshold, improves adaptability and versatility, and avoids tedious steps in artificial processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118967989A_ABST
    Figure CN118967989A_ABST
Patent Text Reader

Abstract

The invention discloses a three-dimensional role model shape transformation method and device, equipment, a medium and a product, and relates to the technical field of role shape transformation, and the three-dimensional role model shape transformation method comprises the steps: obtaining a target three-dimensional role; mapping the skeleton of the target three-dimensional role to a standard human skeleton to obtain a first skeleton of the target role; determining a second skeleton of the target role according to the first skeleton of the target role; the second skeleton of the target role is a skeleton obtained by adjusting the first skeleton of the target role into a T-Pose posture; performing reset skeleton rotation transformation and zooming transformation on the second skeleton of the target role to obtain an initial binding posture; determining a deformation template; determining a deformation part of a target three-dimensional role according to the initial binding posture and the deformation template; and according to the deformation parameters of the deformation template, adjusting parameters of the skin and the skeleton of the deformation part are determined. The shape of the character can be easily changed by applying the deformation template.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of character appearance transformation, and in particular to a method, device, equipment, medium and product for transforming the appearance of a three-dimensional character model. Background Art

[0002] Three-dimensional character images are an important part of games, metaverses, and 3D animations. Diverse character appearances can not only increase the richness of the content, but also better meet the production needs of designers. Through character appearance deformation, we can create different character appearances. The current mainstream human body deformation technology has its own shortcomings.

[0003] One human body deformation solution is to analyze the image and then perform 3D reconstruction. This method is inefficient because it requires a lot of computing power for image analysis and mesh reconstruction. The result cannot be presented in real time and has a lag. In addition, considering the matching of the mesh, bones and UV map, it can only be generated according to specific standards.

[0004] Another human body deformation solution is that the artist prepares the deformation mesh and deformation skeleton of the 3D character model in advance, and then adjusts the deformation effect of the 3D character in combination with the deformation skeleton or deformation mesh. This method has better deformation effect but requires modeling for each deformation situation, which is time-consuming and labor-intensive.

[0005] In addition, the model production standards for 3D characters vary. For these models of different standards, a universal and efficient technical solution is also needed to allow these 3D characters to change their appearance flexibly and freely without too much technical processing. Summary of the invention

[0006] The purpose of the present invention is to provide a method, device, equipment, medium and product for transforming the appearance of a three-dimensional character model, which can easily change the appearance of the character by applying a deformation template.

[0007] To achieve the above object, the present invention provides the following solutions:

[0008] In a first aspect, the present invention provides a method for transforming the appearance of a three-dimensional character model, the method comprising:

[0009] Get the target 3D character.

[0010] The skeleton of the target three-dimensional character is mapped onto a standard human skeleton to obtain a first skeleton of the target character; the standard human skeleton is a skeleton set of the standard human skeleton; the skeleton set includes all key skeletons required for character deformation and skeleton mapping.

[0011] According to the first skeleton of the target character, a second skeleton of the target character is determined; the second skeleton of the target character is a skeleton obtained by adjusting the first skeleton of the target character to a T-Pose posture.

[0012] Reset the bone rotation transformation and scaling transformation of the second skeleton of the target character to obtain an initial binding pose.

[0013] A deformation template is determined, where the deformation template is a template set according to a series of predefined deformation parameters and deformation rules.

[0014] The deformation part of the target three-dimensional character is determined according to the initial binding posture and the deformation template.

[0015] According to the deformation parameters of the deformation template, the adjustment parameters of the deformation part are determined; the adjustment parameters of the deformation part include skin adjustment parameters and bone adjustment parameters.

[0016] In a second aspect, the present invention provides a 3D character model appearance transformation device, the 3D character model appearance transformation device comprising:

[0017] The acquisition module is used to acquire the target three-dimensional character.

[0018] The skeleton mapping module is used to map the skeleton of the target three-dimensional character to a standard human skeleton to obtain a first skeleton of the target character; the standard human skeleton is a skeleton set of the standard human skeleton; the skeleton set includes all key skeletons used for character deformation and skeleton mapping.

[0019] The second skeleton determination module is used to determine the second skeleton of the target character according to the first skeleton of the target character; the second skeleton of the target character is the skeleton obtained by adjusting the first skeleton of the target character to a T-Pose posture.

[0020] The transformation module is used to reset the bone rotation transformation and scaling transformation of the second skeleton of the target character to obtain an initial binding posture.

[0021] The deformation template determination module is used to determine the deformation template, where the deformation template is a template set according to a series of predefined deformation parameters and deformation rules.

[0022] The deformation part determination module is used to determine the deformation part of the target three-dimensional character according to the initial binding posture and the deformation template.

[0023] The adjustment module is used to determine the adjustment parameters of the deformation part according to the deformation parameters of the deformation template; the adjustment parameters of the deformation part include skin adjustment parameters and bone adjustment parameters.

[0024] In a third aspect, the present invention provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any one of the above-described three-dimensional character model appearance transformation methods.

[0025] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the above-mentioned methods for transforming the appearance of a three-dimensional character model.

[0026] In a fifth aspect, the present invention provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any one of the above-mentioned methods for transforming the appearance of a three-dimensional character model.

[0027] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0028] The present invention provides a method, device, equipment, medium and product for transforming the appearance of a three-dimensional character model. The method for transforming the appearance of a three-dimensional character model maps the skeleton of an acquired target three-dimensional character onto a standard human skeleton to obtain a first skeleton of the target character, and then adjusts the first skeleton of the target character to a T-Pose posture to obtain a second skeleton of the target character, thereby achieving standardization of binding postures; by determining a deformation template and an initial binding posture obtained according to the second skeleton of the target character, the deformation part of the target three-dimensional character is determined; and then the skin and skeleton of the deformation part can be adjusted according to the deformation parameters of the deformation template, thereby achieving flexible transformation of the appearance of the character. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0030] Figure 1 This is a diagram of an application environment of a three-dimensional role model appearance transformation method in one embodiment of the present invention.

[0031] Figure 2 A schematic flow chart of a method for transforming the appearance of a three-dimensional character model provided by one embodiment of the present invention.

[0032] Figure 3a A schematic diagram of a skin provided by an embodiment of the present invention.

[0033] Figure 3b A schematic diagram of a skeleton provided by an embodiment of the present invention.

[0034] Figure 4 for Figure 2 Schematic diagram of the detailed process of step S2.

[0035] Figure 5a The mapping result provided by an embodiment of the present invention presents a mapping representation diagram.

[0036] Figure 5b A schematic diagram of displaying a target role for a mapping result provided by an embodiment of the present invention.

[0037] Figure 5c A schematic diagram of a mapping template export function presenting a mapping result provided by an embodiment of the present invention.

[0038] Figure 6 for Figure 2 Schematic diagram of the detailed process of step S3.

[0039] Figure 7a A schematic diagram of a first skeleton provided by an embodiment of the present invention.

[0040] Figure 7b A schematic diagram of a second skeleton provided by an embodiment of the present invention.

[0041] Figure 8 A schematic diagram of an original target three-dimensional character provided by an embodiment of the present invention.

[0042] Fig. 9 A schematic diagram of a Q-version deformation template for a character provided by an embodiment of the present invention.

[0043] Fig.10 A schematic diagram of applying an obesity deformation template to a character provided by an embodiment of the present invention.

[0044] Fig.11 for Figure 2 Schematic diagram of the detailed process of step S6.

[0045] Fig.12 A schematic diagram of functional modules of a three-dimensional character model appearance transformation device provided by one embodiment of the present invention.

[0046] Fig.13 A schematic diagram of the structure of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and understandable, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0049] The three-dimensional role model appearance transformation method provided by the embodiment of the present invention can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. After the terminal 102 obtains the target three-dimensional character, the skeleton of the target three-dimensional character is mapped to the standard human skeleton to obtain the first skeleton of the target character; the standard human skeleton is a skeleton set of the standard human skeleton; the skeleton set includes all the key bones to be used for character deformation and skeleton mapping; according to the first skeleton of the target character, the second skeleton of the target character is determined; the second skeleton of the target character is the skeleton obtained after adjusting the first skeleton of the target character to the T-Pose posture; the second skeleton of the target character is reset to the skeleton rotation transformation and scaling transformation to obtain the initial binding posture; determine the deformation template, which is a template set according to a series of predefined deformation parameters and deformation rules; according to the initial binding posture and the deformation template, determine the deformation part of the target three-dimensional character; according to the deformation parameters of the deformation template, determine the adjustment parameters of the deformation part; the adjustment parameters of the deformation part include skin adjustment parameters and bone adjustment parameters. In addition, in some embodiments, the three-dimensional character model appearance transformation method can also be implemented independently by the server 104 or the terminal 102. For example, the terminal 102 can directly adjust the parameters for the acquired target three-dimensional character, or the server 104 can acquire the target three-dimensional character from the data storage system and adjust the parameters for the target three-dimensional character.

[0050] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.

[0051] In order to enable those skilled in the art to better understand the technical solution of the present invention, some technical names involved in the technical solution are explained below:

[0052] Skin and skeleton: Figure 3a and Figure 3b As shown, the skin mesh is bound to the skeleton. The skeleton is composed of several bones. Different bones are bound to different skin parts. When the bones move, the bones will move with the bound skin parts, thus presenting an animation effect.

[0053] Bone binding: Bind the skin and skeleton together so that the character model can deform with the movement of the skeleton.

[0054] Initial binding pose: The pose adopted by a 3D character when it is modeled. The character's skin and skeleton will be bound to the bones in the initial binding pose.

[0055] T-Pose and A-Pose: There are two common initial binding poses, A-Pose and T-Pose. In A-Pose, the arms are slightly drooping, similar to the shape of the letter "A". This pose is more natural and helps avoid shoulder compression and loss of accuracy. In T-Pose, the character's arms are fully extended horizontally, forming a "T" shape. This pose is more standard and more suitable for technical processing.

[0056] Standard human skeleton: is a set of predefined bones that covers the key bones of the human body used for character deformation and bone mapping.

[0057] Bone mapping method: Through a certain processing method, a mapping relationship is established between the target character's bones and the bones of the standard human skeleton.

[0058] Deformation template: A series of predefined deformation parameters and deformation rules. Different parameters are set for different deformation parts. These parameters are used to guide the appearance of the 3D character to deform according to a certain preset deformation method.

[0059] Inverse Bind Pose Matrix: A 4×4 matrix calculated when the model is loaded to complete the initial bind pose (i.e., T-Pose or A-Pose binding). Each bone corresponds to an inverse bind pose matrix, which is used to convert skin vertices from model space to bone space. This matrix is ​​calculated once during binding and can be used indefinitely.

[0060] Bone transformation matrix: 4x4 matrix, here refers to the transformation matrix of the local space of the bone. When applying skeletal animation, the position and rotation of each bone in the current animation frame will be calculated according to the animation data to affect the skin deformation. In addition, because the bones are composed of a hierarchical relationship, each bone posture is affected by its own transformation as well as the transformation of all its parents.

[0061] In an exemplary embodiment, Figure 2 As shown, a method for transforming the appearance of a three-dimensional role model is provided. The method is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In an embodiment of the present invention, the method is applied to Figure 1 The server 104 and the terminal 102 are taken as an example to illustrate, including the following steps S1 to S7.

[0062] in:

[0063] S1: Obtain a target three-dimensional character.

[0064] This target 3D character does not need to follow any specific bone specification or skin specification, and needs to be bound to a humanoid skeleton. The target 3D character is displayed by loading the model of the target 3D character through a 3D engine or 3D software.

[0065] S2: Mapping the skeleton of the target three-dimensional character onto a standard human skeleton to obtain a first skeleton of the target character; the standard human skeleton is a skeleton set of a standard human skeleton; the skeleton set includes all key skeletons required for character deformation and skeleton mapping.

[0066] S3: determining a second skeleton of the target character according to the first skeleton of the target character; the second skeleton of the target character is a skeleton obtained by adjusting the first skeleton of the target character to a T-Pose posture.

[0067] S4: resetting the bone rotation transformation and scaling transformation of the second skeleton of the target character to obtain an initial binding posture.

[0068] S5: Determine a deformation template, where the deformation template is a template set according to a series of predefined deformation parameters and deformation rules.

[0069] S6: Determine a deformation part of the target three-dimensional character according to the initial binding posture and the deformation template.

[0070] S7: Determine adjustment parameters of the deformation part according to the deformation parameters of the deformation template; the adjustment parameters of the deformation part include skin adjustment parameters and bone adjustment parameters.

[0071] By implementing the above-mentioned steps S1 to S7, the present invention uses processing methods such as bone mapping, bone reconstruction and rebinding to allow the target character to be adapted to a number of preset deformation templates after processing, so that the character's appearance can be easily changed by applying the deformation template without manual processing. This technology greatly reduces the threshold for technology use, improves the versatility and adaptability of the technology, and realizes a flexible and efficient deformation technology.

[0072] In another exemplary embodiment of the present invention, in order to complete body part adaptation, as Figure 4 As shown, the above step S2 is replaced by the following steps S21 to S22:

[0073] S21: Determine the bone set of the standard human skeleton.

[0074] S22: using a skeleton mapping method or a human skeleton mapping tool of a three-dimensional engine to map the skeleton of the target three-dimensional character to a standard human skeleton, obtaining a first skeleton of the target character, and generating a skeleton mapping relationship table.

[0075] It should be noted that due to the influence of various factors on the skeletons of different roles in the industry, various human skeleton structures will be produced. This step is to map human skeletons of different specifications onto pre-defined standard human skeletons for subsequent deformation processing (this standard human skeleton can be a pre-defined data structure and does not need to be actually created).

[0076] In a 3D engine, if you want 3D characters of different specifications to be driven by the same set of animations, you need to map the 3D character skeletons to a set of standard skeletons and then use animation redirection technology to process them. The present invention hopes to allow any 3D character to be deformed using a preset deformation template, and it is also necessary to complete the skeleton mapping first and then use the deformation method to deform it.

[0077] Automatic skeleton mapping is a relatively complex processing technology. Those skilled in the art can use the skeleton mapping tools of Unity or Unreal engine to complete skeleton mapping. At the same time, in order to make the method of the present invention not limited to these mature three-dimensional engines, this embodiment also creates a skeleton mapping method with higher applicability to complete skeleton mapping.

[0078] It should be noted that the purpose of this step is to complete the skeleton relationship mapping. If other methods are used to complete the skeleton mapping, it does not deviate from the original intention and purpose of this invention and is also within the protection scope of the present invention. The specific steps of the skeleton mapping method with high applicability described in this embodiment include:

[0079] Step 1021, obtaining a predefined standard human skeleton.

[0080] This standard human skeleton describes the key human bones used for character deformation. In this embodiment, a set of standard human skeletons with a total of 50 bones is predefined, and its structure is shown in Table 1.

[0081] Table 1 Standard human skeleton

[0082]

[0083]

[0084] Step 1022, extract the tree structure and bone features of the target three-dimensional character skeleton, perform graph matching calculations on it and a number of bone mapping templates, and search for a matching bone mapping template based on a subgraph isomorphism algorithm.

[0085] The skeleton of a 3D character model is composed of a tree-like hierarchical structure. Each node in the tree structure represents a bone. Except for the root node, each bone node in the skeleton tree has a parent node and several child nodes. In three-dimensional space, each bone is described by a 4×4 transformation matrix, which is called a bone transformation matrix, to describe the position, rotation and scale of this bone node.

[0086] The skeleton tree structure and skeleton features of the target three-dimensional character are extracted, wherein the skeleton tree structure is a skeleton hierarchical structure, wherein the skeleton nodes themselves serve as tree nodes, and the relationships between the skeletons and other parent and child skeletons serve as tree edges. In this embodiment, the skeleton orientation is used as the skeleton feature. In addition, the skeleton length, number of child nodes, maximum depth of child nodes, and hierarchical relationship with specific bones can also be used as features.

[0087] The matching bone mapping template is searched out according to the subgraph isomorphism algorithm.

[0088] The bone mapping template is a series of pre-added common human skeleton data with different standard specifications. The data of a single bone mapping template includes: skeleton tree structure, standard bone mapping markers, and bone features.

[0089] To achieve better automatic mapping results, you need to ensure that a certain amount of mapping templates are added to the mapping template library to facilitate template search and matching by the mapping module.

[0090] After ensuring a certain number of mapping templates, a subgraph isomorphism algorithm is used to perform a matching search among these preset mapping templates, and the mapping templates are matched with the template 3D roles one by one to find the mapping template that best matches the target 3D role to establish the mapping.

[0091] In terms of search algorithms, this embodiment adopts a modified VF2 subgraph isomorphism algorithm. Compared with other subgraph isomorphism search algorithms, the VF2 algorithm has strong adaptability and does not require preprocessing. Its pruning strategy and constraint propagation can further improve the search efficiency, and it performs well when processing less complex graph searches such as human skeletal structures (usually 50-200 nodes).

[0092] In this embodiment, there is a target 3D character model G1 and a mapping template G2 to be searched and matched, and the implementation steps are as follows:

[0093] (1) Initialize the state space search tree: Initialize an empty state space search tree to record the matching process of skeleton nodes.

[0094] (2) Selecting a starting node: Select a starting node in the target 3D character (source graph G1) and the mapping template (sub-graph G2). In this embodiment, the left hand (Left Hand) of the mapping template is preferentially selected as the starting node because the palm has five sub-nodes. Starting with nodes with complex structures can quickly filter out unmatched nodes and improve search efficiency.

[0095] (3) Gradually build the mapping: Starting from the selected starting node, gradually explore the nodes of the two graphs and try to establish a mapping relationship between the nodes.

[0096] (4) Checking the basic mapping conditions: Before establishing a mapping between two nodes, it is necessary to check whether the two nodes meet the basic mapping conditions. In this embodiment, two points need to be met:

[0097] Condition 1: The node degree (number of child bones) checked by G1 (target character) is greater than or equal to the node degree (number of child bones) of G2 (mapping template);

[0098] Condition 2: The angle between the two bone orientations is less than 120 degrees. The bone orientation is obtained by converting the coordinate difference between the current bone and the parent bone into a standard direction vector. The result is a three-dimensional vector. The angle approximation is obtained by multiplying the two standard direction vectors and then performing an arc cosine calculation, and finally converting them into degrees.

[0099] (5) Depth-first search: Use the depth-first search (DFS) strategy to recursively search the skeleton tree, trying to map a new pair of skeleton nodes at each step.

[0100] (6) Backtracking: If the current node cannot meet the mapping conditions, backtracking is performed, the previous mapping is canceled, and other mappings are tried.

[0101] (7) Termination condition: When all nodes of the subgraph G2 (mapping template) are mapped to the nodes of the source graph G1 (target character), the bone mapping is completed, and a bone mapping template that can completely match the target character is found. If the mapping cannot be completed, the above steps will be repeated to match other mapping templates.

[0102] Step 1023, if there is any unsuccessful matching, a supplementary solution for splitting and mapping the target character is performed.

[0103] When the mapping template cannot be matched, the present embodiment adds a supplementary scheme for splitting the mapping parts. The supplementary scheme splits the skeletal tree structure of the target character into multiple body parts for separate mapping, including setting separate mapping templates for the left hand, right hand, legs (including pelvis), torso and head and neck for mapping. This ensures that the mapping of most bones can be completed when the mapping template cannot be matched.

[0104] Step 1024, perform a second mapping match between the target character skeleton and the matching mapping template, and mark the relationship between the target character skeleton and the standard human skeleton based on the mapping result.

[0105] Although the mapping relationship can be obtained after the first sub-graph isomorphism matching is completed, accurate matching results are not pursued in order to improve the speed. The purpose of the second mapping of the same template is to correct the wrong mapping relationship to make the mapping more accurate. These errors usually occur in structures such as fingers and legs with similar bones.

[0106] The second mapping is different from the aforementioned VF2 subgraph isomorphic mapping algorithm in that when a node that meets the basic mapping conditions is searched, the algorithm does not directly establish a mapping relationship and then search for the next pair of mappings, but continues to search for the best matching node of the bone feature in the nodes of the same level to establish a mapping relationship. In this embodiment, the best match is based on the aforementioned standard direction vector approximation of the two nodes. In addition, other bone feature detection rules can be set to improve accuracy.

[0107] After the second accurate mapping, the correspondence between the target character skeleton and the standard human skeleton can be marked through the mapping results and the standard human skeleton markers of the mapping template, thereby constructing a corresponding relationship mapping table with the standard human skeleton, as shown in Table 2.

[0108] Table 2 Correspondence mapping table with standard human skeleton

[0109]

[0110] The following is a detailed description of the specific modifications to the VF2 subgraph isomorphism algorithm:

[0111] 1) Select a complex structure node as the starting node.

[0112] Modification point: In step (2), the left hand of the mapping template is selected as the starting node because the palm has five child nodes and a complex structure.

[0113] By selecting nodes with complex structures as the starting nodes, unmatched nodes can be quickly filtered out, improving search efficiency. This strategy takes advantage of the characteristics of the human skeleton structure and optimizes the initial matching process of the algorithm.

[0114] 2) Enhanced basic mapping condition checking.

[0115] Modification point: In step (4), two basic mapping conditions are set: node degree (number of child bones) and bone orientation angle (less than 120 degrees).

[0116] Through strict basic mapping condition checks, node pairs that do not meet the conditions can be quickly excluded before node matching, reducing the search space and improving matching efficiency. This enhancement of the pruning strategy makes the algorithm more efficient when processing human bone structures.

[0117] 3) Two mapping matches and error correction.

[0118] Modification point: In step 1024, two mapping matches are performed, the first one is to quickly obtain the mapping relationship, and the second one is to perform an accurate match to correct the wrong mapping relationship.

[0119] Through two mapping matches and error correction, the final mapping relationship is ensured to be more accurate. This improvement improves the accuracy of the mapping results, especially for bones with similar structures such as fingers and legs, avoiding mismatching.

[0120] 4) A supplementary solution for splitting the mapping parts.

[0121] Modification point: In step 1023, a supplementary solution for splitting the target character's mapping parts is added, and the target character's skeleton tree structure is split into multiple body parts for separate mapping.

[0122] When the complete template cannot be matched, the mapping parts are split to ensure the successful mapping of most bones, which improves the applicability and robustness of the algorithm. This scheme ensures that even in complex situations, partial matches can be found to complete the mapping of most bones.

[0123] Through the above specific modifications, the modified VF2 subgraph isomorphism algorithm has achieved significant technical effects in the following aspects:

[0124] 1. Improve the initial matching efficiency: By selecting complex structure nodes (such as palms) as starting nodes and quickly filtering out unmatched nodes, the initial matching efficiency is improved.

[0125] 2. Reduce the search space: Strict basic mapping condition checks (node ​​degree and bone orientation angle) reduce the search space, avoid invalid searches, and improve matching efficiency.

[0126] 3. Improve mapping accuracy: The two-step mapping matching and error correction mechanism ensure that the final mapping relationship is more accurate, especially avoiding mismatching of bones with similar structures such as fingers and legs.

[0127] 4. Enhance the applicability and robustness of the algorithm: The supplementary scheme of splitting the mapping parts ensures the successful mapping of most bones, and can find partial matches even in complex situations, which improves the applicability and robustness of the algorithm.

[0128] Step 1025, check the mapping results and manually correct the results through manual mapping.

[0129] In an embodiment, the mapping results are visualized through an interface, and the user can confirm the results and modify the mapping relationship on the interface. Figure 5a-5c A schematic diagram of a mapping result presentation interface provided in an embodiment of the present invention.

[0130] like Figure 5a As shown, the visual presentation of the mapping results includes a mapping table, which directly reflects the mapping results. The first column of the table is the standard bone name, the second column is the mapped target character bones, and the unmapped bones are left blank.

[0131] like Figure 5b As shown, the visualization of the mapping results also includes the display of the target character. The skeleton of the character is marked with small dots. The user can drag the small dots on the skeleton to the mapping table to manually establish the mapping relationship.

[0132] like Figure 5c As shown, this mapping module also provides a mapping template export function. Through the Save button, the user can choose to save the current mapping result as new mapping template data to expand the mapping template library.

[0133] In terms of mapping template data export and construction, the construction process mainly involves exporting key data such as the target skeleton and mapping relationship, including: the character skeleton tree structure, the bone feature data required for node matching in the VF2 algorithm, and the mapping relationship between the character skeleton and the standard skeleton.

[0134] It should also be noted that in the process of exporting the character's bone tree structure, in order to build a complete bone tree structure and exclude redundant bones, there are only two types of bone nodes that can be exported: the first type is all bones with a mapping relationship; the second type is all the parent and ancestor bones of the bones with a mapping relationship. These parent and ancestor bones extend at most to the root of the skeleton, that is, the pelvis.

[0135] Because it is necessary to avoid interference from redundant bones in the process of bone mapping templates, these redundant bones will not be exported when exporting template data, but the parent bones of all mapped key bones will be exported, because these bones constitute the skeleton structure specifications unique to this mapping template, even if this node does not need to be mapped.

[0136] The above steps constitute a complete automatic mapping step, that is, mapping the skeleton of the target three-dimensional character to a set of predefined standard human skeletons through the skeleton mapping method.

[0137] In order to adjust the first skeleton of the target character to the T-Pose posture, the second skeleton of the target character is rebuilt with reference to the first skeleton of the target character, and the second skeleton is bound to the target character instead of the first skeleton of the target character to standardize the binding posture. Figure 6 As shown, the above step S3 is replaced by the following steps S31 to S34:

[0138] S31: Obtain the bone mapping result; the bone mapping result is the result obtained according to the bone mapping relationship table.

[0139] S32: Determine the orientation of the arm bones of the first skeleton of the target character according to the bone mapping result.

[0140] S33: According to the orientation of the arm bones of the first skeleton of the target character, the posture of the first skeleton of the target character is adjusted to a T-Pose posture, so as to obtain the first skeleton of the target character in the T-Pose posture.

[0141] S34: Determine the second skeleton of the target character in the T-Pose posture according to the first skeleton of the target character in the T-Pose posture. The schematic diagram of the first skeleton of the target character and the second skeleton of the target character is as follows: Figure 7a and Figure 7b shown.

[0142] It should be noted that the 3D character model is modeled and bound to the skeleton using the initial pose during the production process. The initial pose is divided into A-Pose and T-Pose.

[0143] A-Pose is a pose where the arms are slightly down, similar to the shape of the letter "A". This pose is more natural and helps avoid shoulder squeezing and loss of precision.

[0144] The arms of the T-Pose character are fully extended horizontally to form a "T" shape. This pose is more standard and more suitable for technical processing. In the embodiment of the present invention, the initial binding pose is adjusted to the standard T-Pose pose, which facilitates the subsequent transformation of the appearance to maintain the consistency of the model structure.

[0145] In the following description, the first skeleton is the original skeleton of the model, and the second skeleton is the newly created skeleton. The entire S3 step implementation method includes:

[0146] Step 1031: Restore the model to the initial binding pose (Note: This step is equivalent to zeroing before calculation to ensure the accuracy of the result. The previous step does not adjust the bone pose, and the regular engine will retain the initial pose after loading the model without applying any action, so the non-critical step here is just a reminder). Obtain the arm bones of the first skeleton of the target character through the bone mapping result, and obtain the arm bone orientation through the aforementioned bone orientation acquisition method.

[0147] Step 1032: Calculate the rotation axis and degree of rotation corresponding to the arm bone corrected to the T-Pose posture, where the degree of rotation is the angle between two vectors, obtained by vector dot product and arc cosine function. The rotation axis is obtained by calculating the cross product of the current direction vector and the target direction vector.

[0148] Step 1033: According to the calculated rotation axis and rotation degree, the arm bone of the first skeleton of the target character is rotated, and the pose of the first skeleton of the target character is adjusted to a T-Pose pose.

[0149] Step 1034: Create a second skeleton of the T-Pose target character with reference to the first skeleton of the target character. Set the rotation vector of each bone in the second skeleton to (0, 0, 0), the scaling vector to (1, 1, 1), and align the coordinates with the coordinates of the bones of the first skeleton in the model space.

[0150] Step 1035: Replace the first skeleton of the target character with the second skeleton of the target character, and bind the second skeleton of the target character to the existing skin. After the binding is completed, the skeleton of the target character is replaced with the second skeleton of the target character with a bone rotation vector of (0, 0, 0) and a scaling vector of (1, 1, 1), and its initial binding pose is the T-Pose pose.

[0151] It should be noted that 1. The purpose of constructing the second skeleton is to change the initial pose of the model to T-Pose, and at the same time make the initial rotation vector value of each bone in the initial pose zero, and its position is completely recorded by coordinates. This is done to ensure that there will be no errors in the subsequent deformation based on the initial pose.

[0152] 2. To further explain, the first skeleton is adjusted to the T-Pose posture by rotating the bones, which is equivalent to a T-Pose action. If the initial posture of the first skeleton is A-Pose, it will remain A-Pose without any change. For example, if the world coordinates of the hand bone are (0, 3) vertically, after rotating 90 degrees around the origin, it will be (3, 0) horizontally, and after restoring to the initial posture, it will still be (0, 3) vertically.

[0153] 3. To further explain, the bones are progressively developed layer by layer. If the initial posture is not restored and the bone rotation is retained for deformation, the calculation will become extremely complex and prone to errors. After the bone rotation is reset to zero, the influence of the rotation on the bone is discarded, reducing the complexity of the deformation calculation.

[0154] In another exemplary embodiment of the present invention, in order to allow the target three-dimensional character to deform in appearance according to the selected deformation template, as shown in FIG. Fig.11 As shown, the above step S6 is replaced by the following steps S61-S63:

[0155] S61: Binding the initial binding posture with the preset parameters of the deformation template to determine a deformation weight value; the deformation weight value is used to adjust the deformation strength of the deformation template.

[0156] S62: Calculate deformation parameter weighting factors according to the deformation weight values; the deformation parameter weighting factors include skin scaling parameter weighting factors and bone geometric scaling parameter weighting factors.

[0157] S63: Determine the deformation part of the target three-dimensional character according to the deformation parameter weighting factor.

[0158] This step is to deform the target character. In this step, the deformation module provides many preset deformation templates. Each deformation template represents a deformation style. The user can select any deformation template to deform the appearance of the target character.

[0159] Step 1061: Select a deformation template.

[0160] Users can select the desired deformation template through the template library in the software interface. The template library is displayed in a graphical way, including the template's thumbnail, name and brief description. Users can choose the appropriate deformation template according to their deformation needs and preferences.

[0161] The deformation template is a series of predefined parameters and rules. Different parameters are set for different deformation parts. These parameters are used to guide the appearance of the three-dimensional character to deform according to a certain preset deformation method.

[0162] It should also be noted that these templates are configured in a graphical manner. In this step, you can not only select a template, but also create a template, set various parameters of the template, and preview the deformation effect in real time. Figure 8 As shown, the character applies the Q version deformation template as follows Fig. 9 As shown, the character applies the fat deformation template as follows Fig.10 As shown, the deformation template parameters in this embodiment are as follows:

[0163] Standard bone: The deformation part corresponds to the standard bone marker.

[0164] Skin scaling parameter threshold: 3D vector, controls the 3D scaling of the corresponding skin of the body part in the model space. This parameter sets the deformation limit threshold. This adjustment does not modify the bone transformation matrix and does not affect the bone length. (Mainly used to control the scaling changes of the deformation part).

[0165] Skin offset correction parameter threshold: a three-dimensional vector that controls the three-dimensional offset of the skin corresponding to the body part in the model space. This item is used to make fine-tuning corrections to the offset of the skin part, and is used to manually correct excessive deformation or poor quality after irregular model deformation. This adjustment only offsets the skin mesh of the deformed part and does not change the bone transformation matrix value.

[0166] Bone proportional scaling parameter threshold: scale each part of the body proportionally. This parameter sets the deformation limit threshold and can be used with skin scaling. This scaling is mainly used to affect and adjust the length of bones.

[0167] Whether to affect child nodes: Whether the deformation affects all child node body parts.

[0168] Table 3 Obesity deformation template parameters in the embodiment

[0169]

[0170] Table 4 Q version template parameters in the embodiment

[0171]

[0172] Step 1062: Bind deformation template parameters, adjust deformation weight values, and calculate deformation parameter weighting factors.

[0173] After selecting the corresponding deformation template, the system target character is bound to the preset parameters of the deformation template.

[0174] The user can adjust the deformation strength of this deformation template by modifying the deformation weight value and preview the deformation effect in real time. Each time the deformation module is adjusted, the deformation module will perform linear interpolation between the initial value and the threshold value for each parameter according to the weight value [range 0-1], and calculate the deformation parameter weighting factor for subsequent deformation calculations. Specifically, when the weight value is 0, the parameter weighting factor is the parameter initial value, that is, there is no deformation effect. When the weight value is 1, the parameter weighting factor is the parameter threshold, that is, the extreme deformation effect preset by the deformation template. For weight values ​​between 0 and 1, the parameter weighting factor will transition according to the weight linear interpolation, thereby accurately controlling the intensity of the deformation effect.

[0175] It should be noted that modifying the deformation weight can adjust the final deformation effect. The deformation weight is a single value used to control the overall deformation effect. The specific performance can be understood as a slider. Pulling it to the far left will change the character to one effect, and pulling it to the far right will change the effect. The middle of the slider is the transition deformation effect.

[0176] Step 1063: According to the deformation parameter weighting factor, the binding posture inverse matrix and the bone transformation matrix are transformed, and the character appearance is changed by combining the two deformation methods.

[0177] It should be noted that the skin mesh is bound to the skeleton, which is composed of several bones. Different bones are bound to different skin parts. When the bones move, the bones will move with the bound skin parts, thus presenting an animation effect.

[0178] The skin of a 3D character is composed of several vertices, and the positions of the vertices are updated in real time every frame. The positions are affected by the vertex weights and the skin matrix. The skin matrix is ​​obtained by multiplying the inverse bind pose matrix (Inverse Bind Pose Matrix) and the bone transformation matrix. Here is a basic explanation of the two matrices:

[0179] Inverse BindPose Matrix: A 4×4 matrix calculated when loading a model for initial pose binding (i.e. T-Pose or A-Pose binding). Each bone corresponds to an inverse bind pose matrix, which is used to convert skin vertices from model space to bone space. This matrix is ​​calculated once during binding and can be used indefinitely.

[0180] Bone transformation matrix: 4×4 matrix, which refers to the transformation matrix of the local space of the bone. When applying skeletal animation, the position and rotation of each bone in the current animation frame will be calculated based on the animation data to affect the skin deformation. In addition, because the bones are composed of a hierarchical relationship, each bone posture is affected by not only its own transformation but also the transformation of all its parents.

[0181] According to the above characteristics, combined with the deformation parameter weighting factor, the binding pose inverse matrix is ​​calculated and modified, and the bones are scaled proportionally. The specific steps are as follows:

[0182] Step 1063-1: Determine the inverse bind pose matrix of the initial bind pose; the inverse bind pose matrix is ​​used to transform skin vertices from model space to bone space;

[0183] Step 1063-2: Convert the skin scaling parameter weighting factor into a first scaling transformation matrix;

[0184] Step 1063-3: multiplying the inverse bind pose matrix by the first scaling transformation matrix to obtain a new inverse bind pose matrix;

[0185] It should be noted here that the scaling effect on the inverse matrix of the bind pose is based on the model space, that is, the XYZ components in the parameters correspond to the scaling of the skin on the XYZ axis in the model space coordinate system.

[0186] In the Q-version deformation template of the embodiment, a parameter presets the skin scaling parameter thresholds of the left and right shoulders to 1, 2.2, and 2.2, and sets the parameters to affect the child bones. Since the arms are raised horizontally in the T-Pose posture, the entire arm can be made thicker by enlarging the Y axis (up and down) and the Z axis (front and back). Another parameter presets the skin scaling parameter thresholds of the left and right thighs to 2.5, 1, and 2.5. Since the legs are upright in the T-Pose posture, the legs can be made thicker by enlarging the X axis (left and right) and the Z axis (front and back).

[0187] In terms of the specific deformation calculation method, one of the deformation parameters, the left shoulder, is taken as an example, as shown in Table 5.

[0188] Table 5 Deformation parameters of the left shoulder when calculating the new bind pose inverse matrix

[0189]

[0190] Assume that the current deformation weight value is W, the current skin scaling parameter weighting factor is [1+(1-1)×W, 1+(2.2-1)×W, 1+(2.2-1)×W], that is, when the weight value W is 0.5, the Scale1 parameter weighting factor is [1, 1.6, 1.6], and when the weight value W is 1, the Scale1 parameter weighting factor is [1, 2.2, 2.2].

[0191] That is, the calculation formula of Scale1 is: Scale1 = [1+(skin scaling parameter threshold.×-1)×W, 1+(2.2-1)×W, 1+(2.2-1)×W].

[0192] The standard bone in the parameter item is the left shoulder. The left shoulder bone J1 is found through mapping, and the original binding posture inverse matrix corresponding to the bone is obtained [M J1 -1 ]. Convert the scaling parameter Scale1 into a 4×4 scaling transformation matrix [M Scale1 ], by inverting the original binding pose matrix [M J1 -1 ] and multiply it to get the new binding pose inverse matrix [M J1new -1 ].

[0193] That is, the formula for deformation using the inverse matrix of the binding posture is:J1new -1 ]=[M Scale1 ]*[M J1 -1 ].

[0194] In addition, the parameter item is also set to affect all child bones, and the above deformation calculation needs to be performed on the inverse matrix of the binding pose of all child bones of J1.

[0195] Step 1063-4: performing matrix transformation (multiplication) on the new binding posture inverse matrix according to the skin scaling parameter weighting factor to determine the skin shape of the deformed part;

[0196] Get the inverse matrix of the binding pose corresponding to the deformed part, and change the skin shape of the body part by transforming this matrix. The specific method is: multiply the inverse matrix of the binding pose by the skin offset correction matrix, and then multiply it by the skin scaling parameter weighting factor; the skin offset correction matrix is ​​obtained by multiplying the model space coordinates of the bone by the difference between the initial value of the skin scaling parameter and the threshold value of the skin scaling parameter.

[0197] Step 1063-5: Convert the bone geometric scaling parameter weighting factor into a second scaling transformation matrix;

[0198] Step 1063-6: According to the second scaling transformation matrix, perform matrix transformation (multiplication) on the bone transformation matrix to determine the bone deformation at the deformation site; the bone transformation matrix is ​​the transformation matrix of the local bone space.

[0199] In this embodiment, this parameter presets the proportional scaling threshold of the left shoulder, right shoulder, left thigh, and right thigh to be 0.6, so when the deformation weight is 1, the size of the target character's hands and feet as well as the bone length in the embodiment will be reduced to 0.6 times.

[0200] In terms of the specific deformation calculation method, one of the deformation parameters, the left shoulder, is taken as an example, as shown in Table 6.

[0201] Table 6 Deformation parameters of the left shoulder when calculating the bone transformation matrix

[0202]

[0203] Assume that the current deformation weight value is W, and the "bone geometric scaling parameter weighting factor" corresponding to a certain part is Scale2, the bone geometric scaling parameter weighting factor after applying the deformation weight is 1+(0.6-1)*W, that is, when the weight value W is 0.5, the Scale2 parameter coefficient is 0.8, and when the weight value W is 1, the Scale2 parameter coefficient is 0.6.

[0204] The standard bone in the parameter item is the left shoulder. The left shoulder bone J1 is found through mapping, and the local transformation matrix corresponding to the bone is obtained [MJ1 local ]. Convert the bone proportional scaling parameter weighting factor Scale2 into a 4×4 scaling transformation matrix [M Scale2 ], the matrix scaling component value is the Scale2 component, by changing the local transformation matrix [M J1 local ] and multiply it to get the new bone local transformation matrix [M J1new local ].

[0205] That is, the second deformation formula using bone scaling is: J1new local ]=[M Scale2 ]*[M J1 local ].

[0206] It should be noted that this Scale2 scaling is to make equal scaling of the bones in the X, Y, and Z axes. If Scale2 is non-uniform scaling, it will cause unequal spatial compression of the J1 bone and all its child bones, forming a distorted local space. When the bones move in the distorted space, they will be distorted and deformed, affecting the animation effect (the 3D engine uses animation frames to rotate the bones to change the character's posture and present a coherent animation).

[0207] In another exemplary embodiment of the present invention, the three-dimensional character model appearance transformation method further includes: calculating a skin offset correction matrix of an inverse matrix of a binding pose.

[0208] Specifically, according to the deformation parameter weighting factor, the binding posture inverse matrix and the bone transformation matrix are transformed, and the two deformation methods are combined to change the character appearance, including the following steps:

[0209] Step 1063-a: Determine the inverse bind pose matrix of the initial bind pose; the inverse bind pose matrix is ​​used to transform skin vertices from model space to bone space.

[0210] Step 1063-b: Calculate the skin offset correction matrix of the inverse matrix of the binding posture.

[0211] The inverse bind pose matrix transforms vertices from model space to local bone space. The coordinate origin in model space is generally the center between the two soles of the character's feet. Scaling the inverse bind pose matrix in the previous steps may cause skin offset distortion. To solve this error, the inverse bind pose matrix is ​​automatically corrected here.

[0212] Because when rebinding the character's new skeleton, the bone rotation vector is set to (0, 0, 0), the scaling vector is set to (1, 1, 1), and the initial binding pose is the standard T-Pose pose, so when making corrections, there is no need to consider the impact of rotation and scaling transformations, only the offset correction needs to be calculated.

[0213] This offset correction needs to be pre-multiplied by a 4×4 translation transformation matrix [M offset1 ], this matrix is ​​called the skin offset correction matrix of the deformed part, this [M offset1 ] is composed of three-dimensional vector [V offset1 ] converted.

[0214] Assume that the model space coordinates of the bone J1 corresponding to a certain deformation part are [V J1 model ], after adjusting the deformation weight value W, the corresponding current skin scaling parameter weighting factor is Scale1, and the current skin offset correction parameter weighting factor is T1 (this weighted correction is a secondary correction and does not need to be set normally), where the T1 value is the skin offset correction preset value multiplied by the weight value W.

[0215] [V offset1 ]The calculation formula is: [V offset1 ]=[V J1 model ]*((1, 1, 1)-Scale1)+T1.

[0216] [V offset1 ]Convert 4×4 translation matrix [M offset1 ].

[0217] Step 1063-c: Convert the skin scaling parameter weighting factor into a first scaling transformation matrix.

[0218] Step 1063-d: Multiply the inverse bind pose matrix, the skin offset correction matrix and the first scaling transformation matrix to obtain a new inverse bind pose matrix.

[0219] The complete calculation formula for the first deformation is:

[0220] [M J1new -1 ]=[M Scale1 ]*[M offset1 ]*[M J1 -1 ].

[0221] If the parameter item is set to affect the child bones, the deformation calculation of the child bone's binding posture inverse matrix is ​​also required. Since the child bones are affected by the parent bone offset, all deformed child bones use the first deformed parent bone's [Moffset1 ]Offset matrix for calculation.

[0222] Step 1063-e: According to the skin scaling parameter weighting factor, perform matrix transformation (multiplication) on the new binding posture inverse matrix to determine the skin shape of the deformed part.

[0223] Step 1063-f: converting the bone geometric scaling parameter weighting factor into a second scaling transformation matrix;

[0224] Step 1063-g: According to the second scaling transformation matrix, perform matrix transformation (multiplication) on the bone transformation matrix to determine the bone deformation of the deformed part; the bone transformation matrix is ​​the transformation matrix of the local bone space.

[0225] The second deformation method is the same as above and will not be described in detail here.

[0226] To sum up, using the first deformation method to adjust the skin shape and the second deformation method to adjust the length of the skeleton, combining the above two deformation methods can not only efficiently and flexibly adjust the character appearance and skeleton, but also maintain the relationship balance between the skeleton, skin, binding, animation, and topology after deformation, so that the deformed character still maintains a high degree of standardization and is highly compatible with the normal use of various systems.

[0227] In addition, steps for result verification and adjustment are included.

[0228] Use the 3D view to preview whether the deformation results meet expectations. Based on the actual effect, you can further fine-tune the deformation parameters to optimize the deformation details, body proportions, etc.

[0229] The present invention also provides an application scenario, which applies the above-mentioned three-dimensional character model appearance transformation method. Specifically: the three-dimensional character model appearance transformation method provided in this embodiment can be applied in a 3D animation scene. The 3D animation scene includes a target three-dimensional character acquisition link, a target three-dimensional character and deformation template matching link, and a three-dimensional character appearance transformation link; the target three-dimensional character enters the target three-dimensional character and deformation template matching link from the acquisition link, and enters the three-dimensional character appearance transformation link after the matching is completed. The three-dimensional character model appearance transformation method provided in this embodiment belongs to the three-dimensional character and deformation template matching link and the three-dimensional character appearance transformation link. Specifically, through processing methods such as bone mapping, bone reconstruction and rebinding, the target three-dimensional character can be adapted to a number of preset deformation templates after processing, so that the character appearance can be easily transformed by applying the deformation template without manual processing.

[0230] Based on the same inventive concept, an embodiment of the present invention further provides a 3D character model appearance transformation device for implementing the 3D character model appearance transformation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the 3D character model appearance transformation device provided below can refer to the limitations of the 3D character model appearance transformation method above, and will not be repeated here.

[0231] In an exemplary embodiment, Fig.12 As shown, a three-dimensional role model appearance transformation device is provided, comprising:

[0232] An acquisition module M1 is used to acquire a target three-dimensional character;

[0233] The skeleton mapping module M2 is used to map the skeleton of the target three-dimensional character to a standard human skeleton to obtain a first skeleton of the target character; the standard human skeleton is a skeleton set of the standard human skeleton; the skeleton set includes all key skeletons used for character deformation and skeleton mapping;

[0234] A second skeleton determination module M3 is used to determine a second skeleton of a target character according to the first skeleton of the target character; the second skeleton of the target character is a skeleton obtained by adjusting the first skeleton of the target character to a T-Pose posture;

[0235] The transformation module M4 is used to reset the bone rotation transformation and scaling transformation of the second skeleton of the target character to obtain an initial binding posture;

[0236] A deformation template determination module M5, used to determine a deformation template, wherein the deformation template is a template set according to a series of predefined deformation parameters and deformation rules;

[0237] A deformation part determination module M6, used to determine the deformation part of the target three-dimensional character according to the initial binding posture and the deformation template;

[0238] The adjustment module M7 is used to determine the adjustment parameters of the deformation part according to the deformation parameters of the deformation template; the adjustment parameters of the deformation part include skin adjustment parameters and bone adjustment parameters.

[0239] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Fig.13As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store three-dimensional role model appearance transformation data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a three-dimensional role model appearance transformation method is implemented.

[0240] Those skilled in the art will understand that Fig.13 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0241] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0242] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0243] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0244] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0245] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0246] The database involved in each embodiment provided by the present invention may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided by the present invention may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0247] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0248] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for transforming the appearance of a three-dimensional character model, characterized in that: The three-dimensional role model appearance transformation method comprises: Get the target three-dimensional character; Mapping the skeleton of the target three-dimensional character onto a standard human skeleton to obtain a first skeleton of the target character; the standard human skeleton is a skeleton set of the standard human skeleton; the skeleton set includes all key skeletons used for character deformation and skeleton mapping; Determine a second skeleton of the target character according to the first skeleton of the target character; the second skeleton of the target character is a skeleton obtained by adjusting the first skeleton of the target character to a T-Pose posture; Resetting the bone rotation transformation and scaling transformation of the second skeleton of the target character to obtain an initial binding pose; Determine a deformation template, wherein the deformation template is a template set according to a series of predefined deformation parameters and deformation rules; Determining a deformation part of a target three-dimensional character according to the initial binding posture and the deformation template; According to the deformation parameters of the deformation template, the adjustment parameters of the deformation part are determined; the adjustment parameters of the deformation part include skin adjustment parameters and bone adjustment parameters.

2. The three-dimensional character model appearance transformation method according to claim 1, characterized in that: Mapping the skeleton of the target three-dimensional character onto a standard human skeleton to obtain a first skeleton of the target character, specifically comprising: Determine the set of bones of a standard human skeleton; The skeleton of the target three-dimensional character is mapped to a standard human skeleton by using a skeleton mapping method or a human skeleton mapping tool of a three-dimensional engine to obtain a first skeleton of the target character and generate a skeleton mapping relationship table.

3. The three-dimensional character model appearance transformation method according to claim 2, characterized in that: Determining a second skeleton of the target character according to the first skeleton of the target character specifically includes: Obtaining a bone mapping result; the bone mapping result is a result obtained according to the bone mapping relationship table; Determining the orientation of the arm bones of the first skeleton of the target character according to the bone mapping result; According to the orientation of the arm bones of the first skeleton of the target character, adjusting the posture of the first skeleton of the target character to a T-Pose posture, so as to obtain the first skeleton of the target character in the T-Pose posture; According to the first skeleton of the target character in the T-Pose posture, a second skeleton of the target character in the T-Pose posture is determined.

4. The three-dimensional character model appearance transformation method according to claim 1, characterized in that: Determining a deformation part of a target three-dimensional character according to the initial binding posture and the deformation template specifically includes: Binding the initial binding posture with the preset parameters of the deformation template to determine a deformation weight value; the deformation weight value is used to adjust the deformation strength of the deformation template; According to the deformation weight value, a deformation parameter weighting factor is calculated; the deformation parameter weighting factor includes a skin scaling parameter weighting factor and a bone geometric scaling parameter weighting factor; The deformation part of the target three-dimensional character is determined according to the deformation parameter weighting factor.

5. The three-dimensional character model appearance transformation method according to claim 4, characterized in that: Determining the deformation part of the target three-dimensional character according to the deformation parameter weighting factor specifically includes: Determining an inverse bind pose matrix of the initial bind pose; the inverse bind pose matrix is ​​used to transform skin vertices from model space to bone space; Converting the skin scaling parameter weighting factor into a first scaling transformation matrix; multiplying the inverse bind pose matrix by the first scaling transformation matrix to obtain a new inverse bind pose matrix; Performing a matrix transformation on the new binding posture inverse matrix according to the skin scaling parameter weighting factor to determine the skin shape of the deformed part; Converting the bone geometric scaling parameter weighting factor into a second scaling transformation matrix; According to the second scaling transformation matrix, a matrix transformation is performed on the bone transformation matrix to determine the bone deformation of the deformation part; the bone transformation matrix is ​​a transformation matrix of the local bone space.

6. The three-dimensional character model appearance transformation method according to claim 4, characterized in that: Determining the deformation part of the target three-dimensional character according to the deformation parameter weighting factor specifically includes: Determining an inverse bind pose matrix of the initial bind pose; the inverse bind pose matrix is ​​used to transform skin vertices from model space to bone space; Calculating a skin offset correction matrix of the inverse matrix of the bind pose; Converting the skin scaling parameter weighting factor into a first scaling transformation matrix; Multiplying the bind pose inverse matrix, the skin offset correction matrix and the first scaling transformation matrix to obtain a new bind pose inverse matrix; Performing a matrix transformation on the new binding posture inverse matrix according to the skin scaling parameter weighting factor to determine the skin shape of the deformed part; Converting the bone geometric scaling parameter weighting factor into a second scaling transformation matrix; According to the second scaling transformation matrix, a matrix transformation is performed on the bone transformation matrix to determine the bone deformation at the deformation site; the bone transformation matrix is ​​a transformation matrix of the local bone space.

7. A device for transforming the appearance of a three-dimensional character model, characterized in that: The three-dimensional character model appearance transformation device comprises: An acquisition module, used for acquiring a target three-dimensional character; A skeleton mapping module is used to map the skeleton of the target three-dimensional character to a standard human skeleton to obtain a first skeleton of the target character; the standard human skeleton is a skeleton set of the standard human skeleton; the skeleton set includes all key skeletons used for character deformation and skeleton mapping; A second skeleton determination module is used to determine a second skeleton of a target character according to the first skeleton of the target character; the second skeleton of the target character is a skeleton obtained by adjusting the first skeleton of the target character to a T-Pose posture; A transformation module, used for resetting the bone rotation transformation and scaling transformation of the second skeleton of the target character to obtain an initial binding posture; A deformation template determination module, used to determine a deformation template, wherein the deformation template is a template set according to a series of predefined deformation parameters and deformation rules; A deformation part determination module, used to determine the deformation part of the target three-dimensional character according to the initial binding posture and the deformation template; The adjustment module is used to determine the adjustment parameters of the deformation part according to the deformation parameters of the deformation template; the adjustment parameters of the deformation part include skin adjustment parameters and bone adjustment parameters.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the three-dimensional character model appearance transformation method described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the three-dimensional character model appearance transformation method described in any one of claims 1-6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the three-dimensional character model appearance transformation method described in any one of claims 1-6 are implemented.

Citation Information

Patent Citations

  • Geometric deformation based skin deformation method for three-dimensional animated character model

    CN103679783A

  • Animation model zooming method and device, electronic equipment and storage medium

    CN111062864A

  • Model action redirection method and device, electronic equipment and storage medium

    CN116977506A

  • Motion information redirection method and device, equipment, storage medium and product

    CN116993773A

  • A method, an apparatus and a computer program product for computer graphics

    EP4148682A1