Animation generation method, device and electronic equipment

By obtaining and matching key lines, determining the position of the action data frame, and associating it with the target character, the problem of high difficulty in making three-dimensional skeleton animation is solved, and the ability of ordinary users to quickly generate animations is realized.

CN114862991BActive Publication Date: 2025-02-25BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210435939.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-24
Publication Date
2025-02-25
Estimated Expiration
2042-04-24

AI Technical Summary

Technical Problem

In the prior art, the production of three-dimensional skeleton animation is more difficult, which limits the ability of ordinary users to produce short videos.

Method used

By obtaining the key lines corresponding to the target character, matching the action data, determining the frame position of the action data from the action database, and associating the action data to the target character, rendering and generating role animation.

Benefits of technology

It enables ordinary users to generate complete three-dimensional skeleton animations simply and quickly, reducing the difficulty of production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114862991B_ABST
    Figure CN114862991B_ABST
Patent Text Reader

Abstract

The present disclosure relates to an animation generation method, device and electronic device, wherein the method comprises: obtaining at least one key line corresponding to a target character; determining the action data respectively matched by the at least one key line from an action database, and obtaining at least one action data corresponding to the target character; determining the frame position of the at least one action data in the character animation; at the frame position of the at least one action data in the character animation, respectively associating the at least one action data to the target character, and rendering and generating the character animation. The present disclosure can simply and quickly obtain a complete animation by determining the frame position of at least one action data in the character animation and at least one action data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technology, and in particular to an animation generation method, device and electronic device. Background Art

[0002] In the related art, in the process of making 3D animation videos, making 3D skeletal animation is a key link, and currently a more common scenario is to make corresponding 3D skeletal animation based on the body movements of the target character during the dialogue process.

[0003] At present, a common production method is that after professionals determine the time periods corresponding to the lines of the target character, the receiving professionals adjust the rotation angles of multiple bones of the target character's three-dimensional skeletal animation in each time period, and finally display the corresponding rotation movements of multiple bones in each time period when displaying the three-dimensional skeletal animation, thereby reflecting the corresponding body movements of the target character at each moment, that is, displaying the corresponding body movements when the target character speaks the lines.

[0004] However, with the rise of short videos, more and more ordinary users also want to use 3D skeletal animation to make short videos to increase the appeal of the videos.

[0005] Therefore, a method that allows ordinary users to create three-dimensional skeletal animation is urgently needed. Summary of the invention

[0006] The present disclosure provides an animation generation method, device and electronic device to at least solve the problem of high difficulty in producing three-dimensional skeletal animation in related technologies. The technical solution of the present disclosure is as follows:

[0007] According to a first aspect of an embodiment of the present disclosure, there is provided an animation generation method, comprising:

[0008] Obtain at least one key line corresponding to the target character;

[0009] Determine from the action database the action data respectively matching the at least one key line, and obtain at least one action data corresponding to the target character;

[0010] Determining a frame position of the at least one action data in the character animation;

[0011] At the frame position of the at least one action data in the character animation, the at least one action data is respectively associated with the target character, and the character animation is rendered and generated.

[0012] In some embodiments, the step of determining the frame position of the at least one action data in the character animation comprises:

[0013] For any action data, obtaining the frame position of the key lines corresponding to the action data in the character animation;

[0014] Determine the frame position of the key line as the frame position of the key action in the action data in the character animation;

[0015] Determine the frame positions of the start action and the end action in the action data in the character animation respectively based on the frame position of the key action in the character animation;

[0016] The frame position of the action data in the character animation is determined based on the frame position of the key action in the character animation, the frame position of the start action in the character animation, and the frame position of the end action in the character animation.

[0017] In some embodiments, the step of determining the frame positions of the start action and the end action in the action data in the character animation respectively based on the frame position of the key action in the character animation comprises:

[0018] Determine the frame position of the key action in the action data, the frame position of the start action in the action data, and the frame position of the end action in the action data;

[0019] Determine a first interval frame number between the key action and the starting action based on a frame position of the key action in the action data and a frame position of the starting action in the action data;

[0020] Determine a second interval frame number between the key action and the terminal action based on a frame position of the key action in the action data and a frame position of the terminal action in the action data;

[0021] Determining the frame position of the starting action in the character animation based on the frame position of the key action in the character animation and the first interval frame number;

[0022] Based on the frame position of the key action in the character animation and the second interval frame number, the frame position of the terminal action in the character animation is determined.

[0023] In some embodiments, the step of associating the at least one action data with the target character at the frame position of the character animation, and rendering and generating the character animation comprises:

[0024] For any action data among the at least one action data, determining an overlap between the any action data and other action data;

[0025] When the overlap between any one of the action data and other action data meets the preset requirement, any one of the action data will be associated with the target character at the frame position of the character animation, and the character animation will be rendered and generated.

[0026] In some embodiments, the step of determining, for any action data among the at least one action data, the overlap between the any action data and other action data comprises:

[0027] Obtaining the frame position of the starting action of any action data in the character animation;

[0028] Obtaining a key action of the previous action data of any action data at a frame position of the character animation, and the overlap between the previous action data and other action data meets a preset requirement;

[0029] If the frame position of the starting action of any action data in the character animation is after the frame position of the key action of the previous action data in the character animation, it is determined that the overlap between any action data and other action data meets the preset requirements;

[0030] If the frame position of the starting action of any action data in the character animation is before the frame position of the key action of the previous action data in the character animation, then the any action data is deleted.

[0031] In some embodiments, the method further comprises:

[0032] Obtaining the frame position of the termination action of the previous action data at the character animation;

[0033] If the frame position of the starting action of any action data in the character animation is before the frame position of the ending action of the previous action data in the character animation, it is determined that any action data has an overlapping area with the previous action data;

[0034] The motion data of the overlapping area is generated based on an interpolation algorithm.

[0035] In some embodiments, the step of obtaining at least one key line corresponding to the target character includes:

[0036] Inputting the character text corresponding to the target character into the key lines prediction model;

[0037] Receive text identifiers corresponding to each of the plurality of characters in the character text output by the key line prediction model;

[0038] At least one character with a character identifier of a preset value is determined as a key line, and the key line corresponds to action data.

[0039] In some embodiments, the key line prediction model is trained and obtained in the following manner:

[0040] Obtain multiple sample texts with key lines annotated;

[0041] Inputting the plurality of sample texts into an initial key line prediction model, and determining predicted key lines of the plurality of sample texts through the initial key line prediction model;

[0042] Based on the loss function indicating the difference between the key words and the predicted key words, the initial key words preset model is trained until a preset training completion condition is met, thereby obtaining a trained key words prediction model.

[0043] In some embodiments, the step of determining the action data respectively matching the at least one key line from the action database and obtaining at least one action data corresponding to the target character comprises:

[0044] Displaying selection prompt information corresponding to each of the multiple action data;

[0045] receiving a selection operation for the selection prompt information, and determining at least one action data corresponding to the selection prompt information;

[0046] An association operation for the action data and key lines is received, the action data respectively matching the at least one key line is determined, and at least one action data corresponding to the target character is acquired.

[0047] According to a second aspect of an embodiment of the present disclosure, there is provided an animation generating device, comprising:

[0048] An acquisition unit is configured to acquire at least one key line corresponding to a target character;

[0049] A determination unit, determining the action data respectively matching the at least one key line from an action database, obtaining at least one action data corresponding to the target character; and determining a frame position of the at least one action data in the character animation;

[0050] The rendering unit is configured to execute at least one action data at the frame position of the character animation, associate the at least one action data with the target character respectively, and render to generate the character animation.

[0051] In some embodiments, the determining unit is configured to perform any of the following:

[0052] For any action data, obtaining the frame position of the key lines corresponding to the action data in the character animation;

[0053] Determine the frame position of the key line as the frame position of the key action in the action data in the character animation;

[0054] Determine the frame positions of the start action and the end action in the action data in the character animation respectively based on the frame position of the key action in the character animation;

[0055] The frame position of the action data in the character animation is determined based on the frame position of the key action in the character animation, the frame position of the start action in the character animation, and the frame position of the end action in the character animation.

[0056] In some embodiments, the determining unit is configured to perform any of the following:

[0057] Determine the frame position of the key action in the action data, the frame position of the start action in the action data, and the frame position of the end action in the action data;

[0058] Determine a first interval frame number between the key action and the starting action based on a frame position of the key action in the action data and a frame position of the starting action in the action data;

[0059] Determine a second interval frame number between the key action and the terminal action based on a frame position of the key action in the action data and a frame position of the terminal action in the action data;

[0060] Determining the frame position of the starting action in the character animation based on the frame position of the key action in the character animation and the first interval frame number;

[0061] Based on the frame position of the key action in the character animation and the second interval frame number, the frame position of the terminal action in the character animation is determined.

[0062] In some embodiments, the rendering unit is configured to perform any of the following:

[0063] For any action data among the at least one action data, determining an overlap between the any action data and other action data;

[0064] When the overlap between any one of the action data and other action data meets the preset requirement, any one of the action data will be associated with the target character at the frame position of the character animation, and the character animation will be rendered and generated.

[0065] In some embodiments, the rendering unit is configured to perform any of the following:

[0066] Obtaining the frame position of the starting action of any action data in the character animation;

[0067] Obtaining a key action of the previous action data of any action data at a frame position of the character animation, and the overlap between the previous action data and other action data meets a preset requirement;

[0068] If the frame position of the starting action of any action data in the character animation is after the frame position of the key action of the previous action data in the character animation, it is determined that the overlap between any action data and other action data meets the preset requirements;

[0069] If the frame position of the starting action of any action data in the character animation is after the frame position of the key action of the previous action data in the character animation, then the any action data is deleted.

[0070] In some embodiments, the rendering unit is configured to perform any of the following:

[0071] Obtaining the frame position of the termination action of the previous action data at the character animation;

[0072] If the frame position of the starting action of any action data in the character animation is before the frame position of the ending action of the previous action data in the character animation, it is determined that any action data has an overlapping area with the previous action data;

[0073] The motion data of the overlapping area is generated based on an interpolation algorithm.

[0074] In some embodiments, the acquisition unit is configured to perform any of the following:

[0075] Inputting the character text corresponding to the target character into the key lines prediction model;

[0076] Receive text identifiers corresponding to each of the plurality of characters in the character text output by the key line prediction model;

[0077] At least one character with a character identifier of a preset value is determined as a key line, and the key line corresponds to action data.

[0078] In some embodiments, the key line prediction model of the acquisition unit is trained and obtained in the following manner:

[0079] Obtain multiple sample texts with key lines annotated;

[0080] Inputting the plurality of sample texts into an initial key line prediction model, and determining predicted key lines of the plurality of sample texts through the initial key line prediction model;

[0081] Based on the loss function indicating the difference between the key words and the predicted key words, the initial key words preset model is trained until a preset training completion condition is met, thereby obtaining a trained key words prediction model.

[0082] In some embodiments, the selection unit is configured to perform any of the following:

[0083] Displaying selection prompt information corresponding to each of the multiple action data;

[0084] receiving a selection operation for the selection prompt information, and determining at least one action data corresponding to the selection prompt information;

[0085] An association operation for the action data and key lines is received, the action data respectively matching the at least one key line is determined, and at least one action data corresponding to the target character is acquired.

[0086] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the animation generation method as described in the first aspect.

[0087] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute the animation generation method as described in the first aspect.

[0088] According to a fifth aspect of an embodiment of the present disclosure, there is provided a computer program product, comprising a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the animation generation method as described in the first aspect.

[0089] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0090] The present invention obtains at least one key line corresponding to a target character; determines action data respectively matching the at least one key line from an action database, and obtains at least one action data corresponding to the target character; determines a frame position of the at least one action data in the character animation; at the frame position of the at least one action data in the character animation, associates the at least one action data with the target character, and renders and generates the character animation, so that a complete animation can be obtained simply and quickly.

[0091] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0092] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0093] Figure 1 The figure is a flowchart of an animation generating method according to an exemplary embodiment.

[0094] Figure 2 The figure is a flowchart of a method for determining a frame position according to an exemplary embodiment.

[0095] Figure 3 The figure is a flowchart of an animation generating method according to an exemplary embodiment.

[0096] Figure 4 The figure is a block diagram of an animation generating device according to an exemplary embodiment.

[0097] Figure 5 According to an exemplary embodiment Figure 4 The animation generating device block diagram shown corresponds to an electronic device structure diagram. DETAILED DESCRIPTION

[0098] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0099] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0100] Figure 1 is a flowchart of an animation generation method according to an exemplary embodiment. Figure 1 As shown, the method is used in an electronic device, which is installed with an application for making character animation, and the method includes the following steps.

[0101] In step S101, at least one key line corresponding to a target character is obtained.

[0102] The target character may be any character in a three-dimensional animation video, wherein the three-dimensional animation video includes at least one character, and each character has a corresponding character text, wherein the character text is the lines of the character in the three-dimensional animation video.

[0103] It is understandable that the scheme of the present disclosure can be applied to multiple scenes of character animation. In order to more clearly describe the scheme of the present disclosure, the scheme of the present disclosure is explained by taking the scene of character dialogue as an example. Optionally, at a certain moment, a startup operation for the application is received, and multiple characters produced using three-dimensional skeletal animation are displayed on the application. Since it is a dialogue scene of the characters, the application can obtain the character texts corresponding to each of the multiple characters and the corresponding output time of each word in the character text. The output time can be the voice time of each word in the three-dimensional animation video.

[0104] Optionally, the method for obtaining the character text and its corresponding output time can be implemented as follows: by receiving the character text for any character, or pre-storing the character texts corresponding to multiple characters in the application, receiving an acquisition operation for the character text, to obtain the character texts corresponding to the multiple characters, and further generating audio through text-to-speech related technology to obtain the pronunciation time of each word in the character text in the audio.

[0105] In another optional embodiment, audio data input by the user may be received, and the audio data may be audio data corresponding to a character text recorded in advance, and the audio data may be converted into the character text and the pronunciation time corresponding to each word in the character text through speech recognition technology.

[0106] In summary, before obtaining at least one key line corresponding to the target character, the character text of the target character and the pronunciation time of each word in the character text may be obtained.

[0107] Among them, the key lines are the lines in the target character's text that correspond to the character's actions.

[0108] It is understandable that when a character speaks, there will be various actions accompanying it. Therefore, the application can determine which word in the character text will be accompanied by the character animation based on the character text corresponding to each character, thereby determining at least one key line in the character text.

[0109] The electronic device may store a prediction model for identifying key lines, so that at least one key line may be determined based on the prediction model.

[0110] Optionally, the step of obtaining at least one key line corresponding to the target character includes: inputting the character text corresponding to the target character into the key line prediction model; receiving text identifiers corresponding to multiple characters in the character text output by the key line prediction model; and determining at least one character whose text identifier is a preset value as a key line, and the key line corresponds to action data.

[0111] Among them, the key line prediction model can be a sequence-to-sequence neural network model, the character text is input into the key line prediction model, and the key line prediction model outputs the text identifiers corresponding to multiple characters in the character text. The text identifier can be 0 or 1, and the preset value can be 1, or 0. Assuming the preset value is 1, the text corresponding to 1 is the key line.

[0112] Assuming that the character text corresponding to a certain character is "Listen carefully, this is a top-secret meeting and no one is allowed to disturb!", the character text can be converted into the corresponding text identifier "100010000000010000", where punctuation marks will not be converted into text identifiers, then the corresponding key lines are "you", "this", and "any".

[0113] Optionally, the key lines prediction model is trained in the following manner: multiple sample texts that have been labeled with key lines are obtained; the multiple sample texts are input into an initial key lines prediction model, and the predicted key lines of the multiple sample texts are determined by the initial key lines prediction model; based on a loss function indicating the difference between key lines and predicted key lines, the initial key lines preset model is trained until preset training completion conditions are met, thereby obtaining a trained key lines prediction model.

[0114] The sample texts may be character texts from various movies or TV series with key lines annotated therein.

[0115] In an optional embodiment, the key lines corresponding to the character text can be pre-annotated, the corresponding sample text can be generated, and the text identifiers corresponding to the sample text can be annotated. The training process of the key line prediction model can be implemented as follows: inputting the sample text into the key line prediction model, obtaining the predicted text identifier corresponding to the sample text output by the key line prediction model, further obtaining the predicted key lines corresponding to the predicted text identifier, comparing the predicted key lines with the pre-annotated key lines, and if they are inconsistent, changing the parameters of the key line prediction model and continuing training until the predicted key lines are consistent with the pre-annotated key lines.

[0116] Optionally, a context corresponding to the role text may be set in the application, or the context corresponding to the role text may be received during the process of receiving the role text. There are many ways to obtain the context corresponding to the role text, which will not be described in detail here.

[0117] The application may also determine at least one key line in the character text based on the context corresponding to the character text and the character text.

[0118] In step S102, at least one action data that matches a key line is determined from an action database to obtain at least one action data corresponding to a target character.

[0119] The action database includes action data, each action data represents an action, and the action may be an action of such granularity as nodding, leaning forward, or waving a hand.

[0120] Optionally, the action data may be any one of the following action types: meaningless action, expressive action, indicative action, viewing action, and gesture action.

[0121] Among them, meaningless actions can be shaking the head, raising hands and other random actions that are made in conjunction with speaking but have no clear meaning; expressive actions can be actions that express anger, helplessness, happiness, sadness, affirmation, and negation. For example, anger can be expressed by waving the hand and negation can be expressed by shaking the head; indicative actions can be actions pointing in different directions; watching actions can be actions indicating looking in different directions; gestures can be common gestures such as various numbers, OK, V (victory), etc.

[0122] It is understandable that other actions may also be included. Generally speaking, the more actions included in the action database, the better.

[0123] After determining at least one key line corresponding to the target character, at least one action data may be selected from the action database to match the at least one key line.

[0124] Optionally, determining action data that matches at least one key line respectively from the action database and obtaining at least one action data corresponding to the target character can be implemented as follows: displaying selection prompt information corresponding to multiple action data respectively; receiving a selection operation for the selection prompt information, and determining at least one action data corresponding to the selection prompt information; receiving an association operation for the action data and the key lines, determining action data that matches at least one key line respectively, and obtaining at least one action data corresponding to the target character.

[0125] In order to increase the user's sense of interaction, multiple action selection prompt information can be displayed on the application interface, so that by receiving the selection operation, at least one action data that matches at least one key line can be determined from multiple action data.

[0126] Taking the character text "Listen carefully, this is a top-secret meeting and no one is allowed to interrupt!" as an example, the corresponding key lines are "you", "this", and "anyone". The action data corresponding to "you" is determined to be "pointing with your finger at the listener in front", the action data corresponding to "this" is determined to be "pointing with your finger downward", and the action data corresponding to "anyone" is determined to be "shaking your arms angrily".

[0127] In step S103, a frame position of at least one action data in the character animation is determined.

[0128] Optionally, each character animation may include multiple animation frames, and each animation frame may include corresponding character actions and character lines.

[0129] Each action data includes multiple animation frames. Therefore, it is necessary to determine the frame position corresponding to each action data in the character animation, so as to add the corresponding action data at the frame position.

[0130] Generally speaking, the frame positions of the start frame and end frame of the action data in the character animation can be determined, so that the corresponding start frame and end frame can be added to the frame positions of the start frame and end frame of the action data in the character animation, so as to add the corresponding action data to the corresponding frame position.

[0131] Optionally, the frame position of the starting frame of the action data in the character animation and the number of frames of the action data can also be determined, so that the starting frame can be added at the frame position of the starting frame in the character animation, and the action data can be added accordingly based on the number of frames after the starting frame.

[0132] For example, a character animation includes 100 frames. It is determined that the starting frame of a certain action data is at the 20th frame in the character animation, and the ending frame is at the 40th frame in the character animation. It can be determined that the frame position corresponding to the action data is from the 20th frame to the 40th frame.

[0133] In step S104, at least one action data is associated with a target character at a frame position of the character animation, and the character animation is generated by rendering.

[0134] After determining a frame position of at least one action data in the character animation, the corresponding action data may be added to the corresponding frame position.

[0135] Optionally, the motion data may also include a bone identifier corresponding to each frame and a rotation value of the bone corresponding to the bone identifier.

[0136] By adding a corresponding bone identifier and a corresponding bone rotation value to the frame position of at least one action data in the character animation, the corresponding character animation can be rendered, wherein the target character in the character animation rotates according to the corresponding bone identifier and the rotation value of the bone corresponding to the bone identifier, thereby forming a corresponding action.

[0137] Furthermore, other characters in the character animation may be processed in the above manner, thereby obtaining a complete character animation.

[0138] The present disclosure relates to an animation generation method, which includes: determining the action data that matches the at least one key line from an action database, obtaining at least one action data corresponding to the target character; determining the frame position of the at least one action data in the character animation; at the frame position of the at least one action data in the character animation, associating the at least one action data to the target character, and rendering to generate the character animation. The present disclosure can simply and quickly obtain a complete animation by determining the frame position of at least one action data in the character animation and at least one action data.

[0139] To describe in detail the frame position of at least one action data in the character animation. Figure 2 is a flowchart of a method for determining a frame position according to an exemplary embodiment. Figure 2 As shown, the method is used in an electronic device, which is installed with an application for making character animation, and the method includes the following steps.

[0140] In step S201, for any action data, the frame position of the key lines corresponding to the action data in the character animation is obtained.

[0141] From the above, before determining the frame position of at least one action data in the character animation, the output time of the key line in the character animation has been obtained, that is, the frame position corresponding to the key line in the character animation can be determined, wherein, since a key line can correspond to multiple frame positions in the character animation, the frame position of the key line in the character animation can be determined from multiple frame positions, and the frame position can be the first frame position in multiple frame positions, or the last frame position in multiple frame positions, or any frame position in multiple frame positions. The frame position of the specific key line in the character animation can be flexibly set according to the specific situation, which will not be repeated here.

[0142] In step S202, the frame position of the key line is determined as the frame position of the key action in the action data in the character animation.

[0143] Among them, the action data may include a key action. For example, the character animation corresponding to the action data is pointing the finger at the listener in front. The character animation may be composed of multiple decomposed actions, which may include raising the arm to a certain position and not moving it, extending the finger to point at others, and slowly lowering the arm. The key action in the action data may be extending the finger to point at others.

[0144] Optionally, key actions can be pre-set.

[0145] Take the character text "Listen carefully, this is a top-secret meeting, no one is allowed to interrupt!" as an example, the corresponding key lines are "you", "this", "any", determine that the frame position of "you" in the character animation is T1 frame, and the character animation corresponding to "you" is pointing at the listener in front, then you can add the finger pointing at others to T1 frame. That is, the frame position corresponding to the finger pointing at others is T1 frame.

[0146] In step S203, the frame positions of the start action and the end action in the action data in the character animation are determined based on the frame position of the key action in the character animation.

[0147] In step S204, the frame position of the action data in the character animation is determined based on the frame position of the key action in the character animation, the frame position of the starting action in the character animation, and the frame position of the ending action in the character animation.

[0148] Optionally, the step of determining the frame positions of the starting action and the ending action in the action data in the character animation respectively based on the frame position of the key action in the character animation includes: determining the frame position of the key action in the action data, the frame position of the starting action in the action data, and the frame position of the ending action in the action data; determining a first interval frame number between the key action and the starting action based on the frame position of the key action in the action data and the frame position of the starting action in the action data; determining a second interval frame number between the key action and the ending action based on the frame position of the key action in the action data and the frame position of the ending action in the action data; determining the frame position of the starting action in the character animation based on the frame position of the key action in the character animation and the first interval frame number; determining the frame position of the ending action in the character animation based on the frame position of the key action in the character animation and the second interval frame number.

[0149] After obtaining the frame position of the key action in the character animation, the frame position of the key action in the action data, the frame position of the starting action in the action data, and the frame position of the ending action in the action data are obtained, so as to determine the first interval frame number between the frame position of the key action and the starting action and the second interval frame number between the frame position of the key action and the ending action.

[0150] For example, the action data includes 100 frames, the starting action frame is the 1st frame, the key action is at the 20th frame of the action data, and the ending action is at the 100th frame. Then the first interval frame number is 19 frames, and the second interval frame number is 80 frames. Assuming that the frame position of the key action in the action data is the 30th frame, the frame position of the starting action in the character animation is the 11th frame, and the frame position of the ending action in the character animation is the 110th frame. Therefore, it can be determined that the frame position of the action data in the character animation is from the 11th frame to the 110th frame.

[0151] The frame position of the key action in the action data may be preset.

[0152] It is understandable that if the frame positions corresponding to two key lines are relatively close, then the frame positions of the corresponding action data in the character animation may overlap. Figure 3 is a flowchart of an animation generation method according to an exemplary embodiment. Figure 1 As shown, the method is used in an electronic device, which is installed with an application for making character animation, and the method includes the following steps.

[0153] In step S301, for any action data in at least one action data, an overlap between any action data and other action data is determined.

[0154] The process of determining whether the overlapping situations corresponding to at least one action data meet the preset requirements can be implemented as follows: for any action data in at least one action data, the process of determining the overlapping situation of any action data with other action data can be implemented as follows: obtaining the frame position of the starting action of any action data in the character animation; obtaining the frame position of the key action of the previous action data of any action data in the character animation, and the overlapping situation of the previous action data with other action data meets the preset requirements; if the frame position of the starting action of any action data in the character animation is after the frame position of the key action of the previous action data in the character animation, then determining that the overlapping situation of any action data with other action data meets the preset requirements; if the frame position of the starting action of any action data in the character animation is before the frame position of the key action of the previous action data in the character animation, then deleting any action data.

[0155] Furthermore, the method also includes: obtaining the frame position of the terminal action of the previous action data in the character animation; if the frame position of the starting action of any action data in the character animation is before the frame position of the terminal action of the previous action data in the character animation, then determining that any action data has an overlapping area with the previous action data; and generating action data of the overlapping area based on an interpolation algorithm.

[0156] Generally speaking, before or after each action is completed, the action character maintains an idle action. The idle action can be an action that the character maintains when not speaking in a dialogue scene. For example, the character's arms are naturally hanging down when the character is not speaking. Then, before and after the character performs arm-related actions, the character's arms are naturally hanging down.

[0157] Of course, in some cases, when the overlapping area of ​​the frame positions of two actions is not very large, the two actions can be considered as continuous actions, and the actions in the overlapping area can be generated using linear interpolation or spherical interpolation, or the two actions can be displayed smoothly. Therefore, it is necessary to determine the size of the overlapping area of ​​the frame positions corresponding to the two actions to determine whether the two actions can be displayed smoothly.

[0158] In step S302, when the overlap between any action data and other action data meets the preset requirements, any action data is associated with the target character at the frame position of any action in the character animation, and the character animation is rendered and generated.

[0159] Optionally, when it is determined that the overlap between action data and other action data meets preset requirements, a corresponding bone identifier and a corresponding bone rotation value are added to at least one action data at a frame position of the character animation, so that the corresponding character animation can be rendered.

[0160] Figure 4 is a block diagram of an animation generation device according to an exemplary embodiment. Figure 4 The device includes an acquisition unit 41, a determination unit 42, and a rendering unit 43.

[0161] An acquisition unit 41 is configured to acquire at least one key line corresponding to a target character;

[0162] The determination unit 42 determines the action data respectively matched by the at least one key line from the action database, obtains at least one action data corresponding to the target character; and determines the frame position of the at least one action data in the character animation;

[0163] The rendering unit 43 is configured to execute at least one action data at the frame position of the character animation, associate the at least one action data with the target character respectively, and render to generate the character animation.

[0164] The selection unit 42 is configured to select the action data respectively matching the at least one key line from the action database to obtain at least one action data;

[0165] A determination unit 43 is configured to determine a frame position of the at least one action data in the character animation;

[0166] The rendering unit 44 is configured to perform rendering to generate the character animation based on the at least one action data and the frame position of the at least one action data in the character animation.

[0167] In some embodiments, the determining unit 42 is configured to perform any of the following:

[0168] For any action data, obtaining the frame position of the key lines corresponding to the action data in the character animation;

[0169] Determine the frame position of the key line as the frame position of the key action in the action data in the character animation;

[0170] Determine the frame positions of the start action and the end action in the action data in the character animation respectively based on the frame position of the key action in the character animation;

[0171] The frame position of the action data in the character animation is determined based on the frame position of the key action in the character animation, the frame position of the start action in the character animation, and the frame position of the end action in the character animation.

[0172] In some embodiments, the determining unit 42 is configured to perform any of the following:

[0173] Determine the frame position of the key action in the action data, the frame position of the start action in the action data, and the frame position of the end action in the action data;

[0174] Determine a first interval frame number between the key action and the starting action based on a frame position of the key action in the action data and a frame position of the starting action in the action data;

[0175] Determine a second interval frame number between the key action and the terminal action based on a frame position of the key action in the action data and a frame position of the terminal action in the action data;

[0176] Determining the frame position of the starting action in the character animation based on the frame position of the key action in the character animation and the first interval frame number;

[0177] Based on the frame position of the key action in the character animation and the second interval frame number, the frame position of the terminal action in the character animation is determined.

[0178] In some embodiments, the rendering unit 43 is configured to perform any of the following:

[0179] For any action data among the at least one action data, determining an overlap between the any action data and other action data;

[0180] When the overlap between any one of the action data and other action data meets the preset requirement, any one of the action data will be associated with the target character at the frame position of the character animation, and the character animation will be rendered and generated.

[0181] In some embodiments, the rendering unit 43 is configured to perform any of the following:

[0182] Obtaining the frame position of the starting action of any action data in the character animation;

[0183] Obtaining a key action of the previous action data of any action data at a frame position of the character animation, and the overlap between the previous action data and other action data meets a preset requirement;

[0184] If the frame position of the starting action of any action data in the character animation is after the frame position of the key action of the previous action data in the character animation, it is determined that the overlap between any action data and other action data meets the preset requirements;

[0185] If the frame position of the starting action of any action data in the character animation is after the frame position of the key action of the previous action data in the character animation, then the any action data is deleted.

[0186] In some embodiments, the rendering unit 43 is configured to perform any of the following:

[0187] Obtaining the frame position of the termination action of the previous action data at the character animation;

[0188] If the frame position of the starting action of any action data in the character animation is before the frame position of the ending action of the previous action data in the character animation, it is determined that any action data has an overlapping area with the previous action data;

[0189] The motion data of the overlapping area is generated based on an interpolation algorithm.

[0190] In some embodiments, the acquisition unit 41 is configured to perform any of the following:

[0191] Inputting the character text corresponding to the target character into the key lines prediction model;

[0192] Receive text identifiers corresponding to each of the plurality of characters in the character text output by the key line prediction model;

[0193] At least one character with a character identifier of a preset value is determined as a key line, and the key line corresponds to action data.

[0194] In some embodiments, the key line prediction model of the acquisition unit 41 is trained and obtained in the following manner:

[0195] Obtain multiple sample texts with key lines annotated;

[0196] Inputting the plurality of sample texts into an initial key line prediction model, and determining predicted key lines of the plurality of sample texts through the initial key line prediction model;

[0197] Based on the loss function indicating the difference between the key words and the predicted key words, the initial key words preset model is trained until a preset training completion condition is met, thereby obtaining a trained key words prediction model.

[0198] In some embodiments, the selection unit is configured to perform any of the following:

[0199] Displaying selection prompt information corresponding to each of the multiple action data;

[0200] receiving a selection operation for the selection prompt information, and determining at least one action data corresponding to the selection prompt information;

[0201] An association operation for the action data and key lines is received, the action data respectively matching the at least one key line is determined, and at least one action data corresponding to the target character is acquired.

[0202] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0203] In one possible design, Figure 4 The animation generating device of the embodiment shown can be implemented as an electronic device, such as Figure 5As shown, the electronic device may include a memory 501 and a processor 502;

[0204] The memory 501 stores one or more computer instructions, wherein the one or more computer instructions are invoked and executed by the processor 502 .

[0205] The processor 502 is used for:

[0206] Obtain at least one key line corresponding to the target character;

[0207] Determine from the action database the action data respectively matching the at least one key line, and obtain at least one action data corresponding to the target character;

[0208] Determining a frame position of the at least one action data in the character animation;

[0209] At the frame position of the at least one action data in the character animation, the at least one action data is respectively associated with the target character, and the character animation is rendered and generated.

[0210] The processor 502 may include one or more processors to execute computer instructions to complete all or part of the steps in the above method. Of course, the processor may also be implemented as one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0211] The memory 501 is configured to store various types of data to support operations at the terminal. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0212] Of course, the computing device may also include other components, such as input / output interfaces, communicators, etc.

[0213] The input / output interface provides an interface between the processor and the peripheral interface module, which may be an output device, an input device, etc.

[0214] The communicator is configured to facilitate, among other things, wired or wireless communications between the computing device and other devices.

[0215] Among them, the computing device can be a physical device or an elastic computing host provided by a cloud computing platform, etc. In this case, the computing device can refer to a cloud server, and the above-mentioned processor, memory, etc. can be basic server resources rented or purchased from the cloud computing platform.

[0216] In an exemplary embodiment, there is also provided a method comprising: Computer readable A storage medium, such as a memory, includes instructions that can be Figure 5 The processor 502 of the electronic device shown executes to complete the above method. Optionally, the computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

[0217] In an exemplary embodiment, a computer program product is also provided, comprising a computer program / instruction, which when executed by a processor implements Figure 2 The animation generation method.

[0218] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0219] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0220] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0221] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

[0222] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0223] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An animation generation method, characterized in that: include: Obtain at least one key line corresponding to the target character; Determine from the action database the action data respectively matching the at least one key line, and obtain at least one action data corresponding to the target character; Determining a frame position of the at least one action data in the character animation; At the frame position of the at least one action data in the character animation, respectively associating the at least one action data with the target character, and rendering to generate the character animation; The step of associating the at least one action data with the target character at the frame position of the at least one action data, and rendering and generating the character animation comprises: determining, for any action data in the at least one action data, the overlap between the any action data and other action data; When the overlap between any one of the action data and other action data meets the preset requirement, any one of the action data will be associated with the target character at the frame position of the character animation, and the character animation will be rendered and generated.

2. The animation generation method according to claim 1, characterized in that: The step of determining the frame position of the at least one action data in the character animation comprises: For any action data, obtaining the frame position of the key lines corresponding to the action data in the character animation; Determine the frame position of the key line as the frame position of the key action in the action data in the character animation; Determine the frame positions of the start action and the end action in the action data in the character animation respectively based on the frame position of the key action in the character animation; The frame position of the action data in the character animation is determined based on the frame position of the key action in the character animation, the frame position of the start action in the character animation, and the frame position of the end action in the character animation.

3. The animation generation method according to claim 2, characterized in that: The step of determining the frame positions of the starting action and the ending action in the action data in the character animation respectively based on the frame position of the key action in the character animation comprises: Determine the frame position of the key action in the action data, the frame position of the start action in the action data, and the frame position of the end action in the action data; Determine a first interval frame number between the key action and the starting action based on a frame position of the key action in the action data and a frame position of the starting action in the action data; Determine a second interval frame number between the key action and the terminal action based on a frame position of the key action in the action data and a frame position of the terminal action in the action data; Determining the frame position of the starting action in the character animation based on the frame position of the key action in the character animation and the first interval frame number; Based on the frame position of the key action in the character animation and the second interval frame number, the frame position of the terminal action in the character animation is determined.

4. The animation generation method according to claim 1, characterized in that: The step of determining, for any action data among the at least one action data, the overlap between the any action data and other action data comprises: Obtaining the frame position of the starting action of any action data in the character animation; Obtaining a key action of the previous action data of any action data at a frame position of the character animation, and the overlap between the previous action data and other action data meets a preset requirement; If the frame position of the starting action of any action data in the character animation is after the frame position of the key action of the previous action data in the character animation, it is determined that the overlap between any action data and other action data meets the preset requirements; If the frame position of the starting action of any action data in the character animation is before the frame position of the key action of the previous action data in the character animation, then the any action data is deleted.

5. The animation generation method according to claim 4, characterized in that: The method further comprises: Obtaining the frame position of the termination action of the previous action data at the character animation; If the frame position of the starting action of any action data in the character animation is before the frame position of the ending action of the previous action data in the character animation, it is determined that any action data has an overlapping area with the previous action data; The motion data of the overlapping area is generated based on an interpolation algorithm.

6. The animation generation method according to claim 1, characterized in that: The step of obtaining at least one key line corresponding to the target character comprises: Inputting the character text corresponding to the target character into the key lines prediction model; Receive text identifiers corresponding to each of the plurality of characters in the character text output by the key line prediction model; At least one character with a character identifier of a preset value is determined as a key line, and the key line corresponds to action data.

7. The animation generation method according to claim 6, characterized in that: The key line prediction model is trained and obtained in the following manner: Obtain multiple sample texts with key lines annotated; Inputting the plurality of sample texts into an initial key line prediction model, and determining predicted key lines of the plurality of sample texts through the initial key line prediction model; Based on the loss function indicating the difference between the key words and the predicted key words, the initial key words preset model is trained until a preset training completion condition is met, thereby obtaining a trained key words prediction model.

8. The animation generation method according to claim 1, characterized in that: The step of determining the action data respectively matching the at least one key line from the action database and obtaining at least one action data corresponding to the target character comprises: Displaying selection prompt information corresponding to each of the multiple action data; receiving a selection operation for the selection prompt information, and determining at least one action data corresponding to the selection prompt information; An association operation for the action data and key lines is received, the action data respectively matching the at least one key line is determined, and at least one action data corresponding to the target character is acquired.

9. An animation generating device, characterized in that: include: An acquisition unit is configured to acquire at least one key line corresponding to a target character; A determination unit, determining the action data respectively matching the at least one key line from an action database, and obtaining at least one action data corresponding to the target character; Determining a frame position of the at least one action data in the character animation; The rendering unit is configured to execute, at the frame position of the at least one action data in the character animation, respectively associate the at least one action data with the target character, render and generate the character animation, and, for any action data in the at least one action data, determine the overlap between the any action data and other action data; when the overlap between any action data and other action data meets the preset requirements, associate the any action data with the target character at the frame position of the any action in the character animation, and render and generate the character animation.

10. The animation generating device according to claim 9, characterized in that: The determining unit is configured to perform any of the following: For any action data, obtaining the frame position of the key lines corresponding to the action data in the character animation; Determine the frame position of the key line as the frame position of the key action in the action data in the character animation; Determine the frame positions of the start action and the end action in the action data in the character animation respectively based on the frame position of the key action in the character animation; The frame position of the action data in the character animation is determined based on the frame position of the key action in the character animation, the frame position of the start action in the character animation, and the frame position of the end action in the character animation.

11. The animation generating device according to claim 9, characterized in that: The determining unit is configured to perform any of the following: Determine the frame position of the key action in the action data, the frame position of the start action in the action data, and the frame position of the end action in the action data; Determine a first interval frame number between the key action and the starting action based on a frame position of the key action in the action data and a frame position of the starting action in the action data; Determine a second interval frame number between the key action and the terminal action based on a frame position of the key action in the action data and a frame position of the terminal action in the action data; Determining the frame position of the starting action in the character animation based on the frame position of the key action in the character animation and the first interval frame number; Based on the frame position of the key action in the character animation and the second interval frame number, the frame position of the terminal action in the character animation is determined.

12. The animation generating device according to claim 9, characterized in that: The rendering unit is configured to perform any of the following: Obtaining the frame position of the starting action of any action data in the character animation; Obtaining a key action of the previous action data of any action data at a frame position of the character animation, and the overlap between the previous action data and other action data meets a preset requirement; If the frame position of the starting action of any action data in the character animation is after the frame position of the key action of the previous action data in the character animation, it is determined that the overlap between any action data and other action data meets the preset requirements; If the frame position of the starting action of any action data in the character animation is after the frame position of the key action of the previous action data in the character animation, then the any action data is deleted.

13. The animation generating device according to claim 12, characterized in that: The rendering unit is configured to perform any of the following: Obtaining the frame position of the termination action of the previous action data at the character animation; If the frame position of the starting action of any action data in the character animation is before the frame position of the ending action of the previous action data in the character animation, it is determined that any action data has an overlapping area with the previous action data; The motion data of the overlapping area is generated based on an interpolation algorithm.

14. The animation generating device according to claim 9, characterized in that: The acquisition unit is configured to perform any of the following: Inputting the character text corresponding to the target character into the key lines prediction model; Receive text identifiers corresponding to each of the plurality of characters in the character text output by the key line prediction model; At least one character with a character identifier of a preset value is determined as a key line, and the key line corresponds to action data.

15. The animation generating device according to claim 14, characterized in that: The key line prediction model of the acquisition unit is trained and obtained in the following manner: Obtain multiple sample texts with key lines annotated; Inputting the plurality of sample texts into an initial key line prediction model, and determining predicted key lines of the plurality of sample texts through the initial key line prediction model; Based on the loss function indicating the difference between the key words and the predicted key words, the initial key words preset model is trained until a preset training completion condition is met, thereby obtaining a trained key words prediction model.

16. The animation generating device according to claim 9, characterized in that: The selection unit is configured to perform any of the following: Displaying selection prompt information corresponding to each of the multiple action data; receiving a selection operation for the selection prompt information, and determining at least one action data corresponding to the selection prompt information; An association operation for the action data and key lines is received, the action data respectively matching the at least one key line is determined, and at least one action data corresponding to the target character is acquired.

17. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the animation generation method according to any one of claims 1 to 8. 18 . A computer-readable storage medium, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the animation generation method according to any one of claims 1 to 8.

19. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the animation generation method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Animation generation method and device

    CN110880198A