Animation Generation Method, Device, Electronic Device and Storage Medium

By using offline storage resource library to obtain animation information of characters and wearables, and generate high-quality animations, it solves the problems of high resource consumption and low precision when generating animations in real time, and achieves efficient animation generation.

CN114882156BActive Publication Date: 2025-07-29SHANGHAI MIHOYO TIANMING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210505330.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-10
Publication Date
2025-07-29
Estimated Expiration
2042-05-10

AI Technical Summary

Technical Problem

In the prior art, real-time animation generation consumes too high resources and the generated animation accuracy is low, which cannot effectively solve the problem of interspers between wearables and characters.

Method used

By obtaining the character animation information of the current frame, the target resource information is obtained using the pre-constructed offline storage resource library, including the character storage animation information and the wearable storage animation information, and the animation of the next frame is generated based on this information.

Benefits of technology

It realizes the generation of high-quality animations while saving resources, solves the problems of excessive resource consumption and low animation accuracy during real-time solution, and avoids interspers between wearables and characters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114882156B_ABST
    Figure CN114882156B_ABST
Patent Text Reader

Abstract

The present invention discloses an animation generation method, apparatus, electronic device, and storage medium. The method obtains the character animation information of the current frame to obtain the target character information and the current scene information, and then, according to the target character information and the current scene information, obtains the target resource information from a pre-constructed offline storage resource library to obtain the character stored animation information and the wearable stored animation information. Furthermore, according to the current scene information, the character stored animation information, and the wearable stored animation information, the animation information of the next frame is generated, realizing animation generation based on the offline storage resource library. The method generates animations by querying offline resources, solving the technical problem of excessive resource consumption during real-time calculation. Moreover, by querying offline resources to obtain the pre-generated animation information, the technical problem of uncontrollable animation effects generated by the calculation is solved, and controllable high-quality animations can be generated simply and quickly while saving resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In game production, if motion information is added to a character in the game, the height at which the character's leg is lifted can be affected by the terrain where the character is located, that is, the height at which the character's leg is lifted is different under different terrains. If the character's wearable can be adjusted in real time according to the height at which the leg is lifted, the penetration between the wearable and the character in the game animation can be avoided and the performance can be enhanced.

[0003] In the prior art, usually the cloth system in the engine is used to calculate in real time the height at which the character's leg is lifted and the state of the wearable. However, the method of real-time calculation using the cloth system consumes too much performance and requires a high demand on the server. Moreover, the accuracy of the calculation by this method is relatively low and cannot completely solve the penetration problem.

[0004] In the process of implementing the present invention, it is found that at least the following technical problems exist in the prior art: the resources consumed for real-time animation generation are too high, and the accuracy of the generated animation is relatively low. Summary of the Invention

[0005] The present invention provides an animation generation method, device, electronic device, and storage medium to solve the technical problems of too high resources consumed for real-time animation generation and relatively low accuracy of the generated animation.

[0006] According to one aspect of the present invention, an animation generation method is provided, including:

[0007] Obtaining the character animation information of the current frame, where the character animation information includes target character information and current scene information;

[0008] According to the target character information and the current scene information, obtaining target resource information corresponding to the character animation information from a pre-constructed offline storage resource library, where the target resource information includes character storage animation information and wearable storage animation information corresponding to the target character information and the current scene information;

[0009] Generating the animation information of the next frame according to the current scene information, the character storage animation information, and the wearable storage animation information.

[0010] According to another aspect of the present invention, an animation generation device is provided, including:

[0011] A character acquisition module, configured to obtain the character animation information of the current frame, where the animation information includes target character information and current scene information;

[0012] A resource acquisition module, configured to obtain target resource information corresponding to the character animation information from a pre-constructed offline storage resource library according to the target character information and the current scene information, where the target resource information includes character storage animation information and wearable storage animation information corresponding to the target character information and the current scene information;

[0013] An animation generation module, configured to generate the animation information of the next frame according to the current scene information, the character storage animation information, and the wearable storage animation information.

[0014] According to another aspect of the present invention, there is provided an electronic device, including:

[0015] At least one processor; and

[0016] A memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the animation generation method according to any embodiment of the present invention.

[0018] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the animation generation method according to any embodiment of the present invention when executed.

[0019] The technical solution of the embodiment of the present invention obtains the character animation information of the current frame to obtain the target character information and the current scene information, and then according to the target character information and the current scene information, obtains the target resource information from the pre-constructed offline storage resource library to obtain the character storage animation information and the wearable storage animation information, and then generates the animation information of the next frame according to the current scene information, the character storage animation information, and the wearable storage animation information, realizing the animation generation based on the offline storage resource library. This method generates animations by querying offline resources, solves the technical problem of excessive resource consumption during real-time animation calculation, and solves the technical problem of low animation accuracy generated during real-time calculation by querying offline resources to obtain pre-generated animation information.

[0020] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understandable through the following description. Description of the Drawings

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0022] Figure 1 It is a schematic flowchart of an animation generation method provided in Embodiment 1 of the present invention;

[0023] Figure 2 It is a schematic flowchart of an animation generation method provided in Embodiment 2 of the present invention;

[0024] Figure 3 It is a schematic flowchart of an animation generation method provided in Embodiment 3 of the present invention;

[0025] Figure 4 It is a schematic structural diagram of an animation generation device provided in Embodiment 4 of the present invention;

[0026] Figure 5 It is a schematic structural diagram of an electronic device provided in Embodiment 5 of the present invention. Specific Embodiments

[0027] In order to enable those skilled in the art to better understand the solution of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above accompanying drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order different from those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0029] Embodiment 1

[0030] Figure 1It is a schematic flowchart of an animation generation method provided in the first embodiment of the present invention. This embodiment is applicable to the situation of generating game animation information based on a pre-constructed offline storage resource library. This method can be executed by an animation generation device, which can be implemented in the form of hardware and / or software, and the animation generation device can be configured in an electronic device such as a computer, a tablet, or a mobile phone. As Figure 1 shown, the method includes:

[0031] S110. Obtain the character animation information of the current frame, where the character animation information includes target character information and current scene information.

[0032] Among them, the character animation information can be an animation containing target character information and current scene information. Exemplarily, the character animation information can be a plot animation played in the game, such as an animation of a character triggering a battle; or, it can also be a scene animation shown in the game, such as an animation of a character walking on a hillside.

[0033] Specifically, the purpose of obtaining the character animation information of the current frame in this embodiment is to determine the target character information and the current scene information, so as to further generate the animation information of the next frame according to the target character information and the current scene information.

[0034] Among them, the target character information can be information describing the target character in the character animation information. Optionally, the target character can be a player-controlled character, a rare monster, or a non-player character; the number of target characters can be one or more. Exemplarily, after obtaining the character animation information, a target detection algorithm can be used to determine the target character in the character animation information, and then the target character information corresponding to the target character can be obtained. In this embodiment, the target character information can include a character identifier corresponding to the target character, and can also include attribute information corresponding to the target character, such as weight, body type, and the maximum amplitude of body movements.

[0035] In this embodiment, the current scene information can be information describing the scene included in the character animation information. Specifically, the current scene information can include terrain information. Among them, the terrain information can be information describing the terrain of the scene; for example, the terrain information can include slope information and physical environment simulation information corresponding to the terrain information. The physical environment simulation information can be information describing the physical environment of the terrain, which can include at least one of gravity information, friction information, height information, and wind information.

[0036] S120. According to the target character information and the current scene information, obtain target resource information corresponding to the character animation information from the pre-constructed offline storage resource library, where the target resource information includes character storage animation information and wearable storage animation information corresponding to the target character information and the current scene information.

[0037] In this embodiment, various role animations and wearable animations in various scenarios can be pre-simulated, and the simulated role animation information and wearable animation information are stored in an offline storage resource library. Among them, the simulated role animation information and wearable animation information can be associated and stored with role information and scene information in the offline storage resource library. The wearable animation information can be the animation information of the pendant worn by the role, such as ribbon animation information, headdress animation information, etc.

[0038] Furthermore, when real-time animation needs to be generated, the animation information corresponding to the target role information and the current scene information can be directly queried in the offline storage resource library according to the target role information of the current frame and the current scene information, that is, the role stored animation information and the wearable stored animation information.

[0039] Exemplarily, the simulated animations stored in the offline storage resource library can be in a data format that the engine can quickly recognize; the engine reads the offline storage resource library to obtain the target resource information corresponding to the role animation information of the current frame.

[0040] Specifically, the offline storage resource library can store the simulated animations in a sharded storage manner. For example, in the offline storage resource library, each role corresponds to a data shard, and in a data shard, the simulated animation information of the role corresponding to the data shard in all scenarios is stored. During the process of querying the target resource information, the target data shard corresponding to the target role information can be queried in the offline storage resource library according to the target role information, and then the target resource information corresponding to the current scene information can be queried in the target data shard according to the current scene information, so as to obtain the role stored animation information and the wearable stored animation information corresponding to the target role information and the current scene information.

[0041] Alternatively, in the offline storage resource library, it can also be that each scene corresponds to a data shard, and in a data shard, the simulated animation information of all roles in the scene corresponding to the data shard is stored. During the process of querying the target resource information, the target data shard corresponding to the current scene information can be queried in the offline storage resource library according to the current scene information, and then the target resource information corresponding to the target role information can be queried in the target data shard according to the target role information, so as to obtain the role stored animation information and the wearable stored animation information corresponding to the target role information and the current scene information.

[0042] Through the above sharded storage method, the efficiency of querying the target resource information in the offline storage resource library can be improved, and thus the efficiency of animation generation is improved.

[0043] S130. Generate the animation information for the next frame based on the current scene information, the animation information stored for the character, and the animation information stored for the wearable.

[0044] Specifically, after obtaining the animation information stored for the character and the animation information stored for the wearable, the animation information for the next frame can be generated based on the current scene information, the animation information stored for the character, and the animation information stored for the wearable. Exemplarily, a state machine overlay can be employed to generate the animation information for the next frame to be played based on the current scene information, the animation information stored for the character, and the animation information stored for the wearable.

[0045] In an alternative embodiment, generating the animation information for the next frame based on the current scene information, the animation information stored for the character, and the animation information stored for the wearable can also be: obtaining the real-time weather information and generating the animation information for the next frame based on the real-time weather information, the current scene information, as well as the character animation information and the wearable animation information.

[0046] Among them, the real-time weather information can be the information describing the current weather in the character animation information of the current frame, and it can be determined according to the character animation information of the current frame. For example, the real-time weather information corresponding to the character animation information can be determined according to the character animation information of the current frame.

[0047] Specifically, the animation information for the next frame can be generated based on the real-time weather information, the current scene information, the character animation information, and the wearable animation information to obtain the next frame animation combined with the real-time weather of the current frame. For example, generate the next frame animation containing rain.

[0048] In this alternative embodiment, considering the influence of the real-time weather on the animation display effect, the animation information for the next frame is further generated in combination with the real-time weather information, improving the display effect of the generated animation.

[0049] The technical solution of this embodiment obtains the character animation information of the current frame to obtain the target character information and the current scene information, and then, according to the target character information and the current scene information, obtains the target resource information from the pre-constructed offline storage resource library to obtain the animation information stored for the character and the animation information stored for the wearable, and then generates the animation information for the next frame based on the current scene information, the animation information stored for the character, and the animation information stored for the wearable, realizing the animation generation based on the offline storage resource library. This method generates animations by querying offline resources, solving the technical problem of excessive resource consumption during real-time calculation. Moreover, by querying offline resources to obtain the pre-generated animation information, it solves the technical problem of low animation accuracy generated during real-time calculation, and can generate high-quality animations simply and quickly while saving resources.

[0050] Embodiment Two

[0051] Figure 2 This is a schematic flowchart of an animation generation method provided in the second embodiment of the present invention. On the basis of the above embodiments, this embodiment supplements the process of constructing an offline storage resource library. As Figure 2 shown, the method includes:

[0052] S210. Obtain the original animation information of the target animation character, and determine the animation parameter configuration information corresponding to the original animation information. Among them, the original animation information includes character bone information and animation information of the character bone information. The character bone information includes character body bone information, binding information between the character body bone and the skin, and character wearable bone information.

[0053] Among them, the target animation character can be a pre-constructed character that can be used to generate corresponding animations. Exemplarily, the target animation character can be a player-controlled character, a non-player character, or a game monster in the game. The original animation information can be the character bone information and animation information constructed for the target animation character. Specifically, the character bone information can be the character body bone information, the character wearable bone information, and the binding information between the character body bone and the skin.

[0054] Among them, the character body bone information can be information describing the key points of the character body bones of the target animation character; the character wearable bone information can be information describing the key points of the bones of the wearables of the target animation character; the binding information between the character body bone and the skin can be information describing the binding between the character body bone and the skin of the target animation character.

[0055] It should be noted that the original animation information in this embodiment does not include the animation information of the character wearables. In other words, in this embodiment, it is not necessary to construct the animation information of the character wearables of the target animation character. Compared with the solution that needs to construct the animation information of the character body bones and the animation information of the character wearables, the action production cost can be reduced.

[0056] Specifically, the character bone information and the animation information of the character bone information can be constructed in computer image software. That is, obtaining the original animation information of the target animation character can be: obtaining the original animation information of the target animation character constructed based on computer image software. Among them, the computer image software can be DDC (Digital Content Creation) software.

[0057] Optionally, the original animation information of the target animation character constructed based on computer image software can be stored in a file format that can be read by the engine, and then the engine can read the original animation information from the file exported by the computer image software.

[0058] In this embodiment, the animation parameter configuration information may include the first attribute configuration information corresponding to the target animation character and the second attribute configuration information corresponding to the wearable. Exemplarily, the first attribute configuration information may include the maximum amplitude of the body movement of the target animation character, or may further include the weight and body shape of the target animation character; the second attribute configuration information may include the material of the wearable.

[0059] Optionally, the animation parameter configuration information may be set by the user on the display interface of the engine, or may be automatically determined according to the character bone information. Exemplarily, the maximum amplitude of the body movement may be determined according to the character body bone information in the character bone information, and the material of the wearable may be determined according to the character wearable bone information.

[0060] S220. Based on the animation parameter configuration information, the animation information of the character body bones, and the character bone information, simulate the character simulation animation information and the wearable simulation animation information of the target animation character under the animation scene information.

[0061] Specifically, according to the animation parameter configuration information, the character bone information, and the animation information of the character body bones, physical simulation operations may be performed through the engine to simulate the character simulation animation information and the wearable simulation animation information of the target animation character under various animation scene information, so as to obtain the animation data considering the first attribute configuration information of the target animation character, the second attribute configuration information of the wearable, the character bone information of the target animation character, and the animation scene information.

[0062] It should be noted that in this embodiment, it is not necessary to pre-construct the animation information of the wearable of the target animation character. Through the above method, the character simulation animation information and the wearable simulation animation information of the target animation character under various animation scene information can be generated, reducing the animation production cost.

[0063] Optionally, during the process of generating the character simulation animation information and the wearable simulation animation information of the target animation character in various scenarios, the collision information between the character body bones and the character wearable bones may be further introduced to further avoid the penetration between the character body and the character wearable in the generated animation.

[0064] For example, based on the animation parameter configuration information, the animation information of the character's body bones, and the character bone information, simulating the character simulation animation information and the wearable simulation animation information of the target animation character under the animation scene information may be: adding pre-set bone collision information corresponding to the character bone information to the character body bone information and the character wearable bone information in the character bone information; based on the character bone information after adding the bone collision information, the binding information between the character body bones and the skin, the animation information of the character body bones, and the animation parameter configuration information, simulating the character simulation animation information and the wearable simulation animation information of the target animation character under the animation scene information.

[0065] Among them, the bone collision information may be the collision information between the character body bone information and the character wearable bone information. Specifically, the bone collision information can be introduced into the engine, and then the engine can calculate the character simulation animation information and the wearable simulation animation information of the target animation character under various animation scene information based on the character bone information after adding the bone collision information, the binding information between the character body bones and the skin, the animation information of the character body bones, and the animation parameter configuration information.

[0066] Through this optional implementation method, during the process of simulating the animation data of the target animation character under various animation scene information, the collision information between the character body bones and the character wearable bones can be introduced, avoiding the interpenetration of the character body and the wearable in the generated animation data, and further improving the display effect of the generated animation.

[0067] S230. Obtain the target resource information in the character simulation animation information and the wearable simulation animation information, and store the target resource information in the pre-constructed offline storage resource library.

[0068] Among them, the target resource information may include a speed change curve and pose information. Specifically, the speed change curve may be a curve describing the switching speed between each frame during frame switching; the pose information may be the pose conversion information between each frame during frame switching.

[0069] Specifically, after generating the character simulation animation information and the wearable simulation animation information, the target resource information in the character simulation animation and the target resource information in the wearable simulation animation information can be stored in the pre-constructed offline storage resource library.

[0070] In an alternative embodiment, if bone collision information is introduced during the generation of character simulation animation information and wearable simulation animation information, the bone collision information in the character simulation animation information and the wearable simulation animation information can be deleted, and the target resource information can be determined from the character simulation animation information and the wearable simulation animation information after deleting the bone collision information and stored in the offline storage resource library. That is, obtaining the target resource information in the character simulation animation information and the wearable simulation animation information and storing the target resource information in a pre-constructed offline storage resource library can be: discarding the bone collision information in the character simulation animation information and the wearable simulation animation information to obtain character storage animation information and wearable storage animation information; determining the target resource information in the character storage animation information and the wearable storage animation information, and storing the target resource information and the animation scene information in a corresponding manner in the pre-constructed offline storage resource library.

[0071] Among them, the target resource information includes the character speed change curve and the character pose information between each frame of animation corresponding to the character simulation animation information, and the wearable speed change curve and the wearable pose information between each frame of animation corresponding to the wearable storage animation information. Specifically, the character speed change curve can be a curve describing the change speed of the target animated character between every two consecutive frames of animation; the character pose information can be the pose conversion information of the target animated character between every two consecutive frames of animation. The wearable speed change curve can be a curve describing the change speed of the wearable between every two consecutive frames of animation; the wearable pose information can be the pose conversion information of the wearable between every two consecutive frames of animation. Exemplarily, the character pose information or the wearable pose information includes the rotation amount, the displacement amount, and the scaling amount.

[0072] In this alternative embodiment, considering that after generating the character simulation animation information and the wearable simulation animation information, the bone collision information is no longer needed, so the bone collision information can be discarded to store the character storage animation information and the wearable storage animation information after discarding the bone collision information in the offline storage resource library, reducing the amount of data in the offline storage resource library.

[0073] Specifically, the target resource information and the animation scene information corresponding to the target resource information can be associated and stored in the offline storage resource library. When real-time animation information needs to be generated, the corresponding target resource information can be queried from the offline storage resource library according to the animation scene information.

[0074] Exemplarily, storing the target resource information in a pre-constructed offline storage resource library includes: saving the target resource information as an offline resource file in a preset storage format, and storing the offline resource file in the pre-constructed offline storage resource library, where the preset storage format includes at least one of binary data format, texture data format, and custom data format.

[0075] Specifically, the target resource information can be saved as an offline resource file in binary data format, texture data format, or custom data format and stored in the offline storage resource library; or the target resource information can be saved as an offline resource file in at least two of binary data format, texture data format, and custom data format and stored in the offline storage resource library.

[0076] For example, considering that the target resource information includes character simulation animation information and wearable simulation animation information, the character simulation animation information and wearable simulation animation information in the target resource information can be stored separately. Exemplarily, an offline resource file in binary data format and an offline resource file in texture data format can be generated according to the target resource information, where the offline resource file in binary data format contains the character simulation animation information, and the offline resource file in texture data format contains the wearable simulation animation information.

[0077] Optionally, the binary data format, texture data format, and custom data format can be data formats that can be quickly read by the engine. The engine can obtain the pre-generated target resource information by reading the offline resource file, and then generate the next frame of animation information according to the target resource information.

[0078] S240. Obtain the character animation information of the current frame, where the character animation information includes target character information and current scene information.

[0079] S250. According to the target character information and the current scene information, obtain the target resource information corresponding to the character animation information from the pre-constructed offline storage resource library, where the target resource information includes character storage animation information and wearable storage animation information corresponding to the target character information and the current scene information.

[0080] S260. Generate the next frame of animation information according to the current scene information, character storage animation information, and wearable storage animation information.

[0081] The technical solution of this embodiment obtains the character bone information of the target animation character and the animation information of the character bone information, and simulates the character simulation animation information and the wearable simulation animation information of the target animation character under the animation scene information according to the animation parameter configuration information, the character bone information, and the animation information of the character bone information corresponding to the original animation information, realizing the pre-generation of the animation data of the target animation character under various animation scene information, providing offline resources for the real-time generation of the next frame of animation information of the current frame, and reducing the time cost and resource overhead required for real-time animation generation.

[0082] Embodiment III

[0083] Figure 3 FIG. is a schematic flowchart of an animation generation method provided by Embodiment III of the present invention. On the basis of the above embodiments, this embodiment exemplarily describes the process of obtaining the target resource information. As Figure 3 shown, the method includes:

[0084] S310. Obtain the character animation information of the current frame, where the character animation information includes the target character information and the current scene information.

[0085] S320. Determine the animation scene information that matches the current scene information, and obtain the target resource information corresponding to the target character information and the animation scene information from the pre-constructed offline storage resource library.

[0086] Among them, the animation scene information that matches the current scene information may be the animation scene information that is the same as the current scene information, or the animation scene information whose difference from the current scene information is less than the preset information difference threshold.

[0087] Specifically, considering that among the character simulation animation information and the wearable simulation animation information under each pre-generated animation scene information, there may not be animation scene information that is exactly the same as the current scene information. For example, the animation scene information in the pre-constructed offline storage resource library includes ground slopes of 0 degrees, 30 degrees, 60 degrees, and 90 degrees, and the ground slope in the current scene information is 25 degrees. Therefore, this embodiment can determine the animation scene information that matches the current scene information from each animation scene information.

[0088] Optionally, the scene information difference between the current scene information and each animation scene information can be calculated, and then the animation scene information matching the current scene information can be determined based on each scene information difference. For example, the animation scene information with the smallest scene information difference is determined as the animation scene information matching the current scene information. Among them, the characteristic information corresponding to the current scene information and each animation scene information can be determined first. For each animation scene information, the characteristic distance between the characteristic information of the current scene information and the characteristic information of the animation scene information is calculated, and the characteristic distance is used as the scene information difference.

[0089] For another example, the change curve of the scene information difference between the current scene information and each animation scene information can also be calculated, and the animation scene information matching the current scene information can be determined based on the change curve of the scene information difference. Specifically, the change curve of the scene information difference can describe the change trend of the scene information difference between the current scene information and each animation scene information. The animation scene information corresponding to the extreme value point or the maximum / minimum value point in the change curve of the scene information difference can be determined as the animation scene information matching the current scene information.

[0090] S330. Generate the animation information of the next frame according to the current scene information, the role stored animation information, and the wearable stored animation information.

[0091] In one implementation manner, considering that when the current scene information and the animation scene information are not completely consistent, if the target resource information corresponding to the animation scene information is directly used to generate the animation information of the next frame, the generated animation effect may not conform to the current scene. Therefore, in this embodiment, generating the animation information of the next frame according to the current scene information, the role stored animation information, and the wearable stored animation information includes: using a preset matching algorithm to convert the role stored animation information and the wearable stored animation information corresponding to the target role information under the animation scene information into the role target animation information and the wearable target animation information corresponding to the target role information under the current scene information; using the state machine overlay layer to generate the animation information of the next frame based on the current scene information and the role target animation information and the wearable target animation information corresponding to the target role information under the current scene information.

[0092] Among them, the preset matching algorithm can be a conversion algorithm for converting the target resource information under the animation scene information into the target animation information under the current scene information. Specifically, the preset matching algorithm can determine the animation information conversion amount based on the scene information difference between the animation scene information and the current scene information, and then convert the target resource information under the animation scene information into the target animation information under the current scene information based on the animation information conversion amount.

[0093] Furthermore, a state machine overlay can be adopted to generate the animation information of the next frame based on the character target animation information and the wearable target animation information under the transformed current scene information, as well as the current scene information.

[0094] Through this optional implementation, the target resource information under the animation scene information similar to the current scene information is transformed into the target animation information under the current scene information, making the generated animation information more in line with the current scene information, further improving the animation generation effect, and avoiding the situation where the animation effect does not conform to the current scene.

[0095] The technical solution of this embodiment realizes the accurate acquisition of the target resource information by determining the animation scene information matching the current scene information and obtaining the target resource information corresponding to the target character information and the animation scene information from the pre-constructed offline storage resource library, avoiding the situation where the target resource information cannot be obtained when there is no animation scene information consistent with the current scene information in the offline storage resource library. Moreover, it can also make it unnecessary to enumerate the target resource information under all animation scene information during the process of constructing the target resource information in the offline storage resource library, and only construct the target resource information under part of the animation scene information, reducing the data volume in the offline storage resource library and improving the construction efficiency of the offline storage resource library.

[0096] Embodiment 4

[0097] Figure 4 It is a schematic structural diagram of an animation generation device provided by Embodiment 4 of the present invention. As Figure 4 shown, the device includes a character acquisition module 410, a resource acquisition module 420, and an animation generation module 430.

[0098] The character acquisition module 410 is used to acquire the character animation information of the current frame, where the animation information includes target character information and current scene information;

[0099] The resource acquisition module 420 is used to obtain the target resource information corresponding to the character animation information from the pre-constructed offline storage resource library according to the target character information and the current scene information, where the target resource information includes character storage animation information and wearable storage animation information corresponding to the target character information and the current scene information;

[0100] The animation generation module 430 is used to generate the animation information of the next frame according to the current scene information, the character storage animation information, and the wearable storage animation information.

[0101] The technical solution of this embodiment obtains the character animation information of the current frame to obtain the target character information and the current scene information. Then, according to the target character information and the current scene information, the target resource information is obtained from the pre-constructed offline storage resource library to obtain the character stored animation information and the wearable stored animation information. Furthermore, according to the current scene information, the character stored animation information, and the wearable stored animation information, the animation information of the next frame is generated, realizing the animation generation based on the offline storage resource library. This method generates animations by querying offline resources, solving the technical problem of excessive resource consumption during real-time calculation. Moreover, by querying offline resources to obtain the pre-generated animation information, the technical problem of low animation accuracy generated during real-time calculation is solved.

[0102] Based on the above embodiment, optionally, the device further includes an original animation information acquisition module, a simulation module, and a resource storage module; where:

[0103] The original animation information acquisition module is used to obtain the original animation information of the target animation character and determine the animation parameter configuration information corresponding to the original animation information. Among them, the original animation information includes the character bone information and the animation information of the character bone information. The character bone information includes the character body bone information, the binding information of the character body bone and the skin, and the character wearable bone information;

[0104] The simulation module is used to simulate the character simulation animation information and the wearable simulation animation information of the target animation character in the animation scene information based on the animation parameter configuration information, the animation information of the character body bone, and the character bone information;

[0105] The resource storage module is used to obtain the target resource information in the character simulation animation information and the wearable simulation animation information and store the target resource information in the pre-constructed offline storage resource library.

[0106] Based on the above embodiment, optionally, the simulation module is specifically used for:

[0107] Adding the pre-set bone collision information corresponding to the character bone information to the character body bone information and the character wearable bone information in the character bone information; based on the character bone information after adding the bone collision information, the binding information of the character body bone and the skin, the animation information of the character body bone, and the animation parameter configuration information, simulating the character simulation animation information and the wearable simulation animation information of the target animation character in the animation scene information.

[0108] Based on the above embodiment, optionally, the resource storage module is specifically used for:

[0109] Discard the bone collision information in the character simulation animation information and the wearable simulation animation information to obtain the character stored animation information and the wearable stored animation information; determine the target resource information in the character stored animation information and the wearable stored animation information, and store the target resource information and the animation scene information in an offline storage resource library constructed in advance, where the target resource information includes the character speed change curve and character pose information between each frame of animation corresponding to the character simulation animation information, and the wearable speed change curve and wearable pose information between each frame of animation corresponding to the wearable stored animation information.

[0110] Based on the above embodiments, optionally, the resource storage module is further configured to save the target resource information as an offline resource file in a preset storage format, and store the offline resource file in an offline storage resource library constructed in advance, where the preset storage format includes at least one of a binary data format, a texture data format, and a custom data format.

[0111] Based on the above embodiments, optionally, the character acquisition module 410 is specifically configured to: acquire the original animation information of a target animation character constructed based on computer image software.

[0112] Based on the above embodiments, optionally, the resource acquisition module 420 is further configured to determine the animation scene information matching the current scene information, and acquire the target resource information corresponding to the target character information and the animation scene information from an offline storage resource library constructed in advance.

[0113] Based on the above embodiments, optionally, the animation generation module 430 is specifically configured to:

[0114] Use a preset matching algorithm to convert the character stored animation information and the wearable stored animation information corresponding to the target character information in the animation scene information into the character target animation information and the wearable target animation information corresponding to the target character information in the current scene information; use a state machine overlay layer to generate the animation information of the next frame based on the current scene information and the character target animation information and the wearable target animation information corresponding to the target character information in the current scene information.

[0115] Based on the above embodiments, optionally, the animation generation module 430 is further configured to acquire real-time weather information, and generate the animation information of the next frame according to the real-time weather information, the current scene information, the character animation information, and the wearable animation information.

[0116] The animation generation device provided by the embodiment of the present invention can execute the animation generation method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.

[0117] Embodiment 5

[0118] Figure 5 FIG. 7 is a schematic structural diagram of an electronic device provided by Embodiment 5 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as, for example, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as, for example, a personal digital processor, a cellular phone, a smart phone, a wearable device (such as a helmet, glasses, a watch, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0119] As Figure 5 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0120] A plurality of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0121] The processor 11 may be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the animation generation method.

[0122] In some embodiments, the animation generation method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the animation generation method described above may be executed. Alternatively, in other embodiments, the processor 11 may be configured to execute the animation generation method by any other suitable means (e.g., by means of firmware).

[0123] The various embodiments of the systems and techniques described above in this document may be implemented in digital electronic circuitry, integrated circuit systems, field-programmable gate arrays (FPGA), application-specific integrated circuits (ASIC), application-specific standard products (ASSP), systems-on-chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a special-purpose or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0124] The computer program for implementing the animation generation method of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer programs are executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs may be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0125] Embodiment Six

[0126] Embodiment 6 of the present invention further provides a computer-readable storage medium storing computer instructions for causing a processor to execute an animation generation method, which includes:

[0127] Obtain the character animation information of the current frame, where the character animation information includes target character information and current scene information;

[0128] According to the target character information and the current scene information, obtain target resource information corresponding to the character animation information from a pre-constructed offline storage resource library, where the target resource information includes character storage animation information and wearable storage animation information corresponding to the target character information and the current scene information;

[0129] Generate the animation information of the next frame according to the current scene information, the character storage animation information, and the wearable storage animation information.

[0130] In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0131] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0132] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected with each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.

[0133] The computing system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0134] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is imposed herein.

[0135] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. An animation generation method, characterized in that, Including: Obtain the character animation information of the current frame, where the character animation information includes target character information and current scene information; According to the target character information and the current scene information, obtain target resource information corresponding to the character animation information from a pre-constructed offline storage resource library, where the target resource information includes character storage animation information and wearable storage animation information corresponding to the target character information and the current scene information; the character storage animation information and the wearable storage animation information refer to simulated animations stored in a fragmented storage manner in the offline storage resource library; Generate the animation information of the next frame according to the current scene information, the character storage animation information, and the wearable storage animation information; Before obtaining the target resource information corresponding to the character animation information from the pre-constructed offline storage resource library, it further includes: Obtain the original animation information of the target animation character, and determine the animation parameter configuration information corresponding to the original animation information, where the original animation information includes character bone information and the animation information of the character bone information, and the character bone information includes character body bone information, the binding information of the character body bone and the skin, and character wearable bone information; Based on the animation parameter configuration information, the animation information of the character bone information, and the character bone information, simulate the character simulation animation information and wearable simulation animation information of the target character information in the animation scene information; Obtain the target resource information in the character simulation animation information and the wearable simulation animation information, and store the target resource information in a pre-constructed offline storage resource library; where the target resource information includes the character speed change curve and character pose information between each frame of animation corresponding to the character simulation animation information, and the wearable speed change curve and wearable pose information between each frame of animation corresponding to the wearable simulation animation information.

2. The method according to claim 1, wherein The simulating the character simulation animation information and the wearable simulation animation information of the target character information in the animation scene information based on the animation parameter configuration information, the animation information of the character bone information, and the character bone information includes: Add pre-set bone collision information corresponding to the character bone information to the character body bone information and the character wearable bone information in the character bone information; Based on the character bone information after adding the bone collision information, the animation information of the character bone information, and the animation parameter configuration information, simulate the character simulation animation information and the wearable simulation animation information of the target animation character in the animation scene information.

3. The method according to claim 1, characterized in that The obtaining the target resource information in the character simulation animation information and the wearable simulation animation information, and storing the target resource information in a pre-constructed offline storage resource library includes: Discard the bone collision information in the character simulation animation information and the wearable simulation animation information to obtain the character storage animation information and the wearable storage animation information; Determine the target resource information in the character stored animation information and the wearable stored animation information, and store the target resource information and the animation scene information in the pre-constructed offline storage resource library in a corresponding manner, where the target resource information includes the character speed change curve and character pose information between each frame of animation corresponding to the character simulation animation information, and the wearable speed change curve and wearable pose information between each frame of animation corresponding to the wearable stored animation information.

4. The method according to claim 1, wherein The storing the target resource information in the pre-constructed offline storage resource library includes: Saving the target resource information as an offline resource file in a preset storage format, and storing the offline resource file in the pre-constructed offline storage resource library, where the preset storage format includes at least one of binary data format, texture data format, and custom data format.

5. The method according to claim 1, wherein The obtaining the original animation information of the target animation character includes: Obtaining the original animation information of the target animation character constructed based on computer image software.

6. The method according to claim 1, wherein The obtaining the target resource information corresponding to the character animation information from the pre-constructed offline storage resource library according to the target character information and the current scene information includes: Determine the animation scene information that matches the current scene information, and obtain the target resource information corresponding to the target character information and the animation scene information from the pre-constructed offline storage resource library.

7. The method according to claim 6, wherein The generating the animation information of the next frame according to the current scene information, the character stored animation information, and the wearable stored animation information includes: Using a preset matching algorithm to convert the character stored animation information and the wearable stored animation information corresponding to the target character information in the animation scene information into the character target animation information and the wearable target animation information corresponding to the target character information in the current scene information; Generating the animation information of the next frame by using a state machine overlay based on the current scene information and the character target animation information and the wearable target animation information corresponding to the target character information in the current scene information.

8. The method according to claim 1, wherein The generating the animation information of the next frame according to the current scene information, the character stored animation information, and the wearable stored animation information includes: Obtaining real-time weather information, and generating the animation information of the next frame according to the real-time weather information, the current scene information, the character stored animation information, and the wearable stored animation information.

9. An animation generation device, characterized in that Includes: A character acquisition module, configured to acquire the character animation information of the current frame, where the character animation information includes target character information and current scene information; A resource acquisition module, configured to obtain target resource information corresponding to the character animation information from a pre-constructed offline storage resource library according to the target character information and the current scene information, where the target resource information includes character storage animation information and wearable storage animation information corresponding to the target character information and the current scene information; the character storage animation information and the wearable storage animation information refer to simulated animations stored in a sharded storage manner in the offline storage resource library. An animation generation module, configured to generate the animation information of the next frame according to the current scene information, the character storage animation information, and the wearable storage animation information. The device further includes: An original animation information acquisition module, configured to obtain the original animation information of the target animation character and determine the animation parameter configuration information corresponding to the original animation information, where the original animation information includes character bone information and the animation information of the character bone information, and the character bone information includes character body bone information, the binding information between the character body bone and the skin, and character wearable bone information. A simulation module, configured to simulate the character simulation animation information and the wearable simulation animation information of the target character information in the animation scene information based on the animation parameter configuration information, the animation information of the character bone information, and the character bone information. A resource storage module, configured to obtain the target resource information in the character simulation animation information and the wearable simulation animation information, and store the target resource information in a pre-constructed offline storage resource library; where the target resource information includes the character speed change curve and the character pose information between each frame of animation corresponding to the character simulation animation information, and the wearable speed change curve and the wearable pose information between each frame of animation corresponding to the wearable simulation animation information.

10. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; where The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the animation generation method according to any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a processor to implement the animation generation method according to any one of claims 1-8 when executed.

Citation Information

Patent Citations

  • Costume changing method and device, electronic equipment and storage medium

    CN112316422A

  • Clothes changing method and device, electronic equipment and storage medium

    CN112402957A