Animation generation method, system and device for 3D game

By interpolation and predicting parameter correction of 3D game animations, the similarity and motion trajectory of bones are analyzed, and the stiff problems caused by linear interpolation algorithm are solved, which improves the fluency and realistic nature of 3D game animations.

CN120339466APending Publication Date: 2025-07-18SHANGRAO XINXIN INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510406415.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In the existing 3D game animation generation technology, linear interpolation algorithm causes the animation transition to appear stiff, lacks a sense of smoothness, and cannot effectively handle complex motion changes, resulting in unsatisfactory fluency and realisticity.

Method used

By interpolation of the initially generated 3D game animation, the parameter information of the bone is obtained, and the prediction algorithm and threshold segmentation algorithm are used to analyze the similarity of the bones, combining the root node coordinates and bone length of similar bones, the prediction parameter correction is performed to generate the final 3D game animation.

Benefits of technology

The animation transition effect is optimized to ensure the reasonable relative proportion and posture between the bones, improve the quality and fluency of the overall animation, and increase the accuracy and fluency of the animation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339466A_ABST
    Figure CN120339466A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image data processing, in particular to an animation generation method, system and device for a 3D game, and the method comprises the steps: carrying out the interpolation and prediction of an initially generated 3D game animation, obtaining an interpolated animation frame and a predicted animation frame, and obtaining a predicted animation frame according to the similarity degree of the change of skeleton parameter information in each animation frame; obtaining the similarity between any two skeletons; acquiring a behavior-similar skeleton of each skeleton; further obtaining a root node coordinate reference value and a skeleton length reference value of each skeleton through skeleton parameter information of skeletons with similar behaviors; analyzing the dispersion of the same skeleton parameter information of each skeleton in a plurality of continuous animation frames to obtain a prediction parameter correction value of each skeleton; evaluating the reliability of the bone prediction parameter correction value of each bone; the final root node coordinates and the final skeleton length of each skeleton are obtained, and the final 3D game animation is generated. The invention aims to improve the fluency of the 3D game animation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image data processing, and particularly to an animation generation method, system and device for 3D games. Background Art

[0002] The continuous development of 3D game animation generation technology has made the characters, scenes and interaction effects in the game world more vivid and realistic. With the progress of computer graphics and animation technology, modern 3D games not only rely on complex modeling and rendering techniques, but also combine motion capture and physical engines to present more natural and smooth animation effects. The application of linear interpolation algorithm in 3D game animation makes the animation transition process smoother, more natural and coherent. Through simple and efficient calculations, various animation effects such as character movement, object transformation, and color gradient can be achieved, improving the fluency and visual experience of the game.

[0003] Although linear interpolation is simple and efficient, it does have certain limitations in animation performance. When using the linear interpolation algorithm to generate animations, in some cases, the animation transition appears rigid and lacks a sense of smoothness. At the same time, it cannot effectively handle complex motion changes, resulting in insufficient fluency and realism of the animation. Summary of the Invention

[0004] In view of the above, it is necessary to provide an animation generation method, system and device for 3D games to solve the above problems.

[0005] According to one aspect of the present application, there is provided an animation generation method for 3D games, the method comprising:

[0006] Interpolate the initially generated 3D game animation to obtain interpolated animation frames and generate a preliminary version of the 3D game animation; obtain the parameter information of each bone in each animation frame, including the root node coordinates, rotation angle, and bone length; use a prediction algorithm to obtain the predicted parameter information of each bone in each interpolated animation frame;

[0007] According to the similarity degree of the root node coordinates of any two bones in each previous animation frame in each dimension, and combining the remaining parameter information differences, obtain the correlation characteristics of the any two bones in each dimension, and obtain the similarity between the any two bones;

[0008] Based on the similarity, use a threshold segmentation algorithm to obtain the behaviorally similar bones of each bone in each animation frame; according to the similarity between each bone in each interpolated animation frame and its behaviorally similar bones, and combining the distribution of the root node coordinates and the distribution of the bone lengths of the behaviorally similar bones, obtain the reference value of the root node coordinates and the reference value of the bone length of each bone;

[0009] According to the dispersion of the same bone parameter information of each bone in all animation frames before each interpolation animation frame, combined with the root node coordinate reference value, the bone length reference value, and the corresponding prediction parameter information, obtain the predicted root node coordinate correction value and the predicted bone length correction value of each bone;

[0010] According to the difference in the correlation characteristics of the root node coordinates and the predicted root node coordinate correction values of each bone and its behaviorally similar bones in each dimension of each interpolation animation frame, evaluate the reliability of the predicted root node coordinate correction value and the predicted bone length correction value of each bone;

[0011] Based on the predicted root node coordinate correction value and the predicted bone length correction value, combined with the corresponding reliability and bone parameter information, obtain the final root node coordinate and the final bone length of each bone, and generate the final 3D game animation.

[0012] Preferably, the obtaining of the correlation characteristics of any two bones in each dimension is specifically as follows:

[0013] For any two bones in each animation frame of the initial version of the 3D game animation, respectively obtain the sequences composed of the coordinate values of the root node coordinates in each dimension in all animation frames before each animation frame, denoted as the first sequence and the second sequence; calculate the similarity degree and distance metric between the first sequence and the second sequence; positively fuse the negative correlation mapping result of the distance metric with the similarity degree to obtain the correlation characteristics of any two bones in each dimension.

[0014] Preferably, the obtaining of the similarity between any two bones includes:

[0015] For any two bones in each animation frame of the initial version of the 3D game animation, multiply the correlation characteristics of the any two bones in three dimensions to obtain the first product;

[0016] Respectively obtain the difference in the rotation angle of any two bones in each animation frame before each animation frame, denoted as the first difference; obtain the difference in the bone length of any two bones in all animation frames before each animation frame, denoted as the second difference; positively fuse the product of the first difference and the second difference of any two bones in all animation frames before each animation frame, denoted as the second product;

[0017] Based on the first product and the second product, obtain the similarity between any two bones; wherein the similarity is positively correlated with the first product and negatively correlated with the second product.

[0018] Preferably, the process of obtaining the behaviorally similar bones of each bone in each animation frame is specifically as follows:

[0019] For each bone in each animation frame, perform threshold segmentation on the similarity between each bone and all other bones to obtain a similarity threshold; the bones with a similarity greater than the similarity threshold to each bone are recorded as the behaviorally similar bones of each bone.

[0020] Preferably, the process of obtaining the reference value of the root node coordinates and the reference value of the bone length of each bone is specifically as follows:

[0021] Record the reference value of bone a in each dimension in each interpolation animation frame as T, and its formula form is: where E represents the number of kinematically similar bones of bone a, and Xs ( ′ a,e) represents the normalized value of the similarity between bone a and its e-th kinematically similar bone; D (a,e) represents the coordinate value of the predicted root node coordinates of the e-th kinematically similar bone of bone a in each dimension;

[0022] The reference values of the root node coordinates of bone a in all dimensions in each interpolation animation frame are combined to form the reference value of the root node coordinates of bone a;

[0023] Correspondingly, based on the bone length of each bone in each interpolation animation frame, the reference value of the bone length of each bone is obtained.

[0024] Preferably, the specific process of obtaining the predicted root node coordinate correction value and the predicted bone length correction value of each bone is as follows:

[0025] For each bone in all animation frames before each interpolation animation frame, obtain the normalized value of the variance of the coordinate values of its root node coordinates in each dimension, and calculate the product of the normalized value and the reference value, which is recorded as the third product;

[0026] Calculate the difference between 1 and the normalized value, and multiply the difference by the coordinate value of the predicted root node coordinates of each bone in each dimension, which is recorded as the fourth product;

[0027] The sum of the third product and the fourth product is used as the predicted correction value of each bone in each dimension;

[0028] The coordinates composed of the predicted correction values in all dimensions are used as the predicted correction coordinate values of the root node coordinates of each bone;

[0029] Correspondingly, according to the distribution of the bone length of each bone and the predicted bone length, the predicted bone length correction value of each bone is obtained.

[0030] Preferably, the reliability of the predicted root node coordinate correction value and the predicted bone length correction value for each bone is evaluated as follows:

[0031] The similarity of the root node coordinates of each bone in each interpolation animation frame to the root node coordinates of each of its behaviorally similar bones in each dimension is denoted as the first similarity; the similarity of the predicted root node coordinates of each bone in each interpolation animation frame to the root node coordinates of each of its behaviorally similar bones in each dimension is denoted as the second similarity; calculate the cumulative sum of the absolute values of the differences between the first similarity and the second similarity of each bone in each interpolation animation frame and all of its behaviorally similar bones; based on the negative correlation mapping result of the cumulative sum, obtain the reliability of the predicted root node coordinate correction value of each bone in each dimension;

[0032] Using the method for evaluating the reliability of the predicted root node coordinate correction value of each bone in each dimension, obtain the reliability of the predicted bone length correction value of each bone.

[0033] Preferably, the process of obtaining the final root node coordinates and the final bone length of each bone includes:

[0034] Denote the coordinate value of the root node of bone a in each dimension as P, denote the value of the predicted root node coordinate correction value of bone a in each dimension as Q, denote the reliability corresponding to Q as F, and the formula for the coordinate value G of the final root node of bone a in each dimension is:

[0035] Correspondingly, based on the predicted bone length correction value of each bone and its corresponding reliability, obtain the final bone length of each bone.

[0036] According to another aspect of the present application, there is provided an animation generation device for a 3D game, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of the method described in any one of the above are implemented.

[0037] According to still another aspect of the present application, there is provided an animation generation system for a 3D game. A computer program is stored in the system, and when the computer program is executed by a processor, the animation generation method described in any one of the above is implemented.

[0038] The present application has at least the following beneficial effects:

[0039] This application mainly interpolates the initially generated 3D game animation, and then analyzes and predicts the relevant parameters of the bones to obtain the interpolation information and prediction information of each bone in each interpolated animation frame, providing a data basis for subsequent correction of the interpolation information according to the prediction information; according to the similarity degree of the root node coordinates of any two bones in each dimension in all previous animation frames of each animation frame, combined with the difference in the remaining parameter information, the correlation characteristics of the any two bones in each dimension are obtained, and the similarity between the any two bones is obtained, which helps to analyze the movement of the bones in multiple consecutive animation frames, obtain the bones with similar movement trajectories as references in the animation frame, and obtain the reference value of the root node coordinates and the reference value of the bone length of each bone. The beneficial effect is to optimize the transition effect in the interpolation process and ensure the reasonable relative proportion and posture between the bones; further, according to the dispersion degree of the same bone parameter information of each bone in all animation frames before each interpolated animation frame, combined with the reference value of the root node coordinates, the reference value of the bone length and the corresponding predicted parameter information, the corrected value of the predicted root node coordinates and the corrected value of the predicted bone length of each bone are obtained, which helps to improve the quality and smoothness of the overall animation in the future; evaluating the reliability of the corrected value of the predicted root node coordinates and the corrected value of the predicted bone length of each bone helps to measure the reference value of the corrected value of the predicted bone parameters, combined with the original interpolation, to obtain the final bone-related parameter information. The beneficial effect is that by analyzing in combination with the bone trajectory, it makes up for the situation that the prediction algorithm does not refer to the movement information of adjacent bones, greatly increases the accuracy of the bone data obtained by using the prediction algorithm, so that the final determined bone data information obtained according to the prediction correction result and the linear interpolation result is closer to the visual effect of the interpolated frame animation, and increases the smoothness of the 3D game animation. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a flowchart of the steps of the animation generation method for 3D games provided by this application;

[0041] Figure 2 It is a schematic diagram of the acquisition process of the final root node coordinates and the final bone length provided by this application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0042] In the description of the embodiments of this application, words such as "exemplary", "or", "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or more advantageous than other embodiments or design solutions. Exactly speaking, using words such as "exemplary", "or", "for example" aims to present relevant concepts in a specific way.

[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0044] In addition, it should be noted that the terms "first" and "second" in this application and the accompanying drawings are used to distinguish similar objects and are not used to describe a specific order or sequence. For the methods disclosed in the embodiments of this application or the methods shown in the flowcharts, including one or more steps for implementing the methods, without departing from the scope of this application, the execution order of multiple steps can be interchanged with each other, and some steps can also be deleted.

[0045] Please refer to Figure 1 , which shows a flowchart of the steps of an animation generation method for 3D games provided by an embodiment of this application. The method includes the following steps:

[0046] Step 1: Interpolate the initially generated 3D game animation to obtain interpolated animation frames and generate a preliminary version of the 3D game animation; obtain the parameter information of each bone in each animation frame, including the root node coordinates, rotation angle, and bone length; use a prediction algorithm to obtain the predicted parameter information of each bone in each interpolated animation frame.

[0047] Collect the preliminarily generated 3D game animation, and perform denoising processing on each frame of the obtained image. In this embodiment, the median filtering method is used for denoising, and the implementer can perform image denoising according to the actual situation. The preliminarily produced 3D game animation in this application contains 30 frames, and the number of frames is increased through an interpolation algorithm to obtain a preliminary version of the 3D game animation. Among them, the interpolation algorithm uses the existing linear interpolation algorithm, which is a well-known technology, and this application will not elaborate on it; in this application, the initially generated 3D game animation frames in the preliminary version of the 3D game animation are recorded as initial animation frames; the animation frames obtained through the interpolation algorithm in the preliminary version of the 3D game animation are recorded as interpolated animation frames; it should be understood that there is an interpolated animation frame between two initial animation frames.

[0048] Extract the information of each bone in each frame of the preliminary version of the 3D game animation, including: the coordinates of the root node of each bone, the rotation angle of each bone where each joint is located relative to the parent joint, and the length of each bone. Among them, in this embodiment, quaternions are used to represent the rotation angles of bone nodes. It should be noted that this information can be obtained through the API of the 3D engine and the extraction tool of bone data, which is a well-known technology in the art, and this application will not elaborate on it.

[0049] Since the linear interpolation algorithm may produce a rigid and non - smooth effect, the present application combines a prediction algorithm to correct the results in the interpolated frame images obtained by the interpolation algorithm, thereby increasing the smoothness of the animation. Obtain the number of frames of each interpolated animation frame in the initial 3D game animation, and use the existing time - series prediction algorithm to obtain the predicted root - node coordinates and predicted bone lengths of each bone in the interpolated animation frame according to exponential smoothing; among them, the time - series prediction algorithm is a well - known existing technology, and the present application will not elaborate on it. It should be noted that the predicted animation frames are predicted based on the initial animation frames. It should be understood that for each bone in each interpolated animation frame, there are both root - node coordinates and bone lengths obtained by the interpolation algorithm, and predicted root - node coordinates and predicted bone lengths obtained by the prediction algorithm.

[0050] Step 2: According to the similarity degree of the root - node coordinate changes of any two bones in each dimension in all previous animation frames of each animation frame, combined with the remaining parameter information differences, obtain the correlation features of the any two bones in each dimension, and obtain the similarity between the any two bones.

[0051] Since the animation is continuous, the action changes of the same bone between adjacent animation frames are also smooth and continuous. Therefore, the movement trajectory of the bone can be inferred by analyzing the changes of the bone between different frames, so as to determine the final change result of the bone. Since the bones are connected to each other, the movement trajectory of the target bone can be inferred by analyzing the animation changes of adjacent bones. Some bones, such as the shoulders and legs, often show the characteristics of coordinated movement. For example, when performing synchronous actions such as raising hands and jumping, there may be some correlations in the movement trajectories of these bones.

[0052] Based on this, for any two bones in each animation frame of the initial 3D game animation, according to the similarity degree of the root - node coordinate changes of the two bones in each dimension in all previous animation frames, combined with the remaining parameter information differences, obtain the correlation features of the any two bones in each dimension, and obtain the similarity between the any two bones:

[0053] For bone a and bone b in the i - th animation frame of the initial 3D game animation, respectively obtain the sequences composed of the coordinate values of the root - node coordinates of bone a and bone b in each dimension in all animation frames before the i - th animation frame, denoted as the first sequence and the second sequence; calculate the similarity degree and distance metric between the first sequence and the second sequence; positively fuse the negative - correlation mapping result of the distance metric with the similarity degree to obtain the correlation features of bone a and bone b in each dimension.

[0054] In this embodiment, the similarity degree between sequences is measured by the Pearson correlation coefficient, and the Pearson correlation coefficient is denoted as A; the distance metric is measured by the Manhattan distance, and the mean value of the Manhattan distance is denoted as B; the negative correlation mapping result of a variable is calculated by the reciprocal of the variable; the positive fusion between multiple variables adopts a multiplication calculation method; in this embodiment, the formula form of the correlation feature of bone a and bone b in the first dimension is: It should be noted that to prevent the denominator from being 0 and the formula from being meaningless, a parameter greater than zero needs to be added to the denominator, and the value is 0.01.

[0055] It should be understood that when the correlation degree between the coordinates of the root nodes of two bones in the same dimension of each animation frame is greater, and the absolute value of the difference between the values of the root nodes of the two bones in the same dimension in each animation frame is smaller, it indicates that the correlation feature of the data of the root nodes of the two bones in the same dimension is stronger.

[0056] According to the correlation features of two bones in each dimension and in combination with the remaining parameter information differences, the similarity between the two bones is obtained:

[0057] Multiply the correlation features of bone a and bone b in three dimensions to obtain the first product; respectively obtain the difference in the rotation angles of bone a and bone b in each animation frame before the i-th animation frame, denoted as the first difference; obtain the difference in the bone lengths of bone a and bone b in all animation frames before the i-th animation frame, denoted as the second difference; perform positive fusion on the product of the first difference and the second difference of bone a and bone b in all animation frames before the i-th animation frame, denoted as the second product; based on the first product and the second product, obtain the similarity between bone a and bone b; where the similarity has a positive correlation with the first product and a negative correlation with the second product.

[0058] In this embodiment, the difference between variables is calculated by the absolute value of the difference; the positive fusion of multiple variables adopts an addition calculation method; denote the first product as C and the second product as D, then the formula form of the similarity between bone a and bone b is: It should be noted that to prevent the denominator from being 0 and the formula from being meaningless, a parameter greater than zero needs to be added to the denominator, and the value is 0.01.

[0059] It should be understood that when the similarity of the obtained root nodes of two bones is stronger, and the corresponding bone lengths are closer in each animation frame, and the rotation angles relative to the parent node are also more similar, it indicates that the similarity of the movement trajectories of the two bones is stronger.

[0060] Step 3: Based on the similarity, use the threshold segmentation algorithm to obtain the behaviorally similar bones of each bone in each animation frame; according to the similarity between each bone and its behaviorally similar bones in each interpolation animation frame, combined with the distribution of the root node coordinates and the distribution of the bone lengths of the behaviorally similar bones, obtain the reference value of the root node coordinates and the reference value of the bone length of each bone.

[0061] In each animation frame, calculate the similarity between each bone and other bones, use the Otsu threshold algorithm to process the similarity to obtain the similarity threshold, and record the bones with a similarity greater than the similarity threshold to each bone as the behaviorally similar bones of each bone.

[0062] Calculate the bone positions and bone lengths of each bone in all interpolation animation frames. At the same time, predict the bone positions and bone lengths of each bone in all interpolation animation frames through all animation frames before the initial 3D game animation. Analyze the relevant data of each bone obtained by these two methods to obtain the reliability factor of the bone data. Finally, correct the results obtained by each method according to the obtained reliability factor to obtain the final bone position information in the interpolation animation frame.

[0063] Specifically, according to the similarity between each bone and its behaviorally similar bones in each interpolation animation frame, combined with the numerical distribution of the root node of the behaviorally similar bones in each dimension, obtain the reference value of each bone in each dimension in each interpolation animation frame. Its formula form is: where T represents the reference value of bone a in each dimension in each interpolation animation frame; E represents the number of movement similar bones of bone a, Xs ( ′ a,e) represents the normalized value of the similarity between bone a and its e-th movement similar bone. In this embodiment, the maximum-minimum normalization method is adopted; D (a,e) represents the coordinate value of the predicted root node coordinates of the e-th movement similar bone of bone a in each dimension. The reference values of the root node coordinates of bone a in all dimensions in each interpolation animation frame form the reference value of the root node coordinates of bone a.

[0064] Further, using the same calculation method for the root node coordinate values, based on the bone length of each bone in each interpolation animation frame, obtain the reference value of the bone length of each bone.

[0065] Step 4: According to the dispersion of the same bone parameter information of each bone in all animation frames before each interpolation animation frame, combined with the reference value of the root node coordinates, the reference value of the bone length, and the corresponding predicted parameter information, obtain the corrected value of the predicted root node coordinates and the corrected value of the predicted bone length of each bone.

[0066] For each bone in all animation frames before each interpolated animation frame, obtain the normalized value of the variance of the coordinate values of the root node coordinates in each dimension, calculate the product of the normalized value and the reference value, denoted as the third product; calculate the difference between 1 and the normalized value, and multiply the difference by the coordinate values of the predicted root node coordinates of each bone in each dimension, denoted as the fourth product, and take the sum of the third product and the fourth product as the predicted correction value of each bone in each dimension.

[0067] It should be understood that the coordinates composed of the predicted correction values in all dimensions are used as the predicted correction coordinate values of the root node coordinates of each bone; the smaller the variance of the root node coordinates of each bone in each dimension, the more stable the coordinate values change, and the more reliable the predicted root node coordinates obtained according to the time series prediction algorithm.

[0068] In addition, using the same calculation method as the predicted correction value of each bone in each dimension, replace the coordinate values of the root node coordinates of each bone in each dimension with the bone length of each bone, and replace the predicted coordinate values in each dimension with the predicted bone length, to obtain the predicted bone length correction value of each bone.

[0069] Step Five: Evaluate the reliability of the predicted root node coordinate correction value and the predicted bone length correction value of each bone according to the differences in the correlation characteristics of the root node coordinates, predicted root node coordinate correction values of each bone and its behaviorally similar bones in each dimension of each interpolated animation frame.

[0070] Denote the similarity of the root node coordinates of each bone in each dimension of each interpolated animation frame and its each behaviorally similar bone as the first similarity; denote the similarity of the predicted root node coordinates of each bone in each dimension of each interpolated animation frame and its each behaviorally similar bone as the second similarity; calculate the cumulative sum of the absolute values of the differences between the first similarity and the second similarity of each bone in each interpolated animation frame and all its behaviorally similar bones; based on the negative correlation mapping result of the cumulative sum, obtain the reliability of the predicted root node coordinate correction value of each bone in each dimension.

[0071] In this embodiment, denote the cumulative sum as M, and the formula form of the reliability of the predicted correction value of each bone in each dimension is: exp(-M), where exp() represents the exponential function with the natural constant as the exponent.

[0072] It should be understood that by using the above calculation method, not only can the reliability of the predicted coordinate correction value of each bone be obtained, but also the reliability of the predicted bone length correction value of each bone can be obtained; when the change differences of the predicted data of each bone before and after correction are smaller, it indicates that the reliability of the prediction result is stronger.

[0073] Step 6: Based on the predicted root node coordinate correction value and the predicted bone length correction value, combined with the corresponding reliability and bone parameter information, obtain the final root node coordinates and final bone length of each bone, and generate the final 3D game animation.

[0074] In this embodiment, taking the bone a of the i-th interpolated animation frame as an example, the coordinate value of the root node of the bone a in each dimension is denoted as P, the value of the predicted root node coordinate correction value of the bone a in each dimension is denoted as Q, and the reliability corresponding to Q is denoted as F. The formula for the coordinate value G of the final root node of the bone a in each dimension is:

[0075] It should be understood that the bone length of each bone is used to replace the coordinate value of each dimension point of its root node, and the predicted bone length correction value is used to replace the value of the predicted root node coordinate correction value in each dimension. Using the above formula, the final bone length of each bone is obtained. Among them, the schematic diagram of the acquisition process of the final root node coordinates and the final bone length is as Figure 2 shown; furthermore, the correction of each interpolated animation frame in the 3D game animation is completed, and the final 3D game animation is generated.

[0076] Based on the same concept as the method embodiment of the present application, an animation generation device for 3D games is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of the method described in any one of the above are implemented.

[0077] Based on the same concept as the method embodiment of the present application, an animation generation system for 3D games is provided. A computer program is stored in the system, and when the computer program is executed by a processor, the animation generation method described in any one of the above is implemented.

[0078] In summary, the present application mainly interpolates the initially generated 3D game animation, then analyzes and predicts the relevant parameters of the bones to obtain the interpolation information and prediction information of each bone in each interpolated animation frame, providing a data basis for subsequent correction of the interpolation information according to the prediction information; according to the similarity degree of the root node coordinates of any two bones in each dimension in all previous animation frames of each animation frame, combined with the difference of the remaining parameter information, the correlation characteristics of the any two bones in each dimension are obtained, and the similarity between the any two bones is obtained, which helps to analyze the movement of the bones in a continuous plurality of animation frames, obtain the bones with similar movement trajectories as references in the animation frames, and obtain the root node coordinate reference value and bone length reference value of each bone. The beneficial effect is to optimize the transition effect in the interpolation process and ensure the reasonable relative proportion and posture between the bones; further, according to the dispersion degree of the same bone parameter information of each bone in all animation frames before each interpolated animation frame, combined with the root node coordinate reference value, bone length reference value and corresponding prediction parameter information, the predicted root node coordinate correction value and predicted bone length correction value of each bone are obtained, which helps to improve the quality and smoothness of the overall animation in the future; evaluating the reliability of the predicted root node coordinate correction value and predicted bone length correction value of each bone helps to measure the reference value of the predicted bone parameter correction value, and combined with the original interpolation, the final bone-related parameter information is obtained. The beneficial effect is that by analyzing in combination with the bone trajectory, the situation that the prediction algorithm does not refer to the movement information of adjacent bones is made up for, greatly increasing the accuracy of the bone data obtained by using the prediction algorithm, so that the final determined bone data information obtained according to the prediction correction result and the linear interpolation result is closer to the visual effect of the interpolation frame animation, and the smoothness of the 3D game animation is increased.

[0079] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of the systems, methods, and computer program products according to the embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code, and the module, the segment of a program, or the part of code contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the block may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, which depends on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than that disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, which depends on the functions involved. Each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0080] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. An animation generation method for 3D games, characterized in that, The method includes the following steps: Interpolate the initially generated 3D game animation to obtain interpolated animation frames and generate a preliminary 3D game animation; obtain the parameter information of each bone in each animation frame, including the root node coordinates, rotation angle, and bone length; use a prediction algorithm to obtain the predicted parameter information of each bone in each interpolated animation frame; According to the similarity degree of the root node coordinates of any two bones in each animation frame in each dimension in all previous animation frames, and combining the difference in the remaining parameter information, obtain the correlation characteristics of the any two bones in each dimension, and obtain the similarity between the any two bones; Based on the similarity, use a threshold segmentation algorithm to obtain the behaviorally similar bones of each bone in each animation frame; according to the similarity between each bone in each interpolated animation frame and its behaviorally similar bones, and combining the distribution of the root node coordinates and the distribution of the bone lengths of the behaviorally similar bones, obtain the reference value of the root node coordinates and the reference value of the bone length of each bone; According to the dispersion of the same bone parameter information of each bone in all animation frames before each interpolated animation frame, and combining the reference value of the root node coordinates, the reference value of the bone length, and the corresponding predicted parameter information, obtain the corrected value of the predicted root node coordinates and the corrected value of the predicted bone length of each bone; Evaluate the reliability of the corrected value of the predicted root node coordinates and the corrected value of the predicted bone length of each bone according to the difference in the correlation characteristics of the root node coordinates of each bone in each interpolated animation frame and its behaviorally similar bones in each dimension; Based on the corrected value of the predicted root node coordinates and the corrected value of the predicted bone length, and combining the corresponding reliability and the bone parameter information, obtain the final root node coordinates and the final bone length of each bone, and generate the final 3D game animation.

2. The animation generation method for 3D games according to claim 1, wherein The obtaining of the correlation characteristics of the any two bones in each dimension is specifically: For any two bones in each animation frame of the preliminary 3D game animation, respectively obtain the sequences composed of the coordinate values of the root node coordinates of the any two bones in each dimension in all animation frames before each animation frame, denoted as the first sequence and the second sequence; calculate the similarity degree and the distance metric between the first sequence and the second sequence; Perform positive-phase fusion on the negative correlation mapping result of the distance metric and the similarity degree to obtain the correlation characteristics of the any two bones in each dimension.

3. The animation generation method for 3D games according to claim 1, characterized in that, The obtaining of the similarity between the any two bones includes: For any two bones in each animation frame of the preliminary 3D game animation, multiply the correlation characteristics of the any two bones in three dimensions to obtain a first product; Respectively obtain the difference in the rotation angles of the any two bones in each animation frame before each animation frame, denoted as the first difference; obtain the difference in the bone lengths of the any two bones in all animation frames before each animation frame, denoted as the second difference; perform positive-phase fusion on the product of the first difference and the second difference of the any two bones in all animation frames before each animation frame, denoted as the second product; Based on the first product and the second product, obtain the similarity between any two bones; wherein the similarity has a positive correlation with the first product and a negative correlation with the second product.

4. The animation generation method for 3D games according to claim 1, wherein, The specific process of obtaining the behaviorally similar bones of each bone in each animation frame is as follows: For each bone in each animation frame, perform threshold segmentation on the similarity between each bone and all other bones to obtain a similarity threshold; mark the bones whose similarity to each bone is greater than the similarity threshold as the behaviorally similar bones of each bone.

5. The animation generation method for 3D games according to claim 1, wherein, The specific process of obtaining the reference value of the root node coordinates and the reference value of the bone length of each bone is as follows: Denote the reference value of bone a in each dimension in each interpolation animation frame as T, and its formula form is: where E represents the number of bones with similar motion to bone a, and Xs ( ′ a,e) represents the normalized value of the similarity between bone a and its e-th bone with similar motion; D (a,e) represents the coordinate value of the predicted root node of the e-th bone with similar motion to bone a in each dimension; Form the reference value of the root node coordinates of bone a by using the reference values of the root node coordinates of bone a in all dimensions in each interpolation animation frame; Correspondingly, based on the bone lengths of each bone in each interpolation animation frame, obtain the reference value of the bone length of each bone.

6. The animation generation method for 3D games according to claim 1, characterized in that, The specific process of obtaining the predicted correction value of the root node coordinates and the predicted correction value of the bone length of each bone is as follows: For each bone in all animation frames before each interpolation animation frame, obtain the normalized value of the variance of the coordinate values of its root node coordinates in each dimension, calculate the product of the normalized value and the reference value, and denote it as the third product; Calculate the difference between 1 and the normalized value, and multiply the difference by the coordinate values of the predicted root node coordinates of each bone in each dimension, and denote it as the fourth product; Take the sum of the third product and the fourth product as the predicted correction value of each bone in each dimension; Take the coordinates composed of the predicted correction values in all dimensions as the predicted correction coordinate values of the root node coordinates of each bone; Correspondingly, according to the distribution of the bone lengths of each bone and the predicted bone lengths, obtain the predicted correction value of the bone length of each bone.

7. The animation generation method for 3D games according to claim 1, wherein, The specific process of evaluating the reliability of the predicted correction value of the root node coordinates and the predicted correction value of the bone length of each bone is as follows: Denote the similarity between the root node coordinates of each bone and each of its behaviorally similar bones in each dimension in each interpolation animation frame as the first similarity; denote the similarity between the predicted root node coordinates of each bone and each of its behaviorally similar bones in each dimension in each interpolation animation frame as the second similarity; Calculate the cumulative sum of the absolute values of the differences between the first similarity and the second similarity of each bone and all its behaviorally similar bones in each interpolation animation frame; based on the negative correlation mapping result of the cumulative sum, obtain the reliability of the predicted correction value of the root node coordinates of each bone in each dimension; Adopt the method of evaluating the reliability of the predicted correction value of the root node coordinates of each bone in each dimension to obtain the reliability of the predicted correction value of the bone length of each bone.

8. The animation generation method for 3D games according to claim 1, characterized in that, The process of obtaining the final root node coordinates and the final bone length of each bone includes: Denote the coordinate values of the root node of bone a in each dimension as P, denote the correction values of the predicted root node coordinates of bone a in each dimension as Q, denote the reliability corresponding to Q as F, and the formula for the coordinate value G of the final root node of bone a in each dimension is: Correspondingly, based on the predicted correction value of the bone length of each bone and its corresponding reliability, obtain the final bone length of each bone.

9. An animation generation device for 3D games, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-8.

10. An animation generation system for 3D games, in which a computer program is stored, characterized in that, When the computer program is executed by the processor, it implements the animation generation method according to any one of claims 1-8.