Method, device, storage medium and electronic equipment for generating skeletal animation

CN115984433BActive Publication Date: 2026-09-29NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211702204.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-28
Publication Date
2026-09-29
Estimated Expiration
2042-12-28

AI Technical Summary

Technical Problem

[0005]本公开的目的在于提供一种骨骼动画生成方法、骨骼动画生成装置、存储介质及电子设备,旨在解决游戏资源因不能复用而制作效率低、成本高的问题

Benefits of technology

[0012]在本公开的一些实施例所提供的技术方案中,在骨骼动画更新时,通过对骨骼进行变形处理得到变形骨骼数据,再基于变形骨骼数据进行动画蒙皮处理和骨骼动画的生成。基于上述方法,一方面,当骨架发生了改变,只需要对骨骼进行变形,骨骼数据也可以复用并重新输出动作,而不需要重新制作新的骨架,不仅提高了动画的生成效率,还降低了美术制作成本;另一方面,由于每一帧动画的更新都可以对骨骼进行变形,因此可以适用于游戏运行时实时进行骨骼变形的应用场景。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115984433B_ABST
    Figure CN115984433B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of computer graphics, and particularly relates to a method and device for generating a skeletal animation, a storage medium and an electronic device. The method comprises: in response to an update instruction of a skeletal animation, obtaining original skeletal data of a current frame of the skeletal animation; performing deformation processing on a target bone based on the original skeletal data to obtain deformed skeletal data; and performing animation skinning processing according to the deformed skeletal data to generate a skeletal animation of the current frame of the skeletal animation. The method for generating a skeletal animation provided by the present disclosure can solve the problem of low production efficiency and high cost of game resources due to the inability to reuse.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer graphics, specifically to a method for generating skeletal animation, a device for generating skeletal animation, a storage medium, and an electronic device. Background Technology

[0002] In the field of game development, character art resources are mainly divided into three types: the first is the skeleton, which cannot be changed once it is determined; the second is the animation, which is created based on the determined skeleton; and the third is the clothing mesh, which is bound to the skeleton through skinning operations.

[0003] Therefore, once the skeleton is determined, any subsequent modifications require changes to all the already created animations and clothing meshes, incurring significant time and manpower costs and resulting in low resource production efficiency. Furthermore, existing resources cannot be reused, leading to resource waste.

[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] The purpose of this disclosure is to provide a skeletal animation generation method, skeletal animation generation device, storage medium, and electronic device, aiming to solve the problems of low production efficiency and high cost due to the non-reusability of game resources.

[0006] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part by practice of this disclosure.

[0007] According to one aspect of the present disclosure, a skeletal animation generation method is provided, comprising: in response to a skeletal animation update instruction, acquiring original skeletal data of the current frame of the skeletal animation; performing deformation processing on a target bone based on the original skeletal data to obtain deformed skeletal data; and performing animation skinning processing based on the deformed skeletal data to generate the skeletal animation of the current frame of the skeletal animation.

[0008] According to a second aspect of the present disclosure, a skeletal animation generation apparatus is provided, comprising: a response module, configured to acquire original skeletal data of the current frame of the skeletal animation in response to an update instruction for the skeletal animation; a deformation module, configured to perform deformation processing on a target bone based on the original skeletal data to obtain deformed skeletal data; and an animation module, configured to perform animation skinning processing based on the deformed skeletal data to generate the skeletal animation of the current frame of the skeletal animation.

[0009] According to a third aspect of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the skeletal animation generation method as described in the above embodiments.

[0010] According to a fourth aspect of the present disclosure, an electronic device is provided, characterized in that it includes: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the skeletal animation generation method as described in the above embodiments.

[0011] The exemplary embodiments disclosed herein may have some or all of the following beneficial effects:

[0012] In some embodiments of the present disclosure, during skeletal animation updates, deformed bone data is obtained by deforming the bones, and then animation skinning and skeletal animation generation are performed based on the deformed bone data. Based on this method, on the one hand, when the skeleton changes, only the bones need to be deformed, and the bone data can be reused and the animation re-output, without needing to recreate a new skeleton. This not only improves animation generation efficiency but also reduces art production costs. On the other hand, since the bones can be deformed for each frame of animation update, it is applicable to application scenarios where real-time bone deformation occurs during game runtime.

[0013] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0014] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0015] Figure 1 This diagram illustrates the principle of an existing skeletal animation generation method.

[0016] Figure 2 The schematic diagram illustrates a flowchart of a skeletal animation generation method according to an exemplary embodiment of the present disclosure;

[0017] Figure 3 This schematic diagram illustrates a skeleton in an exemplary embodiment of the present disclosure.

[0018] Figure 4This schematic diagram illustrates a local coordinate system for a skeleton in an exemplary embodiment of the present disclosure;

[0019] Figure 5 The schematic diagram illustrates the principle of a skeletal animation generation method in an exemplary embodiment of the present disclosure;

[0020] Figure 6 The schematic diagram illustrates a flowchart of a method of using a skeleton deformer in an exemplary embodiment of the present disclosure;

[0021] Figure 7 This schematic diagram illustrates the composition of a skeletal animation generation apparatus according to an exemplary embodiment of the present disclosure;

[0022] Figure 8 This schematic diagram illustrates a computer-readable storage medium according to an exemplary embodiment of the present disclosure;

[0023] Figure 9 The schematic diagram illustrates the structure of a computer system of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation

[0024] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art.

[0025] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this disclosure.

[0026] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0027] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0028] Figure 1 This diagram illustrates the principle of an existing skeletal animation generation method. (Reference) Figure 1 As shown, in the field of game development, character art resources are mainly divided into three types: the first is the skeleton, which cannot be changed once it is determined; the second is the animation, which is created based on the determined skeleton; and the third is the clothing mesh, which is bound to the skeleton through skinning operations. As the game is developed, the amount of animation data and clothing data will increase.

[0029] Therefore, once the skeleton is finalized, any subsequent modifications require remodeling and outputting a new skeleton. All existing character animations and appearance models must be re-output, and existing resources cannot be reused. This incurs significant time and manpower costs. The cost calculation method is: number of skeletons * (number of character animations + number of character appearance models). Thus, the more new skeletons, the higher the cost. Furthermore, some games require real-time character model changes during gameplay, which this method cannot meet.

[0030] To address the shortcomings of existing technologies, this disclosure provides a skeletal animation generation method that supports skeleton deformation, thereby enabling data reuse and meeting the need for real-time and arbitrary transformation.

[0031] The implementation details of the technical solutions of the embodiments of this disclosure are described in detail below.

[0032] Figure 2 This schematically illustrates a flowchart of a skeletal animation generation method according to an exemplary embodiment of this disclosure. Figure 2 As shown, the skeletal animation generation method includes steps S1 to S3:

[0033] Step S1: In response to the update instruction of the skeletal animation, obtain the original skeletal data of the current frame of the skeletal animation;

[0034] Step S2: Based on the original bone data, deform the target bone to obtain deformed bone data;

[0035] Step S3: Perform animation skinning processing based on the deformed bone data to generate the skeletal animation of the current frame of the skeletal animation.

[0036] In some embodiments of the present disclosure, during skeletal animation updates, deformed bone data is obtained by deforming the bones, and then animation skinning and skeletal animation generation are performed based on the deformed bone data. Based on this method, on the one hand, when the skeleton changes, only the bones need to be deformed, and the bone data can be reused and the animation re-output, without needing to recreate a new skeleton. This not only improves animation generation efficiency but also reduces art production costs. On the other hand, since the bones can be deformed for each frame of animation update, it is applicable to application scenarios where real-time bone deformation occurs during game runtime.

[0037] The steps of the skeletal animation generation method in this exemplary embodiment will now be described in more detail with reference to the accompanying drawings and embodiments.

[0038] In step S1, in response to the update instruction of the skeletal animation, the original skeletal data of the current frame of the skeletal animation is obtained.

[0039] Specifically, during skeletal animation updates, the pose (skeletal data) for each action at the current time is first sampled, and then multiple poses are merged together. Therefore, upon receiving the skeletal animation update instruction, the system can process the animation sampling and fusion to output the raw skeletal data of the current frame for further processing, thereby generating frame-by-frame skeletal animation.

[0040] Figure 3 This schematically illustrates a skeleton diagram according to an exemplary embodiment of the present disclosure. (Reference) Figure 3 As shown, the skeleton includes multiple bones. Within a skeleton, the bones have parent-child relationships, and all the bones together form a tree structure. In the original skeleton data, each bone can have its local space matrix in local space and its model space matrix in model space recorded.

[0041] In this context, the local space matrix refers to the transformation matrix from the current bone space to its parent bone space. The bones we typically refer to don't actually exist in the actual programming implementation; instead, the information stored is the joint information of each bone head. Each joint stores a 4x4 matrix representing rotation, translation, and scaling information; this matrix is ​​called the local space matrix of that bone.

[0042] The model space matrix corresponds to the local space matrix, which represents the transformation matrix from the current skeleton space to the entire model space. Multiplying the local space matrix by the matrices of the parent bones along the tree structure until the root node yields the matrix representation of that bone in the model space, called the bone's model space matrix.

[0043] Obtaining the raw bone data for the current frame of the skeletal animation is done in the same way as existing methods, so we will not go into too much detail here.

[0044] In step S2, the target bone is deformed based on the original bone data to obtain deformed bone data.

[0045] Specifically, skeletal deformation can involve two dimensions: length deformation and thickness deformation. Length deformation involves making bones longer or shorter, and the mesh affected by that bone will also change length, used to represent the length of a person's hands, legs, etc. Thickness deformation involves making bones thicker or thinner, and the mesh affected by that bone will also change thickness, thus representing the effect of that part becoming fatter or thinner.

[0046] Figure 4 This diagram schematically illustrates a local coordinate system for a skeleton in an exemplary embodiment of this disclosure. (Reference) Figure 4 As shown, in the local space coordinate system, the X-axis represents the length of the bone. Simply put, scaling along the X-axis controls the length of the bone, while scaling along the Y and Z axes controls its thickness.

[0047] Therefore, in one embodiment of this disclosure, when the deformation processing is a length-short deformation processing, the step of deforming the target bone based on the original bone data to obtain deformed bone data includes: determining the sub-bones of the next level of the target bone's level; performing translation operations on each of the sub-bones in the local coordinate system of the target bone to obtain intermediate deformed bone data; and scaling the first coordinate axis of the target bone in the global coordinate system based on the intermediate deformed bone data to obtain the deformed bone data.

[0048] Specifically, scaling or translating the local space matrix will affect all sub-bones below that bone. For example, scaling the upper arm in the local space matrix will affect its sub-bones, including the forearm, hand, and fingers, causing them to be scaled as well. Therefore, for length-to-length deformation processing, you can first translate all the next-level bones of the bone in local space, and then scale the bone along its X-axis in model space.

[0049] The basic principles of the skeleton deformer have been introduced above. However, after the character skeleton is deformed, there may be overlaps or misalignments between the hand and foot positions and the original body shape. Therefore, some auxiliary operations are needed to ensure that the deformed character behaves normally. For example, if the character grows taller, the program needs to automatically raise the character's root bones. Therefore, after the character skeleton is deformed, IK (Integrated Keyboard) is needed to repair the character's interaction with the scene and other characters.

[0050] Therefore, in one embodiment of this disclosure, after deforming the target bone based on the original bone data to obtain deformed bone data, the method further includes: adjusting the root bone of the deformed bone data; and performing bone correction processing based on the deformed bone data after root bone adjustment to update the deformed bone data after bone correction processing to the deformed bone data.

[0051] In one embodiment of this disclosure, root bone adjustment of the deformable skeleton data includes: detecting whether the deformation process meets the root bone adjustment conditions; and adjusting the world coordinates of the root bone in the deformable skeleton data when the root bone adjustment conditions are met.

[0052] Specifically, if the length of a character's legs or the thickness of their feet are changed, the character's root skeleton needs to be adjusted so that the character's feet are precisely on the ground. Therefore, these changes to the root skeleton's height can be configured as root skeleton adjustment conditions. Then, when deformation processing is detected to meet the pre-configured root skeleton adjustment conditions, the coordinates of the root skeleton are adjusted accordingly to meet the actual requirements.

[0053] In one embodiment of this disclosure, bone correction processing is performed based on deformed bone data adjusted from the root bone, including: determining the bone correction order based on the distance between each bone in the deformed bone data and the layer where the root bone is located; calculating the inverse motion IK bone corresponding to each bone according to the bone correction order, and correcting each bone based on each inverse motion IK bone.

[0054] In this context, IK stands for Inverse Kinematics. IK is a physical motion method that uses the displacement and direction of motion of a parent object to inherit the resulting information to its child objects. IK is the opposite of Forward Kinematics. Objects connected by joints consist of a set of rigid segments connected by joints, and changing the angles of the joints can produce infinite shapes.

[0055] The calculation order of IK is determined by the distance of the bone adjusted by IK from the root bone in the skeletal hierarchy. Bones closer to the root bone are calculated earlier.

[0056] After using a deformable skeleton, the IK (Iconic Keyboard) mechanism in the original animation processing workflow must be modified. For example, look IK mainly implements the function of the character looking at the camera. Two-Bone IK is mainly used to control the position of the character's hands and feet. Aim IK is mainly used to handle the orientation of individual bones. For example, after two-bone IK fixes the position of the character's hands, the orientation of the palm can be fixed using aim IK. Combining two-bone IK and aim IK can also be used to handle the problem of toe shaking when the character's legs become longer.

[0057] It's worth noting that during IK restoration, you can record the original body shape's position and orientation in the current frame of the animation before deformation processing. In actions involving scene interaction, if the height, arm length, etc., are changed, the deformed body shape will not be able to accurately touch the scene when performing actions with scene interaction. Therefore, recording some original animation information in advance can help with IK restoration.

[0058] In one embodiment of this disclosure, when the deformation processing is coarse-fine deformation processing, the step of deforming the target bone based on the original bone data to obtain deformed bone data includes: scaling the first coordinate axis, the second coordinate axis, and the third coordinate axis of the target bone in the global coordinate system.

[0059] In other words, when it comes to scaling, if you make a bone thicker or thinner in local space, the sub-bones will also become thicker or thinner. This makes it impossible for artists to adjust each bone individually, which is very inconvenient. However, if you scale a bone in model space, it will not affect the sub-bones, and artists can adjust each bone individually.

[0060] Scaling the model space matrix will not affect sub-bones. For example, scaling the upper arm in model space will not affect the forearm or hand. Therefore, this requirement can be met by scaling the vertices along the X, Y, and Z axes before applying the model space matrix.

[0061] It should be noted that in actual operation, either length deformation processing or thickness deformation processing can be used, or both can be used. This disclosure does not make specific restrictions here.

[0062] In step S3, animation skinning is performed based on the deformed bone data to generate the skeletal animation of the current frame of the skeletal animation.

[0063] Specifically, the deformed bone data after deformation processing is passed into the skinning stage, and after rendering, the deformed bone animation can be seen on the screen.

[0064] Figure 5 This illustration schematically demonstrates the principle of a skeletal animation generation method according to an exemplary embodiment of the present disclosure. (Reference) Figure 5 As shown, with Figure 1 In comparison, the main difference is that this application provides a skeleton deformer that can deform the skeleton after animation sampling fusion during game runtime, thereby allowing the creation of any body shape.

[0065] Using a skeleton deformer modifies the bones in the pose data, effectively creating a virtual skeleton at runtime that artists can freely modify. This involves adjusting different deformation parameters of an existing skeleton to obtain different virtual skeletons, effectively eliminating the limit on the number of bones in the game. These virtual skeletons can then be reused, including for animation and mesh data. The entire process only requires adding the skeleton deformer to the code; no new art assets need to be created or existing ones modified.

[0066] In one embodiment of this disclosure, after obtaining the original skeletal data of the current frame of the skeletal animation in response to an update instruction for the skeletal animation, the method further includes: obtaining the animation type of the skeletal animation; and when the animation type is a cartoon style type, performing hierarchical restoration to update the original skeletal data.

[0067] Specifically, due to the unique workflow of cartoon-style skeletal animation, an additional step is needed to restore the skeletal hierarchy. Specifically, to restore the hierarchy, the artists will export the original parent-child relationships between bones from 3ds Max into a separate file. During runtime, the engine loads this file and builds a skeletal hierarchy tree. By comparing the original bone names with the bone names in the hierarchy tree, the correct hierarchical relationships between bones can be obtained. The local space matrix can be obtained by multiplying the current bone's model space matrix by the inverse of its parent bone's model space matrix. The parent bone relationships are obtained through the loaded skeletal hierarchy tree.

[0068] Next, we will explain the detailed update steps of the skeleton deformer when updating each frame of animation, using specific examples.

[0069] Figure 6 This schematically illustrates a flowchart of a method for using a skeleton deformer according to an exemplary embodiment of this disclosure. (Reference) Figure 6 As shown, the specific steps include:

[0070] Step S601, Animation Sampling and Blending: For each frame of the game animation update, the pose of each action at the current time is first sampled, and then multiple animation poses are blended together. These steps existed before the introduction of the skeleton deformer.

[0071] Step S602: Obtain the local space matrix. After animation sampling and fusion, a Pose data will be output, which records a matrix for each bone on the skeleton. The meaning is the transformation matrix from the current bone space to its parent bone space, which is the local space matrix.

[0072] Step S603: Obtain the model space matrix. The model space matrix can be obtained by performing matrix multiplication along the bone chain starting from the current bone until the root bone.

[0073] Step S604: Obtain the restored model space matrix. To restore the hierarchical structure, the artists will export the original parent-child relationships between bones in 3ds Max as a separate file. During engine runtime, this file is loaded, and a bone hierarchy tree is built. By comparing the original bone names with the bone names in the bone hierarchy tree, the correct bone hierarchy can be obtained.

[0074] Step S605: Obtain the local space matrix after restoring the hierarchy. The local space matrix can be obtained by multiplying the model space matrix of the current bone with the inverse of the model space matrix of its parent bone. The relationship of the parent bones is obtained through the bone hierarchy tree loaded in step S604.

[0075] Step S606: Record the original animation information. After the skeleton deformation is applied, there will be overlap and the positions of the hands and feet will deviate from the original body shape. This step records the position and orientation information of the original body shape in the current frame of the animation. This information will be used in the subsequent IK steps to repair the deformed animation.

[0076] Step S607: On the hierarchical skeleton, perform X-axis scaling: translate sub-bones; as the first step of the skeleton deformer, for each bone, if the art department has set X-axis scaling parameters, all sub-bones of that bone need to be translated.

[0077] Step S608: Adjust the height of the root bone; if the length of the character's legs or the thickness of the feet have been changed, the character's root bone needs to be adjusted so that the character's feet are just standing on the ground.

[0078] Step S609, calculate IK; the order of IK calculation is determined by adjusting the skeleton according to IK and its distance from the root bone in the skeletal hierarchy. The closer to the root bone, the earlier it is calculated.

[0079] Step S610: Obtain the model space matrix for restoring the hierarchical relationship; convert the local space matrix for restoring the hierarchical relationship into the model space matrix for restoring the hierarchical structure through matrix multiplication.

[0080] Step S611: Scale the skeleton along the X, Y, and Z axes on the hierarchical skeleton. This step requires processing the skeleton deformer and applying the scaling of the X, Y, and Z axes in the model space matrix that restores the bone hierarchy.

[0081] Step S612, transfer deformable bone data; transfer the deformable bone data to the original skeleton by mapping the bone names.

[0082] In step S613, the deformed bone data obtained in step S612 is passed into the skinning stage. After rendering, the deformed character can be seen on the screen.

[0083] The above Figure 6The steps in the animation update are as follows: steps S601, S602, S603, and S613 are steps that already exist before the introduction of the skeleton deformer; steps S604, S605, S610, and S612 are for restoring the skeleton hierarchy, which is specific to cartoon-style skeletal animation; steps S607 and S611 are two deformation processing steps of the skeleton deformer; steps S606, S608, and S609 are three steps that are IK correction operations introduced to fix the overlap after the skeleton deformation.

[0084] Based on the above method, by introducing skeleton deformer technology, it is possible to achieve real-time skeletal animation skeleton deformation during game runtime, which can greatly save art costs and achieve what is impossible in traditional methods, namely the need for real-time body shape transformation in the game.

[0085] Figure 7 This schematic diagram illustrates the composition of a skeletal animation generation apparatus according to an exemplary embodiment of the present disclosure, such as... Figure 7 As shown, the skeletal animation generation device 700 may include a response module 701, a deformation module 702, and an animation module 703. Wherein:

[0086] The response module 701 is used to obtain the original skeletal data of the current frame of the skeletal animation in response to the update instruction of the skeletal animation.

[0087] The deformation module 702 is used to deform the target bone based on the original bone data to obtain deformed bone data.

[0088] Animation module 703 is used to perform animation skinning processing based on the deformed bone data to generate the skeletal animation of the current frame of the skeletal animation.

[0089] According to an exemplary embodiment of this disclosure, the deformation module 702 includes a first deformation unit, configured to determine the sub-bone of the next level of the target bone when the deformation processing is a long-short deformation processing; to perform translation operations on each of the sub-bones in the local coordinate system of the target bone to obtain intermediate deformed bone data; and to perform scaling operations on the first coordinate axis of the target bone in the global coordinate system based on the intermediate deformed bone data to obtain the deformed bone data.

[0090] According to an exemplary embodiment of the present disclosure, the deformation module 702 includes a second deformation unit, which is used to scale the first coordinate axis, the second coordinate axis and the third coordinate axis of the target bone in the global coordinate system when the deformation processing is coarse and fine deformation processing.

[0091] According to an exemplary embodiment of the present disclosure, the first deformation unit is further configured to perform root bone adjustment on the deformed bone data after deforming the target bone based on the original bone data to obtain deformed bone data; and perform bone correction processing on the deformed bone data after root bone adjustment to update the deformed bone data after bone correction processing to the deformed bone data.

[0092] According to an exemplary embodiment of this disclosure, the first deformation unit is further configured to detect whether the deformation process satisfies the root bone adjustment condition; when the root bone adjustment condition is satisfied, the world coordinates of the root bone in the deformed bone data are adjusted.

[0093] According to an exemplary embodiment of this disclosure, the first deformation unit is further configured to determine the bone correction order based on the distance between each bone in the deformable bone data and the layer where the root bone is located; calculate the inverse motion IK bone corresponding to each bone according to the bone correction order, and correct each bone based on each inverse motion IK bone.

[0094] According to an exemplary embodiment of this disclosure, the deformation module 702 is further configured to, in response to an update instruction for the skeletal animation, obtain the original skeletal data of the current frame of the skeletal animation, and then, when the animation type is a cartoon style, perform hierarchical restoration to update the original skeletal data.

[0095] The specific details of each module in the aforementioned skeletal animation generation device 700 have been described in detail in the corresponding skeletal animation generation method, so they will not be repeated here.

[0096] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0097] In an exemplary embodiment of this disclosure, a storage medium capable of implementing the above-described method is also provided. Figure 8 This schematic diagram illustrates a computer-readable storage medium according to an exemplary embodiment of the present disclosure, such as... Figure 8As shown, a program product 800 for implementing the above-described method according to an embodiment of the present disclosure is described. This product may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a mobile phone. However, the program product of the present disclosure is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0098] In an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided. Figure 9 The schematic diagram illustrates the structure of a computer system of an electronic device according to an exemplary embodiment of the present disclosure.

[0099] It should be noted that, Figure 9 The computer system 900 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0100] like Figure 9 As shown, the computer system 900 includes a Central Processing Unit (CPU) 901, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 902 or programs loaded from storage section 908 into Random Access Memory (RAM) 903. The RAM 903 also stores various programs and data required for system operation. The CPU 901, ROM 902, and RAM 903 are interconnected via a bus 904. An Input / Output (I / O) interface 905 is also connected to the bus 904.

[0101] The following components are connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. Removable media 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 910 as needed so that computer programs read from them can be installed into storage section 908 as needed.

[0102] In particular, according to embodiments of this disclosure, the processes described below with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 909, and / or installed from removable medium 911. When the computer program is executed by central processing unit (CPU) 901, it performs various functions defined in the system of this disclosure.

[0103] It should be noted that the computer-readable medium shown in the embodiments of this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0104] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0105] The units described in the embodiments of this disclosure can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the unit itself.

[0106] In another aspect, this disclosure also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.

[0107] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0108] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this disclosure.

[0109] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein.

[0110] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for generating skeletal animation, characterized in that, include: During game runtime, in response to the update command of the skeletal animation, the original skeletal data of the current frame of the skeletal animation is obtained; Based on the original bone data, a skeleton deformer is used to deform the target bone to obtain deformed bone data; wherein: When the deformation processing is a length deformation processing, the step of deforming the target bone based on the original bone data to obtain deformed bone data includes: determining the sub-bones of the next level of the target bone's level; performing translation operations on each of the sub-bones in the local coordinate system of the target bone to obtain intermediate deformed bone data; and scaling the first coordinate axis of the target bone in the global coordinate system based on the intermediate deformed bone data to obtain the deformed bone data. When the deformation processing is coarse-fine deformation processing, the deformation processing of the target bone based on the original bone data to obtain deformed bone data includes: scaling the first coordinate axis, the second coordinate axis and the third coordinate axis of the target bone in the global coordinate system respectively; Animation skinning is performed based on the deformed bone data to generate the skeletal animation for the current frame of the skeletal animation.

2. The skeletal animation generation method according to claim 1, characterized in that, After deforming the target bone based on the original bone data to obtain deformed bone data, the method further includes: The deformed skeleton data is then adjusted to include the root skeleton. Based on the deformed bone data adjusted from the root bone, bone correction processing is performed to update the deformed bone data after bone correction processing.

3. The skeletal animation generation method according to claim 2, characterized in that, Root bone adjustment is performed on the deformable skeleton data, including: Check whether the deformation process meets the root skeleton adjustment conditions; When the root skeleton adjustment conditions are met, the world coordinates of the root skeleton in the deformable skeleton data are adjusted.

4. The skeletal animation generation method according to claim 2, characterized in that, Skeletal correction processing is performed based on the deformed skeleton data after root skeleton adjustment, including: The bone correction order is determined based on the distance between each bone and the level of the root bone in the deformed bone data. According to the bone correction order, calculate the inverse motion IK bone corresponding to each bone, and correct each bone based on each inverse motion IK bone.

5. The skeletal animation generation method according to claim 1, characterized in that, After obtaining the raw skeletal data of the current frame of the skeletal animation in response to an update instruction for the skeletal animation, the method further includes: Obtain the animation type of the skeletal animation; When the animation type is cartoon style, the original bone data is restored and updated hierarchically.

6. A skeletal animation generation device, characterized in that, include: The response module is used to obtain the original skeletal data of the current frame of the skeletal animation in response to the update command of the skeletal animation during game runtime. The deformation module is used to deform the target bone based on the original bone data to obtain deformed bone data. When the deformation processing is a length deformation processing, the step of deforming the target bone based on the original bone data to obtain deformed bone data includes: determining the sub-bones of the next level of the target bone's layer; performing translation operations on each of the sub-bones in the local coordinate system of the target bone to obtain intermediate deformed bone data; and scaling the first coordinate axis of the target bone in the global coordinate system based on the intermediate deformed bone data to obtain the deformed bone data. When the deformation processing is a thickness deformation processing, the step of deforming the target bone based on the original bone data to obtain deformed bone data includes: scaling the first, second, and third coordinate axes of the target bone in the global coordinate system. An animation module is used to perform animation skinning processing based on the deformed bone data to generate the skeletal animation of the current frame of the skeletal animation.

7. A computer-readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the skeletal animation generation method as described in any one of claims 1 to 5.

8. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the skeletal animation generation method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Animation model skeleton processing method and device, electronic equipment and storage medium

    CN112102453A

  • Animation production method and device, storage medium and computer equipment

    CN112233211A