Animation playback method, device, equipment and readable medium

By establishing an independent animation state machine for the target character in the cutscene and controlling its actions to execute the target action at the specified moment, the problem of animation discontinuity caused by pausing or fast-forwarding the cutscene is solved, thus improving the user experience.

CN114392549BActive Publication Date: 2025-09-23SHANGHAI PERFECT WORLD SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111666807.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-09-23
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

In game or animation scenes, pausing or fast-forwarding cutscenes causes the target character's animation to play discontinuously, affecting the user's visual experience.

Method used

Create an animation state machine for the target character in the cutscene, control the target action independently of the timeline, and execute the target action at the specified time through the target state node to ensure action continuity.

Benefits of technology

The target character's actions are displayed coherently when the cutscene is paused or fast-forwarded, improving the user's viewing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114392549B_ABST
    Figure CN114392549B_ABST
Patent Text Reader

Abstract

The present invention discloses an animation playback method, device, equipment and readable medium. The method includes: during the playback of a transition animation, establishing an animation state machine for a target character in the transition animation; determining a target action tag corresponding to the first playback moment of the transition animation configured on the timeline of the transition animation; when the transition animation is played to the first playback moment on the timeline, controlling the target character to perform the target action corresponding to the target action tag at the first playback moment through a target state node corresponding to the target action tag established in the animation state machine. In the transition animation, a separate state machine is created independently of the timeline of the transition animation to execute the target action of the target character. When an action adjustment is made to the transition animation, since the target action of the target character is updated independently, it will not be affected by the transition animation, ensuring that the target action can always maintain a coherent display effect, so that users can have a better viewing experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of Internet technology, and in particular to animation playback methods, devices, equipment, and readable media. Background Art

[0002] In some game scenes, some cutscenes will be inserted according to the game links to enhance the coherence of the game's storyline, or to more clearly display action effects through cutscenes, etc.

[0003] In actual applications, during a cutscene, a user might press the pause control to take a break, pausing all animation content within the cutscene. In other cases, when a user is uninterested in the current cutscene or is eager to enter the game scene and complete a mission, they might fast-forward through the dialogue of the target character in the current cutscene. This can cause the character animation and / or camera movement in the current animation scene to pause or jump, resulting in choppy playback of the target character's animation, directly impacting the user's visual experience. Summary of the Invention

[0004] Embodiments of the present invention provide an animation playback method, apparatus, device, and readable medium for improving the effect of transition animation playback.

[0005] In a first aspect, an embodiment of the present invention provides an animation playback method, the method comprising:

[0006] During the playback of the cutscene, establishing an animation state machine for a target character in the cutscene;

[0007] Determining a target action tag configured on a timeline of the transition animation and corresponding to a first playback moment of the transition animation;

[0008] When the transition animation is played to the first playback moment on the timeline, the target state node corresponding to the target action tag established in the animation state machine is used to control the target character to perform the target action corresponding to the target action tag at the first playback moment.

[0009] In a second aspect, an embodiment of the present invention provides an animation playback device, the device comprising:

[0010] An establishment module is used to establish an animation state machine of a target character in the cutscene during the playing of the cutscene;

[0011] a determination module, configured to determine a target action mark configured on the time axis of the transition animation and corresponding to the first playback moment of the transition animation;

[0012] The control module is used to control the target character to perform the target action corresponding to the target action tag at the first playback moment when the transition animation is played to the first playback moment on the timeline through the target state node corresponding to the target action tag established in the animation state machine.

[0013] In a third aspect, an embodiment of the present invention further provides an electronic device comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the animation playback method according to the first aspect.

[0014] In a fourth aspect, an embodiment of the present invention further provides a computer-readable medium on which is stored at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the animation playback method according to the first aspect.

[0015] In an embodiment of the present invention, during the playback of a cutscene, an animation state machine is established for the target character in the cutscene; a target action tag corresponding to the first playback moment of the cutscene configured on the timeline of the cutscene is determined; when the cutscene plays to the first playback moment on the timeline, the target state node corresponding to the target action tag established in the animation state machine is used to control the target character to perform the target action corresponding to the target action tag at the first playback moment. By creating a separate state machine in the cutscene that is independent of the timeline of the cutscene to execute the target action of the target character, when an action adjustment is made to the cutscene, since the target action of the target character is updated independently, it will not be affected by operations such as pausing or fast-forwarding the cutscene, thereby ensuring that the target action of the target character can always maintain a coherent display effect, allowing users to have a better viewing experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0017] Figure 1 A schematic diagram of a flow chart of a method for playing a transition animation provided in an embodiment of the present application;

[0018] Figure 2A flowchart of a method for establishing an animation state machine provided in an embodiment of the present application;

[0019] Figure 3 A schematic diagram of the transition animation playback provided in an embodiment of the present application;

[0020] Figure 4 A schematic diagram of the structure of an animation state machine used as an example in an embodiment of the present application;

[0021] Figure 5 A schematic diagram of the first state machine layer playback standby action provided in an embodiment of the present application;

[0022] Figure 6 Schematic diagram of two state machine layers playing target actions provided in an embodiment of the present application;

[0023] Figure 7 A schematic diagram illustrating target action playback provided in an embodiment of the present application;

[0024] Figure 8 A schematic structural diagram of an animation playback device provided in an embodiment of the present application;

[0025] Figure 9 For Figure 8 A schematic structural diagram of an electronic device corresponding to the animation playback device provided in the embodiment. DETAILED DESCRIPTION

[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0027] The terms used in the embodiments of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The singular forms "a," "an," "the," and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, and unless the context clearly indicates otherwise, "a plurality" generally includes at least two.

[0028] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to the determination" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)," depending on the context.

[0029] In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.

[0030] In existing game scenes, to enrich the game presentation, corresponding cutscenes are inserted according to different game stages or scenes. To enhance the transition between game scenes and cutscenes, game-related characters and content are incorporated into the cutscenes. For example, in a game segment featuring a special move, to enhance the presentation of the special move's effects, a cutscene is inserted when one character unleashes the move, showcasing the full effect. Another example is that at certain stages in some game scenes, dialogue-style cutscenes are added to the scene to better engage the user and provide a more comprehensive understanding of the game's story. If the user doesn't want to watch the cutscenes anymore, they can fast-forward the cutscene by clicking the fast-forward button. If the user is temporarily unable to continue watching the cutscene, they can pause the cutscene by clicking the pause button. However, both fast-forwarding and pausing the cutscenes cause all relevant characters in the cutscene to experience discontinuous actions, such as pausing or fast-forwarding. In particular, the main characters in the cut-scene animation are also affected by this, resulting in discontinuous playback. Therefore, the present application proposes a technical solution that can effectively improve the playback continuity of the cut-scene animation.

[0031] like Figure 1 A flow chart of a method for playing a transition animation provided by an embodiment of the present application. Figure 1 As you can see, the specific steps include the following:

[0032] 101: During the playback of the cutscene, an animation state machine of a target character in the cutscene is established.

[0033] 102: Determine a target action tag configured on the timeline of the transition animation and corresponding to the first playback moment of the transition animation.

[0034] 103: When the transition animation reaches the first playback moment on the timeline, the target state node corresponding to the target action tag established in the animation state machine is used to control the target character to perform the target action corresponding to the target action tag at the first playback moment.

[0035] The cutscenes mentioned here are cutscenes inserted into game scenes. Of course, the technical solution of this application is not limited to cutscenes for game scenes. It can also be applied to various animation scenes, such as novels with animations, or novels presented in animation form. In cutscenes, there are many animated characters, such as the target character, the animated protagonist or supporting character, and the scenery models, building models, landscapes, flowers, plants, and trees in the animated scene. The user's focus is often on the target character.

[0036] In a cutscene, a corresponding timeline is configured, which includes a character action track. On this track, action tags corresponding to each time interval on the timeline can be configured, so that the character bound to the track is controlled to perform (i.e., play) the action represented by the action tag within each time interval according to the character action track. In actual applications, an animation state machine can be established for the target character that needs to be independently updated during the playback of the cutscene. The animation presentation of the target character in the animation state machine is not affected by operations such as pausing or jumping the cutscene. That is, when the user changes the playback state of the cutscene, the animation content of the target character will not change immediately with the cutscene. For example, in a cutscene in which two target characters are having a conversation, when a pause point is configured on the timeline (through which the cutscene is paused after target character 1 finishes speaking, and waits for user interaction), the dialogue subtitles in the cutscene will be immediately paused. However, since the character animations of the two target characters (i.e., the actions performed (or played) by the target characters in the cutscene) are controlled by the corresponding animation state machines, the playback of the target character's animation actions will not be immediately paused due to the pause of the cutscene. Instead, the animation state machine can be used to control the target character to continue to perform the current character action (such as the target action mentioned above).

[0037] Specifically, you can configure various action tags on the character action track that is bound to the target character. Each action tag corresponds to a time interval on the timeline, that is, each time tag has a start time and an end time. Based on the character action track, you can control the target character to perform the corresponding action within the time interval corresponding to each action tag. Thus, based on the character action track, you can control the character bound to the track to perform (i.e., play) the action represented by the action tag within each time interval. For example, when the start time of a certain action tag is the first play time, when the cutscene playback progress reaches the first play time, the target action of the corresponding target character will be played.

[0038] In actual applications, the execution of the target action is controlled by the target state node. Specifically, when the cutscene is playing normally, a target state node is established in the animation state machine. Then, the target state node is used to control the target character to perform the corresponding target action in the cutscene (i.e., the target action is played on the target character model). Through the above scheme, the target action of the target character, camera movement, etc. are updated independently of the timeline of the cutscene, and a transition mechanism is provided to eliminate the impact of the cutscene playback state change on the target action of the target character, for example, causing the target action to be inconsistent.

[0039] In one or more embodiments of the present application, before controlling the target character to perform the target action corresponding to the target action tag at the first playback moment through the target state node corresponding to the target action tag established in the animation state machine, it also includes: determining whether the target character is performing the target action at the first playback moment; if the target character is not performing the target action at the first playback moment, establishing the target state node in the animation state machine according to the target action tag, and controlling the target character to perform the target action corresponding to the target action tag at the first playback moment through the target state node.

[0040] In actual applications, since the animation state machine is empty when the cutscene starts playing, when the start time point on the timeline is reached (for example, when the first playback moment is the start time point), a state node corresponding to the standby action (for example, a standby state node) is established in the first state machine layer of the animation state machine, and the state node controls the target character to cyclically execute the standby action in the cutscene; in addition, after the target character is controlled to execute the standby action cyclically through the standby state node, when the current playback moment of the cutscene on the timeline (that is, when the above-mentioned first playback moment is not the start time point) is bound to an action tag of an action other than the standby action, it is necessary to determine the action tag that needs to be played at the playback moment. When the target action is performed, the corresponding target state node is dynamically created in real time in the second state machine layer of the animation state machine, and the second state machine layer in the animation state machine is switched to the state corresponding to the target state node, so that the target character is controlled to perform the corresponding target action through the target state node established in the second state machine layer, that is, the target state node controls the playback of the target action of the target character, so that the character animation (that is, the action performed by the character, or the action played on the character) is updated independently of the timeline of the cutscene. When the playback state of the cutscene changes (for example, pause or fast forward), the target action can continue to play, and the target action will not be suddenly paused along with the cutscene.

[0041] like Figure 2 A flow chart of a method for establishing an animation state machine provided in an embodiment of the present application. Figure 2 As can be seen in the figure, the method further includes: 201: determining the character action track corresponding to the target character on the timeline of the cutscene; 202: using the action tag corresponding to the first playback moment in the action tag configured in the character action track as the target action tag.

[0042] In actual applications, according to different target characters and different animation playback requirements, action tags of different target actions will be configured on the character's character action track (or called character animation track), so as to control the character's action playback through the character action track.

[0043] For ease of understanding, the following example illustrates the animation state machine establishment scheme.

[0044] like Figure 3 A schematic diagram of the transition animation playback provided in the embodiment of the present application. Figure 3 As you can see, there are dialogue subtitles bound to the timeline in the cutscene, and multiple action tags are configured in the character animation track of the timeline. Figure 4 This is a structural diagram of the animation state machine illustrated in the embodiment of the present application. Figure 4In the animation state machine, you can see that there are two layers, the first state machine layer and the second state machine layer. At this time, the state machine is empty.

[0045] In one or more embodiments of the present application, the target action (corresponding to Figure 3 The actions represented by the action tags configured in the character animation track in the animation include: standby actions and character actions (or non-standby actions). The method further includes: when the target action is a standby action, establishing the target state node in the animation state machine according to the target action tag, including: when playing the standby action at the first playback moment as the first time playing the standby action on the timeline of the cutscene, creating a first target state node corresponding to the standby action in the first state machine layer of the animation state machine; when the target action is a non-standby action, establishing the target state node in the animation state machine according to the target action tag, including: creating a second target state node corresponding to the target action in the second state machine layer of the animation state machine.

[0046] In order to meet the animation playback requirements of the target character and to deal with the impact of the cutscene animation on the target character's action playback due to pause or fast forward or fast rewind, the target action is divided into standby action and character action. Among them, the standby action (for example, upright action) can be a looped action. For example, when there is no state node in the second state machine layer of the animation state machine, the second state machine layer is empty, and there is a time interval between the time periods corresponding to the two state nodes of the second state machine layer (that is, the time periods corresponding to the action playback of the two state nodes), etc., the target character is controlled to loop and execute the standby action. Figure 5 Schematic diagram of the first state machine layer playing the standby action of the target character provided in the embodiment of the present application. Figure 5 As shown, when arriving Figure 3 At the starting point a shown, the standby action is played for the first time. Since the first state machine layer is currently empty, a corresponding first target state node will be dynamically created, and the first state machine layer will be switched to the state corresponding to the standby action (i.e., the standby state). The first target state node controls the loop playback of the target character's standby action. Similarly, when the start moment corresponding to the shrug action is played, a second target state node corresponding to the shrug action is dynamically created in the second state machine layer, and the second state machine layer is switched to the character action state (i.e., the state corresponding to the second target state node). The second target state node controls the target character to perform the corresponding character action (i.e., the shrug action), and the shrug action will cover the loop of the standby action, thereby presenting the target character performing the shrug action in the cutscene. In an embodiment of the present application, the character action played according to the second state machine layer will cover the standby action played in a loop according to the first state machine layer.

[0047] In one or more embodiments of the present application, after controlling the target character to perform the target action corresponding to the target action tag at the first playback moment through the target state node corresponding to the target action tag established in the animation state machine, it also includes: when the transition animation is played to the second playback moment, establishing a third target state node corresponding to the action tag corresponding to the second playback moment in the second state machine layer; controlling the target character to perform the character action represented by the action tag corresponding to the second playback moment in the transition animation through the third target state node in the second state machine layer, wherein the character action is a non-standby action.

[0048] like Figure 6 Schematic diagram of two state machine layers playing target actions provided in the embodiment of this application. Figure 6 As shown, the cutscene continues to play until it reaches the starting moment of the shrug action (for example, the first play moment or the second play moment), dynamically creates the corresponding state node, and switches the second state machine layer to the shrug state. In actual applications, it is also possible to interpolate the actions played in the two state nodes that are connected before and after (or the corresponding time periods overlap) based on the fade-in and fade-out configuration information configured on the character animation track, such as the fade-in and fade-out time period, such as interpolating the standby action and the shrug action, so that the interpolated action is played within the time period, achieving a natural and smooth transition from the standby action to the shrug action, thereby achieving a natural transition between the actions of the two different state machine layers. When the shrug action is played, the shrug action will cover the standby action, so that the target character is presented in the cutscene as performing the shrug action.

[0049] In one or more embodiments of the present application, after the third target state node in the second state machine layer controls the target character to perform the character action represented by the action tag corresponding to the second playback moment in the cutscene, it also includes: when the cutscene is played to the third playback moment, the character action playback ends and the character action is not set to a loop state, and there is no new state node in the second state machine layer, the second state machine layer is switched to an empty state, and the target character is controlled to perform the standby action through the first target state node.

[0050] For example, when the playback reaches the end moment of the shrug action (i.e., the third playback moment), the shrug action ends, and the animation state machine will keep updating. Since the shrug action is not set to loop, after the shrug action is finished, it will switch from the shrug action to the standby action. Interpolation can be performed during the switching process to achieve a natural and smooth transition from the shrug action to the standby action; among them, the second state machine layer will automatically switch to the empty state. At this time, the first state machine layer is still in the standby loop state, so it will continue to loop the standby action.

[0051] In one or more embodiments of the present application, the method further includes: in response to a received jump instruction for the cutscene, jumping the cutscene to a fourth playback moment; based on the fourth playback moment on the timeline, controlling the target character to perform the target action represented by the action tag corresponding to the fourth playback moment in the cutscene through the target state node corresponding to the action tag corresponding to the fourth playback moment established in the animation state machine. The method of controlling the target character to perform the target action represented by the action tag corresponding to the fourth playback moment in the cutscene based on the fourth playback moment on the timeline through the target state node corresponding to the action tag corresponding to the fourth playback moment established in the animation state machine specifically includes: if the target action corresponding to the target character at the fourth playback moment has not yet started playing, playing the target action from a specified position; if the target action corresponding to the target character at the fourth playback moment has already started playing, continuing to play the target action, wherein the target action represented by the action tag corresponding to the fourth playback moment is a character action.

[0052] Combine Figure 3 For example, if the player directly clicks to skip the dialogue when the timeline plays between the start point a and the pause point A, the timeline will jump directly to the pause point A and continue playing.

[0053] like Figure 7 This is a schematic diagram illustrating the target action playback provided in the embodiment of the present application. Figure 7As shown, at the fourth playback moment, if the shrug action has not yet started, the shrug action will start playing from the beginning (or midway, depending on the settings) of the target action. If the second state machine layer does not receive a new action request, the shrug action will be played in its entirety. Optionally, when the time interval between the fourth target state node in the second state machine layer and the fifth state node located after the fourth target state node is less than the required playback duration of the target action corresponding to the fourth target state node, the action is interpolated and played during the transition period according to the fade-in and fade-out configuration information on the timeline. Assuming that the time interval between the character actions "shrug" and "raise head" in the second state machine layer on the timeline is less than the required playback duration of the shrug action, a state transition will be executed at the start of "raise head" on the timeline, switching from shrug to raise head. The interpolation transition between the two actions is performed according to the timeline configuration. If the shrug action is already playing when the game player clicks to skip the dialogue, the second state machine layer will not undergo a state transition, and the shrug action will continue to play unaffected.

[0054] In this embodiment, when the transition animation plays to a pause point configured on the timeline (e.g., the fifth playback moment), the target state node corresponding to the action tag corresponding to the fifth playback moment in the animation state machine is determined, and the target character is continued to be controlled through the target state node to execute the target action corresponding to the action tag corresponding to the fifth playback moment to complete the playback of the target action.

[0055] For example, if Figure 3 As shown, when the playback reaches pause point A, it can be seen that the shrug action has not been completed. Assuming that the game player stops operating at this time, the timeline will remain paused at pause point A. However, the animation state machine will continue to update to control the target character to complete the execution of the shrug action (i.e., complete the shrug action). Since the shrug action is not set to a loop, after the shrug action is completed, the second state machine layer will switch to an empty state. At this time, the first state machine layer is still in a standby loop state, so it will continue to play the standby loop to achieve the transition from the shrug action to the standby action. During the transition process, the target character can be controlled to interpolate and transition from the shrug action (i.e., the character action) to the standby action in a fade-out manner according to the fade-in and fade-out configuration information set on the timeline.

[0056] In one or more embodiments of the present application, it also includes: during the playback of the transition animation, establishing a lens state machine for the lens in the transition animation; determining the lens movement corresponding to the first playback moment on the timeline of the transition animation; when the transition animation is played to the first playback moment on the timeline, controlling the lens to perform the lens movement in the transition animation through the target lens movement node established in the lens state machine.

[0057] It should be noted that the lens movement mentioned here can be understood as the action of the lens shot for the cutscene; similar to the playback control of the character animation, when the cutscene is played, the lens movement animation is updated independently of the timeline, so that the lens movement can be controlled according to the lens movement state node in the lens state machine when the cutscene is paused, so that the lens movement corresponding to the current playback moment (i.e. the lens movement animation) can continue to be played when the cutscene is paused. For specific implementation solutions, please refer to Figures 1 to 7 The corresponding embodiments will not be repeated here.

[0058] Based on the same idea, the embodiment of the present application also provides an animation playback device. Figure 8 This is a structural diagram of an animation playback device provided in an embodiment of the present application. Figure 8 As can be seen in the figure, the device includes:

[0059] Establishing module 81, used for establishing an animation state machine of a target character in the cut-scene during the playing of the cut-scene;

[0060] a determination module 82 for determining a target action tag configured on the time axis of the transition animation and corresponding to the first playback moment of the transition animation;

[0061] The control module 83 is used to control the target character to perform the target action corresponding to the target action tag at the first playback moment when the transition animation is played to the first playback moment on the timeline through the target state node corresponding to the target action tag established in the animation state machine.

[0062] Optionally, the determination module 82 is used to determine whether the target character is performing the target action at the first playback moment; if the target character is not performing the target action at the first playback moment, the target state node is established in the animation state machine according to the target action label, and the target character is controlled by the target state node to perform the target action corresponding to the target action label at the first playback moment.

[0063] Optionally, the determination module 82 is further configured to determine a character action track corresponding to the target character on the timeline of the transition animation; and use the action tag corresponding to the first playback moment in the action tags configured in the character action track as the target action tag.

[0064] Optionally, the system further includes a node establishing module 84. When the target action is a standby action, the node establishing module 84 is configured to create a first target state node corresponding to the standby action in the first state machine layer of the animation state machine when playing the standby action at the first playing moment is regarded as the first playing of the standby action on the timeline of the transition animation;

[0065] When the target action is a non-standby action, the node creation module 84 is configured to create a second target state node corresponding to the target action in the second state machine layer of the animation state machine.

[0066] The node establishment module 84 is used to establish a third target state node corresponding to the action tag corresponding to the second playback moment in the second state machine layer when the transition animation is played to the second playback moment; switch the second state machine layer of the animation state machine to the state corresponding to the third target state node; and control the target character to perform the character action represented by the action tag corresponding to the second playback moment in the transition animation through the third target state node in the second state machine layer, wherein the character action is a non-standby action.

[0067] Optionally, the control module 83 is used to switch the second state machine layer to an empty state when the cutscene animation is played to the third playback moment, the character action playback is completed and the character action is not set to a loop state, and there is no new state node in the second state machine layer, and control the target character to perform the standby action through the first target state node.

[0068] Optionally, the control module 83 is further configured to, in response to a received jump instruction for the transition animation, jump the transition animation to a fourth playback moment;

[0069] Based on the fourth playback moment on the timeline, the target state node corresponding to the action tag corresponding to the fourth playback moment established in the animation state machine is used to control the target character to perform the target action represented by the action tag corresponding to the fourth playback moment in the cutscene.

[0070] Optionally, the control module 83 is configured to start playing the target action from a specified position if the target action corresponding to the target character has not started playing at the fourth playing moment;

[0071] If the target action corresponding to the target character at the fourth playback time has begun to play, then the target action continues to play until it is finished.

[0072] Optionally, the establishing module 81 is further configured to establish a shot state machine for a shot in the cutscene during playback of the cutscene;

[0073] Determining the camera movement corresponding to the first playback moment on the timeline of the cutscene;

[0074] When the cutscene animation reaches the first play moment on the timeline, the lens is controlled to perform the lens movement in the cutscene animation through the target lens movement node established in the lens state machine.

[0075] In one possible design, the above Figure 8 The structure of the animation playback device shown can be implemented as an electronic device. Figure 9 As shown, the electronic device may include: a processor 91 and a memory 92. The memory 92 stores executable code. When the executable code is executed by the processor 91, the processor 91 at least implements the animation playback method provided in the aforementioned embodiment. The electronic device may also include a communication interface 93 for communicating with other devices or a communication network.

[0076] In addition, an embodiment of the present invention provides a non-transitory machine-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of a wireless router, the processor executes the animation playback method provided in the aforementioned embodiments.

[0077] Based on the above embodiment, during the playback of a cutscene, an animation state machine is established for the target character in the cutscene; the target action of the target character corresponding to the first playback moment bound on the timeline of the cutscene is determined; when the cutscene plays to the first playback moment on the timeline, the target character is controlled to perform the target action in the cutscene through the target state node established in the animation state machine. By creating a separate state machine in the cutscene that is independent of the timeline of the cutscene to perform the target action of the target character, when an action adjustment is made to the cutscene, since the target action of the target character is updated independently, it will not be affected by operations such as pausing or fast-forwarding the cutscene, thereby ensuring that the target action of the target character can always maintain a coherent display effect, allowing users to have a better viewing experience.

[0078] The device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separate. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0079] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course can also be implemented by combining hardware and software. Based on this understanding, the essence of the above technical solution or the part that makes the contribution can be embodied in the form of a computer product. The present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention 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 various embodiments of the present invention.

Claims

1. An animation playing method, characterized in that: The method comprises: During the playback of the cutscene, establishing an animation state machine for a target character in the cutscene; Determining a target action tag configured on a timeline of the transition animation and corresponding to a first playback moment of the transition animation; When the cutscene animation reaches a first playback moment on the timeline, determining whether the target character is performing a target action at the first playback moment; if the target character is not performing the target action at the first playback moment, establishing a target state node in the animation state machine according to the target action tag, and controlling the target character to perform the target action corresponding to the target action tag at the first playback moment through the target state node; Wherein, the target action includes: standby action and non-standby action; When the target action is a standby action, establishing a target state node in the animation state machine according to the target action tag includes: when playing the standby action at the first playing moment is the first time the standby action is played on the timeline of the transition animation, creating a first target state node corresponding to the standby action in a first state machine layer of the animation state machine; When the target action is a non-standby action, establishing a target state node in the animation state machine according to the target action tag includes: creating a second target state node corresponding to the target action in a second state machine layer of the animation state machine.

2. The method according to claim 1, characterized in that The method further comprises: Determining a character action track corresponding to the target character on the timeline of the cutscene; The action tag corresponding to the first playback moment in the action tags configured in the character action track is used as the target action tag.

3. The method according to claim 1, characterized in that After controlling the target character to perform the target action corresponding to the target action tag at the first playback moment through the target state node corresponding to the target action tag established in the animation state machine, the method further includes: When the transition animation reaches a second playback moment, establishing a third target state node corresponding to the action tag corresponding to the second playback moment in the second state machine layer; Switching the second state machine layer of the animation state machine to the state corresponding to the third target state node; The target character is controlled by the third target state node in the second state machine layer to perform a character action represented by an action tag corresponding to the second playback moment in the cutscene, wherein the character action is a non-standby action.

4. The method according to claim 3, characterized in that After controlling the target character to perform the character action represented by the action tag corresponding to the second playback moment in the cutscene through the third target state node in the second state machine layer, the method further includes: When the cutscene animation plays to the third playback moment, the character action playback ends and the character action is not set to a loop state, and there is no new state node in the second state machine layer, the second state machine layer is switched to an empty state, and the target character is controlled to perform the standby action through the first target state node.

5. The method according to claim 1, wherein Also includes: In response to the received jump instruction for the transition animation, jumping the transition animation to a fourth playback moment; Based on the fourth playback moment on the timeline, the target state node corresponding to the action tag corresponding to the fourth playback moment established in the animation state machine is used to control the target character to perform the target action represented by the action tag corresponding to the fourth playback moment in the cutscene.

6. The method according to claim 5, characterized in that The step of controlling the target character to perform the target action represented by the action tag corresponding to the fourth playback moment in the cutscene based on the fourth playback moment on the timeline through the target state node corresponding to the action tag corresponding to the fourth playback moment established in the animation state machine includes: If the target action corresponding to the target character has not started playing at the fourth playing time, playing the target action from the designated position; If the target action corresponding to the target character at the fourth playback time has begun to play, then the target action continues to play until it is finished.

7. The method according to claim 1, characterized in that Also includes: During the playback of the cutscene, a lens state machine for the lens in the cutscene is established; Determining the camera movement corresponding to the first playback moment on the timeline of the cutscene; When the cutscene animation reaches the first play moment on the timeline, the lens is controlled to perform the lens movement in the cutscene animation through the target lens movement node established in the lens state machine.

8. An animation playback device, characterized in that: The device comprises: An establishment module is used to establish an animation state machine of a target character in the cutscene during the playing of the cutscene; a determination module, configured to determine a target action tag corresponding to a first playback moment of the cut-scene configured on a timeline of the cut-scene; and further configured to determine whether the target character is performing a target action at the first playback moment; wherein the target action includes a standby action and a non-standby action; a control module, configured to, when the transition animation reaches a first playback moment on the timeline, establish a target state node in the animation state machine according to the target action tag if the target character is not performing the target action at the first playback moment, and control the target character to perform the target action corresponding to the target action tag at the first playback moment through the target state node; The establishment module is further used to create a first target state node corresponding to the standby action in the first state machine layer of the animation state machine when the target action is a standby action and when the standby action is played at the first playback moment as the first time the standby action is played on the timeline of the transition animation; and when the target action is a non-standby action, the establishment module is further used to create a second target state node corresponding to the target action in the second state machine layer of the animation state machine.

9. An electronic device comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the method according to any one of claims 1 to 7.

10. A computer-readable medium having stored thereon at least one instruction, at least one program, code set or instruction set, wherein the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Animation data processing method and device, computer equipment and storage medium

    CN113379876A

  • Animation state machine implementation method and device

    CN113470151A