Gliding animation generation method and device and electronic equipment

By pre-creating the basic gliding posture and intermediate pose animation frames, combining the posture weight in the direction change command, high-quality gliding animations are generated, which solves the problem of high production costs in the existing technology and realizes cost-effective gliding animation generation.

CN119832126AActive Publication Date: 2025-04-15NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When generating gliding animations, the prior art requires the production of a large number of animation resources and connection animations, which leads to high production costs and is difficult to generate high-quality gliding animations while reducing costs.

Method used

By pre-creating the gliding basic posture animation frame and the gliding intermediate posture animation frame, in response to the virtual character direction change instruction, each posture weight is determined according to the direction to be reached, and a gliding animation for the virtual character from the current direction to turn to the target is generated.

Benefits of technology

It realizes that while reducing the cost of gliding animation production, high-quality gliding animation is generated. By pre-producing a small amount of animation resources, rich and realistic aerial gliding effects are achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119832126A_ABST
    Figure CN119832126A_ABST
Patent Text Reader

Abstract

The invention discloses a gliding animation generation method and device, electronic equipment and a computer readable storage medium, and the method comprises the steps: obtaining a to-be-reached first direction of a virtual character in response to a direction change instruction for the virtual character in a gliding state; determining each posture weight corresponding to each gliding intermediate posture animation frame according to the first direction, wherein each gliding intermediate posture animation frame is pre-manufactured based on the gliding basic posture animation frame; according to each posture weight and each gliding intermediate posture animation frame, first geometric data corresponding to each skeleton in the virtual character is determined, and the first geometric data comprises first position data corresponding to a first position to be reached by each skeleton and first angle data corresponding to a first angle to be reached; and according to the first geometric data and the gliding basic posture animation frame, generating a gliding animation of the virtual character turning from the current direction to the first direction. According to the method and the device, the high-quality gliding animation can be generated while the production cost of the gliding animation is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and computer-readable storage medium for generating a gliding animation. Background Art

[0002] In virtual games, gliding animation is a common character special effect, which is used to simulate the dynamic effect of virtual characters gliding in the air. In the related art, in order to generate high-quality gliding animation, a large number of animation resources are often required. For example, for the turning of the character during gliding, corresponding animation resources are produced for each angle, which is approximately generated frame by frame. This results in a huge number of animation resources for turning, and it is also necessary to produce connection animations between the animation resources, resulting in extremely high production costs for gliding animations. Therefore, it is extremely important to generate high-quality gliding animations while reducing the production costs of gliding animations. Summary of the invention

[0003] The present application provides a method, device, electronic device and computer-readable storage medium for generating a gliding animation, which can generate high-quality gliding animation while reducing the production cost of the gliding animation. The specific scheme is as follows:

[0004] In a first aspect, an embodiment of the present application provides a method for generating a gliding animation, which is 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 instruction for the virtual character in a gliding state, acquiring a first direction to be reached by the virtual character;

[0006] According to the first direction, determining each posture weight corresponding to each gliding intermediate posture animation frame, wherein each of the gliding intermediate posture animation frames is pre-produced based on the gliding basic posture animation frame;

[0007] Determine first geometric data corresponding to each bone in the virtual character according to each of the posture weights and each of the gliding intermediate posture animation frames, wherein the first geometric data includes first position data corresponding to a first position to be reached by each of the bones and first angle data corresponding to a first angle to be reached by each of the bones;

[0008] A gliding animation of the virtual character turning from a current orientation to the first direction is generated according to the first geometric data and the gliding basic posture animation frame.

[0009] In a second aspect, an embodiment of the present application provides a device for generating a gliding animation, which is applied to a game scene, wherein the game scene includes at least one virtual character, and the device includes:

[0010] an acquisition unit, configured to acquire a first direction to be reached by the virtual character in response to a direction change instruction for the virtual character in a gliding state;

[0011] A first determining unit is used to determine, according to the first direction, each posture weight corresponding to each gliding intermediate posture animation frame, wherein each of the gliding intermediate posture animation frames is pre-made based on a gliding basic posture animation frame;

[0012] A second determining unit is used to determine first geometric data corresponding to each bone in the virtual character according to each of the posture weights and each of the gliding intermediate posture animation frames, wherein the first geometric data includes first position data corresponding to a first position to be reached by each of the bones and first angle data corresponding to a first angle to be reached by each of the bones;

[0013] A generating unit is used to generate a gliding animation of the virtual character turning from a current orientation to the first direction according to the first geometric data and the gliding basic posture animation frame.

[0014] In a third aspect, the present application further provides an electronic device, including:

[0015] Processor; and

[0016] The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the method described in the first aspect is executed.

[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing a data processing program, which 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] A method for generating a gliding animation provided in an embodiment of the present application is applied to a game scene, wherein the game scene includes at least one virtual character, and the method includes: in response to a direction change instruction for the virtual character in a gliding state, obtaining a first direction to be reached by the virtual character; determining, based on the first direction, each posture weight corresponding to each gliding intermediate posture animation frame, wherein each of the gliding intermediate posture animation frames is pre-produced based on a gliding basic posture animation frame; determining, based on each of the posture weights and the each of the gliding intermediate posture animation frames, first geometric data corresponding to each of the bones in the virtual character, wherein the first geometric data includes first position data corresponding to a first position to be reached by each of the bones and first angle data corresponding to a first angle to be reached by each of the bones; generating, based on the first geometric data and the gliding basic posture animation frame, a gliding animation of the virtual character turning from a current direction to the first direction.

[0020] It can be seen that the method for generating the gliding animation provided in the embodiment of the present application is to pre-generate each gliding intermediate posture animation frame through the gliding basic posture animation frame, so that the animation resources in the gliding process are divided into each gliding intermediate posture animation frame and the gliding basic posture animation frame. When the virtual character has a direction change demand during the gliding process, the posture weights of each gliding intermediate posture animation frame are determined through the first direction to be reached by the virtual character. Since each posture weight is used to indicate the contribution of each gliding intermediate posture animation frame in turning the above-mentioned virtual character from the current direction to the first direction, the position data and angle data of each bone corresponding to the virtual character reaching the first direction can be obtained after mixing according to the weights, thereby generating a gliding animation of the virtual character turning from the current direction to the first direction. On the one hand, mixing the pre-made gliding intermediate posture animation frames can obtain high-quality gliding animations. On the other hand, pre-making a small number of gliding intermediate posture animation frames greatly reduces the production cost, and achieves a rich and realistic air gliding effect with very few resources. Therefore, the method for generating the gliding animation provided in the embodiment of the present application can generate high-quality gliding animations while reducing the production cost of gliding animations. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 is a game system diagram for implementing a method for generating a gliding animation provided in an embodiment of the present application;

[0022] Figure 2 is a flow chart of a method for generating a gliding animation provided in an embodiment of the present application;

[0023] Figure 3 It is a schematic diagram of an example of a left-tilted animation frame, a gliding basic posture animation frame, and a right-tilted animation frame in the method for generating a gliding animation provided in an embodiment of the present application;

[0024] Figure 4 It is a schematic diagram of an example of a forward tilting animation frame, a gliding basic posture animation frame and a backward tilting animation frame in the method for generating a gliding animation provided in an embodiment of the present application;

[0025] Figure 5 It is a schematic diagram of an example of a left-turning animation frame, a gliding basic posture animation frame, and a right-turning animation frame in the method for generating a gliding animation provided in an embodiment of the present application;

[0026] Figure 6 is a schematic diagram of an example of a two-dimensional mixed space in the method for generating a gliding animation provided in an embodiment of the present application;

[0027] Figure 7 is a schematic diagram of an example of a one-dimensional mixed space in the method for generating a gliding animation provided in an embodiment of the present application;

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

[0029] Fig. 9 It is a structural block diagram of an example of a device for generating a gliding animation provided in an embodiment of the present application;

[0030] Fig.10 It is a structural block diagram of an example of an electronic device for data processing provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0032] It should be noted that the terms "first", "second", "third", etc. in the claims, description and drawings of the present application are used to distinguish similar objects and are not used to describe a specific order or sequence. The data used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including", "having" and their variants are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0033] It should be understood that in the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" is merely a way to describe the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "Including A, B and / or C" means including any one, any two, or any three of A, B, and C.

[0034] It should be understood that in the embodiments of the present 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 according to A. Determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.

[0035] Based on the reasons mentioned in the background technology, in order to generate high-quality gliding animation while reducing the production cost of gliding animation, the first embodiment of the present application provides a method for generating gliding animation, which is applied to electronic devices. The electronic devices can be desktop computers, laptop computers, mobile phones, tablet computers, electronic watches, etc., or other electronic devices that can generate gliding animations, which are not specifically limited in the embodiments of the present application.

[0036] In an optional embodiment, when the method for generating the gliding animation runs on a terminal device, the terminal device may include a display screen and a processor, the display screen being used to present a game screen and receive instructions generated by a player acting on the game screen. The game screen may include a portion of a virtual game scene, which is a virtual world in which virtual characters perform activities. The processor is used to store game applications, run the game, generate game screens, respond to instructions, and control the display of the game screen on the display screen. When the player operates the game screen through the display screen, the game screen can control the local content of the terminal device by responding to the received operation instructions. The terminal device may provide a graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on the display screen of the terminal device, or the graphical user interface may be presented through holographic projection.

[0037] In an optional embodiment, when the method for generating the gliding animation 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 a client device. The operating body of the game application and the game screen presentation body are separated, and the storage and operation of the method for generating the gliding animation are completed on the server. The game screen presentation is completed on the client, and the client is mainly used for receiving and sending game data and presenting the game screen. For example, the client can be a display device with a data transmission function close to the player side, such as a mobile terminal, a television, a computer, a handheld computer, a personal digital assistant, a head-mounted display device, etc., but the terminal device for processing game data is a server in the cloud. When playing the game, the player instructs the client to send instructions to the server, and the server controls the running of the game according to the instructions, encodes and compresses the game screen and other data, and returns it to the client through the network. Finally, the client decodes and outputs the game screen.

[0038] It should be noted that in the embodiment of the present application, the execution subject of the method for generating the gliding animation can be a terminal device or a server, wherein the terminal device can be a local terminal device or a client device in the aforementioned cloud game. The embodiment of the present application does not limit the type of the execution subject.

[0039] For example, in combination with the above introduction, Figure 1 A game system 100 for implementing a method for generating a gliding animation provided by an embodiment of the present application is shown. 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 be connected to the server 102 of different games through the network. The terminal is any device with computing hardware that can support and execute software application tools corresponding to the game.

[0040] In the above-mentioned game system 100, the terminal 101 is used to install and run the game application. In some cases, the game application may not be installed in advance in the terminal 101, and the player can directly access the game through a client such as a browser. The player uses the registered game account to log in to the game application, and can control the virtual character corresponding to the game account to participate in the game. When the player logs in to the game application, the terminal 101 will send a login request to the server 102, and the server 102 will verify the game account used by the player. At the same time, the server 102 determines the game mechanism corresponding to the game account according to the login request, and returns a login success notification to the terminal 101 after the verification is passed. In the process of the player participating in the game through the game application, the terminal 101 and the server 102 interact with each other, and the terminal 101 sends various information to the server 102. The server 102 determines the display data of the terminal 101 according to the stored game mechanism and the received information, and sends the display data to the terminal 101, so that the display data sent by the server 102 can be displayed to the player through the terminal 101.

[0041] In a possible application scenario, 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 be connected to each other through different networks and different servers.

[0043] Among them, the terminal 101 can have one or more multi-touch screens for sensing and obtaining the input of the user through touch or sliding operations performed at multiple points on one or more touch display screens. The terminal 101 can also be connected to a keyboard and / or a mouse and / or a game controller, so that the user can perform interface operations through the keyboard and / or mouse and / or a game controller.

[0044] The network may be a wireless network or a wired network, such as a wireless network such as a wireless local area network (WLAN), a local area network (LAN), a cellular network, a 2G network, a 3G network, a 4G network, a 5G network, etc. In addition, different terminals may also use their own Bluetooth network or hotspot network to connect to other terminals or to a server, etc. In addition, the system 100 may include multiple databases, which are coupled to different servers, and game-related information may be continuously stored in the database when different players play a multi-player game online.

[0045] It should be noted that Figure 1 The game system diagram shown is only an example. The game system 100 described in the embodiment of the present application is to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can know that with the evolution of the game system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.

[0046] The technical solution of the present application is 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 in detail in some embodiments.

[0047] The following, combined Figure 2 to Figure 8 The present invention introduces a method for generating a gliding animation provided in an embodiment of the present application.

[0048] The method for generating a gliding animation provided in the present application is applied to a game scene, wherein the game scene includes at least one virtual character. Figure 2 FIG. 1 is a flow chart of a method for generating a gliding animation provided in an embodiment of the present application, comprising the following steps S101 to S104:

[0049] Step S101: In response to a direction change instruction for the virtual character in a gliding state, a first direction to be reached by the virtual character is acquired.

[0050] It can be understood that virtual games refer to applications developed according to the needs of game applications, and the types of games may include but are not limited to at least one of the following: two-dimensional (Two Dimension) game applications, three-dimensional (Three Dimension) game applications, virtual reality (Virtual Reality, VR) game applications, augmented reality (Augmented Reality, AR) game applications, and mixed reality (Mixed Reality, MR) game applications.

[0051] In the embodiment of the present application, the virtual game may be one of a sandbox survival game, a role-playing game, an action-adventure game, a shooting game, etc. Among them, a sandbox survival game allows players to explore, survive and build in a world full of unknowns and interact with other players; in a role-playing game, players play specific roles and have a rich gaming experience in a virtual world; an action-adventure game may generally include modules such as combat, puzzle solving, and exploration; in a shooting game, players can defeat enemy virtual characters through shooting.

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

[0053] The game scene refers to a virtual environment provided for a virtual character to perform game behaviors. The game scene may include at least one virtual character, which may be a player character controlled by a player or a non-player character not controlled by a player. It should be understood that the game scene may also include virtual characters and other non-player characters (NPC) controlled by other players. For ease of introduction, in the subsequent content, the virtual character is described as a player character controlled by a player, which does not constitute a limitation of the present application.

[0054] In this step, the virtual character may be in a gliding state, which means that the virtual character is using a designated device or a designated skill to slow down the falling speed, so that it can move horizontally in the air for a long time. Usually, the virtual character in the gliding state can use a load-bearing hand to "grasp" a designated device, which can be the left or right hand of the virtual character, and the designated device can be a virtual hang glider, a virtual paraglider, or other virtual flying equipment, which can be a bird with wings, a virtual flying machine, etc.

[0055] When the virtual character is in a gliding state, a direction change instruction may be triggered, and the direction change instruction is used to instruct the virtual character to change direction during the gliding process. In a specific implementation, the direction change instruction may be generated by a shortcut key operation, a voice command operation, an air gesture recognition operation, or a touch operation for a specified control. The touch operation may be a click operation, a slide operation, a press operation, or a drag operation, and the present embodiment does not specifically limit the generation method of the direction change instruction.

[0056] In response to a direction change instruction for the virtual character in the gliding state, a first direction to be reached by the virtual character may be obtained first, where the first direction is the changed direction indicated by the direction change instruction. The first direction is different from the current direction of the virtual character. For example, if the current direction is due east, the first direction may be due south, due north, 45° east by south, or 45° east by north, etc.

[0057] Step S102: determining, according to the first direction, each posture weight corresponding to each gliding intermediate posture animation frame, wherein each of the gliding intermediate posture animation frames is pre-produced based on a gliding basic posture animation frame.

[0058] In the embodiment of the present application, during the game development stage, a gliding basic posture animation frame can be pre-made, and each gliding intermediate posture animation frame can also be pre-made based on the gliding basic posture animation frame. Each gliding intermediate posture animation frame and the gliding basic posture animation frame are used as the original animation resources of the gliding animation to quickly generate the gliding animation during the game running stage.

[0059] The gliding basic posture animation frame is an animation frame produced by taking the gliding basic posture as the posture of the virtual character, and the gliding basic posture refers to the posture of the virtual character in the gliding state and without external force. Each gliding intermediate posture animation frame is an animation frame produced by superimposing the gliding intermediate posture on the gliding basic posture, and the gliding intermediate posture refers to the posture of the virtual character moving and turning in various directions during the gliding process.

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

[0061] In an optional embodiment, each gliding intermediate posture animation frame includes: each moving posture animation frame produced with the load-bearing hand of the virtual character during gliding as the axis, and each rotating posture animation frame produced with the character center of mass of the virtual character as the rotation base point.

[0062] Among them, the above-mentioned moving posture animation frames include a left tilting animation frame, a right tilting animation frame, a forward tilting animation frame, and a backward tilting animation frame; the above-mentioned rotation posture animation frames include a left rotation animation frame and a right rotation animation frame.

[0063] As you can understand, the center of mass is the weighted average position of all mass points in an object or system. If an object is homogeneous (i.e., the density is the same everywhere), then its center of mass is its geometric center.

[0064] The following combination Figures 3 to 5 Introduce the animation frames of each gliding intermediate pose:

[0065] like Figure 3 As shown, it is a schematic diagram of an example of a left-tilted animation frame, a gliding basic posture animation frame and a right-tilted animation frame in the method for generating a gliding animation provided in an embodiment of the present application, including 3-a, 3-b and 3-c. Among them, 3-b is a gliding basic posture animation frame (front view), in which the virtual character is not tilted relative to the central axis 10; 3-a is a left-tilted animation frame based on the gliding basic posture animation frame 3-b, tilted to the left with the bearing hand 11 as the axis, in which the virtual character is tilted to the left relative to the central axis 10; 3-c is a right-tilted animation frame based on the gliding basic posture animation frame 3-b, tilted to the right with the bearing hand 11 as the axis, in which the virtual character is tilted to the right relative to the central axis 10.

[0066] like Figure 4 As shown, it is a schematic diagram of an example of a forward tilting animation frame, a gliding basic posture animation frame and a backward tilting animation frame in the method for generating a gliding animation provided in an embodiment of the present application, including 4-a, 4-b and 4-c. Among them, 4-b is a gliding basic 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 based on the gliding basic posture animation frame 4-b, tilted backward with the weight-bearing hand 11 as the axis, in which the virtual character is tilted backward relative to the central axis 10; 4-c is a forward tilting animation frame based on the gliding basic posture animation frame 4-b, tilted forward with the weight-bearing hand 11 as the axis, in which the virtual character is tilted forward relative to the central axis 10.

[0067] like Figure 4 As shown, it is a schematic diagram of an example of a forward tilting animation frame, a gliding basic posture animation frame and a backward tilting animation frame in the method for generating a gliding animation provided in an embodiment of the present application, including 4-a, 4-b and 4-c. Among them, 4-b is a gliding basic 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 based on the gliding basic posture animation frame 4-b, tilted backward with the weight-bearing hand 11 as the axis, in which the virtual character is tilted backward relative to the central axis 10; 4-c is a forward tilting animation frame based on the gliding basic posture animation frame 4-b, tilted forward with the weight-bearing hand 11 as the axis, in which the virtual character is tilted forward relative to the central axis 10.

[0068] like Figure 5 5-a, 5-b and 5-c are schematic diagrams of an example of a left-turning animation frame, a gliding basic posture animation frame and a right-turning animation frame in the method for generating a gliding animation provided in an embodiment of the present application, including 5-a, 5-b and 5-c. 5-b is a gliding basic posture animation frame (front view), 5-b and the attached Figure 3 3-b is the same as 3-b in the figure. In this animation frame, the virtual character does not rotate relative to the central axis 10; 5-a is a left-turning animation frame produced based on the gliding basic posture animation frame 5-b, which rotates to the left with the character center of mass of the virtual character as the rotation base point; 5-c is a right-turning animation frame produced based on the gliding basic posture animation frame 5-b, which rotates to the right with the character center of mass of the virtual character as the rotation base point.

[0069] According to the first direction obtained in step S101, each posture weight corresponding to each gliding intermediate posture animation frame may be determined.

[0070] In an optional specific implementation example, step S102 may be implemented by the following steps:

[0071] Determining a first weight of each moving posture animation frame according to the first direction; and

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

[0073] During the gliding process, the virtual character behaves as a free fall in the vertical direction and can move or rotate in any direction in the horizontal direction. In this embodiment, the above-mentioned moving posture animation frames can be used as a two-dimensional mixed space, which includes two axes, a first axis and a second axis. The value ranges of the two axes are both set to [-1, 1]. The left tilt animation frame and the right tilt animation frame in each moving posture animation frame are referenced on the first axis, and the forward tilt animation frame and the backward tilt animation frame in each moving 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 , which is a schematic diagram of an example of a two-dimensional hybrid space in the method for generating a gliding animation provided by an embodiment of the present application, including two axes, the first axis is the X axis, and the second axis is the Y axis, wherein the positive direction of the X axis indicates tilting to the right, the negative direction of the X axis indicates tilting to the left, the positive direction of the Y axis indicates tilting forward, and the negative direction of the Y axis indicates tilting backward. The value ranges of the X axis and the Y axis are both [-1, 1].

[0075] After obtaining the first direction, the corresponding value in the above-mentioned two-dimensional mixed space can be determined according to the first direction. The value represents the first weight of each moving posture animation frame. The first weight includes the weights corresponding to the animation frame tilting to the left, the animation frame tilting to the right, the animation frame tilting forward, and the animation frame tilting backward, respectively.

[0076] Combined with the above Figure 6 The calculation method of the first weight of each moving pose animation frame is introduced:

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

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

[0079] In the case where the first direction is in the fourth quadrant, if the first direction 18 is an angle a3 to the right of the current direction, and a3 is less than 45°, then the value output by the two-dimensional hybrid space is (1, -tan(a3)), w 左 =0,w 右 =1,w 前 =0,w 后=tan(a3); if the first direction 19 is offset by an angle b3 after being in the positive right direction, and b3 is equal to 45°, then the value output by the two-dimensional hybrid space is (1, -1), w 左 =0,w 右 =1,w 前 =0,w 后 =1; if the first direction 20 is an angle c3 to the right of the current direction, and c3 is greater than 45°, then the value output by the two-dimensional hybrid space is (cot(c3), -1), w 左 =0,w 右 =cot(c3),w 前 =0,w 后 =1.

[0080] In the case where the first direction is in the third quadrant, if the first direction 21 is an angle a4 degrees to the left of the current direction, and a4 is less than 45°, then the value output by the two-dimensional hybrid space is (-1, -tan(a4)), w 左 =1,w 右 =0,w 前 =0,w 后 =tan(a4); if the first direction 22 is an angle b4 to the left of the current direction, and b4 is equal to 45°, then the value output by the two-dimensional hybrid space is (-1, -1), w 左 =1,w 右 =0,w 前 =0,w 后 =1; if the first direction 23 is an angle c4 to the left of the current direction, and c4 is greater than 45°, then the value output by the two-dimensional hybrid space is (-cot(c1), -1), w 左 =cot(c1),w 右 =0,w 前 =0,w 后 =1.

[0081] Among them, w 左 is the weight of the animation frame tilted to the left, w 右 is the weight of the right tilt animation frame, w 前 is the weight of the forward tilt animation frame, w 后 The weight for the backward tilt animation frame.

[0082] As shown in Table 1, it is an example table of the first direction, the value corresponding to the two-dimensional mixed space, and the first weight of each moving posture animation frame in the gliding animation generation method provided in an embodiment of the present application.

[0083] Table 1.

[0084]

[0085] In the above Table 1, when the first direction is the current left of the virtual character, the value corresponding to the two-dimensional mixed space is (-1, 0), and the first weights of each moving posture animation frame are: the weight of the animation frame tilted to the left is 1, the weight of the animation frame tilted to the right is 0, the weight of the animation frame tilted forward is 0, and the weight of the animation frame tilted backward is 0; when the first direction is the current right of the virtual character, the value corresponding to the two-dimensional mixed space is (1, 0), and the first weights of each moving posture animation frame are: the weight of the animation frame tilted to the left is 0, the weight of the animation frame tilted to the right is 1, the weight of the animation frame tilted forward is 0, and the weight of the animation frame tilted backward is 0; when the first direction is the current front of the virtual character 45° to the left, the value corresponding to the two-dimensional mixed space is (-1, 1), and the first weights of each moving posture animation frame are: the weight of the animation frame tilted to the left is 1, the weight of the animation frame tilted to the right is 0, the weight of the animation frame tilted forward is 1, and the weight of the animation frame tilted backward is 0; when the first direction is the current front of the virtual character 45° to the right

[0086] , the value corresponding to the two-dimensional blend space is (1, 1), and the first weights of the animation frames of the moving postures are: the weight of the animation frame tilting to the left is 0, the weight of the animation frame tilting to the right is 1, the weight of the animation frame tilting forward is 1, and the weight of the animation frame tilting backward is 0.

[0087] In this way, the first weight of each moving posture animation frame can be obtained.

[0088] Similar to the above-mentioned moving posture animation frames as a two-dimensional blending space, in this embodiment, the above-mentioned turning posture animation frames can also be regarded as a one-dimensional blending space. The one-dimensional blending space includes a third axis, and the value range of the third axis is [-1, 1]. The left turn animation frame and the right turn 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 , which is a schematic diagram of an example of a one-dimensional hybrid space in the method for generating a gliding animation provided by an embodiment of the present application, including a third axis, the Z axis, wherein the positive direction of the Z axis represents a rightward rotation, and the negative direction of the Z axis represents a leftward rotation. The value range of the Z axis is [-1, 1].

[0090] Optionally, the above step of “determining the second weight of each rotation posture animation frame according to 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 a first yaw angle corresponding to the first direction and a second yaw angle corresponding to the current orientation;

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

[0093] A second weight of each of the rotation posture animation frames is determined according to the difference.

[0094] It can be understood that the yaw angle is an angle parameter that describes the rotation of an object in three-dimensional space, specifically refers to the rotation angle of the object around the vertical axis. In the embodiment of the present application, the value range of the difference between the first yaw angle and the second yaw angle is [-90°, 90°], that is, the maximum allowable yaw angle range is 90°, so that the action of the virtual character is more in line with reality and the realism of the game is increased.

[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 a normalized value, which 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] As shown in Table 2, it is an example table of the first direction, the value corresponding to the one-dimensional mixed space, and the first weight of each rotation posture animation frame in the gliding animation generation method provided in an embodiment of the present application.

[0097] Table 2.

[0098]

[0099] In the above Table 2, when the first direction is the current left of the virtual character, the value corresponding to the one-dimensional mixed space is -1, and the second weights of each moving posture animation frame are: the weight of the left rotation animation frame is 1, and the weight of the right rotation animation frame is 0; when the first direction is the current right of the virtual character, the value corresponding to the one-dimensional mixed space is 1, and the second weights of each moving posture animation frame are: the weight of the left rotation animation frame is 0, and the weight of the right rotation animation frame is 1; when the first direction is the current front of the virtual character 45° to the left, the value corresponding to the one-dimensional mixed space is -0.5, and the second weights of each moving posture animation frame are: the weight of the left rotation animation frame is 0.5, and the weight of the right rotation animation frame is 0; when the first direction is the current front of the virtual character 45° to the right, the value corresponding to the one-dimensional mixed space is 0.5, and the second weights of each moving posture animation frame are: the weight of the left rotation animation frame is 0, and the weight of the right rotation animation frame is 0.5.

[0100] In this way, the second weight of each rotation posture animation frame can be obtained.

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

[0102] Step S103: determining first geometric data corresponding to each bone in the virtual character according to each of the posture weights and each of 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 the above-mentioned intermediate posture animation frames of gliding, the intermediate posture animation frames of gliding can be weighted according to the posture weights, so as to determine the first geometric data.

[0105] Specifically, in the case where each posture weight includes a first weight of each moving posture animation frame and a second weight of each rotation posture animation frame, the above-mentioned step S103 may specifically include: weighting each of the moving posture animation frames and each of the rotation posture animation frames according to the first weight and the second weight, respectively, to obtain the first geometric data corresponding to each of the bones.

[0106] It should be noted that the virtual character's body turning from the current direction to the first direction is a gradual process, that is, when the virtual character receives a direction change instruction during the gliding process, the body cannot immediately turn to the first direction to be reached, but is a process of gradually changing from the current direction to the first direction, that is, the gliding animation of the virtual character turning from the current direction to the first direction has a preset animation duration (for example, 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-mentioned preset animation duration. In other words, the first weight refers to the weight of each moving posture animation frame corresponding to the last time node in the above-mentioned 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-mentioned preset animation duration.

[0108] In an optional 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: generating a gliding animation of the virtual character turning from a current orientation to the first direction according to the first geometric data and the gliding basic posture animation frame.

[0110] In an optional implementation, the gliding basic posture animation frame may be used as the starting frame of the gliding animation to be generated.

[0111] When 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 corresponding to each bone in the intermediate frame of the gliding animation to be generated can be determined according to the first geometric data.

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

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

[0114]

[0115] Among them, 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, and P i is the position data of the bone in the middle frame, t c is the playback time of the intermediate frame in the gliding animation to be generated, t0 is the playback time of the start frame in the gliding animation to be generated, and t1 is the playback time of the end frame in the gliding animation to be generated. R0 is the angle data of the bone in the gliding basic posture animation frame, R1 is the first angle data corresponding to the bone in the first geometric data, R i It is the angle data corresponding to the bone in the middle frame.

[0116] In this way, by moving each bone in the gliding basic posture animation frame to the position indicated by the position data of each bone 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 gliding basic posture animation frame to the first position indicated by the first position data and the angle indicated by the first angle data, the end frame of the gliding animation to be generated can be obtained. In this way, by playing the start frame, the intermediate frame and the end frame, the gliding animation of the virtual character smoothly turning from the current direction to the first direction can be obtained.

[0117] A method for generating a gliding animation provided in an embodiment of the present application is applied to a game scene, wherein the game scene includes at least one virtual character, and the method includes: in response to a direction change instruction for the virtual character in a gliding state, obtaining a first direction to be reached by the virtual character; determining, based on the first direction, each posture weight corresponding to each gliding intermediate posture animation frame, wherein each of the gliding intermediate posture animation frames is pre-produced based on a gliding basic posture animation frame; determining, based on each of the posture weights and the each of the gliding intermediate posture animation frames, first geometric data corresponding to each of the bones in the virtual character, wherein the first geometric data includes first position data corresponding to a first position to be reached by each of the bones and first angle data corresponding to a first angle to be reached by each of the bones; generating, based on the first geometric data and the gliding basic posture animation frame, a gliding animation of the virtual character turning from a current direction to the first direction.

[0118] It can be seen that the method for generating the gliding animation provided in the embodiment of the present application is to pre-generate each gliding intermediate posture animation frame through the gliding basic posture animation frame, so that the animation resources in the gliding process are divided into each gliding intermediate posture animation frame and the gliding basic posture animation frame. When the virtual character has a direction change demand during the gliding process, the posture weights of each gliding intermediate posture animation frame are determined through the first direction to be reached by the virtual character. Since each posture weight is used to indicate the contribution of each gliding intermediate posture animation frame in turning the above-mentioned virtual character from the current direction to the first direction, the position data and angle data of each bone corresponding to the virtual character reaching the first direction can be obtained after mixing according to the weights, thereby generating a gliding animation of the virtual character turning from the current direction to the first direction. On the one hand, mixing the pre-made gliding intermediate posture animation frames can obtain high-quality gliding animations. On the other hand, pre-making a small number of gliding intermediate posture animation frames greatly reduces the production cost, and achieves a rich and realistic air gliding effect with very few resources. Therefore, the method for generating the gliding animation provided in the embodiment of the present application can generate high-quality gliding animations while reducing the production cost of gliding animations.

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

[0120] Determining, according to the first weight, a first sub-weight corresponding to each time node of each moving posture animation frame in the gliding animation to be generated;

[0121] Determining, according to the second weight, a second sub-weight corresponding to each time node of each rotation posture animation frame in the gliding animation to be generated;

[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 respectively to obtain the first geometric data corresponding to each time node of each bone in the gliding animation to be generated.

[0123] As can be seen from the above introduction, the virtual character turning from the current orientation to the first direction is a gradual process. In this embodiment, the first sub-weight corresponding to each of the moving posture animation frames at each time node in the gliding animation to be generated can be determined according to the first weight; and the second sub-weight corresponding to each of the rotating posture animation frames at each time node in the gliding animation to be generated can be determined according to the second weight.

[0124] In a specific implementation, the first sub-weight corresponding to each time node can be determined in a manner that the first sub-weight changes at a uniform speed, wherein the first sub-weight corresponding to the last time node is the first weight, and the difference between the first sub-weights of every two adjacent time nodes is the same; similarly, the second sub-weight corresponding to each time node can be determined in a manner that the second sub-weight changes at a uniform speed, wherein the second sub-weight corresponding to the last time node is the second weight, and the difference between the second sub-weights of every two adjacent time nodes is the same.

[0125] For example, when the first direction is 45° to the left of the current direction of the virtual character, the first weights of the moving posture animation frames are: the weight of the animation frame leaning to the left is 1, and the weight of the animation frame leaning forward 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 animation frame leaning to the left is 0.2, and the weight of the animation frame leaning forward is 0.2; the first sub-weight of the second time node is: the weight of the animation frame leaning to the left is 0.4, and the weight of the animation frame leaning forward is 0.4; the first sub-weight of the third time node is: the weight of the animation frame leaning to the left is 0.6, and the weight of the animation frame leaning forward is 0.6; the first sub-weight of the fourth time node is: the weight of the animation frame leaning to the left is 0.8, and the weight of the animation frame leaning forward is 0.8; the first sub-weight of the fifth time node is: the weight of the animation frame leaning to the left is 1, and the weight of the animation frame leaning forward is 1.

[0126] In this way, for a time node, each moving posture animation frame and each rotation posture animation frame can be weighted and summed according to the corresponding first sub-weight and second sub-weight, so as to obtain the position data and angle data corresponding to each bone at each time node in the gliding animation to be generated, that is, the first geometric data corresponding to each bone at each time node in the gliding animation to be generated.

[0127] This setting method determines the sub-weight of each time node within the preset animation duration of the gliding animation to be generated through the first weight and the second weight, and weights each moving posture animation frame and each rotating posture animation frame according to the sub-weight, thereby obtaining the position data and angle data of the bone at each time node, thereby generating an animation in which the virtual character changes from the current orientation to the first orientation within a period of time, and realizing the turning animation during the gliding process through very few animation resources, thereby reducing the production cost.

[0128] In an optional embodiment, in this embodiment, a spring damping system can be applied to generate an animation effect of an overshoot and gradually decaying oscillation after the virtual character turns to the first direction. In a specific implementation, a spring damping coefficient can be preset, and the spring damping coefficient is less than 1. Since a spring damping system is applied in the gliding animation, each time the direction of the virtual character changes, an animation effect of overshoot and oscillation can be generated when the target direction is reached. This setting method can simulate the animation effect of the virtual character overshooting and gradually decaying oscillation after reaching a certain position when moving in the air, so that the gliding animation conforms to the physical performance in the real world, thereby enhancing the player's visual experience.

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

[0130] Step S20: generating a gliding oscillation posture animation according to the gliding basic posture animation frame and the left-right rotation amplitude parameter that changes with time;

[0131] Step S21: generating a gliding animation of the virtual character turning from a current direction to the first direction according to the first geometric data and the gliding oscillation posture animation.

[0132] In this embodiment, an animation curve corresponding to the left-right rotation amplitude parameter that changes with time can be pre-made, in which the horizontal axis of the animation curve is the preset animation duration, the vertical axis is the left-right rotation amplitude parameter, the positive direction of the vertical axis represents the right-hand rotation amplitude parameter, and the negative direction of the vertical axis represents the left-hand rotation amplitude parameter. The left-right rotation amplitude parameter is a value that oscillates between the positive and negative axes according to the animation rhythm, and the animation rhythm can be understood as the timing and speed changes 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 bones in the gliding basic posture animation frame are slightly rotated left and right to generate a gliding oscillation posture animation. In this way, the swaying process of the virtual character's body in the gliding oscillation posture animation is uneven, and the rotation amplitude of each adjacent time node is not the same, thereby simulating the random shaking caused by uneven force during gliding in the real world.

[0134] Optionally, the above step S20 can be implemented by the following steps:

[0135] Determine the gliding oscillation posture animation frame corresponding to each time node according to the gliding basic posture animation frame and the left-right rotation amplitude parameter that changes with time;

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

[0137] The gliding oscillation posture animation frames are played at the playing rate to obtain the gliding oscillation posture animation.

[0138] It should be noted that each time node in the gliding oscillation posture animation to be generated has a corresponding left-right rotation amplitude parameter. The left-right rotation amplitude parameter corresponding to each time node is used to control the rotation of each bone in the gliding basic posture animation frame, thereby obtaining a gliding oscillation posture animation frame corresponding to each time node with a left-handed or right-handed oscillation effect relative to the gliding basic posture.

[0139] After that, 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 or time scaling factor played per unit time. The playback rate determines the speed of the animation. A faster playback rate makes the animation look faster, and all actions and changes are completed in a shorter time. For example, the turning action of the virtual character will appear faster and more hasty at a faster playback rate.

[0140] As an implementation method, the play rate of the gliding animation to be generated may be determined by the following steps:

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

[0142] The play rate of the gliding animation to be generated is determined according to the gliding speed and a preset maximum speed.

[0143] In this implementation, the playback rate of the gliding animation may be positively correlated with the gliding speed of the virtual character. The faster the gliding speed of the virtual character, the faster the playback rate of the gliding animation.

[0144] First, the gliding speed of the virtual character is obtained, and then the ratio between the component of the gliding speed in the horizontal direction and the preset maximum speed is calculated, and the playback rate of the gliding animation to be generated is determined based on the ratio.

[0145] Specifically, the value obtained by adding 1 to the ratio of the horizontal component of the gliding speed to the preset maximum speed can be used as a multiple of the original playback rate. For example, when the player does not input the moving speed for the virtual character during the gliding process, the horizontal component of the gliding speed is 0, and the ratio between the horizontal component of the gliding speed and 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, that is, the gliding animation is played 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, and the maximum playback rate is twice the original playback rate. When the horizontal component of the gliding speed is the preset maximum speed, the ratio between the horizontal component of the gliding speed and the preset maximum speed is 1. In this case, the playback rate of the gliding animation to be generated is twice the original playback rate.

[0146] After the play rate of the gliding animation to be generated is determined, the gliding oscillation gesture animation frames may be played at the play rate to obtain the gliding oscillation gesture animation.

[0147] With this setting, when the playback rate is faster, the playback speed of the above animation curve is also faster, and the virtual character rotates left and right more frequently, which can simulate the animation effect of the virtual character being subjected to greater wind resistance when accelerating in the air, and gradually intensifying the swaying of the body, further improving the details in the gliding animation.

[0148] After generating the gliding oscillation posture animation, the gliding oscillation posture animation can be used as the basis of the gliding animation to be generated, and combined with the above-mentioned first geometric data, a gliding animation with the animation effect of the virtual character's body swinging naturally during gliding is obtained, which turns from the current direction to the first direction.

[0149] In an optional specific implementation, the above step S21 can be implemented by the following steps:

[0150] Determine motion data to be executed by each of the bones according to the first geometric data and the second geometric data corresponding to each of the bones in the gliding basic posture animation frame;

[0151] According to the motion data, each of the bones in the gliding oscillation posture animation is driven to move, so as to obtain a gliding animation in which the virtual character turns from a current direction 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, and the second geometric data includes the second position data and the second angle data corresponding to each bone.

[0153] Afterwards, based on the first geometric data determining the position data and angle data corresponding to each bone at each time node in the gliding animation to be generated without adding the oscillation effect, or the first geometric data being the position data and angle data corresponding to each time node in the gliding animation to be generated without adding the oscillation effect, the position data corresponding to each bone at each time node in the gliding animation to be generated without adding the oscillation effect and the second position data can be subtracted, and the angle data corresponding to each bone at each time node in the gliding animation to be generated without adding the oscillation effect and the second angle data can be subtracted to obtain the dynamic part of the position data and angle data of each bone at each time node in the gliding animation to be generated without adding the oscillation effect that is different from the gliding basic posture, and the dynamic part is the motion data to be executed by each bone at each time node. The motion data represents the motion to be performed by each bone at each time node relative to the position data and angle data in the gliding basic posture animation frame in the process of the virtual character changing from the current direction to the first direction.

[0154] Afterwards, the motion data to be executed by each bone at each time node is used to control each bone to perform corresponding motion at each time node in the gliding oscillation posture animation. Since each bone at each time node in the gliding oscillation posture animation already has a left-handed or right-handed oscillation effect relative to the gliding basic posture animation frame, by superimposing the motion data of each bone at each time node on each frame of the gliding oscillation posture animation, it is possible to obtain a gliding animation in which the virtual character has a left-handed or right-handed oscillation effect at each time node, and the overall presentation turns from the current direction to the first direction.

[0155] As shown in Table 3, it is an example table of geometric data of each bone in different animation frames in the method for generating a gliding animation provided in an embodiment of the present application.

[0156] Table 3.

[0157]

[0158] In the above Table 3, the preset animation duration includes four time nodes: 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 pose animation frame by the left and right rotation amplitude parameters of each time node, the geometric data of each bone at time node t0 in the gliding oscillation pose animation is S0, the geometric data of time node t1 is S1, the geometric data of time node t2 is S2, and the geometric data of time node t3 is S3. In the gliding animation to be generated without adding the oscillation effect, the geometric data of each bone at time node t0 is S4, the geometric data of time node t1 is S5, the geometric data of time node t2 is S6, and the geometric data of time node t3 is S7. Compare the 3 geometric data of each bone at each time node in the gliding animation to be generated without adding the oscillation effect with the second geometric data S of each bone in the gliding basic pose animation frame. 基 Subtract and obtain the motion data of each bone at the time node t0 in the process of turning from the current direction to the first direction: S4-S 基 , the motion data of the time node t1 is S5-S 基 , the motion data of the time node t2 is S6-S 基 , the motion data of the time node t3 is S7-S 基 The motion data of each bone at each time node in the process of turning from the current direction to the first direction is assigned to the gliding oscillation posture animation, and the geometric data of each bone at the t0 time node in the gliding animation to be generated with the oscillation effect is obtained as S4-S 基 + The geometric data of the S0 and t1 time nodes is S5-S 基 + The geometric data of the S1 and t2 time nodes is S6-S 基 + The geometric data of the S2 and t3 time nodes is S7-S 基 +S 3。

[0159] This setting method, while not destroying the animation effect of the random shaking of the virtual character in the gliding oscillation posture animation, adds the animation effects of turning and tilting the moving direction, further realizing the rich details of the character's gliding process with very few resources.

[0160] In an optional implementation, before step S101, the method for generating a gliding animation provided in the embodiment of the present application may further include the following steps:

[0161] When the virtual character is in a non-gliding state, in response to a gliding instruction for the virtual character, a pre-made gliding charge posture animation frame is used as the starting frame of a 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, so as to generate the first animation of the virtual character entering a gliding state from a non-gliding state.

[0162] In this embodiment, the gliding posture animation frame can be prepared in advance. Figure 8 , which is a schematic diagram of an example of a gliding charging posture animation frame in the gliding animation generation method provided in an embodiment of the present application, in which the virtual character presents a posture of accumulating power to jump.

[0163] When the virtual character is in a non-gliding state, a gliding instruction may be triggered to instruct the virtual character to enter a gliding state from a non-gliding state. In a specific implementation, the gliding instruction may be generated by a shortcut key operation, a voice command operation, an air gesture recognition operation, or a touch operation on a specified control. The touch operation may be a click operation, a slide operation, a press operation, or a drag operation, etc. This embodiment does not specifically limit the method for generating the gliding instruction.

[0164] When a gliding instruction for a virtual character is received, the above-mentioned gliding charge posture animation frame can be used as the starting frame of the first animation to be generated, and the above-mentioned gliding basic posture animation frame can be used as the ending frame of the first animation to be generated, so as to generate 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 ready 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] Obtaining a duration configured for the virtual character to change from a non-gliding state to a gliding state;

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

[0168] The first animation of the virtual character entering the gliding state from the non-gliding state is generated according to the third geometric data.

[0169] The above duration refers to the transition duration between the start frame and the end frame, that is, the transition duration from the gliding ready pose animation frame to the gliding basic pose animation frame. The duration specifically refers to the time required for each skeleton of the virtual character to change from the position and angle in the gliding ready pose animation frame to the position and angle in the gliding basic pose animation frame. The duration is set to an arbitrary floating point number, such as 0.2 seconds.

[0170] In this implementation, by using the gliding charging posture animation frame as the starting frame and the gliding basic posture 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, and the third geometric data includes the third position data and third angle data of each bone.

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

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

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

[0174] Determine 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 an interpolation factor corresponding to each time node of the duration;

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

[0177] First, the fourth geometric data corresponding to each bone in the gliding ready posture animation frame may be obtained, the fourth geometric data including the fourth position data and the fourth angle data of each bone;

[0178] Afterwards, the difference data between the fourth geometric data and the second geometric data may be calculated, that is, the position difference and rotation difference of each bone between the initial state and the end state of the first animation may be calculated;

[0179] Afterwards, the interpolation factor corresponding to each time node within the duration corresponding to the first animation to be generated may be calculated; in the embodiment of the present application, the interpolation factor corresponding to each time node may be calculated by a fourth power deceleration function;

[0180] Afterwards, for each bone at each time node, 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 node, and the position information is the third position data in the third geometric data;

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

[0182] The easeOutQuart easing function is a commonly used easing function that is used to simulate the effect of an object gradually slowing down at the end of an animation or transition effect. This function can make the animation faster at the beginning and gradually slow down at the end, thus producing a more natural and smooth visual effect.

[0183] It should be noted that, through the above-mentioned fourth power deceleration and easing function, the generated first animation changes rapidly in the initial stage, then gradually slows down, and finally stops very smoothly, providing a natural acceleration followed by deceleration effect. Since the starting frame of the first animation (the gliding posture animation frame) is the action of the virtual character accumulating strength to jump in the air, and the posture of the virtual character is relatively relaxed when jumping or falling, the above-mentioned fourth power deceleration and easing function can be combined to simulate the effect of the character suddenly being accelerated by the large air resistance when the glider is spread out, and then moving upward suddenly and then tending to be flat. In addition, through the above-mentioned fourth power deceleration and easing function, it is possible to achieve smooth switching between the starting frame and the ending frame with inconsistent postures.

[0184] In an optional implementation manner, the method for generating a gliding animation provided in the embodiment of the present application may further include the following steps:

[0185] Creating a dynamic rigid body for each of the first joints in the skeleton, wherein the dynamic rigid body has a corresponding spring frequency;

[0186] Determine the physical weight of the rigid body to be added to the gliding animation;

[0187] Determining the target position of each of the first joints after adding rigid body constraints according to the rigid body physical weight, the spring frequency and the position of each of the first joints in the gliding animation;

[0188] The position of each of the first joints in the gliding animation is changed to the target position to obtain a target animation.

[0189] In a physics engine, a rigid body refers to an object with a fixed shape and mass that can be affected by forces and torques to produce movement. The first joints mentioned above refer to the main joints in the skeletons of the virtual character. For example, the first joints may include the joints between the waist and hips, the joints between the hips and thighs (also called hip joints), the joints between the thighs and calves (also called knee joints), the joints between the calves and feet (also called ankle joints), etc.

[0190] In the embodiment of the present application, a dynamic rigid body can be created for each first joint, and a reasonable constraint angle can be set. The dynamic rigid body can move according to the laws of physics when affected by the force and collision of the physics engine. For example, when the virtual character jumps and lands, the rigid bodies of the legs and waist will naturally buffer and rebound according to the ground reaction force and gravity.

[0191] The head, arms and other parts can be set as kinematic rigid bodies. The position and rotation of the kinematic rigid body are directly controlled by the animation controller and are 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 will be affected by the physics engine, showing natural physical effects such as buffering, rebound, swing, etc. At the same time, parts such as the head and arms still maintain precise control of the animation to ensure the smoothness and naturalness of the movements.

[0193] In the gliding stage, as the virtual character enters the gliding state, the physical weight of each dynamic rigid body can be gradually increased from 0 to 1. This process can be achieved through the interpolation function to ensure a smooth transition. During the gliding process, the spring frequency of the rigid bodies in different parts increases from top to bottom. That is to say, the spring frequency of the waist rigid body is the lowest, and the spring frequency of the foot rigid body is the highest. In this way, the rigid bodies closer to the end of the limbs can have a larger range of motion, thereby increasing the naturalness and realism of the virtual character. When the distance between the virtual character and the ground is lower than a certain threshold, the rigid body physical weight is gradually turned off, so that the virtual character's limbs return to the animation position completely, ensuring the return to a stable animation performance before landing.

[0194] In this way, through the rigid body physical weight, the spring frequency of each dynamic rigid body and the position of each first joint in the gliding animation, the target position of each first joint after adding the rigid body constraint can be determined. In this way, the position of the first joint in the gliding animation can be changed to the target position, thereby obtaining the target animation.

[0195] This setting can achieve more realistic physical effects during the gliding process of the virtual character and ensure a smooth transition back to the animation performance before landing. For example, the legs of the virtual character can collide and then bounce off during the gliding process, which improves the animation performance of the gliding animation and further increases the realism.

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

[0197] Corresponding to the method for generating a gliding animation provided in the first embodiment of the present application, the second embodiment of the present application further provides a device for generating a gliding animation, which is applied to a game scene, wherein the game scene includes at least one virtual character, such as Fig. 9 As shown, the gliding animation generating device 900 includes:

[0198] An acquiring unit 901 is configured to acquire a first direction to be reached by the virtual character in response to a direction change instruction for the virtual character in a gliding state;

[0199] A first determining unit 902 is used to determine, according to the first direction, each posture weight corresponding to each gliding intermediate posture animation frame, wherein each of the gliding intermediate posture animation frames is pre-made based on a gliding basic posture animation frame;

[0200] A second determining unit 903 is used to determine first geometric data corresponding to each bone in the virtual character according to each posture weight and each gliding intermediate 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;

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

[0202] Optionally, the generating unit 904 is specifically configured to:

[0203] Generate a gliding oscillation posture animation according to the gliding basic posture animation frame and the left-right rotation amplitude parameter that changes with time;

[0204] A gliding animation of the virtual character turning from a current orientation to the first direction is generated according to the first geometric data and the gliding oscillation gesture animation.

[0205] Optionally, the generating unit 904 is specifically configured to:

[0206] Determine motion data to be executed by each of the bones according to the first geometric data and the second geometric data corresponding to each of the bones in the gliding basic posture animation frame;

[0207] According to the motion data, each of the bones in the gliding oscillation posture animation is driven to move, so as to obtain a gliding animation in which the virtual character turns from a current direction to the first direction.

[0208] Optionally, the generating unit 904 is specifically configured to:

[0209] Determine the gliding oscillation posture animation frame corresponding to each time node according to the gliding basic posture animation frame and the left-right rotation amplitude parameter that changes with time;

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

[0211] The gliding oscillation posture animation frames are played at the playing rate to obtain the gliding oscillation posture animation.

[0212] Optionally, the generating unit 904 is specifically configured to:

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

[0214] The play rate of the gliding animation to be generated is determined according to the gliding speed and a preset maximum speed.

[0215] Optionally, each of the gliding intermediate posture animation frames includes each moving posture animation frame produced with the load-bearing hand of the virtual character during gliding as the axis, and each rotating posture animation frame produced with the character mass center of the virtual character as the rotation base point;

[0216] Among them, each of the moving posture animation frames includes a left tilting animation frame, a right tilting animation frame, a forward tilting animation frame, and a backward tilting animation frame; each of the rotating posture animation frames includes a left rotating animation frame and a right rotating animation frame.

[0217] Optionally, the first determining unit 902 is specifically configured to:

[0218] Determining a first weight of each of the moving posture animation frames according to the first direction; and

[0219] determining a second weight of each of the rotation posture animation frames according to the first direction and second direction data representing the current orientation of the virtual character;

[0220] The second determining unit 903 is specifically configured to:

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

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

[0223] When the virtual character is in a non-gliding state, in response to a gliding instruction for the virtual character, a pre-made gliding charge posture animation frame is used as the starting frame of a 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, so as to generate the first animation of the virtual character entering a gliding state from a non-gliding state.

[0224] Optionally, the generating unit 904 is further specifically configured to:

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

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

[0227] The first animation of the virtual character entering the gliding state from the non-gliding state is generated according to the third geometric data.

[0228] Optionally, the generating unit 904 is further specifically configured to:

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

[0230] Determine 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 an interpolation factor corresponding to each time node of the duration;

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

[0233] Optionally, the second determining unit 903 is specifically configured to:

[0234] Determining, according to the first weight, a first sub-weight corresponding to each time node of each moving posture animation frame in the gliding animation to be generated;

[0235] Determining, according to the second weight, a second sub-weight corresponding to each time node of each rotation posture animation frame in the gliding animation to be generated;

[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 respectively to obtain the first geometric data corresponding to each time node of each bone in the gliding animation to be generated.

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

[0238] Creating a dynamic rigid body for each of the first joints in the skeleton, wherein the dynamic rigid body has a corresponding spring frequency;

[0239] Determine the physical weight of the rigid body to be added to the gliding animation;

[0240] Determining the target position of each of the first joints after adding rigid body constraints according to the rigid body physical weight, the spring frequency and the position of each of the first joints in the gliding animation;

[0241] The position of each of the first joints in the gliding animation is changed to the target position to obtain a target animation.

[0242] Corresponding to the method for generating a gliding animation provided in the first embodiment of the present application, the third embodiment of the present application further provides an electronic device for generating a gliding animation.

[0243] like Fig.10 , which is a structural block diagram of an example of an electronic device for data processing provided in an embodiment of the present application.

[0244] In this embodiment, an optional hardware structure of the electronic device 1000 can be as follows: Fig.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] The bus 1005 may be a communication device for transmitting data between components inside the electronic device 1000, such as an internal bus (e.g., a CPU-memory bus, where the processor is a central processing unit, CPU for short), an external bus (e.g., a universal serial bus port, a peripheral component interconnect express port), etc.

[0246] In addition, the electronic device further 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, an intranet, a local area network, a 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] The peripheral interface 1007 is used to connect to the peripheral device, and the peripheral device can be the peripheral device 1 ( Fig.10 1009 in), peripheral 2 ( Fig.10 1010) and peripheral 3 ( Fig.10 1011 in the figure). Peripherals are peripheral devices, which may include but are not limited to cursor control devices (such as mice, touch pads or touch screens), 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, or an application specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

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

[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 instruction for the virtual character in a gliding state, acquiring a first direction to be reached by the virtual character;

[0252] According to the first direction, determining each posture weight corresponding to each gliding intermediate posture animation frame, wherein each of the gliding intermediate posture animation frames is pre-produced based on the gliding basic posture animation frame;

[0253] Determine first geometric data corresponding to each bone in the virtual character according to each of the posture weights and each of the gliding intermediate posture animation frames, wherein the first geometric data includes first position data corresponding to a first position to be reached by each of the bones and first angle data corresponding to a first angle to be reached by each of the bones;

[0254] A gliding animation of the virtual character turning from a current orientation to the first direction is generated according to the first geometric data and the gliding basic posture animation frame.

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

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

[0257] According to the first direction, determining each posture weight corresponding to each gliding intermediate posture animation frame, wherein each of the gliding intermediate posture animation frames is pre-produced based on the gliding basic posture animation frame;

[0258] Determine first geometric data corresponding to each bone in the virtual character according to each of the posture weights and each of the gliding intermediate posture animation frames, wherein the first geometric data includes first position data corresponding to a first position to be reached by each of the bones and first angle data corresponding to a first angle to be reached by each of the bones;

[0259] A gliding animation of the virtual character turning from a current orientation to the first direction is generated according to the first geometric data and the gliding basic posture animation frame.

[0260] It should be noted that for the detailed description of the devices, electronic devices and computer-readable storage media provided in the second, third and fourth embodiments of the present application, reference can be made to the relevant description of the first embodiment of the present application, and no further details will be given here.

[0261] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

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

[0263] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0264] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules 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), random access memory (RAM) of other attributes, read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage media or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.

[0265] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0266] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

Claims

1. A method for generating a gliding animation, characterized in that: Applied to a game scene, the game scene includes at least one virtual character, and the method includes: In response to a direction change instruction for the virtual character in a gliding state, acquiring a first direction to be reached by the virtual character; According to the first direction, determining each posture weight corresponding to each gliding intermediate posture animation frame, wherein each of the gliding intermediate posture animation frames is pre-produced based on the gliding basic posture animation frame; Determine first geometric data corresponding to each bone in the virtual character according to each of the posture weights and each of the gliding intermediate posture animation frames, wherein the first geometric data includes first position data corresponding to a first position to be reached by each of the bones and first angle data corresponding to a first angle to be reached by each of the bones; A gliding animation of the virtual character turning from a current orientation to the first direction is generated according to the first geometric data and the gliding basic posture animation frame.

2. The method according to claim 1, characterized in that The step of generating a gliding animation of the virtual character turning from a current orientation to the first direction according to the first geometric data and the gliding basic posture animation frame comprises: Generate a gliding oscillation posture animation according to the gliding basic posture animation frame and the left-right rotation amplitude parameter that changes with time; A gliding animation of the virtual character turning from a current orientation to the first direction is generated according to the first geometric data and the gliding oscillation gesture animation.

3. The method according to claim 2, characterized in that The step of generating a gliding animation of the virtual character turning from a current orientation to the first direction according to the first geometric data and the gliding oscillation posture animation comprises: Determine motion data to be executed by each of the bones according to the first geometric data and the second geometric data corresponding to each of the bones in the gliding basic posture animation frame; According to the motion data, each of the bones in the gliding oscillation posture animation is driven to move, so as to obtain a gliding animation in which the virtual character turns from a current direction to the first direction.

4. The method according to claim 2, characterized in that: The step of generating a gliding oscillation posture animation according to the gliding basic posture animation frame and the left-right rotation amplitude parameter that changes with time includes: Determine the gliding oscillation posture animation frame corresponding to each time node according to the gliding basic posture animation frame and the left-right rotation amplitude parameter that changes with time; Determining the playback rate of the gliding animation to be generated; The gliding oscillation posture animation frames are played at the playing rate to obtain the gliding oscillation posture animation.

5. The method according to claim 4, characterized in that The step of determining the playback rate of the gliding animation to be generated comprises: Obtaining the gliding speed of the virtual character; The play rate of the gliding animation to be generated is determined according to the gliding speed and a preset maximum speed.

6. The method according to claim 1, characterized in that Each of the gliding intermediate posture animation frames includes each moving posture animation frame produced with the load-bearing hand of the virtual character during gliding as the axis, and each rotating posture animation frame produced with the character mass center of the virtual character as the rotation base point; Among them, each of the moving posture animation frames includes a left tilting animation frame, a right tilting animation frame, a forward tilting animation frame, and a backward tilting animation frame; each of the rotating posture animation frames includes a left rotating animation frame and a right rotating animation frame.

7. The method according to claim 6, characterized in that Determining, according to the first direction, each posture weight corresponding to each gliding intermediate posture animation frame includes: Determining a first weight of each of the moving posture animation frames according to the first direction; and determining a second weight of each of the rotation posture animation frames according to the first direction and second direction data representing the current orientation of the virtual character; The step of determining the first geometric data corresponding to each bone in the virtual character according to each posture weight and each gliding intermediate posture animation frame comprises: Each of the moving posture animation frames and each of the rotating posture animation frames are weighted according to the first weight and the second weight, so as to obtain first geometric data corresponding to each of the bones.

8. The method according to claim 1, characterized in that Before acquiring the first direction to be reached by the virtual character in response to the direction change instruction for the virtual character in the gliding state, the method further includes: When the virtual character is in a non-gliding state, in response to a gliding instruction for the virtual character, a pre-made gliding charge posture animation frame is used as the starting frame of a 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, so as to generate the first animation of the virtual character entering a gliding state from a non-gliding state.

9. The method according to claim 8, characterized in that The method of using the pre-made gliding ready 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, comprises: Obtaining a duration configured for the virtual character to change from a non-gliding state to a gliding state; Determine, according to the gliding ready posture animation frame and the gliding basic posture animation frame, third geometric data corresponding to each of the bones at each time node of the duration; The first animation of the virtual character entering the gliding state from the non-gliding state is generated according to the third geometric data.

10. The method according to claim 9, characterized in that The determining, according to the gliding ready posture animation frame and the gliding basic posture animation frame, the third geometric data corresponding to each of the bones at each time node of the duration includes: Obtain fourth geometric data corresponding to each of the bones in the gliding ready posture animation frame; Determine 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 an interpolation factor corresponding to each time node of the duration; The third geometric data corresponding to each of the bones at each time node of the duration is determined according to the interpolation factor, the difference data and the second geometric data.

11. The method according to claim 7, characterized in that The step of weighting each of the moving posture animation frames and each of the rotating posture animation frames according to the first weight and the second weight to obtain first geometric data corresponding to each of the bones includes: Determining, according to the first weight, a first sub-weight corresponding to each time node of each moving posture animation frame in the gliding animation to be generated; Determining, according to the second weight, a second sub-weight corresponding to each time node of each rotation posture animation frame in the gliding animation to be generated; 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 respectively to obtain the first geometric data corresponding to each time node of each bone in the gliding animation to be generated.

12. The method according to claim 1, characterized in that The method further comprises: Creating a dynamic rigid body for each of the first joints in the skeleton, wherein the dynamic rigid body has a corresponding spring frequency; Determine the physical weight of the rigid body to be added to the gliding animation; Determining the target position of each of the first joints after adding rigid body constraints according to the rigid body physical weight, the spring frequency and the position of each of the first joints in the gliding animation; The position of each of the first joints in the gliding animation is changed to the target position to obtain a target animation.

13. A device for generating a gliding animation, characterized in that: Applied to a game scene, the game scene includes at least one virtual character, and the device includes: an acquisition unit, configured to acquire a first direction to be reached by the virtual character in response to a direction change instruction for the virtual character in a gliding state; A first determining unit is used to determine, according to the first direction, each posture weight corresponding to each gliding intermediate posture animation frame, wherein each of the gliding intermediate posture animation frames is pre-made based on a gliding basic posture animation frame; A second determining unit is used to determine first geometric data corresponding to each bone in the virtual character according to each of the posture weights and each of the gliding intermediate posture animation frames, wherein the first geometric data includes first position data corresponding to a first position to be reached by each of the bones and first angle data corresponding to a first angle to be reached by each of the bones; A generating unit is used to generate a gliding animation of the virtual character turning from a current orientation to the first direction according to the first geometric data and the gliding basic posture animation frame.

14. An electronic device, characterized in that: include: processor; as well as The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the method according to any one of claims 1 to 12 is executed.

15. A computer-readable storage medium, characterized in that: A data processing program is stored, and the program is run by a processor to execute the method according to any one of claims 1 to 12.

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