Methods, devices, and electronic equipment for generating gliding animations

By pre-creating gliding basic and intermediate pose animation frames and combining pose weights to generate gliding animations, the problem of high cost of gliding animations is solved, achieving high-quality and low-cost gliding animation generation.

CN119832126BActive Publication Date: 2025-11-14NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411706169.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-11-14
Estimated Expiration
2044-11-25

AI Technical Summary

Technical Problem

The current technology for generating gliding animations is costly and requires a large amount of animation resources, resulting in low production efficiency.

Method used

By pre-creating basic gliding posture animation frames and intermediate gliding posture animation frames, and calculating posture weights based on direction change commands, a gliding animation is generated in which the virtual character turns from its current orientation to the target direction.

Benefits of technology

It reduces the production cost of gliding animations while generating high-quality gliding animations, providing rich and realistic aerial gliding effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119832126B_ABST
    Figure CN119832126B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, electronic device, and computer-readable storage medium for generating gliding animations. The method includes: in response to a direction change command for a virtual character in a gliding state, obtaining a first direction that the virtual character needs to reach; determining posture weights corresponding to each intermediate gliding posture animation frame based on the first direction, wherein each intermediate gliding posture animation frame is pre-created based on a basic gliding posture animation frame; determining first geometric data corresponding to each bone in the virtual character based on the posture weights and the intermediate gliding posture animation frames, wherein the first geometric data includes first position data corresponding to a first position to be reached by each bone and first angle data corresponding to a first angle to be reached; and generating a gliding animation of the virtual character turning from its current orientation to the first direction based on the first geometric data and the basic gliding posture animation frames. This application can generate high-quality gliding animations while reducing the production cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and specifically to a method, apparatus, electronic device, and computer-readable storage medium for generating gliding animations. Background Technology

[0002] In virtual games, gliding animation is a common character effect used to simulate the dynamic effect of virtual characters gliding through the air. However, generating high-quality gliding animations often requires creating a large number of animation assets. For example, for turning during gliding, corresponding animation assets are created for each angle, almost frame-by-frame, resulting in a massive number of turning animation assets. Furthermore, the transition animations between these assets also need to be created, leading to extremely high production costs for gliding animations. Therefore, finding a way to generate high-quality gliding animations while reducing production costs is crucial. Summary of the Invention

[0003] This application provides a method, apparatus, electronic device, and computer-readable storage medium for generating gliding animations, which can generate high-quality gliding animations while reducing production costs. The specific solution is as follows:

[0004] In a first aspect, embodiments of this application provide a method for generating gliding animations, applied to a game scene, wherein the game scene includes at least one virtual character, and the method includes:

[0005] In response to a direction change command for the virtual character in a gliding state, a first direction to be reached by the virtual character is obtained;

[0006] Based on the first direction, determine the posture weights corresponding to each intermediate gliding posture animation frame, wherein each intermediate gliding posture animation frame is pre-made based on the basic gliding posture animation frame;

[0007] Based on the posture weights and the gliding intermediate posture animation frames, the first geometric data corresponding to each bone in the virtual character is determined, wherein the first geometric data includes the first position data corresponding to the first position to be reached by each bone and the first angle data corresponding to the first angle to be reached by each bone.

[0008] Based on the first geometric data and the gliding basic posture animation frame, a gliding animation is generated in which the virtual character turns from the current orientation to the first direction.

[0009] Secondly, embodiments of this application provide a gliding animation generation apparatus applied to a game scene, wherein the game scene includes at least one virtual character, and the apparatus includes:

[0010] The acquisition unit is configured to acquire a first direction to be reached by the virtual character in a gliding state in response to a direction change command for the virtual character.

[0011] The first determining unit is used to determine the posture weights corresponding to each intermediate gliding posture animation frame according to the first direction, wherein each intermediate gliding posture animation frame is pre-made based on the basic gliding posture animation frame.

[0012] The second determining unit is used to determine the first geometric data corresponding to each bone in the virtual character based on each posture weight and each gliding intermediate posture animation frame, wherein the first geometric data includes first position data corresponding to the first position to be reached by each bone and first angle data corresponding to the first angle to be reached by each bone.

[0013] The generation unit is configured to generate a gliding animation of the virtual character turning from its current orientation to the first direction based on the first geometric data and the gliding basic posture animation frame.

[0014] Thirdly, this application also provides an electronic device, including:

[0015] Processor; and

[0016] A memory for storing a data processing program, which, when the electronic device is powered on and runs through the processor, executes the method described in the first aspect.

[0017] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a data processing program that is executed by a processor to perform the method described in the first aspect.

[0018] Compared with the prior art, this application has the following advantages:

[0019] The gliding animation generation method provided in this application embodiment is applied to a game scene, the game scene including at least one virtual character. The method includes: in response to a direction change command for the virtual character in a gliding state, obtaining a first direction to be reached by the virtual character; determining each posture weight corresponding to each intermediate gliding posture animation frame based on the first direction, wherein each intermediate gliding posture animation frame is pre-made based on a basic gliding posture animation frame; determining first geometric data corresponding to each bone in the virtual character based on each posture weight and each intermediate gliding posture animation frame, wherein the first geometric data includes first position data corresponding to a first position to be reached by each bone and first angle data corresponding to a first angle to be reached by each bone; and generating a gliding animation of the virtual character turning from the current orientation to the first direction based on the first geometric data and the basic gliding posture animation frame.

[0020] As can be seen, the gliding animation generation method provided in this application pre-creates intermediate gliding posture animation frames using basic gliding posture animation frames. This splits the animation resources during gliding into intermediate gliding posture animation frames and basic gliding posture animation frames. When the virtual character needs to change direction during gliding, the posture weights of each intermediate gliding posture animation frame are determined based on the first direction the virtual character wants to reach. Since each posture weight indicates the contribution of each intermediate gliding posture animation frame in turning the virtual character from its current orientation to the first direction, mixing them according to the weights yields the position and angle data of each bone corresponding to the virtual character reaching the first direction, thereby generating a gliding animation of the virtual character turning from its current orientation to the first direction. On one hand, mixing the pre-created intermediate gliding posture animation frames results in high-quality gliding animation; on the other hand, pre-creating a small number of intermediate gliding posture animation frames significantly reduces production costs, achieving rich and realistic aerial gliding effects with minimal resources. Therefore, the gliding animation generation method provided in this application can generate high-quality gliding animation while reducing production costs. Attached Figure Description

[0021] Figure 1 This is a game system diagram of a method for generating gliding animations provided in an embodiment of this application;

[0022] Figure 2 This is a flowchart of the gliding animation generation method provided in the embodiments of this application;

[0023] Figure 3 This is a schematic diagram of an example of the left-tilting animation frame, the gliding basic posture animation frame, and the right-tilting animation frame in the gliding animation generation method provided in the embodiments of this application;

[0024] Figure 4 This is a schematic diagram of an example of a forward tilt animation frame, a gliding basic posture animation frame, and a backward tilt animation frame in the gliding animation generation method provided in this application embodiment;

[0025] Figure 5 This is a schematic diagram of an example of the left-turning animation frame, the gliding basic posture animation frame, and the right-turning animation frame in the gliding animation generation method provided in the embodiments of this application;

[0026] Figure 6 This is a schematic diagram of an example of a two-dimensional mixed space in the gliding animation generation method provided in the embodiments of this application;

[0027] Figure 7 This is a schematic diagram of an example of a one-dimensional hybrid space in the gliding animation generation method provided in the embodiments of this application;

[0028] Figure 8 This is a schematic diagram of an example of a gliding pose animation frame in the gliding animation generation method provided in this application embodiment;

[0029] Figure 9 This is a structural block diagram of an example of the gliding animation generation apparatus provided in the embodiments of this application;

[0030] Figure 10 This is a structural block diagram of an example of an electronic device for data processing provided in an embodiment of this application. Detailed Implementation

[0031] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.

[0032] It should be noted that the terms "first," "second," "third," etc., in the claims, specification, and drawings of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. Such data are interchangeable where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown or described herein. Furthermore, the terms "comprising," "having," and their variations are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or apparatuses.

[0033] It should be understood that in the embodiments of this application, "at least one" means one or more, and "more than one" means two or more. "And / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the related objects before and after it are in an "or" relationship. "Contains A, B and / or C" means containing any one, two, or three of A, B, and C.

[0034] It should be understood that in the embodiments of this application, "B corresponding to A", "B corresponding to A", "A corresponds to B" or "B corresponds to A" means that B is associated with A, and B can be determined based on A. Determining B based on A does not mean that B is determined solely based on A; B can also be determined based on A and / or other information.

[0035] Based on the reasons mentioned in the background technology, in order to generate high-quality gliding animations while reducing the production cost of gliding animations, the first embodiment of this application provides a method for generating gliding animations. This method is applied to electronic devices, which may be desktop computers, laptops, mobile phones, tablets, electronic watches, etc., or other electronic devices capable of generating gliding animations. This application embodiment is not specifically limited.

[0036] In one alternative embodiment, when the gliding animation generation method is run on a terminal device, the terminal device may include a display screen and a processor. The display screen is used to present game visuals and receive commands generated by the player interacting with the game visuals. The game visuals may include a portion of a virtual game scene, which is a virtual world where virtual characters move. The processor is used to store the game application, run the game, generate game visuals, respond to commands, and control the display of the game visuals on the display screen. When the player interacts with the game visuals through the display screen, the game visuals can control the local content of the terminal device in response to the received operation commands. The terminal device can provide the graphical user interface to the player in various ways, such as rendering the display on the terminal device's screen or presenting the graphical user interface through holographic projection.

[0037] In an optional embodiment, when the gliding animation generation method runs on a server, the method can be implemented and executed based on a cloud gaming system. A cloud gaming system refers to a gaming method based on cloud computing. A cloud gaming system includes a server and client devices. The main body running the game application and the main body presenting the game screen are separate; the storage and execution of the gliding animation generation method are completed on the server. The game screen presentation is completed on the client, which is mainly used for receiving and sending game data and presenting the game screen. For example, the client can be a display device with data transmission capabilities located close to the player, such as a mobile terminal, television, computer, PDA, personal digital assistant, head-mounted display device, etc. However, the terminal device for processing game data is the server in the cloud. During gameplay, the player instructs the client to send commands to the server. The server controls the game operation according to the commands, encodes and compresses game screen data, returns it to the client via the network, and finally, the client decodes and outputs the game screen.

[0038] It should be noted that, in this embodiment, the execution entity of the gliding animation generation method can be a terminal device or a server. The terminal device can be a local terminal device or a client device in the aforementioned cloud gaming. This embodiment does not limit the type of execution entity.

[0039] For example, in conjunction with the above description, Figure 1 This application illustrates a game system 100 for implementing a method for generating gliding animations, as provided in an embodiment of this application. The game system 100 may include at least one terminal 101, at least one server 102, and a network. The terminal 101 held by the player can connect to the server 102 of different games via the network. The terminal is any device with computing hardware capable of supporting and executing software applications corresponding to the game.

[0040] In the aforementioned game system 100, terminal 101 is used to install and run the game application. In some cases, the game application may not need to be pre-installed on terminal 101, and players can directly access the game through a browser or other client. Players log in to the game application using their registered game account to control the virtual character corresponding to that account and participate in the game. When a player logs in to the game application, terminal 101 sends a login request to server 102. Server 102 verifies the game account used by the player and determines the game mechanics corresponding to the game account based on the login request. If the verification is successful, a login success notification is returned to terminal 101. During the player's participation in the game through the game application, terminal 101 and server 102 exchange data. Terminal 101 sends various information to server 102. Server 102 determines the display data for terminal 101 based on the stored game mechanics and the received information, and sends the display data back to terminal 101 so that terminal 101 can display the display data sent by server 102 to the player.

[0041] In possible application scenarios, different terminals 101 may be served by different servers 102, and the servers 102 corresponding to different terminals 101 may be the same server.

[0042] In addition, when the game system 100 includes multiple terminals, multiple servers, and multiple networks, different terminals can connect to each other through different networks and different servers.

[0043] The terminal 101 may have one or more multi-touch screens for sensing and obtaining input from touch or swipe operations performed by the user at multiple points on one or more touch displays. The terminal 101 may also be connected to a keyboard and / or mouse and / or game controller, enabling the user to perform interface operations via a keyboard and / or mouse and / or game controller.

[0044] The network can be a wireless or wired network, such as a wireless local area network (WLAN), local area network (LAN), cellular network, 2G network, 3G network, 4G network, 5G network, etc. Additionally, different terminals can connect to other terminals or to the server using their own Bluetooth network or hotspot network. Furthermore, the system 100 can include multiple databases, which are coupled to different servers, and can continuously store game-related information in the databases while different players are playing multiplayer games online.

[0045] It should be noted that, Figure 1 The game system diagram shown is merely an example. The game system 100 described in this application embodiment is intended to more clearly illustrate the technical solutions of this application embodiment and does not constitute a limitation on the technical solutions provided in this application embodiment. As those skilled in the art will know, with the evolution of game systems and the emergence of new business scenarios, the technical solutions provided in this application embodiment are also applicable to similar technical problems.

[0046] The technical solution of this application will be described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0047] The following, combined with Figures 2-8 This application introduces a method for generating gliding animations according to embodiments.

[0048] The gliding animation generation method provided in this application is applied to a game scene, which includes at least one virtual character. For example... Figure 2 The diagram shown is a flowchart of a gliding animation generation method provided in this application embodiment, including the following steps S101 to S104:

[0049] Step S101: In response to a direction change command for the virtual character in a gliding state, obtain the first direction that the virtual character wants to reach.

[0050] It is understood that virtual games refer to applications developed according to the needs of game applications. The types of games may include, but are not limited to, at least one of the following: two-dimensional (2D) game applications, three-dimensional (3D) game applications, virtual reality (VR) game applications, augmented reality (AR) game applications, and mixed reality (MR) game applications.

[0051] In this embodiment, the virtual game can be one of the following: sandbox survival game, role-playing game, action-adventure game, shooting game, etc. Specifically, sandbox survival games allow players to explore, survive, and build in a world full of unknowns, and interact with other players; role-playing games allow players to experience a rich gaming experience in a virtual world by playing a specific character; action-adventure games typically include modules such as combat, puzzle-solving, and exploration; and shooting games allow players to defeat enemy virtual characters through shooting.

[0052] In the aforementioned virtual games, virtual characters can enter a gliding state to glide through the air, which not only enhances the game's visual appeal but also improves the player's immersion and gaming experience.

[0053] The aforementioned game scenario refers to a virtual environment provided for virtual characters to perform game actions. This game scenario may include at least one virtual character, which can be a player character controlled by a player or a non-player character not controlled by a player. It should be understood that the aforementioned game scenario may also include virtual characters controlled by other players and other non-player characters (NPCs). For ease of explanation, the following description will use a player character controlled by a player as an example, and this does not constitute a limitation of this application.

[0054] In this step, the virtual character can be in a gliding state. Gliding means the virtual character is using a designated device or skill to slow its descent, allowing it to move horizontally in the air for an extended period. Typically, a gliding virtual character can "grip" a designated device using its supporting hand. This supporting hand can be either the virtual character's left or right hand, and the designated device can be a virtual glider, a virtual paraglider, or other virtual flight equipment, such as a winged bird or a virtual flying machine.

[0055] When the virtual character is gliding, a direction change command can be triggered, instructing the virtual character to change direction during gliding. In a specific implementation, this direction change command can be generated through one of the following methods: keyboard shortcuts, voice commands, air gesture recognition, or touch operations on a specified control. Touch operations can be clicks, swipes, presses, or drags, etc. This embodiment does not specifically limit the method of generating the direction change command.

[0056] In response to a direction change command for a virtual character in a gliding state, the first direction the virtual character wants to reach can be obtained first. This first direction is the changed direction indicated by the direction change command. The first direction differs from the virtual character's current orientation. For example, if the current orientation is due east, the first direction could be due south, due north, 45° east of south, or 45° east of north, etc.

[0057] Step S102: Determine the posture weights corresponding to each gliding intermediate posture animation frame according to the first direction, wherein each gliding intermediate posture animation frame is pre-made based on the gliding basic posture animation frame.

[0058] In this embodiment of the application, during the game development stage, basic gliding posture animation frames can be pre-created, and intermediate gliding posture animation frames can also be pre-created based on the basic gliding posture animation frames. The intermediate gliding posture animation frames and the basic gliding posture animation frames serve as the original animation resources for gliding animation, used to quickly generate gliding animation during the game's runtime phase.

[0059] Among them, the gliding basic posture animation frame is an animation frame created based on the gliding basic posture of the virtual character. The gliding basic posture refers to the posture of the virtual character when it is gliding and not subject to external forces. Each gliding intermediate posture animation frame is an animation frame created by superimposing gliding intermediate postures on the gliding basic posture. The gliding intermediate posture refers to the posture of the virtual character moving and turning in various directions during gliding.

[0060] The aforementioned posture weights are used to indicate the contribution of each gliding intermediate posture animation frame to turning the virtual character from its current orientation to the first orientation.

[0061] In one optional implementation, each gliding intermediate posture animation frame includes: each movement posture animation frame created with the weight-bearing hand of the virtual character as the axis during gliding, and each rotation posture animation frame created with the character's center of mass as the rotation base point.

[0062] Among them, the above-mentioned movement posture animation frames include left tilt animation frames, right tilt animation frames, forward tilt animation frames, and backward tilt animation frames; the above-mentioned rotation posture animation frames include left rotation animation frames and right rotation animation frames.

[0063] Understandably, the center of mass refers to the weighted average position of all mass points in an object or system. If an object is uniform (i.e., its density is the same everywhere), then its center of mass is its geometric center.

[0064] The following combination Figures 3-5 Introducing the animation frames for each gliding mid-pose:

[0065] like Figure 3 The diagram shows an example of a left-tilting animation frame, a basic gliding posture animation frame, and a right-tilting animation frame in the gliding animation generation method provided in this application embodiment, including frames 3-a, 3-b, and 3-c. 3-b is a basic gliding posture animation frame (front view), in which the virtual character is not tilted relative to the central axis 10; 3-a is a left-tilting animation frame created based on the basic gliding posture animation frame 3-b, tilting to the left with the supporting hand 11 as the axis, in which the virtual character tilts to the left relative to the central axis 10; 3-c is a right-tilting animation frame created based on the basic gliding posture animation frame 3-b, tilting to the right with the supporting hand 11 as the axis, in which the virtual character tilts to the right relative to the central axis 10.

[0066] like Figure 4 The diagram shown illustrates an example of a forward-tilting animation frame, a basic gliding posture animation frame, and a backward-tilting animation frame in the gliding animation generation method provided in this application embodiment, including frames 4-a, 4-b, and 4-c. 4-b is a basic gliding posture animation frame (side view), in which the virtual character is not tilted relative to the central axis 10; 4-a is a left-tilting animation frame created based on the basic gliding posture animation frame 4-b, tilting backward with the supporting hand 11 as the axis, in which the virtual character tilts backward relative to the central axis 10; 4-c is a forward-tilting animation frame created based on the basic gliding posture animation frame 4-b, tilting forward with the supporting hand 11 as the axis, in which the virtual character tilts forward relative to the central axis 10.

[0067] like Figure 4 The diagram shown illustrates an example of a forward-tilting animation frame, a basic gliding posture animation frame, and a backward-tilting animation frame in the gliding animation generation method provided in this application embodiment, including frames 4-a, 4-b, and 4-c. 4-b is a basic gliding posture animation frame (side view), in which the virtual character is not tilted relative to the central axis 10; 4-a is a left-tilting animation frame created based on the basic gliding posture animation frame 4-b, tilting backward with the supporting hand 11 as the axis, in which the virtual character tilts backward relative to the central axis 10; 4-c is a forward-tilting animation frame created based on the basic gliding posture animation frame 4-b, tilting forward with the supporting hand 11 as the axis, in which the virtual character tilts forward relative to the central axis 10.

[0068] like Figure 5 The diagram shown illustrates an example of a left-turning animation frame, a basic gliding posture animation frame, and a right-turning animation frame in the gliding animation generation method provided in this application, including frames 5-a, 5-b, and 5-c. 5-b is the basic gliding posture animation frame (front view), and 5-b is related to the attached diagram. Figure 3 Similar to 3-b, in this animation frame, the virtual character does not rotate relative to the central axis 10; 5-a is a left-turning animation frame created based on the gliding basic posture animation frame 5-b, rotating to the left with the character's center of mass as the rotation base point; 5-c is a right-turning animation frame created based on the gliding basic posture animation frame 5-b, rotating to the right with the character's center of mass as the rotation base point.

[0069] Based on the first direction obtained in step S101, the posture weights corresponding to each gliding intermediate posture animation frame can be determined.

[0070] In one optional implementation, step S102 can be specifically implemented through the following steps:

[0071] Based on the first direction, determine the first weight of each movement pose animation frame; and

[0072] A second weight is determined for each rotation posture animation frame based on the first direction and the second direction data representing the current orientation of the virtual character.

[0073] During gliding, the virtual character exhibits free fall in the vertical direction and can move or rotate in any direction in the horizontal direction. In this embodiment, the above-mentioned movement posture animation frames can be regarded as a two-dimensional hybrid space, which includes two axes: a first axis and a second axis. The value range of both axes is set to [-1, 1]. The left-tilting animation frame and the right-tilting animation frame in each movement posture animation frame are referenced on the first axis, and the forward-tilting animation frame and the backward-tilting animation frame in each movement posture animation frame are referenced on the second axis. The gliding basic posture animation frame is referenced at the point (0, 0).

[0074] like Figure 6 The diagram shown is a schematic representation of a two-dimensional hybrid space in the gliding animation generation method provided in this application embodiment. It includes two axes: the first axis is the X-axis, and the second axis is the Y-axis. The positive direction of the X-axis represents tilting to the right, and the negative direction of the X-axis represents tilting to the left. The positive direction of the Y-axis represents tilting forward, and the negative direction of the Y-axis represents tilting backward. The value range of both the X-axis and the Y-axis is [-1, 1].

[0075] After obtaining the first direction, the corresponding value in the above two-dimensional mixed space can be determined based on the first direction. This value represents the first weight of each movement pose animation frame. The first weight includes the weights corresponding to the left tilt animation frame, right tilt animation frame, forward tilt animation frame, and backward tilt animation frame, respectively.

[0076] In combination with the above Figure 6 The calculation method for the first weight of each movement pose animation frame is introduced:

[0077] If the first direction is located in the second quadrant, and if the first direction 13 is the angle a1 to the left of the current orientation, and a1 is less than 45°, then the output value of the two-dimensional hybrid space is (-1, tan(a1)), w 左 =1, w 右 =0, w 前 =tan(a1), w 后 =0; If the first direction 12 is the angle b1 to the left of the current orientation, and b1 equals 45°, then the output value of the two-dimensional hybrid space is (-1, 1), w 左 =1, w 右 =0, w 前 =1, w 后 =0; If the first direction 14 is the angle c1 to the left of the current orientation, and c1 is greater than 45°, then the output value of the two-dimensional hybrid space is (-cot(c1), 1), w 左 =cot(c1), w 右 =0, w 前 =1, w 后 =0.

[0078] If the first direction is located in the first quadrant, and if the first direction 15 is the angle a2 to the right of the current orientation, and a2 is less than 45°, then the output value of the two-dimensional hybrid space is (1, tan(a2)), w 左 =0, w 右 =1, w 前 =tan(a2), w 后 =0; If the first direction 16 is the angle b2 to the right of the current orientation, and b2 equals 45°, then the output value of the two-dimensional hybrid space is (1, 1), w 左 =0, w 右 =1, w 前 =1, w 后 =0; If the first direction 17 is the angle c2 to the right of the current orientation, and c2 is greater than 45°, then the output value of the two-dimensional hybrid space is (cot(c2), 1), w 左 =0, w 右 =cot(c2), w 前 =1, w 后 =0.

[0079] If the first direction is located in the fourth quadrant, and if the first direction 18 is a rightward deviation of a3 from the current orientation, and a3 is less than 45°, then the output value of the two-dimensional hybrid space is (1, -tan(a3)), w 左 =0, w 右 =1, w 前 =0, w 后=tan(a3); If the first direction 19 is the rightward direction offset by an angle of b3, and b3 equals 45°, then the output value of the two-dimensional blend space is (1, -1), w 左 =0, w 右 =1, w 前 =0, w 后 =1; If the first direction 20 is the angle c3 to the right of the current orientation, and c3 is greater than 45°, then the output value of the two-dimensional hybrid space is (cot(c3), -1), w 左 =0, w 右 =cot(c3), w 前 =0, w 后 =1.

[0080] If the first direction is located in the third quadrant, and if the first direction 21 is a leftward deviation of a4 from the current orientation, and a4 is less than 45°, then the output value of the two-dimensional hybrid space is (-1, -tan(a4)), w 左 =1, w 右 =0, w 前 =0, w 后 =tan(a4); If the first direction 22 is the angle b4 to the left of the current orientation, and b4 equals 45°, then the output value of the two-dimensional hybrid space is (-1, -1), w 左 =1, w 右 =0, w 前 =0, w 后 =1; If the first direction 23 is the angle c4 to the left of the current orientation, and c4 is greater than 45°, then the output value of the two-dimensional hybrid space is (-cot(c1), -1), w 左 =cot(c1), w 右 =0, w 前 =0, w 后 =1.

[0081] Among them, w 左 For the weight of the animation frame tilted to the left, w 右 For the weight of the rightward tilt animation frame, w 前 For the weights of the forward tilt animation frames, w 后 The weights for the backward tilting animation frames.

[0082] Table 1 is an example table showing the values ​​corresponding to the first direction and the two-dimensional hybrid space, as well as the first weight of each movement posture animation frame in the gliding animation generation method provided in the embodiments of this application.

[0083] Table 1.

[0084]

[0085] In Table 1 above, when the first direction is directly to the left of the virtual character, the value of the two-dimensional blending space is (-1, 0), and the first weights of each movement animation frame are as follows: the weight of the left tilt animation frame is 1, the weight of the right tilt animation frame is 0, the weight of the forward tilt animation frame is 0, and the weight of the backward tilt animation frame is 0; when the first direction is directly to the right of the virtual character, the value of the two-dimensional blending space is (1, 0), and the first weights of each movement animation frame are as follows: the weight of the left tilt animation frame is 0, the weight of the right tilt animation frame is 1, the weight of the forward tilt animation frame is 0, and the weight of the backward tilt animation frame is 0; when the first direction is 45° forward to the left of the virtual character, the value of the two-dimensional blending space is (-1, 1), and the first weights of each movement animation frame are as follows: the weight of the left tilt animation frame is 1, the weight of the right tilt animation frame is 0, the weight of the forward tilt animation frame is 1, and the weight of the backward tilt animation frame is 0; when the first direction is 45° forward to the right of the virtual character...

[0086] At that time, the value corresponding to the two-dimensional mixed space is (1, 1), and the first weights of each movement pose animation frame are as follows: the weight of the left tilt animation frame is 0, the weight of the right tilt animation frame is 1, the weight of the forward tilt animation frame is 1, and the weight of the backward tilt animation frame is 0.

[0087] In this way, the first weight of each of the aforementioned movement pose animation frames can be obtained.

[0088] Similar to the above-mentioned movement posture animation frames as a two-dimensional hybrid space, in this embodiment, the above-mentioned turning posture animation frames can also be regarded as a one-dimensional hybrid space. The one-dimensional hybrid space includes a third axis, the value range of the third axis is [-1, 1], the left-turning animation frame and the right-turning animation frame in each rotation posture animation frame are referenced on the third axis, and the gliding basic posture animation frame is referenced at the point (0, 0).

[0089] like Figure 7 The diagram shown is a schematic representation of a one-dimensional hybrid space in the gliding animation generation method provided in this application embodiment, including a third axis, the Z-axis, where the positive direction of the Z-axis represents rotation to the right and the negative direction of the Z-axis represents rotation to the left. The value range of the Z-axis is [-1, 1].

[0090] Optionally, the above step "determining the second weight of each rotation posture animation frame based on the first direction and the second direction data representing the current orientation of the virtual character" can be implemented according to the following steps:

[0091] Determine the first yaw angle corresponding to the first direction and the second yaw angle corresponding to the current orientation;

[0092] Determine the difference between the first yaw angle and the second yaw angle;

[0093] Based on the difference, a second weight is determined for each of the rotational pose animation frames.

[0094] As is understandable, yaw angle is an angular parameter describing the rotation of an object in three-dimensional space, specifically referring to the rotation angle of the object around its vertical axis. In this embodiment, the range of the difference between the first yaw angle and the second yaw angle is [-90°, 90°], meaning that the maximum allowable yaw angle range is 90°. This makes the virtual character's movements more realistic and increases the game's realism.

[0095] After obtaining the difference between the first yaw angle and the second yaw angle, the difference can be normalized to the interval [-1, 1] to obtain the normalized value. The normalized value represents the second weight of each rotation posture animation frame. The first weight includes the weights corresponding to the left rotation animation frame and the right rotation animation frame, respectively.

[0096] Table 2 is an example table of the values ​​corresponding to the first direction and the one-dimensional hybrid space, as well as the first weight of each rotation posture animation frame in the gliding animation generation method provided in the embodiments of this application.

[0097] Table 2.

[0098]

[0099] In Table 2 above, when the first direction is directly to the left of the virtual character, the value of the one-dimensional blend space is -1, and the second weights of each movement animation frame are as follows: the weight of the left-turning animation frame is 1, and the weight of the right-turning animation frame is 0; when the first direction is directly to the right of the virtual character, the value of the one-dimensional blend space is 1, and the second weights of each movement animation frame are as follows: the weight of the left-turning animation frame is 0, and the weight of the right-turning animation frame is 1; when the first direction is 45° to the left of the virtual character, the value of the one-dimensional blend space is -0.5, and the second weights of each movement animation frame are as follows: the weight of the left-turning animation frame is 0.5, and the weight of the right-turning animation frame is 0; when the first direction is 45° to the right of the virtual character, the value of the one-dimensional blend space is 0.5, and the second weights of each movement animation frame are as follows: the weight of the left-turning animation frame is 0, and the weight of the right-turning animation frame is 0.5.

[0100] In this way, the second weight of each of the aforementioned rotational pose animation frames can be obtained.

[0101] The first and second weights mentioned above are the weights of each posture corresponding to each intermediate gliding posture animation frame.

[0102] Step S103: Determine the first geometric data corresponding to each bone in the virtual character based on the posture weights and the gliding intermediate posture animation frames.

[0103] The first geometric data includes first position data corresponding to the first position to be reached by each of the bones and first angle data corresponding to the first angle to be reached by each of the bones.

[0104] After determining the posture weights corresponding to each of the above intermediate gliding posture animation frames, the first geometric data can be determined by weighting each intermediate gliding posture animation frame according to the posture weights.

[0105] Specifically, when the pose weights include the first weights of each movement pose animation frame and the second weights of each rotation pose animation frame, the above step S103 may specifically include: weighting each of the movement pose animation frames and each of the rotation pose animation frames according to the first weights and the second weights to obtain the first geometric data corresponding to each of the bones.

[0106] It should be noted that the virtual character's change from the current orientation to the first direction is a gradual process. That is to say, when the virtual character receives a direction change command during gliding, the body cannot immediately turn to the first direction to be reached. Instead, it is a gradual process of changing from the current orientation to the first direction. In other words, the gliding animation of the virtual character changing from the current orientation to the first direction has a preset animation duration (e.g., 2 seconds).

[0107] It should be noted that the weight of each posture refers to the weight of each gliding intermediate posture animation frame corresponding to the last time node in the above preset animation duration. In other words, the first weight refers to the weight of each movement posture animation frame corresponding to the last time node in the above preset animation duration, and the second weight refers to the weight of each rotation posture animation frame corresponding to the last time node in the above preset animation duration.

[0108] In one alternative implementation, the first geometric data refers to the geometric data of each bone corresponding to the last time node in the gliding animation to be generated.

[0109] Step S104: Based on the first geometric data and the gliding basic posture animation frame, generate a gliding animation of the virtual character turning from the current orientation to the first direction.

[0110] In one alternative implementation, the gliding basic posture animation frame can be used as the starting frame for the gliding animation to be generated.

[0111] If the first geometric data is the geometric data of each bone corresponding to the last time node in the gliding animation to be generated, the position data and angle data of each bone in the intermediate frames of the gliding animation to be generated can be determined based on the first geometric data.

[0112] In one specific implementation, the position and angle data of each bone in the intermediate frame of the gliding animation to be generated can be determined by linear interpolation.

[0113] For a single bone, the position and angle data of each bone in the intermediate frame are calculated by linear interpolation as shown in the following formulas (1) and (2):

[0114]

[0115] Where P0 is the position data of the bone in the gliding basic posture animation frame, P1 is the first position data corresponding to the bone in the first geometric data, P i This is the position data of the bone in the intermediate frame, t c t0 is the playback time of the intermediate frame in the gliding animation to be generated, t1 is the playback time of the start frame in the gliding animation to be generated, and t2 is the playback time of the end frame in the gliding animation to be generated. R0 is the angle data of this bone in the gliding basic posture animation frame, R1 is the first angle data corresponding to this bone in the first geometric data, and R... i It is the angle data of the bone in the middle frame.

[0116] In this way, by moving each bone in the basic gliding posture animation frame to the position indicated by the position data in the intermediate frame and the angle indicated by the angle data, the intermediate frame of the gliding animation to be generated can be obtained; by moving each bone in the basic gliding posture animation frame to the first position indicated by the first position data and the angle indicated by the first angle data, the ending frame of the gliding animation to be generated can be obtained. Playing the starting frame, intermediate frame, and ending frame will produce a gliding animation of the virtual character smoothly changing from the current orientation to the first orientation.

[0117] The gliding animation generation method provided in this application embodiment is applied to a game scene, the game scene including at least one virtual character. The method includes: in response to a direction change command for the virtual character in a gliding state, obtaining a first direction to be reached by the virtual character; determining each posture weight corresponding to each intermediate gliding posture animation frame based on the first direction, wherein each intermediate gliding posture animation frame is pre-made based on a basic gliding posture animation frame; determining first geometric data corresponding to each bone in the virtual character based on each posture weight and each intermediate gliding posture animation frame, wherein the first geometric data includes first position data corresponding to a first position to be reached by each bone and first angle data corresponding to a first angle to be reached by each bone; and generating a gliding animation of the virtual character turning from the current orientation to the first direction based on the first geometric data and the basic gliding posture animation frame.

[0118] As can be seen, the gliding animation generation method provided in this application pre-creates intermediate gliding posture animation frames using basic gliding posture animation frames. This splits the animation resources during gliding into intermediate gliding posture animation frames and basic gliding posture animation frames. When the virtual character needs to change direction during gliding, the posture weights of each intermediate gliding posture animation frame are determined based on the first direction the virtual character wants to reach. Since each posture weight indicates the contribution of each intermediate gliding posture animation frame in turning the virtual character from its current orientation to the first direction, mixing them according to the weights yields the position and angle data of each bone corresponding to the virtual character reaching the first direction, thereby generating a gliding animation of the virtual character turning from its current orientation to the first direction. On one hand, mixing the pre-created intermediate gliding posture animation frames results in high-quality gliding animation; on the other hand, pre-creating a small number of intermediate gliding posture animation frames significantly reduces production costs, achieving rich and realistic aerial gliding effects with minimal resources. Therefore, the gliding animation generation method provided in this application can generate high-quality gliding animation while reducing production costs.

[0119] In an optional implementation, the aforementioned first geometric data refers to the position and angle data of each bone at each time point in the gliding animation to be generated; the aforementioned step "weighting each of the movement posture animation frames and each of the rotation posture animation frames according to the first weight and the second weight to obtain the first geometric data corresponding to each bone" may include the following steps:

[0120] Based on the first weight, determine the first sub-weight corresponding to each time node in the gliding animation to be generated for each of the aforementioned movement posture animation frames;

[0121] Based on the second weight, determine the second sub-weight corresponding to each time node in the gliding animation to be generated for each of the rotation posture animation frames;

[0122] According to the first sub-weight and the second sub-weight, each of the moving posture animation frames and each of the rotating posture animation frames are weighted to obtain the first geometric data corresponding to each time node of each bone in the gliding animation to be generated.

[0123] As described above, the virtual character's shift from its current orientation to the first direction is a gradual process. In this embodiment, a first sub-weight corresponding to each time point in the gliding animation to be generated can be determined based on a first weight; and a second sub-weight corresponding to each time point in the gliding animation to be generated can be determined based on a second weight.

[0124] In a specific implementation, the first sub-weights corresponding to each time node can be determined by the uniform change of the first sub-weights. The first sub-weight corresponding to the last time node is the first weight, and the difference between the first sub-weights of any two adjacent time nodes is the same. Similarly, the second sub-weights corresponding to each time node can be determined by the uniform change of the second sub-weights. The second sub-weight corresponding to the last time node is the second weight, and the difference between the second sub-weights of any two adjacent time nodes is the same.

[0125] For example, when the first direction is 45° to the left of the current orientation of the virtual character, the first weights of each movement animation frame are as follows: the weight of the left-tilting animation frame is 1, and the weight of the forward-tilting animation frame is 1. Assuming that there are 5 time nodes within the preset animation duration of the gliding animation to be generated, the first sub-weight of the first time node is: the weight of the left-tilting animation frame is 0.2, and the weight of the forward-tilting animation frame is 0.2; the first sub-weight of the second time node is: the weight of the left-tilting animation frame is 0.4, and the weight of the forward-tilting animation frame is 0.4; the first sub-weight of the third time node is: the weight of the left-tilting animation frame is 0.6, and the weight of the forward-tilting animation frame is 0.6; the first sub-weight of the fourth time node is: the weight of the left-tilting animation frame is 0.8, and the weight of the forward-tilting animation frame is 0.8; and the first sub-weight of the fifth time node is: the weight of the left-tilting animation frame is 1, and the weight of the forward-tilting animation frame is 1.

[0126] In this way, for a given time point, the animation frames of each movement posture and each rotation posture can be weighted and summed according to the corresponding first and second sub-weights to obtain the position and angle data of each bone at each time point in the gliding animation to be generated, which is also the first geometric data of each bone at each time point in the gliding animation to be generated.

[0127] This setup determines the sub-weight of each time node within the preset animation duration of the gliding animation to be generated through the first and second weights. Then, it weights each movement posture animation frame and each rotation posture animation frame according to the sub-weights, thereby obtaining the position data and angle data of the skeleton at each time node. This generates an animation of the virtual character changing from the current orientation to the first direction over a period of time. The turning animation during the gliding process is achieved with very few animation resources, reducing production costs.

[0128] In one optional implementation, a spring-damping system can be applied to generate an animation effect where the virtual character gradually decays and oscillates after turning to the first direction. Specifically, a spring-damping coefficient less than 1 can be preset. Because a spring-damping system is used in the gliding animation, each change in direction by the virtual character will produce an overshoot oscillation animation effect upon reaching the target direction. This setting simulates the animation effect of a virtual character overshooting and gradually decaying oscillation after reaching a certain position while moving in the air, making the gliding animation consistent with real-world physics and thus enhancing the player's visual experience.

[0129] In an optional implementation, step S104 can be achieved by the following steps S20 and S21:

[0130] Step S20: Generate gliding oscillation posture animation based on the gliding basic posture animation frame and the left and right rotation amplitude parameters that change over time;

[0131] Step S21: Based on the first geometric data and the gliding oscillation posture animation, generate a gliding animation of the virtual character turning from the current orientation to the first direction.

[0132] In this embodiment, an animation curve corresponding to the left and right rotation amplitude parameters that change over time can be pre-created. In this animation curve, the horizontal axis is the preset animation duration, and the vertical axis is the left and right rotation amplitude parameters. The positive direction of the vertical axis represents the right rotation amplitude parameter, and the negative direction of the vertical axis represents the left rotation amplitude parameter. The left and right rotation amplitude parameters are values ​​that oscillate between the positive and negative axes according to the animation rhythm. The animation rhythm can be understood as the timing arrangement and speed change of the action movement in the animation.

[0133] By using the left and right rotation amplitude parameters that change with time in the above animation curve, the character's skeleton in the gliding basic posture animation frame is slightly rotated left and right, generating a gliding oscillating posture animation. In this gliding oscillating posture animation, the virtual character's body swaying process is uneven, and the rotation amplitude at each adjacent time node is not the same, thus simulating the random swaying caused by uneven force during gliding in the real world.

[0134] Optionally, step S20 above can be achieved through the following steps:

[0135] Based on the gliding basic posture animation frame and the left and right rotation amplitude parameters that change over time, determine the gliding oscillation posture animation frame corresponding to each time node;

[0136] Determine the playback rate of the gliding animation to be generated;

[0137] Play the gliding oscillation posture animation frames according to the playback rate to obtain the gliding oscillation posture animation.

[0138] It should be noted that each time point in the gliding oscillation posture animation to be generated has a corresponding left and right rotation amplitude parameter. By controlling the rotation of each bone in the gliding basic posture animation frame through the left and right rotation amplitude parameter corresponding to each time point, the gliding oscillation posture animation frame with left or right rotation oscillation effect relative to the gliding basic posture is obtained.

[0139] Next, the playback rate of the gliding animation to be generated can be determined. The playback rate of an animation refers to the number of frames played per unit of time, or the time scaling factor; the playback rate determines how fast or slow the animation appears. A faster playback rate makes the animation appear faster, with all actions and changes completed in a shorter time. For example, a virtual character's turning motion will appear more rapid and abrupt at a faster playback rate.

[0140] As one implementation method, the playback rate of the gliding animation to be generated can be determined through the following steps:

[0141] Obtain the gliding speed of the virtual character;

[0142] The playback rate of the gliding animation to be generated is determined based on the gliding speed and the preset maximum speed.

[0143] In this embodiment, the playback rate of the gliding animation can be positively correlated with the gliding speed of the virtual character; the faster the virtual character glides, the faster the playback rate of the gliding animation.

[0144] First, obtain the gliding speed of the virtual character. Then, calculate the ratio between the horizontal component of the gliding speed and the preset maximum speed. Based on this ratio, determine the playback rate of the gliding animation to be generated.

[0145] Specifically, the ratio of the horizontal component of the gliding speed to the preset maximum speed, plus 1, can be used as a multiple of the original playback rate. For example, when the player does not input movement speed for the virtual character during gliding, the horizontal component of the gliding speed is 0, and the ratio of the horizontal component of the gliding speed to the preset maximum speed is 0. In this case, the playback rate of the gliding animation to be generated is 1 times the original playback rate, meaning the gliding animation plays at the original rhythm. When the horizontal component of the gliding speed is greater than 0, the playback rate can be increased accordingly as the gliding speed increases, with a maximum playback rate of 2 times the original playback rate. When the horizontal component of the gliding speed is the preset maximum speed, the ratio of the horizontal component of the gliding speed to the preset maximum speed is 1, and the playback rate of the gliding animation to be generated is 2 times the original playback rate.

[0146] After determining the playback rate of the gliding animation to be generated, the gliding oscillation posture animation frames can be played at that playback rate to obtain the gliding oscillation posture animation.

[0147] With this setting, the faster the playback speed, the faster the playback speed of the above animation curves, and the more frequently the virtual character rotates left and right. This can simulate the animation effect of the virtual character experiencing greater wind resistance when accelerating in the air, gradually intensifying the swaying of the body, and further enhancing the detail in the gliding animation.

[0148] After generating the gliding oscillation posture animation, the gliding oscillation posture animation can be used as the basis for the gliding animation to be generated. Combined with the first geometric data mentioned above, a gliding animation that shows the virtual character's body naturally swaying during gliding and turns from the current orientation to the first direction can be obtained.

[0149] In one possible implementation, step S21 above can be achieved through the following steps:

[0150] Based on the first geometric data and the second geometric data corresponding to each bone in the gliding basic posture animation frame, determine the motion data to be executed for each bone.

[0151] Based on the motion data, each of the bones in the gliding oscillation posture animation is driven to move, resulting in a gliding animation of the virtual character turning from the current orientation to the first direction.

[0152] In this implementation, the second geometric data corresponding to each bone in the gliding basic posture animation frame can be obtained. The second geometric data includes the second position data and the second angle data corresponding to each bone.

[0153] Subsequently, based on the first geometric data determining the position and angle data of each bone at each time point in the gliding animation without oscillation effects to be generated, or the first geometric data being the position and angle data at each time point in the gliding animation without oscillation effects to be generated, the difference between the position data and the second position data at each time point in the gliding animation without oscillation effects to be generated, and the difference between the angle data and the second angle data at each time point in the gliding animation without oscillation effects to be generated, can be obtained to obtain the dynamic part of the position and angle data of each bone at each time point in the gliding animation without oscillation effects to be generated, which differs from the basic gliding posture. This dynamic part is the motion data to be executed by each bone at each time point. This motion data represents the movement that each bone needs to perform at each time point relative to the position and angle data in the basic gliding posture animation frame during the process of the virtual character changing from the current orientation to the first direction.

[0154] Subsequently, by using the motion data to be executed by each bone at each time point, the corresponding movements of each bone in the gliding oscillation posture animation are controlled. Since each bone already has a left- or right-rotational oscillation effect relative to the basic gliding posture animation frame at each time point, by superimposing the motion data of each bone at each time point in each frame of the gliding oscillation posture animation, it is possible to obtain a gliding animation in which the virtual character has a left- or right-rotational oscillation effect at each time point, and the overall appearance changes from the current orientation to the first direction.

[0155] Table 3 is an example table of geometric data of each bone in different animation frames in the gliding animation generation method provided in the embodiments of this application.

[0156] Table 3.

[0157]

[0158] In Table 3 above, the preset animation duration includes four time points: t0, t1, t2, and t3. The second geometric data of each bone in the gliding basic posture animation frame is S. 基After controlling the rotation of each bone in the gliding basic posture animation frame by adjusting the left and right rotation amplitude parameters at each time point, the geometric data of each bone at time point t0 is obtained as S0, at time point t1 as S1, at time point t2 as S2, and at time point t3 as S3. The geometric data of each bone at time point t0 in the gliding animation to be generated without oscillation effects is obtained as S4, at time point t1 as S5, at time point t2 as S6, and at time point t3 as S7. The geometric data of each bone at each time point in the gliding animation to be generated without oscillation effects is then compared with the second geometric data S of each bone in the gliding basic posture animation frame. 基 By subtracting the values, we obtain the motion data of each bone at time t0 during the process of changing from the current orientation to the first orientation, which is S4-S. 基 The motion data at time t1 is S5-S 基 The motion data at time point t2 is S6-S 基 The motion data at time point t3 is S7-S 基 The motion data of each bone at each time point during the transition from the current orientation to the first orientation is assigned to the gliding oscillation posture animation, resulting in the geometric data of each bone at time point t0 in the gliding animation with added oscillation effects to be generated, which is S4-S. 基 The geometric data for time nodes S0 and t1 are S5-S 基 The geometric data for time nodes S1 and t2 are S6-S 基 The geometric data for time nodes S2 and t3 are S7-S 基 +S 3。

[0159] This setup, without disrupting the animation of the virtual character's random swaying during gliding and oscillating, adds animation effects of turning, deflecting, and tilting the direction of movement, further achieving rich detail in the character's gliding process with minimal resources.

[0160] In an optional implementation, prior to step S101, the gliding animation generation method provided in this application embodiment may further include the following steps:

[0161] When the virtual character is in a non-gliding state, in response to a gliding command for the virtual character, a pre-made gliding ready-to-glide animation frame is used as the starting frame of the first animation to be generated, and the gliding basic posture animation frame is used as the ending frame of the first animation to be generated, thereby generating the first animation of the virtual character entering the gliding state from the non-gliding state.

[0162] In this embodiment, gliding posture animation frames can be pre-created. For example... Figure 8 The image shown is a schematic diagram of an example of a gliding pose animation frame in the gliding animation generation method provided in this application embodiment, in which the virtual character is in a pose of charging up for a jump.

[0163] When the virtual character is not in a gliding state, a gliding command can be generated to instruct the virtual character to enter a gliding state. Specifically, the gliding command can be generated through one of the following methods: keyboard shortcuts, voice commands, air gesture recognition, or touch operations on a specified control. Touch operations can be clicks, swipes, presses, or drags, etc. This embodiment does not specifically limit the method of generating the gliding command.

[0164] When a gliding command is received for a virtual character, the aforementioned gliding ready-to-glide animation frame can be used as the starting frame of the first animation to be generated, and the aforementioned gliding basic posture animation frame can be used as the ending frame of the first animation to be generated, thus generating the first animation of the virtual character entering the gliding state from the non-gliding state.

[0165] Optionally, the above-mentioned "using the pre-made gliding posture animation frame as the starting frame of the first animation to be generated, and using the gliding basic posture animation frame as the ending frame of the first animation to be generated, to generate the first animation of the virtual character entering the gliding state from the non-gliding state" includes the following steps:

[0166] Obtain the duration configured for the virtual character to glide from a non-gliding state;

[0167] Based on the gliding ready posture animation frame and the gliding basic posture animation frame, determine the third geometric data corresponding to each of the bones at each time node of the duration;

[0168] Based on the third geometric data, the first animation is generated showing the virtual character transitioning from a non-gliding state to a gliding state.

[0169] The aforementioned duration refers to the transition time between the start frame and the end frame, that is, the transition time from the gliding poise animation frame to the gliding base pose animation frame. Specifically, this duration refers to the time required for the position and angle of each bone of the virtual character to change from the gliding poise animation frame to the position and angle in the gliding base pose animation frame. This duration can be set to any floating-point number, such as 0.2 seconds.

[0170] In this embodiment, by using the gliding ready-to-go pose animation frame as the starting frame and the gliding basic pose animation frame as the ending frame, the third geometric data of each bone of the virtual character at each time node of the first animation to be generated can be determined. The third geometric data includes the third position data and the third angle data of each bone.

[0171] In this way, by using the third geometric data of each bone of the virtual character at each time point of the first animation to be generated, the first animation of the virtual character entering the gliding state from the non-gliding state can be generated.

[0172] Optionally, the above step "determining the third geometric data corresponding to each of the bones at each time point of the duration based on the gliding ready posture animation frame and the gliding basic posture animation frame" can be implemented in the following way:

[0173] Obtain the fourth geometric data corresponding to each of the bones in the gliding and accumulating posture animation frame;

[0174] Determine the difference data between the fourth geometric data and the second geometric data corresponding to each of the bones in the gliding basic posture animation frame;

[0175] Determine the interpolation factor corresponding to each time point of the duration;

[0176] Based on the interpolation factor, the difference data, and the second geometric data, the third geometric data corresponding to each of the bones at each time point of the duration is determined.

[0177] First, the fourth geometric data corresponding to each bone in the gliding and accumulating posture animation frame can be obtained. The fourth geometric data includes the fourth position data and the fourth angle data of each bone.

[0178] Next, the difference data between the fourth geometric data and the second geometric data can be calculated, that is, the position difference and rotation difference of each bone between the initial state and the final state of the first animation can be calculated.

[0179] Then, the interpolation factor corresponding to each time node within the duration of the first animation to be generated can be calculated; in this embodiment, the interpolation factor corresponding to each time node can be calculated by the fourth power deceleration easing function.

[0180] Then, for each bone at each time point, interpolation is performed using the interpolation factor and the corresponding position difference, and then the position information of the initial state (that is, the fourth position data in the fourth geometric data) is superimposed to calculate the position information of each bone at each time point. This position information is the third position data in the third geometric data.

[0181] Then, for each bone at each time point, interpolation is performed using the interpolation factor and the corresponding rotation difference, and then the rotation information of the initial state (i.e., the fourth angle data in the fourth geometric data) is superimposed to calculate the rotation information of each bone at each time point. This rotation information is the third angle data in the third geometric data.

[0182] The 4th power easing function (easeOutQuart) is a commonly used easing function to simulate the effect of an object gradually slowing down at the end of an animation or transition. This function allows the animation to start faster and gradually slow down at the end, resulting in a more natural and smoother visual effect.

[0183] It should be noted that the aforementioned fourth-power deceleration and easing function causes the generated first animation to change rapidly in the initial stage, then gradually slow down, and finally stop very smoothly, providing a natural acceleration and deceleration effect. Since the starting frame of the first animation (the gliding stance animation frame) depicts the virtual character preparing to jump in the air, and the virtual character's posture is relatively relaxed during jumps or falls, the aforementioned fourth-power deceleration and easing function can simulate the effect of the character suddenly accelerating upwards due to significant air resistance when opening their glider, and then gradually smoothing out. Furthermore, the aforementioned fourth-power deceleration and easing function allows for smooth transitions between start and end frames with inconsistent postures.

[0184] In an optional implementation, the gliding animation generation method provided in this application embodiment may further include the following steps:

[0185] Dynamic rigid bodies are created for each of the multiple first joints in each of the bones, wherein each dynamic rigid body has a corresponding spring frequency;

[0186] Determine the rigid body physics weights to be added to the gliding animation;

[0187] Based on the rigid body physical weights, the spring frequency, and the positions of each of the first joints in the gliding animation, the target positions of each of the first joints after adding rigid body constraints are determined.

[0188] The positions of each of the first joints in the gliding animation are changed to the target positions to obtain the target animation.

[0189] In a physics engine, a rigid body is an object with a fixed shape and mass that can be affected by forces and torques, thus producing motion. The aforementioned "first joint" refers to the major joints in the skeleton of a virtual character. For example, the first joint may include the joint between the waist and hips, the joint between the hip and thigh (also called the hip joint), the joint between the thigh and calf (also called the knee joint), and the joint between the calf and foot (also called the ankle joint), etc.

[0190] In this embodiment, a dynamic rigid body can be created for each first joint, and reasonable constraint angles can be set. When the dynamic rigid body is affected by the forces and collisions of the physics engine, it can move according to the laws of physics. For example, when a virtual character jumps and lands, the rigid bodies of the legs and waist will naturally cushion and rebound according to the ground reaction force and gravity.

[0191] For parts such as the head and arms, kinematic rigid bodies can be set up. The position and rotation of a kinematic rigid body can be directly controlled by the animation controller, and it is not affected by the physics engine.

[0192] In this way, by creating dynamic rigid bodies for multiple first joints, the waist, hips, legs, and feet of the virtual character are affected by the physics engine, exhibiting natural physical effects such as cushioning, rebounding, and swaying. At the same time, parts such as the head and arms still maintain precise control over the animation, ensuring the smoothness and naturalness of the movements.

[0193] During the gliding phase, as the virtual character enters gliding mode, the physical weights of each rigid body are gradually increased from 0 to 1. This process can be achieved through interpolation functions to ensure a smooth transition. During gliding, the spring frequencies of the rigid bodies in different parts increase sequentially from top to bottom; that is, the spring frequency of the waist rigid body is the lowest, and the spring frequency of the foot rigid body is the highest. This allows the rigid bodies closer to the extremities to have a greater range of motion, thereby increasing the naturalness and realism of the virtual character. When the distance between the virtual character and the ground falls below a certain threshold, the physical weights of the rigid bodies are gradually deactivated, allowing the virtual character's limbs to fully return to their animated positions, ensuring a stable animation before landing.

[0194] In this way, by using the rigid body physical weights, the spring frequencies of each dynamic rigid body, and the positions of each first joint in the gliding animation, the target position of each first joint after adding rigid body constraints can be determined. Thus, the position of the first joint in the gliding animation can be changed to the target position, thereby obtaining the target animation.

[0195] This setup allows for more realistic physics effects during virtual character gliding and ensures a smooth transition back to animation before landing. For example, the virtual character's legs can collide and bounce off each other during gliding, enhancing the animation's visual appeal and further increasing realism.

[0196] The above is an introduction to the method for generating gliding animation provided in the first embodiment of this application.

[0197] Corresponding to the gliding animation generation method provided in the first embodiment of this application, the second embodiment of this application also provides a gliding animation generation apparatus, applied to a game scene, wherein the game scene includes at least one virtual character, such as... Figure 9 As shown, the gliding animation generation device 900 includes:

[0198] Acquisition unit 901 is configured to acquire a first direction to be reached by the virtual character in a gliding state in response to a direction change command for the virtual character.

[0199] The first determining unit 902 is used to determine the posture weights corresponding to each gliding intermediate posture animation frame according to the first direction, wherein each gliding intermediate posture animation frame is pre-made based on the gliding basic posture animation frame.

[0200] The second determining unit 903 is used to determine the first geometric data corresponding to each bone in the virtual character based on each posture weight and each gliding intermediate posture animation frame, wherein the first geometric data includes first position data corresponding to the first position to be reached by each bone and first angle data corresponding to the first angle to be reached by each bone.

[0201] The generation unit 904 is used to generate a gliding animation of the virtual character turning from the current orientation to the first direction based on the first geometric data and the gliding basic posture animation frame.

[0202] Optionally, the generation unit 904 is specifically used for:

[0203] Based on the gliding basic posture animation frames and the left and right rotation amplitude parameters that change over time, a gliding oscillation posture animation is generated;

[0204] Based on the first geometric data and the gliding oscillation posture animation, a gliding animation is generated in which the virtual character turns from the current orientation to the first direction.

[0205] Optionally, the generation unit 904 is specifically used for:

[0206] Based on the first geometric data and the second geometric data corresponding to each bone in the gliding basic posture animation frame, determine the motion data to be executed for each bone.

[0207] Based on the motion data, each of the bones in the gliding oscillation posture animation is driven to move, resulting in a gliding animation of the virtual character turning from the current orientation to the first direction.

[0208] Optionally, the generation unit 904 is specifically used for:

[0209] Based on the gliding basic posture animation frame and the left and right rotation amplitude parameters that change over time, determine the gliding oscillation posture animation frame corresponding to each time node;

[0210] Determine the playback rate of the gliding animation to be generated;

[0211] Play the gliding oscillation posture animation frames according to the playback rate to obtain the gliding oscillation posture animation.

[0212] Optionally, the generation unit 904 is specifically used for:

[0213] Obtain the gliding speed of the virtual character;

[0214] The playback rate of the gliding animation to be generated is determined based on the gliding speed and the preset maximum speed.

[0215] Optionally, each of the gliding intermediate posture animation frames includes each movement posture animation frame made with the weight-bearing hand of the virtual character as the axis during gliding, and each rotation posture animation frame made with the character's center of mass as the rotation base point.

[0216] The movement animation frames include left tilt animation frames, right tilt animation frames, forward tilt animation frames, and backward tilt animation frames; the rotation animation frames include left rotation animation frames and right rotation animation frames.

[0217] Optionally, the first determining unit 902 is specifically used for:

[0218] Based on the first direction, determine the first weight of each of the movement pose animation frames; and

[0219] Based on the first direction and the second direction data representing the current orientation of the virtual character, a second weight is determined for each of the rotation posture animation frames;

[0220] The second determining unit 903 is specifically used for:

[0221] Based on the first weight and the second weight, each of the movement posture animation frames and each of the rotation posture animation frames are weighted to obtain the first geometric data corresponding to each of the bones.

[0222] Optionally, the generation unit 904 is further configured to:

[0223] When the virtual character is in a non-gliding state, in response to a gliding command for the virtual character, a pre-made gliding ready-to-glide animation frame is used as the starting frame of the first animation to be generated, and the gliding basic posture animation frame is used as the ending frame of the first animation to be generated, thereby generating the first animation of the virtual character entering the gliding state from the non-gliding state.

[0224] Optionally, the generation unit 904 is further specifically used for:

[0225] Obtain the duration configured for the virtual character to glide from a non-gliding state;

[0226] Based on the gliding ready posture animation frame and the gliding basic posture animation frame, determine the third geometric data corresponding to each of the bones at each time node of the duration;

[0227] Based on the third geometric data, the first animation is generated showing the virtual character transitioning from a non-gliding state to a gliding state.

[0228] Optionally, the generation unit 904 is further specifically used for:

[0229] Obtain the fourth geometric data corresponding to each of the bones in the gliding and accumulating posture animation frame;

[0230] Determine the difference data between the fourth geometric data and the second geometric data corresponding to each of the bones in the gliding basic posture animation frame;

[0231] Determine the interpolation factor corresponding to each time point of the duration;

[0232] Based on the interpolation factor, the difference data, and the second geometric data, the third geometric data corresponding to each of the bones at each time point of the duration is determined.

[0233] Optionally, the second determining unit 903 is specifically used for:

[0234] Based on the first weight, determine the first sub-weight corresponding to each time node in the gliding animation to be generated for each of the aforementioned movement posture animation frames;

[0235] Based on the second weight, determine the second sub-weight corresponding to each time node in the gliding animation to be generated for each of the rotation posture animation frames;

[0236] According to the first sub-weight and the second sub-weight, each of the moving posture animation frames and each of the rotating posture animation frames are weighted to obtain the first geometric data corresponding to each time node of each bone in the gliding animation to be generated.

[0237] Optionally, the generation unit 904 is further configured to:

[0238] Dynamic rigid bodies are created for each of the multiple first joints in each of the bones, wherein each dynamic rigid body has a corresponding spring frequency;

[0239] Determine the rigid body physics weights to be added to the gliding animation;

[0240] Based on the rigid body physical weights, the spring frequency, and the positions of each of the first joints in the gliding animation, the target positions of each of the first joints after adding rigid body constraints are determined.

[0241] The positions of each of the first joints in the gliding animation are changed to the target positions to obtain the target animation.

[0242] Corresponding to the gliding animation generation method provided in the first embodiment of this application, the third embodiment of this application also provides an electronic device for generating gliding animations.

[0243] like Figure 10 The diagram shown is a structural block diagram of an example of an electronic device for data processing provided in an embodiment of this application.

[0244] In this embodiment, an optional hardware structure of the electronic device 1000 may be as follows: Figure 10 As shown, it includes: at least one processor 1001, at least one memory 1002 and at least one communication bus 1005; the memory 1002 contains a program 1003 and data 1004.

[0245] Bus 1005 can be a communication device for transmitting data between components within electronic device 1000, such as an internal bus (e.g., CPU-memory bus, where the processor is the central processing unit, or CPU for short) or an external bus (e.g., a universal serial bus port or a peripheral component interconnection fast port).

[0246] Additionally, the electronic device also includes at least one network interface 1006 and at least one peripheral interface 1007. The network interface 1006 provides wired or wireless communication with an external network 1008 (e.g., the Internet, intranet, local area network, mobile communication network, etc.). In some embodiments, the network interface 1006 may include any number of network interface controllers (NICs), radio frequency (RF) modules, repeaters, transceivers, modems, routers, gateways, any combination of wired network adapters, wireless network adapters, Bluetooth adapters, infrared adapters, near field communication (NFC) adapters, cellular network chips, etc.

[0247] Peripheral interface 1007 is used to connect to peripherals, such as peripheral 1 in the figure. Figure 10 1009 in the middle), peripheral 2 ( Figure 10 1010 in the middle) and peripheral 3 ( Figure 10 (1011 in the original text). Peripherals are peripheral devices, which may include, but are not limited to, cursor control devices (such as mice, touchpads, or touchscreens), keyboards, displays (such as cathode ray tube displays, liquid crystal displays), displays or light-emitting diode displays, video input devices (such as cameras or input interfaces coupled to video files), etc.

[0248] The processor 1001 may be a CPU, an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.

[0249] The memory 1002 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage device.

[0250] The processor 1001 calls the program and data stored in the memory 1002 and executes the following steps:

[0251] In response to a direction change command for the virtual character in a gliding state, a first direction to be reached by the virtual character is obtained;

[0252] Based on the first direction, determine the posture weights corresponding to each intermediate gliding posture animation frame, wherein each intermediate gliding posture animation frame is pre-made based on the basic gliding posture animation frame;

[0253] Based on the posture weights and the gliding intermediate posture animation frames, the first geometric data corresponding to each bone in the virtual character is determined, wherein the first geometric data includes the first position data corresponding to the first position to be reached by each bone and the first angle data corresponding to the first angle to be reached by each bone.

[0254] Based on the first geometric data and the gliding basic posture animation frame, a gliding animation is generated in which the virtual character turns from the current orientation to the first direction.

[0255] Corresponding to the gliding animation generation method provided in the first embodiment of this application, the fourth embodiment of this application provides a computer-readable storage medium storing a program for generating gliding animations. This program is executed by a processor to perform the following steps:

[0256] In response to a direction change command for the virtual character in a gliding state, a first direction to be reached by the virtual character is obtained;

[0257] Based on the first direction, determine the posture weights corresponding to each intermediate gliding posture animation frame, wherein each intermediate gliding posture animation frame is pre-made based on the basic gliding posture animation frame;

[0258] Based on the posture weights and the gliding intermediate posture animation frames, the first geometric data corresponding to each bone in the virtual character is determined, wherein the first geometric data includes the first position data corresponding to the first position to be reached by each bone and the first angle data corresponding to the first angle to be reached by each bone.

[0259] Based on the first geometric data and the gliding basic posture animation frame, a gliding animation is generated in which the virtual character turns from the current orientation to the first direction.

[0260] It should be noted that for a detailed description of the apparatus, electronic device and computer-readable storage medium provided in the second, third and fourth embodiments of this application, please refer to the relevant description of the first embodiment of this application, which will not be repeated here.

[0261] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.

[0262] In a typical configuration, a node device in a blockchain includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0263] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0264] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage media, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.

[0265] 2. Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied 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.

[0266] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.

Claims

1. A method for generating gliding animation, characterized in that, Applied to a game scenario, wherein the game scenario includes at least one virtual character, the method includes: In response to a direction change command for the virtual character in a gliding state, a first direction to be reached by the virtual character is obtained; Based on the first direction, determine the posture weights corresponding to each intermediate gliding posture animation frame, wherein each intermediate gliding posture animation frame is pre-made based on the basic gliding posture animation frame; Based on the posture weights and the gliding intermediate posture animation frames, the first geometric data corresponding to each bone in the virtual character is determined, wherein the first geometric data includes the first position data corresponding to the first position to be reached by each bone and the first angle data corresponding to the first angle to be reached by each bone. Based on the first geometric data and the gliding basic posture animation frame, generate a gliding animation of the virtual character turning from the current orientation to the first direction; Dynamic rigid bodies are created for each of the multiple first joints in each of the bones, wherein each dynamic rigid body has a corresponding spring frequency; Determine the rigid body physics weights to be added to the gliding animation; Based on the rigid body physical weights, the spring frequency, and the positions of each of the first joints in the gliding animation, the target positions of each of the first joints after adding rigid body constraints are determined. The positions of each of the first joints in the gliding animation are changed to the target positions to obtain the target animation.

2. The method according to claim 1, characterized in that, The step of generating a gliding animation of the virtual character turning from its current orientation to the first direction based on the first geometric data and the gliding basic posture animation frames includes: Based on the gliding basic posture animation frames and the left and right rotation amplitude parameters that change over time, a gliding oscillation posture animation is generated; Based on the first geometric data and the gliding oscillation posture animation, a gliding animation is generated in which the virtual character turns from the current orientation to the first direction.

3. The method according to claim 2, characterized in that, The step of generating a gliding animation of the virtual character turning from its current orientation to the first direction based on the first geometric data and the gliding oscillation posture animation includes: Based on the first geometric data and the second geometric data corresponding to each bone in the gliding basic posture animation frame, determine the motion data to be executed for each bone. Based on the motion data, each of the bones in the gliding oscillation posture animation is driven to move, resulting in a gliding animation of the virtual character turning from the current orientation to the first direction.

4. The method according to claim 2, characterized in that, The step of generating a gliding oscillation posture animation based on the gliding basic posture animation frame and the time-varying left and right rotation amplitude parameters includes: Based on the gliding basic posture animation frame and the left and right rotation amplitude parameters that change over time, determine the gliding oscillation posture animation frame corresponding to each time node; Determine the playback rate of the gliding animation to be generated; Play the gliding oscillation posture animation frames according to the playback rate to obtain the gliding oscillation posture animation.

5. The method according to claim 4, characterized in that, Determining the playback rate of the gliding animation to be generated includes: Obtain the gliding speed of the virtual character; The playback rate of the gliding animation to be generated is determined based on the gliding speed and the preset maximum speed.

6. The method according to claim 1, characterized in that, Each of the gliding intermediate posture animation frames includes each movement posture animation frame created with the weight-bearing hand of the virtual character as the axis during gliding, and each rotation posture animation frame created with the character's center of mass as the rotation base point. The movement animation frames include left tilt animation frames, right tilt animation frames, forward tilt animation frames, and backward tilt animation frames; the rotation animation frames include left rotation animation frames and right rotation animation frames.

7. The method according to claim 6, characterized in that, The step of determining the posture weights corresponding to each gliding intermediate posture animation frame based on the first direction includes: Based on the first direction, determine the first weight of each of the movement pose animation frames; and Based on the first direction and the second direction data representing the current orientation of the virtual character, a second weight is determined for each of the rotation posture animation frames; The step of determining the first geometric data corresponding to each bone in the virtual character based on each posture weight and each gliding intermediate posture animation frame includes: Based on the first weight and the second weight, each of the movement posture animation frames and each of the rotation posture animation frames are weighted to obtain the first geometric data corresponding to each of the bones.

8. The method according to claim 1, characterized in that, Before obtaining the first direction to be reached by the virtual character in response to a direction change command for the virtual character in a gliding state, the method further includes: When the virtual character is in a non-gliding state, in response to a gliding command for the virtual character, a pre-made gliding ready-to-glide animation frame is used as the starting frame of the first animation to be generated, and the gliding basic posture animation frame is used as the ending frame of the first animation to be generated, thereby generating the first animation of the virtual character entering the gliding state from the non-gliding state.

9. The method according to claim 8, characterized in that, The step of generating the first animation of the virtual character transitioning from a non-gliding state to a gliding state by using a pre-made gliding posture animation frame as the starting frame of the first animation to be generated, and using the gliding basic posture animation frame as the ending frame of the first animation to be generated, includes: Obtain the duration configured for the virtual character to glide from a non-gliding state; Based on the gliding ready posture animation frame and the gliding basic posture animation frame, determine the third geometric data corresponding to each of the bones at each time node of the duration; Based on the third geometric data, the first animation is generated showing the virtual character transitioning from a non-gliding state to a gliding state.

10. The method according to claim 9, characterized in that, The step of determining the third geometric data corresponding to each skeleton at each time point of the duration based on the gliding ready posture animation frame and the gliding basic posture animation frame includes: Obtain the fourth geometric data corresponding to each of the bones in the gliding and accumulating posture animation frame; Determine the difference data between the fourth geometric data and the second geometric data corresponding to each of the bones in the gliding basic posture animation frame; Determine the interpolation factor corresponding to each time point of the duration; Based on the interpolation factor, the difference data, and the second geometric data, the third geometric data corresponding to each of the bones at each time point of the duration is determined.

11. The method according to claim 7, characterized in that, The step of weighting each of the movement pose animation frames and each of the rotation pose animation frames according to the first weight and the second weight to obtain the first geometric data corresponding to each skeleton includes: Based on the first weight, determine the first sub-weight corresponding to each time node in the gliding animation to be generated for each of the aforementioned movement posture animation frames; Based on the second weight, determine the second sub-weight corresponding to each time node in the gliding animation to be generated for each of the rotation posture animation frames; According to the first sub-weight and the second sub-weight, each of the moving posture animation frames and each of the rotating posture animation frames are weighted to obtain the first geometric data corresponding to each time node of each bone in the gliding animation to be generated.

12. A device for generating gliding animation, characterized in that, Applied to a game scenario, wherein the game scenario includes at least one virtual character, the device includes: The acquisition unit is configured to acquire a first direction to be reached by the virtual character in a gliding state in response to a direction change command for the virtual character. The first determining unit is used to determine the posture weights corresponding to each intermediate gliding posture animation frame according to the first direction, wherein each intermediate gliding posture animation frame is pre-made based on the basic gliding posture animation frame. The second determining unit is used to determine the first geometric data corresponding to each bone in the virtual character based on each posture weight and each gliding intermediate posture animation frame, wherein the first geometric data includes first position data corresponding to the first position to be reached by each bone and first angle data corresponding to the first angle to be reached by each bone. The generation unit is configured to generate a gliding animation of the virtual character turning from its current orientation to the first direction based on the first geometric data and the gliding basic posture animation frame; create dynamic rigid bodies for each of the multiple first joints in each of the skeletons, wherein the dynamic rigid bodies have corresponding spring frequencies; determine the rigid body physical weights to be added to the gliding animation; determine the target position of each first joint after adding rigid body constraints based on the rigid body physical weights, the spring frequencies and the position of each first joint in the gliding animation; and change the position of each first joint in the gliding animation to the target position to obtain the target animation.

13. An electronic device, characterized in that, include: processor; as well as A memory for storing a data processing program, which, when the electronic device is powered on and runs through the processor, performs the method as described in any one of claims 1-11.

14. A computer-readable storage medium, characterized in that, The system contains a data processing program that is executed by a processor to perform the method as described in any one of claims 1-11.

Citation Information

Patent Citations

  • Virtual object construction method and device, computer equipment, medium and program product

    CN118615708A

  • Neural animation layering for synthesizing martial arts movements

    US11830121B1