Climbing animation adaptation method and device, equipment and storage medium

By adjusting the bone position information of virtual characters on the climbing tool and adapting to climbing tools of different sizes, the problem of large overhead of animation resources in the existing technology is solved, and flexible adaptation and saving of animation resources is achieved.

CN119206002APending Publication Date: 2024-12-27TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411302924.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The prior art requires customizing corresponding animation resources for model sizes of different ladders, resulting in excessive overhead of animation resources.

Method used

By obtaining the expected grasp position of the virtual character on the climbing tool, adjusting the bone position information in the animation resource to adapt to the climbing tool of different model sizes, and generating animation resources suitable for the new tool.

Benefits of technology

There is no need to design corresponding animation resources for the horizontal bar spacing of different ladders, which effectively saves the overhead of animation resources and improves the adaptability and realistic nature of animation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206002A_ABST
    Figure CN119206002A_ABST
Patent Text Reader

Abstract

The invention discloses a climbing animation adaptation method and device, equipment and a storage medium, and belongs to the technical field of computer animation. The method comprises the following steps: acquiring a first animation resource of a virtual character adapted to a first climbing tool, wherein the first animation resource comprises position information of N skeletons of the virtual character in a one-time climbing process on the first climbing tool; acquiring an expected grasping position of a palm child skeleton of the virtual character on the second climbing tool; determining an expected position of the root bone based on the expected grasping position; and based on the expected position of the root skeleton, adjusting position information of N skeletons contained in the first animation resource to obtain a second animation resource of which the virtual character is adaptive to the second climbing tool. According to the method, only the position information of each skeleton in the first animation resource is adjusted so as to adapt to climbing tools with different model sizes (such as different grabbing point intervals), and the expense of the animation resource is effectively saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer animation technology, and in particular to a climbing animation adaptation method, device, equipment and storage medium. Background Art

[0002] In game applications, by interacting with climbing tools (such as ladders), virtual characters are able to climb or descend, providing players with diverse gaming experiences and interactive fun.

[0003] In the related art, the interaction mode between the virtual character and the climbing tool (such as a ladder) can adapt the ladder model scheme for the animation resource. Specifically, first, make the animation resource of the virtual character that interacts reasonably with the ladder model. For example, you can create animation resources for the virtual character's climbing, descending and other actions on the ladder. In these animation resources, the position of the virtual character's hands and feet during the movement should match the model size of the ladder, such as the spacing between the ladder's crossbars. Then play the animation at the interaction point between the virtual character and the ladder to realize the movement of the virtual character on the ladder. For example, when the virtual character's hand position touches the ladder, the corresponding animation resource can be automatically played to realize the movement of the virtual character on the ladder.

[0004] The above method requires customizing corresponding animation resources for different ladder model sizes (such as different ladder horizontal bar spacings), which will bring about the problem of excessive animation resource overhead. Summary of the invention

[0005] The embodiment of the present application provides a climbing animation adaptation method, device, equipment and storage medium. The technical solution provided by the embodiment of the present application is as follows:

[0006] According to one aspect of an embodiment of the present application, a climbing animation adaptation method is provided, the method comprising:

[0007] Acquire a first animation resource of a virtual character adapted for a first climbing tool, wherein the first animation resource includes position information of N bones of the virtual character during a climbing process on the first climbing tool, wherein the N bones include a root bone and at least one child bone, and N is an integer greater than or equal to 2;

[0008] Acquire an expected gripping position of a palm sub-skeleton of the virtual character on a second climbing tool; the expected gripping position is a gripping point that the palm sub-skeleton is expected to reach when the climbing process is completed, and the at least one sub-skeleton includes the palm sub-skeleton;

[0009] Based on the expected grasping position, determining an expected position of a root skeleton; the expected position of the root skeleton is the position that the root skeleton is expected to reach when the palm sub-skeleton reaches the expected grasping position;

[0010] Based on the expected position of the root bone, the position information of the N bones included in the first animation resource is adjusted to obtain a second animation resource adapted for the virtual character to the second climbing tool.

[0011] According to one aspect of an embodiment of the present application, there is provided a climbing animation adaptation device, the device comprising:

[0012] A first acquisition module is used to acquire a first animation resource adapted for a first climbing tool by a virtual character, wherein the first animation resource includes position information of N bones of the virtual character during a climbing process on the first climbing tool, wherein the N bones include a root bone and at least one child bone, and N is an integer greater than or equal to 2;

[0013] A second acquisition module is used to acquire an expected gripping position of a palm sub-bone of the virtual character on a second climbing tool; the expected gripping position is a gripping point that the palm sub-bone is expected to reach when the climbing process is completed, and the at least one sub-bone includes the palm sub-bone;

[0014] A first determination module is used to determine an expected position of a root skeleton based on the expected grasping position; the expected position of the root skeleton is the position that the root skeleton is expected to reach when the palm sub-skeleton reaches the expected grasping position;

[0015] The first adjustment module is used to adjust the position information of the N bones included in the first animation resource based on the expected position of the root bone, so as to obtain a second animation resource adapted for the virtual character to the second climbing tool.

[0016] According to one aspect of an embodiment of the present application, a computer device is provided, the computer device comprising a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the above-mentioned climbing animation adaptation method.

[0017] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the above-mentioned climbing animation adaptation method.

[0018] According to one aspect of an embodiment of the present application, a computer program product is provided. The computer program product includes a computer program. The computer program is loaded and executed by a processor to implement the above-mentioned climbing animation adaptation method.

[0019] The technical solution provided by the embodiments of the present application includes at least the following beneficial effects:

[0020] The expected position of the root bone can be determined by the expected gripping position of the palm sub-bone on the second climbing tool, and the expected position of the root bone can be used to adjust the position information of each bone in the first animation resource adapted to the first climbing tool, thereby obtaining the second animation resource adapted to the second climbing tool. Since the method only adjusts the position information of each bone in the first animation resource to adapt to climbing tools of different model sizes (such as different gripping point spacings), there is no need to design corresponding animation resources for climbing tools with different gripping point spacings (such as different ladder crossbar spacings), thereby effectively saving the cost of animation resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a schematic diagram of an implementation environment of a solution provided by an embodiment of the present application;

[0022] Figure 2 is a flow chart of a climbing animation adaptation method provided by an embodiment of the present application;

[0023] Figure 3 is a flow chart of a climbing animation adaptation method provided by another embodiment of the present application;

[0024] Figure 4 This is a schematic diagram of a climbing animation display interface from a first-person perspective provided by an embodiment of the present application;

[0025] Figure 5 This is a schematic diagram of a climbing animation display interface from a third-person perspective provided by an embodiment of the present application;

[0026] Figure 6 is a schematic diagram of animation frames of a virtual character climbing process provided by an embodiment of the present application;

[0027] Figure 7 is a block diagram of a climbing animation adaptation device provided by an embodiment of the present application;

[0028] Figure 8 It is a structural block diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0030] Please refer to Figure 1, which shows a schematic diagram of a solution implementation environment provided by an embodiment of the present application. The solution implementation environment can be implemented as an application system. The implementation environment can include: a terminal device 10 and a server 20.

[0031] The terminal device 10 includes, but is not limited to, mobile phones, tablet computers, intelligent voice interaction devices, game consoles, wearable devices, multimedia playback devices, PCs (Personal Computers), vehicle-mounted terminals, smart home appliances, AR (Augmented Reality) devices, VR (Virtual Reality) devices and other electronic devices. The terminal device 10 can run the client of the target application (such as a visual programming application). Optionally, the target application can be an application that needs to be downloaded and installed, or it can be in the form of a web page or a small program, which is not limited in the embodiments of the present application.

[0032] In the embodiment of the present application, the target application may be, but is not limited to, an open world game application, a level-breaking game application, a war strategy game application, a tower defense game application, a real-time strategy game (RTS) application, a turn-based strategy game application, a grand strategy game application, a city construction and management game application, a war strategy game application, a business strategy game application, a strategy game (Simulation Game, SLG) application, a social application, an interactive entertainment application, a simulation program, a virtual reality (VR) application, an augmented reality (AR) application, a three-dimensional map application, a virtual reality game application, an augmented reality game application, a party game application, and the like.

[0033] In some embodiments, the target application may include a UGC (User Generated Content) editor, which can implement custom editing of the size of the climbing tool, such as the user can edit the length of the climbing tool and the spacing between adjacent gripping points. By custom designing the size of the climbing tool and executing the climbing animation adaptation method provided in this application, the system can obtain animation resources adapted to the designed climbing tool, so that the climbing animation of the virtual character can be displayed in the target application based on the animation resources. Exemplarily, when the climbing tool is a ladder, the user can customize the spacing between the horizontal bars of the ladder, and then by executing the climbing animation adaptation method of this application, the system can generate a climbing animation of the virtual character on a ladder with different horizontal bar spacings.

[0034] The execution subject of the above climbing animation adaptation method can be a terminal device or a server. When the execution subject of the method is a server, the server sends the obtained animation resource data to the terminal device, so that the terminal device can display the climbing animation of the virtual character on the terminal screen based on the received animation resource data.

[0035] The above-mentioned virtual character refers to an interactive element in the target application. Taking the target application as a game application as an example, the virtual character refers to a character controlled by the user in the game application. The virtual character can be in the form of a person, an animal, a cartoon or other forms, which is not limited in the embodiments of the present application. The virtual object can be displayed in three-dimensional form or in two-dimensional form, which is not limited in the embodiments of the present application. Optionally, when the virtual scene in which the virtual character is located is a three-dimensional virtual environment, the virtual character is a three-dimensional stereo model, such as a three-dimensional stereo model created based on animation skeleton technology. Each virtual character has its own shape and volume in the three-dimensional virtual environment and occupies a part of the space in the three-dimensional virtual environment. Schematically, the virtual character is a virtual person, such as a simulated person character or an animated person character. In some implementations, the virtual character can also be implemented using a 2.5-dimensional or 2-dimensional model, which is not limited in the embodiments of the present application.

[0036] The server 20 is used to provide background services for the client of the target application in the terminal device 10. For example, the server 20 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but is not limited to these.

[0037] The terminal device 10 and the server 20 can communicate with each other via a network, which can be a wired network or a wireless network.

[0038] Please refer to Figure 2 , which shows a flow chart of a climbing animation adaptation method provided by an embodiment of the present application. The execution subject of each step of the method may be a computer device, for example, the computer device may be Figure 1 The terminal device 10 in the implementation environment of the solution shown may also be Figure 1 The method may include at least one of the following steps (210-240):

[0039] Step 210, obtaining a first animation resource adapted for the first climbing tool for the virtual character, the first animation resource including position information of N bones of the virtual character during a climbing process on the first climbing tool, the N bones including a root bone and at least one child bone, and N being an integer greater than or equal to 2.

[0040] A climbing tool refers to a structure that a virtual character contacts and relies on during the climbing process, such as a handle on a wall, a rack, a ladder, a climbing net, etc. The structure of the climbing tool may include a gripping point, which may also be referred to as a climbing point. A gripping point refers to a position used by a virtual character to grip, support, or step on during the climbing process. The structures of different types of climbing tools may be different. Exemplarily, when the climbing tool is a ladder, the structure of the climbing tool may include a crossbar of the ladder, and the gripping point is any position on the crossbar. When the climbing tool is a climbing wall, the gripping point may include various protrusions, gripping points, or grooves on the wall. When the climbing tool is a climbing net, the gripping point may include a grid intersection, any position in the grid, and a contact point at the edge of the grid. This application does not limit the type of climbing tool.

[0041] The structure of the climbing tool may include the size of the climbing tool and the spacing of the gripping points. The size of the climbing tool is used to determine the range of movement of the virtual character on the climbing tool. It may include length, width and height. The spacing of the gripping points refers to the distance between adjacent gripping points, which is used to determine the moving distance of the virtual character during the climbing process. Exemplarily, when the climbing tool is a ladder, the size of the ladder may refer to the length of the ladder, and the spacing of the gripping points of the ladder may refer to the spacing of the ladder crossbars. Exemplarily, when the climbing tool is a rock climbing net, the size of the rock climbing net may refer to the overall coverage area of ​​the net. The spacing of the gripping points of the rock climbing net may refer to the distance between the intersections of the grid or the distance between certain specific gripping points in the grid. The present application does not limit the structure of the climbing tool.

[0042] The climbing tool may be a curved surface or a flat surface. For example, the curved climbing tool may include a curved wall, an arched structure, a cylinder, a sphere, or any other structure with a curved surface. The flat climbing tool may include a straight wall, a ladder, or any other structure with a flat surface. This application does not limit this.

[0043] The animation resource in this application refers to a sequence of animation frames included in a climbing process of a virtual character on a climbing tool. By playing the animation frame sequence, the continuous action performance of the virtual character in the climbing process can be obtained. The number of frames in a sequence of animation frames included in a climbing process can range from dozens to hundreds of frames, and the specific number depends on the complexity of the climbing action and the sophistication of the animation resources. It is understandable that the more frames a sequence of animation frames includes in a climbing process, the higher the details and smoothness of the climbing animation will be, making the climbing action more natural and realistic. The fewer frames a sequence of animation frames includes in a climbing process, the more it can save the overhead and development cost of animation resources. For simple climbing actions, dozens of frames can be used to express the climbing action of the virtual character, and for complex and detailed climbing actions, hundreds of frames can be used to accurately capture the climbing details of the virtual character. This application does not limit this.

[0044] Each animation frame includes the position information of each skeleton (also called skeleton point) contained in the virtual character. The position information may include the position, rotation angle and scaling angle of the skeleton point. The position of the skeleton point may refer to the spatial coordinates of the skeleton point in the virtual scene. When the virtual scene in which the virtual character is located is a three-dimensional space, the spatial coordinates are three-dimensional coordinates, which can be represented by abscissa, ordinate and vertical coordinates, and are used to determine the specific position of the skeleton point in the virtual scene. The rotation angle refers to the rotation angle of the skeleton point around its own axis, usually expressed in degrees (or radians), and is used to describe the displacement direction of the skeleton point. The scaling angle refers to the scaling ratio of the skeleton point in space, usually expressed as a scale factor, and is used to describe the size change of the skeleton point.

[0045] It is understandable that the skeleton points of the virtual character are used to control the movement of the virtual character. The skeleton points can be divided into root skeletons and sub-skeletons. Among them, the root skeleton refers to the main skeleton in the skeleton system of the virtual character, which is the starting point or basic skeleton of the entire skeleton system. The root skeleton is responsible for the movement and transformation of the entire skeleton system and can be located at the ground position of the center of the virtual character. Sub-skeleton refers to the lower-level skeleton relative to the root skeleton, which is attached to the root skeleton and moves with the movement of the root skeleton. Sub-skeleton can include limb bones, fingers, feet, etc. In some embodiments, the number of root skeletons is 1, and the number of sub-skeletons is at least one. Normally, when the virtual character is a virtual person, the number of whole body skeleton points of the virtual person is 70, including 1 root skeleton and 69 sub-skeletons.

[0046] In some embodiments, the root bone is used to drive the child bones to move. For example, in order to realize the climbing action of the virtual character on the ladder, the position of the root bone should be moved up, and the upward movement of the root bone will be transmitted to the child bones, and the child bones (such as limbs and torso) will also move accordingly to ensure that the virtual character completes the climbing action.

[0047] A climbing process of a virtual character on a climbing tool includes a starting moment and an ending moment. The position of the root skeleton and the palm sub-skeleton of the virtual character on the climbing tool at the starting moment can be referred to as the starting position. The position of the root skeleton of the virtual character at the ending moment is referred to as the first target position (for the first climbing tool) and the expected position of the root skeleton (for the second climbing tool) in this application. The position of the palm sub-skeleton of the virtual character on the climbing tool is referred to as the first target grasping position (for the first climbing tool) and the expected grasping position (for the second climbing tool) in this application.

[0048] A climbing process can be an ascending process, a descending process, or a horizontal movement process, which is not limited in this application. For example, taking a climbing tool as a ladder, a climbing process of a virtual character on the climbing tool can refer to a complete climbing process in which a palm of the virtual character starts from the current grasping horizontal bar position (i.e., the starting position), and gradually moves to the grasping point of another horizontal bar (i.e., the desired grasping position) through the coordinated actions of the root skeleton and other trunk and limbs of the body. The process includes the entire action chain of the virtual character's palm starting from the starting position, the movement and adjustment of the root skeleton and other trunk and limbs of the body, and the final movement of the palm to the desired grasping position.

[0049] It is understandable that the structure of the climbing tool is different, and the animation resources adapted to the climbing tool are different. Specifically, when the spacing of the gripping points of the climbing tool is different, the animation resources adapted to the climbing tool are different. Taking the climbing tool as a ladder as an example, illustratively, when the spacing between the horizontal bars of the ladder is small, the displacement of the bone points in a climbing process of the virtual character in the animation resource is small, such as the displacement of the palm sub-bone in the direction of the ladder and the extension of the arm will be smaller, to adapt to the smaller horizontal bar spacing. When the spacing between the horizontal bars of the ladder is large, the displacement of the palm sub-bone in the direction of the ladder and the extension of the arm of the virtual character in the animation resource will be larger, to adapt to the larger horizontal bar spacing.

[0050] The main problem to be solved by the present application is: how to generate a second animation resource adapted to a second climbing tool based on a first animation resource designed for a first climbing tool. For example, taking a ladder as an example, the first climbing tool may be a ladder with a horizontal bar spacing of 1 meter, and a first animation resource adapted to the ladder with a horizontal bar spacing of 1 meter may be designed, and the first animation resource may enable a virtual character to perform climbing actions on a ladder with a horizontal bar spacing of 1 meter. The second climbing tool may be a ladder with a horizontal bar spacing of 0.5 meters, and the technical problem to be solved by the present application is: how to generate a second animation resource based on the first animation resource, and the second animation resource may be adapted to the climbing action of a ladder with a horizontal bar spacing of 0.5 meters.

[0051] Step 220, obtaining the expected gripping position of the palm sub-skeleton of the virtual character on the second climbing tool; the expected gripping position is the gripping point that the palm sub-skeleton is expected to reach when the climbing process is completed, and at least one sub-skeleton includes the palm sub-skeleton.

[0052] The palm sub-skeleton may be the palm position, which is used to locate the position of the palm of the virtual character on the climbing tool. The expected gripping position may refer to the spatial coordinates of the expected gripping position. For example, taking the climbing tool as a ladder, the expected gripping position may be the spatial coordinates of any point on a horizontal bar of the ladder. The expected gripping position of the palm sub-skeleton of the virtual character on the second climbing tool is obtained to ensure that the palm sub-skeleton can accurately fit the expected gripping position, thereby achieving the realism of the climbing action.

[0053] Step 230, based on the expected grasping position, determine the expected position of the root skeleton; the expected position of the root skeleton is the position that the root skeleton is expected to reach when the palm sub-skeleton reaches the expected grasping position.

[0054] The expected position of the root skeleton may be the spatial coordinates of the expected position of the root skeleton. In some embodiments, when the virtual character performs a climbing action on a climbing tool with different gripping point spacings (such as a ladder with different crossbar spacings), the relative position of the palm sub-skeleton and the root skeleton may not change, and the expected position of the root skeleton can be determined by the expected gripping position and relative position of the palm sub-skeleton. Furthermore, by controlling the relative position of the palm sub-skeleton and the root skeleton to remain unchanged, when the root skeleton reaches the expected position of the root skeleton, it can be ensured that the palm sub-skeleton reaches the expected gripping position, thereby improving the accuracy and realism of the climbing animation.

[0055] In some embodiments, the spatial coordinates of the expected position of the root bone can be determined based on the index of the expected position of the root bone. The index of the expected position of the root bone refers to an identifier used to identify and distinguish different gripping points of the climbing tool. It can be understood that the identifier and the spatial coordinate are in a one-to-one correspondence, and different identifiers correspond to different spatial coordinates. Through the index of the expected position of the root bone, the spatial coordinates of the expected position of the root bone can be quickly found and determined.

[0056] In some embodiments, please refer to Figure 3 , which shows a flow chart of a climbing animation adaptation method provided by another embodiment of the present application. The method may include: Figure 3 In the process 300, specifically, Figure 3As shown, the user inputs a climbing instruction, and the virtual character receives the instruction and performs a climbing action. The climbing process steps may include obtaining an index of the desired gripping position; based on the index of the desired gripping position, obtaining the spatial coordinates of the desired gripping position. After obtaining the spatial coordinates of the desired gripping position, the spatial coordinates of the desired position of the root bone can be determined based on the spatial coordinates of the desired gripping position, and then the root bone drives the sub-bones to move in the process of moving to the desired position of the root bone to achieve the climbing action of the virtual character. When there is a first angle between the displacement direction of the root bone when completing the climbing process on the first climbing tool and the displacement direction of the palm sub-bone when completing the climbing process on the second climbing tool, it is also necessary to adjust the rotation angle of the root bone to rotate the displacement direction of the root bone to the displacement direction of the starting position and the desired gripping position. For the specific process, please see below.

[0057] Step 240: Based on the expected position of the root bone, adjust the position information of the N bones included in the first animation resource to obtain a second animation resource adapted to the second climbing tool for the virtual character.

[0058] In some embodiments, the second animation resource includes data of multiple second animation frames included in a climbing process of the virtual character on the second climbing tool. The data of each second animation frame in the multiple second animation frames includes: position information of N bones included in the virtual character, the N bones include a root bone and at least one child bone, and N is an integer greater than or equal to 2.

[0059] In some embodiments, based on the expected position of the root bone, the position information of N bones contained in each first animation frame of the first animation resource is adjusted to obtain the adjusted position information of each first animation frame; based on the adjusted position information of each first animation frame, the position information of N bones contained in each second animation frame is determined; based on the position information of N bones contained in each second animation frame, a second animation resource adapted for the virtual character to the second climbing tool is obtained.

[0060] In some embodiments, the adjusted position information of each first animation frame is used as the position information of the N bones included in each second animation frame.

[0061] In some embodiments, the terminal device can display a climbing animation of a virtual character on a second climbing tool on a terminal screen based on a second animation resource. In some embodiments, the terminal device displays a climbing animation display interface, which is used to display a climbing animation of a virtual character on a second climbing tool, and the climbing animation is determined based on the second animation resource, and the second animation resource is obtained by adjusting the position information of N bones contained in each first animation frame of the first animation resource, wherein the first animation resource includes data of multiple first animation frames contained in a climbing process of the virtual character on the first climbing tool, and the data of each first animation frame in the multiple first animation frames includes: position information of N bones contained in the virtual character, and the N bones include a root bone and at least one child bone, and N is an integer greater than or equal to 2.

[0062] In some embodiments, the terminal device displays a climbing animation display interface, which is used to display the climbing animation of the virtual character on the second climbing tool from a first-person perspective. Figure 4 , which shows a schematic diagram of a climbing animation display interface 40 in a first-person perspective provided by an embodiment of the present application. Figure 4 As shown, in the first-person perspective, the adaptation of the hand composition of the virtual character can be achieved. That is, during the climbing process of the virtual character on the ladder, the relative position ratio of the hand on the terminal screen can be ensured to remain consistent. It can be understood that when the adaptation of the left hand composition of the virtual character is achieved in the first-person perspective, what is obtained in the above step 220 is the expected gripping position of the palm sub-skeleton of the left hand of the virtual character on the second climbing tool, which can ensure that, in the first-person perspective, the left hand of the virtual character is accurately fitted to the gripping point, thereby improving the user experience.

[0063] In some embodiments, the terminal device displays a climbing animation display interface, which is used to display the climbing animation of the virtual character on the second climbing tool from a third-person perspective. Figure 5 , which shows a schematic diagram of a climbing animation display interface 50 in a third-person perspective provided by an embodiment of the present application. Figure 5 As shown, in the third-person perspective, the complete climbing action of the virtual character on the second climbing tool can be displayed. Through the third-person perspective, the user can observe the full-body climbing action and posture changes of the virtual character more clearly, have a more comprehensive understanding of the details of the climbing action, enhance the perception and control of the virtual character's action, and thus improve the user experience.

[0064] In some embodiments, in response to the setting operation for the size and gripping point of the second climbing tool, a climbing animation of the virtual character on the second climbing tool is displayed in the climbing animation display interface. The setting operation for the size and gripping point of the second climbing tool may include setting the length, width, and spacing of the gripping points of the climbing tool. Exemplarily, taking the climbing tool as a ladder as an example, the length of the ladder and the spacing of the horizontal bars of the ladder can be set. With the above method, the user can flexibly set the size of the climbing tool and the distance of the gripping points, so that the user can intuitively observe the climbing performance of the virtual character under different climbing tool configurations.

[0065] The technical solution provided by the embodiment of the present application can determine the expected position of the root bone through the expected gripping position of the palm sub-bone on the second climbing tool, and can use the expected position of the root bone to adjust the position information of each bone in the first animation resource adapted to the first climbing tool, thereby obtaining the animation resource adapted to the second climbing tool. Since this method only adjusts the position information of each bone in the first animation resource to adapt to climbing tools of different model sizes (such as different gripping point spacings), there is no need to design corresponding animation resources for climbing tools with different gripping point spacings (such as different ladder crossbar spacings), thereby effectively saving the cost of animation resources.

[0066] The following describes a method for determining the expected position of the root bone. The above step 230 can be implemented based on the following steps 231 to 233.

[0067] Step 231, obtaining the first target grasping position of the palm sub-bone on the first climbing tool and the first target position of the root bone from the first animation resource; the first target grasping position is the grasping point that the palm sub-bone is designed to reach when the climbing process is completed; the first target position is the position that the root bone is designed to reach when the palm sub-bone reaches the first target grasping position.

[0068] In some embodiments, based on the first target gripping position and the first target position, the relative position of the first target gripping position and the first target position can be determined, and the relative position is also the offset of the positions of the two in the following text. By clarifying the relative position of the first target gripping position and the first target position, the relative position can be used as a reference to adjust the position information of each skeletal point to adapt to climbing tools with different gripping point spacings. The specific design value of the relative position of the first target gripping position and the first target position can be designed based on the experience of technicians, and this application does not limit this.

[0069] For example, Figure 6 The child Figure 1As shown, the first target grasping position of the palm sub-bone on the first climbing tool may be position 61 , and the first target position reached by the root bone may be position 62 .

[0070] Step 232, based on the offset between the first target position and the first target grasping position, determine the offset between the root bone desired position and the desired grasping position.

[0071] In some embodiments, the offset between the first target position and the first target grasp position is equal to the offset between the root bone desired position and the desired grasp position.

[0072] Step 233, determining the expected position of the root bone based on the offset between the expected position of the root bone and the expected grasping position, and the expected grasping position.

[0073] The offset between positions refers to the distance offset and the angle offset between positions. The distance offset refers to the difference in distance between the two, and the angle offset may refer to the angle between the line connecting the two and the climbing tool. The offset between the first target position and the first target gripping position refers to the distance offset and the angle offset between the first target position and the first target gripping position.

[0074] In some embodiments, Figure 5 As shown, the offsets between the desired gripping positions of the palm sub-skeleton and the desired positions of the root bones of the climbing tools with gripping points of different spacings and different inclinations are consistent, that is, the distance offset and the angle offset between the desired gripping positions of the palm sub-skeleton and the desired positions of the root bones are equal. Exemplarily, the offsets of position 51 (that is, the desired gripping position of the palm sub-skeleton) and position 52 (that is, the desired position of the root bones), the offsets of position 53 (that is, the desired gripping position of the palm sub-skeleton) and position 54 (that is, the desired position of the root bones), and the offsets of position 55 (that is, the desired gripping position of the palm sub-skeleton) and position 56 (that is, the desired position of the root bones) are equal. That is, the offset between the above-mentioned first target position and the first target gripping position is equal to the offset between the desired gripping position of the palm sub-skeleton and the desired position of the root bones. That is, the expected position of the root bones can be determined by the expected gripping position and the offset between the expected gripping position of the palm sub-skeleton and the expected position of the root bones.

[0075] The above method takes the offset between the first target position and the first target grasping position as a reference. When the distance between the grasping points of the climbing tool and the inclination angle of the climbing tool change, the expected position of the root bone can be accurately determined based on the expected grasping position of the palm sub-bones and the offset between the first target position and the first target grasping position.

[0076] In some embodiments, trigonometric functions are used to determine the displacement components corresponding to each dimension of the expected position of the root bone in the spatial coordinates based on the distance offset and angle offset between the expected grasping position of the palm sub-bone and the expected position of the root bone, such as determining the displacement components of the expected position of the root bone in the horizontal, vertical and vertical coordinates; the spatial coordinates of the expected position of the root bone are determined based on the spatial coordinates of the expected grasping position and the displacement components corresponding to each dimension of the expected position of the root bone in the spatial coordinates.

[0077] In some embodiments, based on the offset between the first target position and the first target grasping position, and the expected grasping position, determining the expected position of the root bone may include the following steps: determining a first offset vector and a second offset vector, the first offset vector being the offset between the actual first target grasping position and the first reference position of the reference sub-bone, and the second offset vector being the offset between the first reference position of the reference sub-bone and the first target position; wherein the reference sub-bone is another sub-bone different from the palm sub-bone, and the first reference position of the reference sub-bone is the position that the reference sub-bone is designed to reach when the palm sub-bone reaches the first target grasping position; based on the first offset vector, determining the offset between the expected grasping position and the second reference position of the reference sub-bone; determining the second reference position according to the expected grasping position and the offset between the expected grasping position and the second reference position; wherein the second reference position is the position that the reference sub-bone is expected to reach when the palm sub-bone reaches the expected grasping position; based on the second offset vector, determining the offset between the expected position of the root bone and the second reference position; determining the expected position of the root bone according to the second reference position and the offset between the expected position of the root bone and the second reference position.

[0078] In some embodiments, the first offset vector, the offset of the expected grasping position and the second reference position of the reference sub-bone are equal. The second offset vector, the offset of the expected position of the root bone and the second reference position are equal. The reference sub-bone refers to the bone used as a reference in the process of calculating the expected position of the root bone. The reference sub-bone can be a wrist sub-bone or other sub-bone that cooperates with the palm sub-bone to determine the expected position of the root bone. Similarly, the first offset vector and the second offset vector include the distance offset and the angle offset between the positions. The first offset vector is the distance offset and the angle offset between the first target grasping position and the first reference position of the reference sub-bone, and the second offset vector is the distance offset and the angle offset between the first reference position of the reference sub-bone and the first target position.

[0079] In some embodiments, for gripping points of different spacings, and climbing tools of different inclinations, the offset between the expected gripping position of the palm sub-bone and the reference position of the reference sub-bone is consistent. Similarly, the offset between the second reference position of the reference sub-bone and the expected position of the root bone is consistent. This method, determining the expected position of the root bone includes two steps: first, determining the second reference position of the second reference sub-bone based on the expected gripping position and the first offset vector, and then determining the expected position of the root bone based on the second reference position and the second offset vector. This method can ensure that the offset between the expected gripping position of the palm sub-bone and the second reference sub-bone (such as the wrist sub-bone) remains unchanged, so that in the first-person perspective, it can further ensure that the relative position ratio of the hand on the terminal screen remains consistent.

[0080] The following describes a method for determining the expected position of the root bone when a first angle exists between the displacement direction of the root bone when completing a climbing process on a first climbing tool and the displacement direction of the palm sub-bone when completing a climbing process on a second climbing tool.

[0081] The displacement direction of the root bone during the climbing process on the first climbing tool refers to the direction between the starting position of the root bone corresponding to the starting moment and the first target position of the root bone corresponding to the ending moment during a climbing process, which can be a vertically upward direction. The displacement direction of the palm sub-bone during the climbing process on the second climbing tool refers to the direction between the starting position of the palm sub-bone corresponding to the starting moment and the desired gripping position of the palm sub-bone corresponding to the ending moment during a climbing process, such as Figure 6 The child Figure 2 As shown, it can be in the direction along the ladder.

[0082] like Figure 6 The child Figure 2 As shown, there is a first angle 63 between the displacement direction of the root bone when completing the climbing process on the first climbing tool and the displacement direction of the palm sub-bone when completing the climbing process on the second climbing tool; based on the first angle 63, the first target position is adjusted to obtain the adjusted first target position; wherein the expected position of the root bone is determined based on the offset between the adjusted first target position and the first target gripping position, and the expected gripping position.

[0083] Since the second climbing tool has an inclination angle compared to the first climbing tool, and the spatial coordinates of the skeleton points in the first animation resource are determined based on the coordinate system in the first climbing tool scene. In order to make the coordinate system in the first climbing tool scene suitable for the second climbing tool scene, the first target position needs to be adjusted to adapt to the inclination angle of the second climbing tool. For the offset between the adjusted first target position and the first target gripping position, the distance offset between the two remains unchanged, and the angle offset between the two changes. In some embodiments, the first target position is rotated around the first target gripping position by a first angle in a direction away from the first climbing tool to obtain the adjusted first target position. The angular offset between the adjusted first target position and the first target gripping position increases the size of the first angle compared to before the adjustment. In some embodiments, trigonometric functions are used to determine the displacement components corresponding to each dimension of the adjusted first target grasping position in the spatial coordinates based on the second angle and the distance offset between the first target position and the first target grasping position, such as determining the displacement components of the adjusted first target grasping position in the horizontal coordinate, the vertical coordinate, and the vertical coordinate, wherein the second angle is the angle offset between the first target position and the first target grasping position plus the first angle; based on the spatial coordinates of the first target grasping position and the displacement components corresponding to each dimension of the adjusted first target grasping position in the spatial coordinates, the spatial coordinates of the adjusted first target grasping position are determined. The above method can quickly determine the adjusted first target grasping position by rotating the first target position.

[0084] In some embodiments, trigonometric functions are used to determine the displacement components corresponding to each dimension of the expected position of the root bone in the spatial coordinates based on the distance offset and angle offset between the adjusted first target position and the first target grasping position, such as determining the displacement components of the expected position of the root bone in the horizontal, vertical and vertical coordinates; the spatial coordinates of the expected position of the root bone are determined based on the spatial coordinates of the expected grasping position and the displacement components corresponding to each dimension of the expected position of the root bone in the spatial coordinates.

[0085] In the above method, when there is an angle between the displacement direction of the root bone when completing the climbing process on the first climbing tool and the displacement direction of the palm sub-bone when completing the climbing process on the second climbing tool, the first target position is adjusted to make the determined expected position of the root bone faster and more accurate.

[0086] The following describes an implementation method for obtaining a second animation resource adapted to a second climbing tool for a virtual character based on the position information of N bones included in the first animation resource. The above step 240 can be implemented based on the following steps 241 to 242.

[0087] Step 241, determining the moving speed of the root bone on the second climbing tool according to the distance between the starting position of the root bone and the expected position of the root bone, and the duration of the climbing process; wherein the starting position of the root bone refers to the position of the root bone at the starting moment of the climbing process on the second climbing tool.

[0088] In some embodiments, the first animation resource includes data of multiple first animation frames included in a climbing process of the virtual character on the first climbing tool, and the data of each of the multiple first animation frames includes: position information of N bones of the virtual character.

[0089] In some embodiments, the distance between the starting position of the root bone and the expected position of the root bone is equal to the distance between the starting position of the palm sub-bone and the expected gripping position; wherein the starting position of the palm sub-bone refers to the position of the palm sub-bone at the start of the climbing process on the second climbing tool. In some embodiments, the moving speed of the root bone on the second climbing tool is determined by determining the ratio between the moving speeds of the root bone on the second climbing tool based on the distance between the starting position of the root bone and the expected position of the root bone and the duration of the climbing process.

[0090] In some embodiments, for each first animation frame among multiple first animation frames, the displacement of the root bone in the first animation frame is obtained, and the displacement is determined based on the position information of the root bone in the first animation frame and the position information of the root bone in the previous animation frame; based on the displacement of the root bone in the first animation frame, the target displacement of the root bone on the second climbing tool in the second animation frame is determined; based on the target displacement of the root bone on the second climbing tool in the second animation frame and the time interval between adjacent animation frames, the moving speed of the root bone on the second climbing tool in the second animation frame is determined; thereby, the moving speed of the root bone on the second climbing tool in each second animation frame is determined.

[0091] In some embodiments, the moving speed of the root skeleton on the second climbing tool in the second animation frame is determined based on the ratio of the target displacement of the root skeleton on the second climbing tool in the second animation frame to the time interval of adjacent animation frames. In some embodiments, the moving speed of the root skeleton on the second climbing tool in each second animation frame may be the same or different, and the present application does not limit this. It is understandable that when the virtual character moves at a uniform speed during a climbing process, the moving speed of the root skeleton on the second climbing tool in each second animation frame is the same. When the virtual character moves at a non-uniform speed during a climbing process, the moving speed of the root skeleton on the second climbing tool in each second animation frame is different.

[0092] In some embodiments, the ratio of the displacement of the root bone in the first animation frame to the distance between the root bone's starting position on the first climbing tool and the first target position is equal to the ratio of the root bone's target displacement on the second climbing tool in the second animation frame to the distance between the root bone's starting position on the second climbing tool and the expected position of the root bone.

[0093] In some embodiments, the moving speed of the root skeleton on the second climbing tool is determined based on the moving speed of the root skeleton on the first climbing tool, the distance between the starting position of the root skeleton performing a climbing process on the first climbing tool and the first target position, and the distance between the starting position of the palm sub-skeleton performing a climbing process on the second climbing tool and the expected gripping position. In some embodiments, the moving speed of the root skeleton on the second climbing tool is determined based on the ratio of the moving speed of the root skeleton on the first climbing tool to the distance between the starting position of the root skeleton performing a climbing process on the first climbing tool and the first target position, and the distance between the starting position of the palm sub-skeleton performing a climbing process on the second climbing tool and the expected gripping position. Exemplarily, assuming that the moving speed of the root skeleton on the first climbing tool is 1m / s (meter / second), the distance between the starting position of the root skeleton performing a climbing process on the first climbing tool and the first target position is 1 meter, and the distance between the starting position of the palm sub-skeleton performing a climbing process on the second climbing tool and the expected gripping position is 2m, then the moving speed of the root skeleton on the second climbing tool is 2m / s.

[0094] Step 242, according to the moving speed of the root skeleton on the second climbing tool, adjust the position information of the N skeletons contained in each first animation frame of the first animation resource to obtain the second animation resource adapted to the second climbing tool for the virtual character. In some embodiments, according to the moving speed of the root skeleton on the second climbing tool, the moving speed of the child skeleton on the second climbing tool is determined, and the moving speed of the child skeleton on the second climbing tool can be equal to the moving speed of the root skeleton on the second climbing tool.

[0095] In some embodiments, trigonometric functions are used to determine the velocity component corresponding to each dimension of the sub-bone in the spatial coordinates based on the angle between the displacement direction of the sub-bone on the second climbing tool and the displacement direction of the root bone on the second climbing tool, as well as the movement speed of the root bone on the second climbing tool, such as determining the respective velocity components of the sub-bone in the horizontal coordinate, vertical coordinate and vertical coordinate; based on the spatial coordinates of the sub-bone in the first animation frame, and the velocity components corresponding to each dimension of the sub-bone in the spatial coordinates, the adjusted spatial coordinates of the sub-bone are determined.

[0096] In some embodiments, the second animation resource includes data of multiple second animation frames, and the multiple second animation frames correspond one-to-one to the multiple first animation frames. The above step 242 may include: obtaining the movement speed of the root bone on the first climbing tool from the first animation resource; adjusting the position information of the root bone in each first animation frame according to the movement speed of the root bone on the second climbing tool and the movement speed of the root bone on the first climbing tool, and obtaining the position information of the root bone in each second animation frame; determining the position information of each sub-bone of the N bones in each second animation frame according to the position information of the root bone in each second animation frame, and obtaining the second animation resource of the virtual character adapted to the second climbing tool.

[0097] In some embodiments, the number of frames of the first animation frame included in the first animation resource is the same as the number of frames of the second animation frame included in the second animation resource. The first animation frame and the second animation frame may be in a one-to-one correspondence, and different first animation frames correspond to different second animation frames. Exemplarily, the first animation resource may include three first animation frames, namely, first animation frame 1, first animation frame 2, and first animation frame 3. Based on the expected position of the root bone, the position information of the N bones included in the first animation frame 1 is adjusted to obtain the adjusted position information of the first animation frame 1, and the adjusted position information of the first animation frame 1 is used as the position information of the N bones included in the second animation frame 1. The same operation is performed on the first animation frame 2 and the first animation frame 3 to obtain the second animation frame 2 and the second animation frame 3, respectively.

[0098] In some embodiments, the ratio of the movement speed of the root bone on the first climbing tool to the movement speed of the root bone on the second climbing tool is determined; based on the ratio and the spatial coordinates of the root bone in each first animation frame, the adjusted spatial coordinates of the root bone in each first animation frame are obtained. This method can quickly adjust the position information of the root bone based on the speed ratio of the root bone on the two climbing tools.

[0099] In some embodiments, based on the adjusted spatial coordinates of the root bone in each first animation frame, the spatial coordinates of the child bones in the N bones are adjusted to obtain the adjusted spatial coordinates of the child bones in each first animation frame.

[0100] The above method adjusts the movement speed of the root bone so that the displacement of each bone can adapt to the climbing tool with different grip point spacings in the same time. In this way, when the grip point spacing of the climbing tool changes, the movement and action of each bone of the virtual character can transition naturally and smoothly, thereby presenting a more realistic and natural climbing effect.

[0101] The following is an introduction to animation post-processing.

[0102] In some embodiments, in order to further fit other sub-bone points of the virtual character (such as foot bones) with the gripping points on the climbing tool to improve the realism of the virtual character's climbing process. After determining the second animation resource, it also includes an animation post-processing process. The process may include the following steps: determining the first position of the first sub-bone of the virtual character on the second climbing tool, the first sub-bone refers to the other sub-bones in contact with the second climbing tool except the palm sub-bone among the N bones, and the first position is the position of the gripping point closest to the first sub-bone located on the second climbing tool; based on the first position, generating a third animation resource, the third animation resource includes the position information of the other sub-bones in the N bones except the root bone and the palm sub-bone in the process of the first sub-bone moving from the second position to the first position, and the second position is the position of the first sub-bone when the climbing process stops on the second climbing tool.

[0103] The first sub-bone is the other sub-bones in the N bones except the palm sub-bone that are in contact with the second climbing tool, such as another palm sub-bone of the virtual character and the foot sub-bone.

[0104] In some embodiments, the third animation resource includes data of at least one third animation frame included in the process of the first sub-bone moving from the second position to the first position, and the data of each third animation frame in the at least one third animation frame includes: position information of other sub-bones among the N bones except the root bone and the palm sub-bone.

[0105] In some embodiments, inverse kinematics (IK) is used to generate a third animation resource based on the first position. Inverse kinematics refers to the process of calculating the angles or positions required for other sub-bone points in the motion system (i.e., other sub-bones in the N bones except the root bone and the palm sub-bone) when the target position (i.e., the first position) is known, so that the end bone (i.e., the first sub-bone) of the motion system reaches the specified target position (i.e., the first position).

[0106] In some embodiments, the process of obtaining the third animation resource by using inverse dynamics may include: target position determination, which may determine the target position (i.e., the first position) that the end bone (i.e., the first child bone) needs to reach; establishing a mathematical model, which may establish a joint chain model between bones to describe how each bone is connected through a joint); target position constraint, which may set the first child bone to reach the first position as a constraint condition; calculating the initial solution, which may calculate the initial solution based on the first position using an algorithm (such as a heuristic algorithm or a gradient descent method). The initial solution may include the position information of the skeleton points of the virtual character in each third animation frame; iterative solution, which may include using forward dynamics to calculate the arrival position of the first child bone based on the position information of the current skeleton point; error calculation, which may calculate the error between the current arrival position of the first child bone and the first position; adjusting the joint angle, which may adjust the position information of the skeleton point according to the error to reduce the error; convergence check, which may determine whether the current solution is sufficient to make the first child bone close to the first position. If the error is within the preset range, the solution converges; otherwise, continue to iterate; output the result, and finally output the position information of the skeleton of the virtual character in each third animation frame, so that the first skeleton can accurately reach the first position.

[0107] In the above method, after the second animation resource is played on the second climbing tool, the second position reached by the first sub-bone may be slightly offset from the gripping point. The third animation resource ensures that the bone points other than the palm sub-bone in contact with the climbing tool are more closely aligned and realistic with the gripping point, thereby achieving a smoother and more realistic climbing action.

[0108] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0109] Please refer to Figure 7 , which shows a block diagram of a climbing animation adaptation device provided by an embodiment of the present application. The device has the function of implementing the above climbing animation adaptation method example, and the function can be implemented by hardware, or by hardware executing corresponding software. The device can be the computer device described above, or it can be set in a computer device. Figure 7 As shown, the device 700 may include a first acquisition module 710, a second acquisition module 720, a first determination module 730 and a first adjustment module 740.

[0110] The first acquisition module 710 is used to acquire a first animation resource of a virtual character adapted for a first climbing tool, wherein the first animation resource includes position information of N bones of the virtual character during a climbing process on the first climbing tool, wherein the N bones include a root bone and at least one child bone, and N is an integer greater than or equal to 2.

[0111] The second acquisition module 720 is used to obtain the expected gripping position of the palm sub-skeleton of the virtual character on the second climbing tool; the expected gripping position is the gripping point that the palm sub-skeleton is expected to reach when completing the climbing process, and the at least one sub-skeleton includes the palm sub-skeleton.

[0112] The first determination module 730 is used to determine the expected position of the root skeleton based on the expected grasping position; the expected position of the root skeleton is the position that the root skeleton is expected to reach when the palm sub-skeleton reaches the expected grasping position.

[0113] The first adjustment module 740 is used to adjust the position information of the N bones included in the first animation resource based on the expected position of the root bone, so as to obtain a second animation resource adapted for the virtual character to the second climbing tool.

[0114] In some embodiments, the first determination module 730 is used to obtain the first target grasping position of the palm sub-bone on the first climbing tool and the first target position of the root bone from the first animation resource; the first target grasping position is the grasping point that the palm sub-bone is designed to reach when the climbing process is completed; the first target position is the position that the root bone is designed to reach when the palm sub-bone reaches the first target grasping position; based on the offset between the first target position and the first target grasping position, determine the offset between the expected position of the root bone and the expected grasping position; based on the offset between the expected position of the root bone and the expected grasping position, and the expected grasping position, determine the expected position of the root bone.

[0115] In some embodiments, the first determination module 730 is used to determine a first offset vector and a second offset vector, the first offset vector being the offset between the first target grasping position and the first reference position of the reference sub-bone, and the second offset vector being the offset between the first reference position of the reference sub-bone and the first target position; wherein the reference sub-bone is another sub-bone different from the palm sub-bone, and the first reference position is the position that the reference sub-bone is designed to reach when the palm sub-bone reaches the first target grasping position; based on the first offset vector, determining the offset between the expected grasping position and the second reference position of the reference sub-bone; determining the second reference position according to the expected grasping position and the offset between the expected grasping position and the second reference position; wherein the second reference position is the position that the reference sub-bone is expected to reach when the palm sub-bone reaches the expected grasping position; based on the second offset vector, determining the offset between the expected position of the root bone and the second reference position; determining the expected position of the root bone according to the second reference position and the offset between the expected position of the root bone and the second reference position.

[0116] In some embodiments, a first angle exists between a displacement direction of the root bone when the climbing process is completed on the first climbing tool and a displacement direction of the palm sub-bone when the climbing process is completed on the second climbing tool; the device 700 further includes: a second adjustment module ( Figure 7 not shown).

[0117] A second adjustment module is used to adjust the first target position based on the first angle to obtain an adjusted first target position; wherein the expected position of the root bone is determined based on the offset between the adjusted first target position and the first target grasping position, and the expected grasping position.

[0118] In some embodiments, the second adjustment module is used to rotate the first target position around the first target gripping position by the first angle in a direction away from the first climbing tool to obtain the adjusted first target position.

[0119] In some embodiments, the first animation resource includes data of multiple first animation frames contained in a climbing process of the virtual character on the first climbing tool, and the data of each first animation frame in the multiple first animation frames includes: position information of N bones of the virtual character; the first adjustment module 740 is used to determine the moving speed of the root bone on the second climbing tool according to the distance between the starting position of the root bone and the expected position of the root bone, and the duration of the climbing process; wherein the starting position of the root bone refers to the position of the root bone at the starting moment of the climbing process on the second climbing tool; according to the moving speed of the root bone on the second climbing tool, the position information of the N bones contained in each of the first animation frames of the first animation resource is adjusted to obtain the second animation resource of the virtual character adapted to the second climbing tool.

[0120] In some embodiments, the second animation resource includes data of multiple second animation frames, and the multiple second animation frames correspond one-to-one to the multiple first animation frames. The first adjustment module 740 is used to obtain the movement speed of the root bone on the first climbing tool from the first animation resource; adjust the position information of the root bone in each first animation frame according to the movement speed of the root bone on the second climbing tool and the movement speed of the root bone on the first climbing tool, and obtain the position information of the root bone in each second animation frame; determine the position information of each of the sub-bones of the N bones in each second animation frame according to the position information of the root bone in each second animation frame, and obtain the second animation resource of the virtual character adapted to the second climbing tool.

[0121] In some embodiments, the apparatus 700 further includes: a second determining module ( Figure 7 not shown).

[0122] A second determination module is used to determine a first position of a first sub-bone of the virtual character on the second climbing tool, where the first sub-bone refers to other sub-bones in contact with the second climbing tool except the palm sub-bone among the N bones, and the first position is the position of a gripping point located on the second climbing tool and closest to the first sub-bone; based on the first position, a third animation resource is generated, where the third animation resource includes position information of other sub-bones in the N bones except the root bone and the palm sub-bone in the process of the first sub-bone moving from the second position to the first position, and the second position is the position of the first sub-bone when the climbing process is stopped on the second climbing tool.

[0123] The technical solution provided by the embodiment of the present application can determine the expected position of the root bone through the expected gripping position of the palm sub-bone on the second climbing tool, and can use the expected position of the root bone to adjust the position information of each bone in the first animation resource adapted to the first climbing tool, thereby obtaining the second animation resource adapted to the second climbing tool. Since this method only adjusts the position information of each bone in the first animation resource to adapt to climbing tools of different model sizes (such as different gripping point spacings), there is no need to design corresponding animation resources for climbing tools with different gripping point spacings (such as different ladder crossbar spacings), thereby effectively saving the cost of animation resources.

[0124] It should be noted that the device provided in the above embodiment, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0125] Please refer to Figure 8 , which shows a structural block diagram of a computer device 800 provided in one embodiment of the present application.

[0126] Typically, the computer device 800 includes a processor 810 and a memory 820 .

[0127] The processor 810 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 810 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 810 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 810 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 810 may also include an AI processor for processing computing operations related to machine learning.

[0128] The memory 820 may include one or more computer-readable storage media, which may be non-transitory. The memory 820 may also include a high-speed random access memory and a non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 820 is used to store a computer program, which is configured to be executed by one or more processors to implement the above-mentioned climbing animation adaptation method.

[0129] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation on the computer device 800, and the computer device 800 may include more or less components than those shown in the figure, or combine some components, or adopt a different arrangement of components.

[0130] In some embodiments, a computer-readable storage medium is further provided, wherein a computer program is stored in the storage medium, and the computer program is loaded and executed by a processor to implement the above-mentioned climbing animation adaptation method.

[0131] Optionally, the computer readable storage medium may include: ROM (Read-Only Memory), RAM (Random-Access Memory), SSD (Solid State Drives) or optical disks, etc. Among them, the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).

[0132] In some embodiments, a computer program product is also provided, which includes a computer program stored in a computer-readable storage medium, and a processor reads and executes the computer program from the computer-readable storage medium to implement the above-mentioned climbing animation adaptation method.

[0133] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes 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 objects associated before and after are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application are not limited to this.

[0134] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A climbing animation adaptation method, characterized in that: The method comprises: Acquire a first animation resource of a virtual character adapted for a first climbing tool, wherein the first animation resource includes position information of N bones of the virtual character during a climbing process on the first climbing tool, wherein the N bones include a root bone and at least one child bone, and N is an integer greater than or equal to 2; Acquire an expected gripping position of a palm sub-skeleton of the virtual character on a second climbing tool; the expected gripping position is a gripping point that the palm sub-skeleton is expected to reach when the climbing process is completed, and the at least one sub-skeleton includes the palm sub-skeleton; Based on the expected grasping position, determining an expected position of a root skeleton; the expected position of the root skeleton is the position that the root skeleton is expected to reach when the palm sub-skeleton reaches the expected grasping position; Based on the expected position of the root bone, the position information of the N bones included in the first animation resource is adjusted to obtain a second animation resource adapted for the virtual character to the second climbing tool.

2. The method according to claim 1, characterized in that The step of determining the expected position of the root bone based on the expected grasping position includes: Acquire, from the first animation resource, a first target grasping position of the palm sub-bone on the first climbing tool and a first target position of the root bone; the first target grasping position is a grasping point that the palm sub-bone is designed to reach when the climbing process is completed; the first target position is a position that the root bone is designed to reach when the palm sub-bone reaches the first target grasping position; Determining an offset between the root bone desired position and the desired grasping position based on an offset between the first target position and the first target grasping position; The root bone expected position is determined based on an offset between the root bone expected position and the expected grasping position, and the expected grasping position.

3. The method according to claim 2, characterized in that The step of determining the expected position of the root bone based on the expected grasping position includes: Determine a first offset vector and a second offset vector, wherein the first offset vector is an offset between the first target grasping position and a first reference position of a reference sub-bone, and the second offset vector is an offset between the first reference position of the reference sub-bone and the first target position; wherein the reference sub-bone is another sub-bone different from the palm sub-bone, and the first reference position is a position that the reference sub-bone is designed to reach when the palm sub-bone reaches the first target grasping position; Based on the first offset vector, determining an offset between the desired grasping position and a second reference position of the reference sub-bone; Determine the second reference position according to the expected grasping position and the offset between the expected grasping position and the second reference position; wherein the second reference position is the position that the reference sub-bone is expected to reach when the palm sub-bone reaches the expected grasping position; Based on the second offset vector, determining an offset between the expected position of the root bone and the second reference position; The expected position of the root bone is determined according to the second reference position and an offset between the expected position of the root bone and the second reference position.

4. The method according to claim 2 or 3, characterized in that: There is a first angle between the displacement direction of the root bone when completing the climbing process on the first climbing tool and the displacement direction of the palm sub-bone when completing the climbing process on the second climbing tool; The method further comprises: Based on the first angle, adjusting the first target position to obtain an adjusted first target position; The expected position of the root bone is determined based on the offset between the adjusted first target position and the first target grasping position, and the expected grasping position.

5. The method according to claim 4, characterized in that The adjusting the first target position based on the first angle to obtain the adjusted first target position includes: The first target position is rotated around the first target gripping position by the first angle in a direction away from the first climbing tool to obtain the adjusted first target position.

6. The method according to any one of claims 1 to 5, characterized in that: The first animation resource includes data of a plurality of first animation frames included in a climbing process of the virtual character on the first climbing tool, and the data of each first animation frame in the plurality of first animation frames includes: position information of N bones of the virtual character; The adjusting, based on the expected position of the root bone, the position information of the N bones included in the first animation resource to obtain the second animation resource adapted for the virtual character to the second climbing tool comprises: Determine the moving speed of the root bone on the second climbing tool according to the distance between the starting position of the root bone and the expected position of the root bone, and the duration of the climbing process; wherein the starting position of the root bone refers to the position of the root bone at the starting moment of executing the climbing process on the second climbing tool; According to the moving speed of the root bone on the second climbing tool, the position information of the N bones contained in each of the first animation frames of the first animation resource is adjusted to obtain the second animation resource of the virtual character adapted to the second climbing tool.

7. The method according to claim 6, characterized in that The second animation resource includes data of a plurality of second animation frames, and the plurality of second animation frames correspond one to one to the plurality of first animation frames; The step of adjusting the position information of the N bones contained in each of the first animation frames of the first animation resource according to the moving speed of the root bone on the second climbing tool to obtain the second animation resource adapted for the virtual character to the second climbing tool includes: Acquire, from the first animation resource, a moving speed of the root skeleton on the first climbing tool; According to the moving speed of the root skeleton on the second climbing tool and the moving speed of the root skeleton on the first climbing tool, adjusting the position information of the root skeleton in each first animation frame to obtain the position information of the root skeleton in each second animation frame; According to the position information of the root bone in each second animation frame, the position information of each sub-bone of the N bones in each second animation frame is determined to obtain the second animation resource of the virtual character adapted to the second climbing tool.

8. The method according to any one of claims 1 to 7, characterized in that: After adjusting the position information of the N bones included in the first animation resource based on the expected position of the root bone to obtain the second animation resource adapted to the second climbing tool for the virtual character, the method further includes: Determine a first position of a first sub-bone of the virtual character on the second climbing tool, where the first sub-bone refers to other sub-bones of the N bones except the palm sub-bone that are in contact with the second climbing tool, and the first position is a position of a gripping point on the second climbing tool that is closest to the first sub-bone; Based on the first position, a third animation resource is generated, wherein the third animation resource includes position information of sub-bones other than the root bone and the palm sub-bone among N bones in the process of the first sub-bone moving from the second position to the first position, wherein the second position is the position of the first sub-bone when the climbing process is stopped on the second climbing tool.

9. An adaptation device for climbing animation, characterized in that: The device comprises: A first acquisition module is used to acquire a first animation resource adapted for a first climbing tool by a virtual character, wherein the first animation resource includes position information of N bones of the virtual character during a climbing process on the first climbing tool, wherein the N bones include a root bone and at least one child bone, and N is an integer greater than or equal to 2; A second acquisition module is used to acquire an expected gripping position of a palm sub-bone of the virtual character on a second climbing tool; the expected gripping position is a gripping point that the palm sub-bone is expected to reach when the climbing process is completed, and the at least one sub-bone includes the palm sub-bone; A first determination module is used to determine an expected position of a root skeleton based on the expected grasping position; the expected position of the root skeleton is the position that the root skeleton is expected to reach when the palm sub-skeleton reaches the expected grasping position; The first adjustment module is used to adjust the position information of the N bones included in the first animation resource based on the expected position of the root bone, so as to obtain a second animation resource adapted for the virtual character to the second climbing tool.

10. A computer device, characterized in that: The computer device comprises a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the method according to any one of claims 1 to 8.

12. A computer program product, characterized in that The computer program product comprises a computer program, which is loaded and executed by a processor to implement the method according to any one of claims 1 to 8.