Animation generation method, device, terminal and storage medium
By constructing object skeleton chains on the character bones of the game character model and generating object animations based on the linked sub-skeleton animation, the problem of complex action animation production process of the skeleton system is solved, and the efficiency and accuracy of animation production are improved.
Patent Information
- Application Number
- CN202110198587.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-22
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2041-02-22
AI Technical Summary
In three-dimensional animation production, the action animation production process of the skeletal system is complicated, especially when multiple objects are mounted on the character's main body, the animation production efficiency is inefficient.
By obtaining the character bones of the game character model and the corresponding character animation, the object bone chain of the game object model is constructed on the character bones, the first segment animation of the chain is constructed based on the link sub-skeleton animation, and the objects corresponding to the object bone chain are generated based on the animation Animation.
It realizes automatic generation of object animations, reduces the manual operation time of animators, and improves the efficiency and accuracy of animation production.
Smart Images

Figure CN112819931B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to an animation generation method, device, terminal and storage medium. Background Art
[0002] Bone binding is a link in 3D animation production. The specific content is to build a bone system for the already made 3D models of animals, characters, etc., so that the 3D models can move according to the animator's wishes, laying the foundation for the action production in the next link.
[0003] The skeleton system is generally divided into two parts. One is the Bip skeleton, which is generally used for the construction of the character's main body; the other is the Bone skeleton, which is generally used for the secondary construction of the character's main body, for example, the construction of ribbons, backpacks, hair and other objects mounted on the character's main body.
[0004] However, currently, when making skeleton action animation, the production process is complicated and difficult, especially when there are many objects mounted on the character body, the efficiency of animation production is low. Summary of the invention
[0005] The embodiments of the present invention provide an animation generation method, device, terminal and storage medium, which can improve the efficiency of animation production.
[0006] An embodiment of the present invention provides an animation generation method, comprising:
[0007] Obtaining a character skeleton of a game character model and a character animation corresponding to the character skeleton, wherein the character skeleton includes a connecting sub-skeleton, and the connecting sub-skeleton corresponds to the connecting sub-skeleton animation in the character animation;
[0008] Constructing an object skeleton chain of a game object model on the character skeleton of the game character model, wherein the object skeleton chain includes a chain head segment located at the front end of the object skeleton chain, and the chain head segment is mounted on the connecting sub-skeleton;
[0009] Based on the link sub-skeletal animation, construct the chain head segment animation corresponding to the chain head segment;
[0010] Based on the chain head segment animation, generating the object animation corresponding to the object skeleton chain;
[0011] While the game character model executes the character animation, the game object model executes the object animation.
[0012] The embodiment of the present invention further provides an animation generating device, comprising:
[0013] An acquisition unit, used for acquiring a character skeleton of a game character model and a character animation corresponding to the character skeleton, wherein the character skeleton includes a connecting sub-skeleton, and the connecting sub-skeleton corresponds to the connecting sub-skeleton animation in the character animation;
[0014] A construction unit, used for constructing an object skeleton chain of a game object model on the character skeleton of the game character model, wherein the object skeleton chain includes a chain head segment located at the front end of the object skeleton chain, and the chain head segment is mounted on the connecting sub-skeleton;
[0015] A chain head animation unit, used for constructing a chain head segment animation corresponding to the chain head segment based on the link sub-skeletal animation;
[0016] An object animation unit, used to generate an object animation corresponding to the object skeleton chain based on the chain head segment animation;
[0017] The execution unit is used for the game object model to execute the object animation while the game character model executes the character animation.
[0018] In some embodiments, the animation includes multiple frames of animation, and the chain head animation unit includes:
[0019] Alignment subunit, used to display frame alignment controls in the interface;
[0020] A time subunit, for determining the generation time of each frame of the linked sub-skeleton animation picture when a trigger operation for the frame alignment control is detected;
[0021] A blank frame subunit is used to generate a blank frame picture of the chain head segment according to the generation time of each frame of the connected sub-skeleton animation picture;
[0022] The chain head animation sub-unit is used to obtain a frame of chain head segment animation picture corresponding to the chain head segment based on the animation creation operation on the frame of blank frame picture.
[0023] In some embodiments, the blank frame subunit is further used for:
[0024] Displaying a frame track on the page, wherein the frame track is a track with time as the horizontal axis and containing frame identifiers;
[0025] According to the generation time, a frame identifier corresponding to the blank frame picture is generated in the frame track.
[0026] In some embodiments, the object skeleton chain is composed of multiple segments, and the construction unit includes:
[0027] A linking sub-unit, used for mounting the linking sub-skeletons of the game character model on the linking sub-skeletons;
[0028] A chain head intermediate subunit, used for mounting the intermediate segment on the chain head segment;
[0029] An intermediate chain tail subunit, used for mounting the chain tail segment on the intermediate segment;
[0030] The object skeleton chain includes a chain tail segment located at the rear end of the object skeleton chain and a middle segment located between the chain head segment and the chain tail segment.
[0031] In some embodiments, the building block is further used for:
[0032] Display the bone chain page;
[0033] The bone chain page displays the identifier corresponding to the connected sub-bone, the identifier corresponding to the first segment of the chain, the identifier of the middle segment and the identifier of the last segment of the chain. The identifier corresponding to the first segment of the chain is connected to the identifier corresponding to the connected sub-bone, the identifier corresponding to the first segment of the chain is connected to the identifier of the middle segment, and the identifier of the middle segment is connected to the identifier of the last segment of the chain.
[0034] In some embodiments, the object animation includes a chain head segment animation, a middle segment animation, and a chain tail segment animation, and the object animation unit includes:
[0035] A parameter subunit, used to determine the physical motion parameters of the chain head segment in the chain head segment animation picture of the previous frame;
[0036] The animation subunit is used to generate the middle segment animation of the middle segment and the tail segment animation of the tail segment based on the physical motion parameters of the head segment.
[0037] In some embodiments, the animation subunit includes:
[0038] Based on the physical motion parameters of the chain head segment, generating the intermediate segment animation of the intermediate segment;
[0039] Determining the physical motion parameters of the intermediate segment in the previous frame of the intermediate segment animation;
[0040] The chain tail segment animation of the chain tail segment is generated based on the physical motion parameters of the middle segment in the middle segment animation of the previous frame.
[0041] In some embodiments, the physical motion parameter includes the softness of the skeleton chain, and the animation subunit is used to:
[0042] Display softness controls in the page;
[0043] When a softness modification operation for the softness control is detected, obtaining the softness of the skeleton chain corresponding to the softness modification operation;
[0044] Based on the physical motion parameters of the chain head segment and the flexibility of the skeleton chain, the middle segment animation of the middle segment and the chain tail segment animation of the chain tail segment are generated.
[0045] In some embodiments, the object animation unit further includes:
[0046] A screening subunit, configured to perform a waste frame screening operation on the object animation to obtain a plurality of waste frames in the object animation when a frame cleaning trigger operation is detected;
[0047] A removal subunit, used for removing the waste frames from the object animation to obtain a cleaned frame animation;
[0048] A display subunit, used for displaying information corresponding to the waste frame on a page;
[0049] The execution unit is used for:
[0050] While the game character model executes the character animation, the game object model executes the post-cleaning frame animation.
[0051] In some embodiments, the animation includes multiple frames of animation, and the screening subunit includes:
[0052] A range submodule, used to obtain a preset reference range of waste frames;
[0053] The screening submodule is used to determine the animation picture as a waste frame in the object animation when the animation picture in the object animation meets the waste frame reference range.
[0054] In some embodiments, the waste frame reference range includes a position reference range, a rotation reference range and a scaling reference range, and the screening submodule is used to
[0055] When the animation frame in the object animation meets the position reference range, determining the animation frame as a waste frame in the object animation;
[0056] When the animation frame in the object animation meets the rotation reference range, determining the animation frame as a waste frame in the object animation;
[0057] When the animation frame in the object animation meets the scaling reference range, the animation frame is determined as a waste frame in the object animation.
[0058] In some embodiments, the execution unit is further configured to:
[0059] Based on the character skeleton of the game character model, the game character model is subjected to skinning and binding processing to obtain a bound game character model;
[0060] Based on the object skeleton chain of the game object model, the game object model is subjected to skinning and binding processing to obtain a bound game object model;
[0061] The game character model executes the character animation while the game object model executes the object animation, including:
[0062] While the bound game character model executes the character animation, the bound game object model executes the object animation.
[0063] An embodiment of the present invention further provides a terminal, comprising a memory storing a plurality of instructions; the processor loads instructions from the memory to execute the steps in any one of the animation generation methods provided in the embodiments of the present invention.
[0064] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor to execute the steps in any one of the animation generation methods provided by the embodiments of the present invention.
[0065] The embodiment of the present invention can obtain the character skeleton of a game character model and the character animation corresponding to the character skeleton. The character skeleton may include connecting sub-bones, and the connecting sub-bones correspond to the connecting sub-bone animation in the character animation; construct an object skeleton chain of a game object model on the character skeleton of the game character model, and the object skeleton chain may include a chain head segment located at the front end of the object skeleton chain, and the chain head segment is mounted on the connecting sub-bone; based on the connecting sub-bone animation, construct a chain head segment animation corresponding to the chain head segment; based on the chain head segment animation, generate an object animation corresponding to the object skeleton chain; while the game character model executes the character animation, the game object model executes the object animation.
[0066] In the present invention, after the user constructs the object skeleton chain on the character skeleton, he only needs to construct the chain head segment animation of the chain head segment in any object skeleton chain, and the present solution can automatically generate the object animation corresponding to all object skeleton chains according to the chain head segment animation. Therefore, the present solution improves the efficiency of animation production. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0068] Figure 1a is a scene schematic diagram of the animation generation method provided by an embodiment of the present invention;
[0069] Figure 1b is a flowchart of an animation generation method provided by an embodiment of the present invention;
[0070] Figure 1c is a schematic diagram of a model skeleton of an animation generation method provided by an embodiment of the present invention;
[0071] Figure 1d It is a schematic diagram of a skeleton chain page of an animation generation method provided by an embodiment of the present invention;
[0072] Figure 1e is a schematic diagram of a frame track of an animation generation method provided by an embodiment of the present invention;
[0073] Figure 2a It is a schematic diagram of a process of generating a hem animation of a coat equipped on a game character provided by an embodiment of the present invention;
[0074] Figure 2b is a top view of a game character equipped with a coat while performing character animation provided by an embodiment of the present invention;
[0075] Figure 3 is a schematic diagram of the structure of an animation generating device provided by an embodiment of the present invention;
[0076] Figure 4 It is a schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0077] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0078] Embodiments of the present invention provide an animation generation method, device, terminal and storage medium.
[0079] The animation generating device can be integrated into an electronic device, which can be a terminal, a server, etc. The terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, or a personal computer (PC), etc. The server can be a single server or a server cluster composed of multiple servers.
[0080] In some embodiments, the animation generating device may also be integrated into multiple electronic devices. For example, the animation generating device may be integrated into multiple servers, and the animation generating method of the present invention may be implemented by multiple servers.
[0081] In some embodiments, the server may also be implemented in the form of a terminal.
[0082] For example, refer to Figure 1a The electronic device can obtain the character skeleton of the game character model and the character animation corresponding to the character skeleton, wherein the character skeleton includes a connecting sub-skeleton, and the connecting sub-skeleton corresponds to the connecting sub-skeleton animation in the character animation; construct an object skeleton chain of the game object model on the character skeleton of the game character model, wherein the object skeleton chain includes a chain head segment located at the front end of the object skeleton chain, and the chain head segment is mounted on the connecting sub-skeleton; based on the connecting sub-skeleton animation, construct a chain head segment animation corresponding to the chain head segment; based on the chain head segment animation, generate an object animation corresponding to the object skeleton chain; while the game character model executes the character animation, the game object model executes the object animation.
[0083] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
[0084] In this embodiment, an animation generation method is provided, such as Figure 1b As shown, the specific process of the animation generation method can be as follows:
[0085] 101. Obtain a character skeleton of a game character model and a character animation corresponding to the character skeleton. The character skeleton includes a link sub-bone, and the link sub-bone corresponds to the link sub-bone animation in the character animation.
[0086] There are many ways to obtain the character skeleton of the game character model and the character animation corresponding to the character skeleton.
[0087] For example, the character skeleton of the game character model and the character animation corresponding to the character skeleton can be obtained by reading the character skeleton of the game character model stored in the local memory; for another example, the character skeleton of the game character model and the character animation corresponding to the character skeleton can be obtained by communicating with the animation database through the network; for another example, the character skeleton of the game character model and the character animation corresponding to the character skeleton can be manually made by an animator in the animation production software, and so on.
[0088] Among them, the character skeleton, namely the Bip skeleton, can be used to execute the physical motion information of the game character model, and the physical motion information is the character animation corresponding to the character skeleton.
[0089] The game role model may be a game character model, a game animal model, and so on.
[0090] 102. Construct an object skeleton chain of a game object model on the character skeleton of the game character model, wherein the object skeleton chain includes a chain head segment located at the front end of the object skeleton chain, and the chain head segment is mounted on a connecting sub-bone.
[0091] Corresponding to the character skeleton is the object skeleton chain, namely the Bone skeleton. The object skeleton chain is the skeleton of the game object model mounted on the character skeleton, among which the link sub-bone in the Bip skeleton is connected to the chain head segment in the Bone skeleton.
[0092] Among them, the game object model can be equipment, an object model mounted on a game character model, for example, the game object model can be a floating accessory, such as a skirt, long hair, sleeves, ribbons, etc.
[0093] For example, refer to Figure 1c , the gray part of the figure is the character skeleton, and the white part is the object skeleton chain. Figure 1c In the figure, 7 object bone chains are mounted on the character skeleton, and the first segment of each object bone chain can be connected to the connecting child bone on the character skeleton.
[0094] Each object bone chain can be connected to different linked child bones on the character skeleton.
[0095] In this solution, each sub-bone in the character skeleton (including connecting sub-bones) can have its corresponding sub-bone animation, that is, the connecting sub-bone can have its corresponding connecting sub-bone animation, and all sub-bone animations constitute the character animation of the character skeleton.
[0096] For example, Figure 1c The character animation of the character skeleton shown is head turning. In this head turning animation, only the head sub-bone in the character skeleton rotates, and other sub-bones do not need to perform physical movements.
[0097] There are many ways to construct the object skeleton chain of the game object model on the character skeleton of the game character model.
[0098] For example, an animator may manually construct an object skeleton chain of a game object model on the character skeleton of a game character model; for another example, the object skeleton chain of a game object model may be automatically obtained and mounted on the character skeleton of a game character model, and so on.
[0099] In some embodiments, in order to improve the realistic physical performance of the game object model when performing physical motion, especially when the game object model is a soft streamer, the object skeleton chain may be composed of multiple segments, and step 102 may include the following steps:
[0100] (1) Mount the chain head segment on the link sub-bone of the game character model;
[0101] (2) Mounting the middle segment on the chain head segment;
[0102] (3) Mounting the tail segment on the middle segment;
[0103] The object skeleton chain may include a tail segment located at the last end of the object skeleton chain and an intermediate segment located between the head segment and the tail segment.
[0104] For example, refer to Figure 1c , Figure 1c Each object skeleton chain in has a chain head segment, two middle segments and a chain tail segment.
[0105] It should be noted that, in some embodiments, the object skeleton chain may have only one chain head segment and one chain tail segment, without any intermediate segment; in some embodiments, the object skeleton chain may have only one chain head segment, without any intermediate segment or chain tail segment; in some embodiments, the object skeleton chain may have one chain head segment, N intermediate segments and one chain tail segment, where N is a positive integer.
[0106] In some embodiments, in order to facilitate operation and overview of all object skeleton chains, a skeleton chain page is provided, so the following steps may be included after step 102:
[0107] Display the bone chain page;
[0108] The bone chain page displays the identifiers corresponding to the connected sub-bones, the identifier corresponding to the first segment of the chain, the identifier of the middle segment and the identifier of the last segment of the chain. The identifier corresponding to the first segment of the chain is connected to the identifier corresponding to the connected sub-bones, the identifier corresponding to the first segment of the chain is connected to the identifier of the middle segment, and the identifier of the middle segment is connected to the identifier of the last segment of the chain.
[0109] Among them, the logo can be expressed in the form of text, numbers, symbols, etc.
[0110] The label can be a name. The bone chain page can display the name of the connected child bone and all the object bone chains mounted on the connected child bone. Each object bone chain is represented by the name of the chain head segment, the name of the middle segment and the name of the chain tail segment.
[0111] For example, refer to Figure 1d , the bone chain page can display the connected child bone Bip_001 and the 7 object bone chains mounted on Bip_001. Taking the sixth object bone chain as an example, the sixth object bone chain includes the chain head segment [Bone_6_1], the middle segment [Bone_6_2], the middle segment [Bone_6_3] and the chain tail segment [Bone_6_4].
[0112] In some embodiments, when it is detected that the user has selected any mark in the skeleton chain page, the animation of the segment corresponding to the mark can be displayed to the user, and the animation can include x frames of animation pictures, where x is any positive integer.
[0113] For example, reference Figure 1d When the user clicks [Bone_6_2], the x-frame animation of the second positive segment in the sixth object's bone chain will be displayed.
[0114] For example, to display x frames of animation for each segment, you can use Figure 1e The frame track shown is displayed, which uses time as the horizontal axis (that is, its scale is frames) and contains tracks of multiple frame identifiers.
[0115] The frame identifier is used to represent a frame of animation. Figure 1e In the example, the frame mark is a white strip, which represents a frame of animation. When it is detected that the user clicks on a white strip in the frame track, the frame of animation corresponding to the white strip can be displayed on the page.
[0116] 103. Based on the link sub-bone animation, construct the chain head segment animation corresponding to the chain head segment.
[0117] In steps 101-102, a character skeleton is established, and a plurality of object skeleton chains are added to the character skeleton. In some embodiments, since the animator needs to animate the object skeleton chains in addition to the character skeleton, the animator also needs to animate the object skeleton chains.
[0118] In order to reduce the time consumed by animators in making object animations corresponding to all object skeleton chains frame by frame and in accordance with the real-time physical laws, thereby improving the efficiency of animation generation, this embodiment proposes a method in which a user only needs to make a chain head segment animation corresponding to the chain head segment in any object skeleton chain, and based on the chain head segment animation, the object animations corresponding to all object skeleton chains can be generated in step 104.
[0119] The animation may include multiple frames of animation pictures, therefore, the link sub-bone animation may include multiple frames of link sub-bone animation pictures, and the chain head segment animation may include multiple frames of chain head segment animation pictures.
[0120] Through step 103, the problems of complicated operation and time-consuming caused by manually constructing the chain head segment animation corresponding to the chain head segment of each object skeleton chain one by one based on the linked sub-skeleton animation can be effectively solved, thereby greatly improving the animation generation efficiency.
[0121] In addition, first frame inconsistency refers to the problem that the appearance time of the first frame in two animations is inconsistent, and / or the appearance time of the last frame is inconsistent. For example, if the first frame of the character animation and the ribbon animation are inconsistent, the physical movement of the character and the ribbon in the animation will be out of sync, resulting in a strong sense of incongruity.
[0122] In some embodiments, in order to solve the problem that the first frame between the link sub-skeletal animation and the chain head segment animation corresponding to each chain head segment is inconsistent, step 103 may include the following steps:
[0123] (1) Display frame alignment controls in the interface;
[0124] (2) When a trigger operation for the frame alignment control is detected, the generation time of each frame of the linked sub-skeleton animation picture is determined;
[0125] (3) Generate a blank frame of the chain head segment according to the generation time of each frame of the linked sub-skeleton animation picture;
[0126] (4) Based on the animation creation operation for a blank frame, a frame of chain head segment animation corresponding to the chain head segment is obtained.
[0127] The frame alignment control may be presented in the form of a button, a check box, etc.
[0128] The blank frame refers to a blank frame, that is, a preset blank frame is generated, but the preset blank frame does not contain any model object.
[0129] The animator can create animation for the blank frame by placing a game model in the blank frame, designing actions for the game model, etc., and finally obtain a frame of animation for which the animation is created, that is, a frame of chain head segment animation corresponding to the chain head segment.
[0130] The generation time of the animation picture refers to the time in which second the animation picture is displayed;
[0131] In the present application, a blank frame of the chain head segment can be generated according to the generation time of each frame of the connected sub-skeleton animation picture; and then based on the animation creation operation for the blank frame, a chain head segment animation frame corresponding to the chain head segment is obtained.
[0132] That is to say, the generation time of the animation picture of the link sub-bone corresponds to the generation time of the animation picture of the chain head segment.
[0133] For example, if the generation time of the animation picture of the i-th frame connected to the sub-skeleton is 00:12:01, then the generation time of the animation picture of the i-th frame chain head segment is also 00:12:01, where i is a positive integer.
[0134] In some embodiments, the step "(3) generating a blank frame of the chain head segment according to the generation time of each frame of the linked sub-skeleton animation frame" may also include the following steps:
[0135] Display the frame track on the page. The frame track is a track with time as the horizontal axis and contains frame labels;
[0136] According to the generation time, a frame identifier corresponding to the blank frame image is generated in the frame track.
[0137] For example, refer to Figure 1e , Figure 1e A frame track is displayed, which includes multiple frames. Assuming that the duration of each frame is 0.1 seconds, the generation time of the 0th frame of animation is 0, the generation time of the 1st frame of animation is 00:00:00.1 seconds, the generation time of the 2nd frame of animation is 00:00:00.2 seconds, the generation time of the 3rd frame of animation is 00:00:00.3 seconds…, and the generation time of the 100th frame of animation is 00:00:10 seconds.
[0138] 104. Based on the chain head segment animation, generate the object animation corresponding to the object skeleton chain.
[0139] Among them, the object animation can include the chain head segment animation, the middle segment animation and the chain tail segment animation, and the animation can include multiple frames of animation pictures. Therefore, the object animation can include multiple frames of chain head segment animation pictures, multiple frames of middle segment animation pictures, and multiple frames of chain tail segment animation pictures.
[0140] In the embodiment of the present application, the object animation corresponding to all object skeleton chains can be automatically generated based on only the chain head segment animation of any object skeleton chain, thereby reducing the user's operation complexity and improving the animation generation efficiency. Therefore, in some embodiments, step 104 may include the following steps:
[0141] (1) determining the physical motion parameters of the chain head segment in the previous frame of the chain head segment animation picture;
[0142] (2) Based on the physical motion parameters of the chain head segment, the middle segment animation of the middle segment and the chain tail segment animation of the chain tail segment are generated.
[0143] The previous frame refers to the animation frame before the current frame, and the next frame refers to the animation frame after the current frame. Figure 1e , assuming the current frame is the 7th frame, the previous frame is the 6th frame, and the next frame is the 8th frame.
[0144] In this embodiment, whenever the physical motion parameters of the middle segment and the physical motion parameters of the chain tail segment are to be determined, they can be determined based on the physical motion parameters of the chain head segment in the previous frame of the chain head segment animation picture.
[0145] For example, in some embodiments, whenever the physical motion parameters of the middle segment in the middle segment animation picture of the current frame and the physical motion parameters of the end segment in the end segment animation picture of the current frame need to be determined, they can be determined based on the physical motion parameters of the head segment in the head segment animation picture of the previous frame.
[0146] Among them, according to Ph i-1 Ask for Ph i , and according to Ph i Then determine Pm i and Pt i There are many ways to calculate Ph. i 、Pm i , Pt i The visual effects reflected on the object skeleton chain are also different, which will not be expanded here. Among them, the current frame is the i-th frame, Ph i-1 Refers to the physical motion parameter of the first segment h of the i-1th frame, Ph i Refers to the physical motion parameters of the first segment h of the i-th frame chain, Pm iRefers to the physical motion parameter of the middle segment m of the i-th frame, Pt i Refers to the physical motion parameters of the tail segment t of the i-th frame.
[0147] In some embodiments, the physical motion parameters may include the softness of the skeletal chain, and the step “(2) generating the middle segment animation of the middle segment and the chain tail segment animation of the chain tail segment based on the physical motion parameters of the chain head segment” may include the following steps:
[0148] Display softness controls in the page;
[0149] When a softness modification operation for a softness control is detected, the softness of the bone chain corresponding to the softness modification operation is obtained;
[0150] Based on the physical motion parameters of the chain head segment and the softness of the bone chain, the middle segment animation of the middle segment and the chain tail segment animation of the chain tail segment are generated.
[0151] The softness control may be presented in the form of a button, a check box, an input box, a drag bar, etc.
[0152] When the user modifies the softness of the object's bone chain through the softness control, the above Ph i 、Pm i , Pt i The weighted processing is performed so that the final intermediate segment animation and the chain tail segment animation can be controlled by the user to show the degree of softness or hardness.
[0153] In some embodiments, the step “(2) generating the middle segment animation of the middle segment and the tail segment animation of the tail segment based on the physical motion parameters of the head segment” may include the following steps:
[0154] Based on the physical motion parameters of the chain head segment, the middle segment animation of the middle segment is generated;
[0155] Determine the physical motion parameters of the middle segment in the previous frame of the middle segment animation;
[0156] The chain tail segment animation of the chain tail segment is generated based on the physical motion parameters of the middle segment in the middle segment animation of the previous frame.
[0157] For example, the current frame is the i-th frame, when the physical motion parameter Ph of the chain head segment h in the i-1-th frame chain head segment animation picture is known i-1 When , the physical motion parameter Pm of the middle segment m in the middle segment animation picture of the i-th frame can be obtained i , and the physical motion parameter Pt of the chain tail segment t in the i-th frame chain tail segment animation picture i .
[0158] Specifically, in some embodiments, whenever the physical motion parameters of the middle segment in the middle segment animation picture of the current frame and the physical motion parameters of the tail segment in the tail segment animation picture of the current frame need to be determined, they can be determined based on the physical motion parameters of the first segment in the first segment animation picture of the current frame; and the physical motion parameters of the first segment in the first segment animation picture of the current frame can be determined by the physical motion parameters of the first segment in the first segment animation picture of the previous frame.
[0159] For example, the current frame is the i-th frame, when the physical motion parameter Ph of the chain head segment h in the i-1-th frame chain head segment animation picture is known i-1 When , the physical motion parameter Ph of the chain head segment in the i-th frame chain head segment animation picture can be obtained i , according to Ph i Then Pm can be determined i and Pt i .
[0160] 105. While the game character model executes character animation, the game object model executes object animation.
[0161] Skin is a 3D animation production technology. The technology of binding a model to a skeleton is called Bind Skin. Since the skeleton and the model are independent of each other, in order for the skeleton to drive the model to produce reasonable movement, the outer contour of the model controlled by the skeleton needs to be bound to the skeleton.
[0162] In some embodiments, before step 105, the model may be skinned based on the skeleton. Therefore, before step 105, the following steps may be included:
[0163] Based on the character skeleton of the game character model, the game character model is subjected to skinning and binding processing to obtain a bound game character model;
[0164] Based on the object skeleton chain of the game object model, the game object model is subjected to skinning and binding processing to obtain the bound game object model;
[0165] Therefore, step 105 may include the following steps:
[0166] While the bound game character model executes character animation, the bound game object model executes object animation.
[0167] Since each time the skeleton animation is automatically generated, there are often frames with calculation errors (i.e., waste frames), and the positions of these waste frames are often far away before or after the animation starts or ends (even thousands or tens of thousands of frames). In order to reduce the time required for detecting and removing waste frames and improve the removal efficiency, in some embodiments, in order to remove waste frames in the generated animation and improve the accuracy of each current animation frame, the following steps can also be performed after step 104 and before step 105:
[0168] (1) When a frame cleaning trigger operation is detected, a waste frame filtering operation is performed on the object animation to obtain multiple waste frames in the object animation;
[0169] (2) Eliminate the waste frames from the object animation to obtain a cleaned frame animation.
[0170] In some embodiments, after step "(2) removing waste frames from the object animation to obtain a cleaned frame animation", information corresponding to the waste frames can also be displayed on the page to provide information support for users, so that users can understand the removed waste frames.
[0171] Therefore, in step 105, the game character model can execute the post-clearing frame animation while the game object model executes the character animation.
[0172] There are many ways to perform the waste frame filtering operation. For example, in some embodiments, the step “(1) performing the waste frame filtering operation on the object animation to obtain a plurality of waste frames in the object animation” may include the following steps:
[0173] A. Get the preset reference range of waste frames;
[0174] B. When an animation picture in the object animation meets the waste frame reference range, the animation picture is determined as a waste frame in the object animation.
[0175] For example, the preset waste frame reference range refers to the position range where waste frames appear before or after the animation starts or ends. For example, assuming that the preset waste frame reference range is (-∞, 0) and (800, +∞), when a frame of animation meets the preset waste frame reference range, that is, the frame of animation appears before the 0th frame or after the 800th frame, the frame of animation is determined as a waste frame in the object animation.
[0176] It should be noted that, in some embodiments, in addition to judging the position of a waste frame, the criterion for judging whether a waste frame is a waste frame may also be determined by detecting whether the frame is rotated or scaled incorrectly.
[0177] For example, in some embodiments, the preset waste frame reference range may include a position reference range, a rotation reference range, and a scaling reference range, and the step “B. when the animation picture in the object animation meets the waste frame reference range, determining the animation picture as a waste frame in the object animation” may include the following steps:
[0178] b1. When the animation screen in the object animation meets the position reference range, the animation screen is determined as a waste frame in the object animation;
[0179] b2. When the animation screen in the object animation meets the rotation reference range, the animation screen is determined as a waste frame in the object animation;
[0180] b3. When the animation picture in the object animation meets the scaling reference range, the animation picture is determined as a waste frame in the object animation.
[0181] For example, the preset position reference range is (-∞, 0) and (800, +∞). When a frame of animation meets the position reference range, that is, the frame of animation appears before the 0th frame or after the 800th frame, the frame of animation is determined as a waste frame in the object animation.
[0182] For example, the preset rotation reference range is (-∞, 30) and (30, +∞). When a frame of animation meets the rotation reference range, that is, the frame of animation is rotated counterclockwise by more than 30°, or rotated clockwise by more than 30°, the frame of animation is determined as a waste frame in the object animation.
[0183] For example, the preset scaling reference range is (0, 0.8) and (1.2, +∞), and the original size of the animation picture is Q. Then, when a frame of the animation picture meets the scaling reference range, that is, the size of the frame of the animation picture is less than 0.8Q, or the size of the frame of the animation picture is greater than 1.2Q, then the frame of the animation picture is determined as a waste frame in the object animation.
[0184] As can be seen from the above, the embodiment of the present invention can obtain the character skeleton of the game character model, and the character animation corresponding to the character skeleton. The character skeleton may include a connecting sub-skeleton, and the connecting sub-skeleton corresponds to the connecting sub-skeleton animation in the character animation; construct an object skeleton chain of the game object model on the character skeleton of the game character model, and the object skeleton chain may include a chain head segment located at the front end of the object skeleton chain, and the chain head segment is mounted on the connecting sub-skeleton; based on the connecting sub-skeleton animation, construct a chain head segment animation corresponding to the chain head segment; based on the chain head segment animation, generate an object animation corresponding to the object skeleton chain; while the game character model executes the character animation, the game object model executes the object animation.
[0185] In the embodiment of the present invention, the user does not need to debug the corresponding object animations for all the object skeleton chains mounted on the character skeleton one by one. The user only needs to build the chain head segment animation for the chain head segment of any object skeleton chain. The solution can automatically generate the object animations corresponding to all the object skeleton chains. The object animation generation efficiency is high, and the generated object animation effect is realistic and accurate. Therefore, the embodiment of the present invention can automatically build the object animation of the game object model through the connection sub-skeleton animation of the game character model, thereby improving the efficiency of animation production.
[0186] The method described in the above embodiment will be further described in detail below.
[0187] In the process of game development, developers need to create a lot of character animations. In addition, if the game character has a lot of floating accessories, such as skirts, long hair, sleeves, ribbons and even props ribbons, the object animations of these floating objects are often made manually frame by frame.
[0188] Especially when there are a large number of game characters and floating objects, the animation generation solution provided by the embodiment of the present invention can be applied in various game development scenarios to improve the generation efficiency and accuracy of object animation.
[0189] For example, in this embodiment, the method of the embodiment of the present invention will be described in detail by taking the generation of the hem animation of a coat equipped on a game character as an example.
[0190] like Figure 2a As shown, the specific process of an animation generation method is as follows:
[0191] 201. Set up a character skeleton of a game character, and N hem skeleton chains mounted on the character skeleton, wherein the hem skeleton chain includes a chain head segment, a middle segment, and a chain tail segment.
[0192] In this embodiment, the skeleton chain refers to the hem skeleton chain, namely, the Bone skeleton; and the character skeleton is the Bip skeleton.
[0193] In the following text, the bone chain is referred to as the hem bone chain.
[0194] 202. Skin and bind the skeleton of the game character and N clothing hem skeleton chains.
[0195] 203. Create character animation for the skinned character skeleton, and generate blank frames according to the time parameters of each frame in the character animation.
[0196] 204. Based on the blank frame, create a chain head segment animation for the chain head segment of the target bone chain after skinning, and the target bone chain is any hem bone chain.
[0197] Generating the chain head segment animation based on the blank frame can solve the problem of inconsistent first frame.
[0198] In this embodiment, only one chain head segment animation needs to be produced for the chain head segment of any target bone chain after skinning. Steps 205 to 206 can automatically generate the hem animation of all hem bone chains based on the chain head segment animation, without the need for the user to manually repeat work, thereby improving the efficiency of animation generation.
[0199] 205. Generate chain head segment animations of other bone chains according to the chain head segment animation of the target bone chain. The other bone chains are other hem bone chains among the N hem bone chains except the target bone chain.
[0200] 206. Generate the chain tail segment animation of the chain tail segment and the middle segment animation of the middle segment in the hem skeleton chain according to the chain head segment animation of the hem skeleton chain.
[0201] 207. Clean up the waste frames of the hem animation of each skinned hem skeleton chain to obtain the cleaned hem animation of each hem skeleton chain, which includes the chain head segment animation, the middle segment animation and the chain tail segment animation.
[0202] 208. While the skinned character skeleton executes the character animation, each hem skeleton chain also executes its own cleaned hem animation at the same time.
[0203] refer to Figure 2b , Figure 2b This is a top view of a game character equipped with a coat while performing character animation. The white arrow indicates a hem bone chain of the coat. It can be seen that when the game character in the game is performing the character animation, the hem of the coat flutters naturally following the game character's movements.
[0204] As can be seen from the above, this solution can set up the character skeleton of the game character, and N hem bone chains mounted on the character skeleton, the bone chain including the chain head segment, the middle segment and the chain tail segment; perform skinning and binding on the character skeleton of the game character and the N hem bone chains; make character animation for the skinned character skeleton, and generate blank frames according to the time parameters of each frame in the character animation; based on the blank frames, make chain head segment animation for the chain head segment of the target bone chain after skinning, the target bone chain is any hem bone chain; generate other bone chains according to the chain head segment animation of the target bone chain The chain head segment animation is generated according to the chain head segment animation of the skeleton chain, and the other skeleton chains are the skeleton chains other than the target skeleton chain in the N hem skeleton chains; the chain tail segment animation of the chain tail segment and the middle segment animation of the middle segment in the skeleton chain are generated; the waste frames of the hem animation of each skinned skeleton chain are cleaned up to obtain the cleaned hem animation of each skeleton chain, and the hem animation includes the chain head segment animation, the middle segment animation and the chain tail segment animation; while the skinned character skeleton executes the character animation, each hem skeleton chain also executes its cleaned hem animation at the same time.
[0205] Therefore, this solution improves the efficiency of animation production.
[0206] In order to better implement the above method, an embodiment of the present invention further provides an animation generation device, which can be integrated in an electronic device, and the electronic device can be a terminal, a server, etc. Among them, the terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, a personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers.
[0207] For example, in this embodiment, the method of the embodiment of the present invention is described in detail by taking the animation generating device being specifically integrated into a personal computer as an example.
[0208] For example, Figure 3 As shown, the animation generation device may include an acquisition unit 301, a construction unit 302, a chain head animation unit 303, an object animation unit 304 and an execution unit 305, as follows:
[0209] (I) Acquisition unit 301:
[0210] The acquisition unit 301 can be used to acquire the character skeleton of the game character model and the character animation corresponding to the character skeleton. The character skeleton may include a connecting sub-bone, and the connecting sub-bone corresponds to the connecting sub-bone animation in the character animation.
[0211] (ii) Construction unit 302:
[0212] The construction unit 302 can be used to construct an object skeleton chain of a game object model on the character skeleton of the game character model. The object skeleton chain can include a chain head segment located at the front end of the object skeleton chain, and the chain head segment is mounted on the connecting sub-bone.
[0213] In some embodiments, an object skeleton chain is composed of multiple segments.
[0214] For example, in some embodiments, the object skeleton chain may include a tail segment located at the last end of the object skeleton chain, and an intermediate segment located between the head segment and the tail segment.
[0215] Therefore, in some embodiments, the building block 302 may include a linking chain head subunit, a chain head middle subunit, and a middle chain tail subunit, as follows:
[0216] (1) Linking the first subunit:
[0217] The Link Head Subunit can be used to mount the Link Head segment on the Link Sub-bone of the game character model.
[0218] (2) Chain head intermediate subunit:
[0219] The chain head intermediate subunit can be used to mount the intermediate segment on the chain head segment.
[0220] (3) Middle chain tail unit:
[0221] The middle tail subunit can be used to mount the tail segment on the middle segment.
[0222] In some embodiments, the construction unit 302 may also be used to:
[0223] Display the bone chain page;
[0224] The bone chain page displays the identifiers corresponding to the connected sub-bones, the identifier corresponding to the first segment of the chain, the identifier of the middle segment and the identifier of the last segment of the chain. The identifier corresponding to the first segment of the chain is connected to the identifier corresponding to the connected sub-bones, the identifier corresponding to the first segment of the chain is connected to the identifier of the middle segment, and the identifier of the middle segment is connected to the identifier of the last segment of the chain.
[0225] In some embodiments, the object animation may include the chain head segment animation, the middle segment animation and the chain tail segment animation. The object animation unit 304 may include a parameter subunit and an animation subunit, as follows:
[0226] (4) Parameter subunit:
[0227] The parameter subunit can be used to determine the physical motion parameters of the chain head segment in the previous frame of the chain head segment animation picture.
[0228] (5) Animation subunit:
[0229] The animation subunit can be used to generate the middle segment animation of the middle segment and the chain tail segment animation of the chain tail segment based on the physical motion parameters of the chain head segment.
[0230] In some embodiments, the animation subunit may be used to:
[0231] Based on the physical motion parameters of the chain head segment, the middle segment animation of the middle segment is generated;
[0232] Determine the physical motion parameters of the middle segment in the previous frame of the middle segment animation;
[0233] The chain tail segment animation of the chain tail segment is generated based on the physical motion parameters of the middle segment in the middle segment animation of the previous frame.
[0234] In some embodiments, the physical motion parameters may include bone chain softness, and the animation subunits may be used to:
[0235] Display softness controls in the page;
[0236] When a softness modification operation for a softness control is detected, the softness of the bone chain corresponding to the softness modification operation is obtained;
[0237] Based on the physical motion parameters of the chain head segment and the softness of the bone chain, the middle segment animation of the middle segment and the chain tail segment animation of the chain tail segment are generated.
[0238] (III) Chain head animation unit 303:
[0239] The first animation unit 303 can be used to construct the chain head segment animation corresponding to the chain head segment based on the linked sub-skeletal animation.
[0240] In some embodiments, the animation may include multiple frames of animation, and the chain head animation unit 303 may include an alignment subunit, a time subunit, a blank frame subunit, and a chain head animation subunit, as follows:
[0241] (1) Alignment subunits:
[0242] The alignment subunit can be used to display frame alignment controls in the interface.
[0243] (2) Time subunit:
[0244] The time subunit can be used to determine the generation time of each frame of the connected sub-bone animation screen when a trigger operation for the frame alignment control is detected.
[0245] (3) Blank frame subunit:
[0246] The blank frame sub-unit can be used to generate a blank frame picture of the chain head segment according to the generation time of each frame of the connected sub-skeleton animation picture.
[0247] In some embodiments, the blank frame subunit may also be used for:
[0248] Display the frame track on the page. The frame track is a track with time as the horizontal axis and contains frame labels;
[0249] According to the generation time, a frame identifier corresponding to the blank frame image is generated in the frame track.
[0250] (4) Chain head animation subunit:
[0251] It can be used to obtain a chain head segment animation frame corresponding to the chain head segment based on an animation creation operation for a blank frame.
[0252] (IV) Object animation unit 304:
[0253] The object animation unit 304 may be used to generate object animation corresponding to the object skeleton chain based on the chain head segment animation.
[0254] In some embodiments, the object animation unit 304 may further include a screening subunit, a culling subunit, and a display subunit, as follows:
[0255] (1) Screening subunit:
[0256] The screening subunit may be used to perform a waste frame screening operation on the object animation when a frame cleanup trigger operation is detected, so as to obtain a plurality of waste frames in the object animation.
[0257] In some embodiments, the animation may include multiple frames of animation, and the screening sub-unit may include a range sub-module and a screening sub-module, as follows:
[0258] A. Scope submodule:
[0259] The range submodule can be used to obtain a preset reference range of waste frames.
[0260] B. Screening submodule:
[0261] The screening submodule may be used to determine an animation frame as a waste frame in the object animation when the animation frame in the object animation meets the waste frame reference range.
[0262] In some embodiments, the waste frame reference range may include a position reference range, a rotation reference range, and a scaling reference range, and the screening submodule may be used to
[0263] When an animation picture in the object animation meets the position reference range, the animation picture is determined as a waste frame in the object animation;
[0264] When an animation frame in the object animation meets the rotation reference range, the animation frame is determined as a waste frame in the object animation;
[0265] When an animation picture in the object animation meets the scaling reference range, the animation picture is determined as a waste frame in the object animation.
[0266] (2) Eliminate subunits:
[0267] The culling subunit can be used to remove waste frames from the object animation to obtain a cleaned-up frame animation.
[0268] (3) Display subunit:
[0269] The display subunit may be used to display information corresponding to the waste frame in the page.
[0270] (V) Execution unit 305:
[0271] The execution unit 305 may be configured to cause the game object model to execute object animation while the game character model executes character animation.
[0272] In some embodiments, the execution unit 305 may be configured to:
[0273] While the game character model performs character animation, the game object model performs cleanup post-frame animation.
[0274] In some embodiments, the execution unit 305 may also be used to:
[0275] Based on the character skeleton of the game character model, the game character model is subjected to skinning and binding processing to obtain a bound game character model;
[0276] Based on the object skeleton chain of the game object model, the game object model is subjected to skinning and binding processing to obtain the bound game object model;
[0277] When the game character model executes the character animation, the game object model executes the object animation. The bound game character model executes the character animation, and the bound game object model executes the object animation at the same time.
[0278] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.
[0279] As can be seen from the above, the animation generation device of this embodiment is composed of an acquisition unit for acquiring the character skeleton of a game character model, and the character animation corresponding to the character skeleton. The character skeleton may include connecting sub-bones, and the connecting sub-bones correspond to the connecting sub-bone animation in the character animation; the construction unit is used to construct an object skeleton chain of a game object model on the character skeleton of the game character model. The object skeleton chain may include a chain head segment located at the front end of the object skeleton chain, and the chain head segment is mounted on the connecting sub-bones; the chain head animation unit is used to construct a chain head segment animation corresponding to the chain head segment based on the connecting sub-bone animation; the object animation unit is used to generate an object animation corresponding to the object skeleton chain based on the chain head segment animation; and the execution unit is used to execute the object animation of the game object model while the game character model executes the character animation.
[0280] Therefore, the embodiment of the present invention can improve the efficiency of animation production.
[0281] The embodiment of the present invention further provides an electronic device, which may be a terminal, a server, or the like. The terminal may be a mobile phone, a tablet computer, a smart Bluetooth device, a notebook computer, a personal computer, or the like; the server may be a single server or a server cluster composed of multiple servers, or the like.
[0282] In some embodiments, the animation generating device may also be integrated into multiple electronic devices. For example, the animation generating device may be integrated into multiple servers, and the animation generating method of the present invention may be implemented by multiple servers.
[0283] In this embodiment, the electronic device of this embodiment is a terminal as an example for detailed description, for example, Figure 4 As shown, it shows a schematic diagram of the structure of the terminal involved in the embodiment of the present invention, specifically:
[0284] The terminal may include one or more processors 401 of processing cores, one or more computer-readable storage media memories 402, a power supply 403, an input module 404, and a communication module 405. Those skilled in the art will appreciate that Figure 4 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0285] The processor 401 is the control center of the terminal. It uses various interfaces and lines to connect various parts of the entire terminal. It executes various functions of the terminal and processes data by running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, so as to perform overall detection of the terminal. In some embodiments, the processor 401 may include one or more processing cores; in some embodiments, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.
[0286] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0287] The terminal also includes a power supply 403 for supplying power to various components. In some embodiments, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 403 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0288] The terminal may further include an input module 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0289] The terminal may also include a communication module 405. In some embodiments, the communication module 405 may include a wireless module. The terminal may perform short-range wireless transmission through the wireless module of the communication module 405, thereby providing the user with wireless broadband Internet access. For example, the communication module 405 may be used to help the user send and receive emails, browse web pages, and access streaming media.
[0290] Although not shown, the terminal may also include a display unit, etc., which will not be described in detail here. Specifically in this embodiment, the processor 401 in the terminal will load the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 will run the application stored in the memory 402 to achieve various functions, as follows:
[0291] Get the character skeleton of the game character model and the character animation corresponding to the character skeleton. The character skeleton includes a link sub-bone, and the link sub-bone corresponds to the link sub-bone animation in the character animation;
[0292] An object skeleton chain of a game object model is constructed on the character skeleton of the game character model, wherein the object skeleton chain includes a chain head segment located at the front end of the object skeleton chain, and the chain head segment is mounted on the connecting sub-bone;
[0293] Based on the link sub-bone animation, construct the chain head segment animation corresponding to the chain head segment;
[0294] Generate the object animation corresponding to the object skeleton chain based on the chain head segment animation;
[0295] While the game character model performs character animation, the game object model performs object animation.
[0296] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0297] From the above, it can be seen that this solution improves the efficiency of animation production.
[0298] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0299] To this end, an embodiment of the present invention provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the animation generation methods provided in the embodiments of the present invention. For example, the instructions can execute the following steps:
[0300] Get the character skeleton of the game character model and the character animation corresponding to the character skeleton. The character skeleton includes a link sub-bone, and the link sub-bone corresponds to the link sub-bone animation in the character animation;
[0301] An object skeleton chain of a game object model is constructed on the character skeleton of the game character model, wherein the object skeleton chain includes a chain head segment located at the front end of the object skeleton chain, and the chain head segment is mounted on the connecting sub-bone;
[0302] Based on the link sub-bone animation, construct the chain head segment animation corresponding to the chain head segment;
[0303] Generate the object animation corresponding to the object skeleton chain based on the chain head segment animation;
[0304] While the game character model performs character animation, the game object model performs object animation.
[0305] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0306] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in various optional implementations of the animation generation aspect or the game development aspect provided in the above embodiments.
[0307] Since the instructions stored in the storage medium can execute the steps in any animation generation method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any animation generation method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0308] The above is a detailed introduction to an animation generation method, device, terminal and computer-readable storage medium provided in an embodiment of the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. An animation generation method, characterized in that: include: Obtaining a character skeleton of a game character model and a character animation corresponding to the character skeleton, wherein the character skeleton includes a connecting sub-skeleton, and the connecting sub-skeleton corresponds to the connecting sub-skeleton animation in the character animation; Constructing an object skeleton chain of a game object model on the character skeleton of the game character model, wherein the object skeleton chain includes a chain head segment located at the front end of the object skeleton chain, and the chain head segment is mounted on the connecting sub-skeleton; Based on the link sub-skeletal animation, construct the chain head segment animation corresponding to the chain head segment; Based on the chain head segment animation, generating the object animation corresponding to the object skeleton chain; While the game character model executes the character animation, the game object model executes the object animation; The animation includes multiple frames of animation, and the chain head segment animation corresponding to the chain head segment is constructed based on the link sub-skeletal animation, including: Show frame alignment controls in the interface; When a trigger operation for the frame alignment control is detected, determining the generation time of each frame of the linked sub-skeleton animation picture; Generate a blank frame of the chain head segment according to the generation time of each frame of the connected sub-skeleton animation picture; Based on the animation creation operation for the one blank frame, a frame of chain head segment animation picture corresponding to the chain head segment is obtained.
2. The animation generation method according to claim 1, characterized in that: The step of generating a blank frame of the chain head segment according to the generation time of each frame of the connected sub-skeleton animation frame also includes: Displaying a frame track on the page, wherein the frame track is a track with time as the horizontal axis and containing frame identifiers; According to the generation time, a frame identifier corresponding to the blank frame picture is generated in the frame track.
3. The animation generation method according to claim 1, characterized in that: The object skeleton chain is composed of a plurality of segments, and the object skeleton chain of the game object model is constructed on the character skeleton of the game character model, including: Mounting the chain head segment on the connecting sub-bone of the game character model; Mounting the middle segment on the chain head segment; Mounting the tail segment on the middle segment; The object skeleton chain includes a chain tail segment located at the rear end of the object skeleton chain and a middle segment located between the chain head segment and the chain tail segment.
4. The animation generation method according to claim 3, characterized in that: After constructing the object skeleton chain of the game object model on the character skeleton of the game character model, it also includes: Display the bone chain page; The bone chain page displays the identifier corresponding to the connected sub-bone, the identifier corresponding to the first segment of the chain, the identifier of the middle segment and the identifier of the last segment of the chain. The identifier corresponding to the first segment of the chain is connected to the identifier corresponding to the connected sub-bone, the identifier corresponding to the first segment of the chain is connected to the identifier of the middle segment, and the identifier of the middle segment is connected to the identifier of the last segment of the chain.
5. The animation generation method according to claim 3, characterized in that: The object animation includes a chain head segment animation, a middle segment animation and a chain tail segment animation, and the animation includes multiple frames of animation pictures. The object animation corresponding to the object skeleton chain is generated based on the chain head segment animation, including: Determine the physical motion parameters of the chain head segment in the chain head segment animation picture of the previous frame; Based on the physical motion parameters of the chain head segment, the middle segment animation of the middle segment and the chain tail segment animation of the chain tail segment are generated.
6. The animation generation method according to claim 5, characterized in that: The step of generating the middle segment animation of the middle segment and the tail segment animation of the tail segment based on the physical motion parameters of the chain head segment comprises: Based on the physical motion parameters of the chain head segment, generating the intermediate segment animation of the intermediate segment; Determining the physical motion parameters of the intermediate segment in the previous frame of the intermediate segment animation; The chain tail segment animation of the chain tail segment is generated based on the physical motion parameters of the middle segment in the middle segment animation of the previous frame.
7. The animation generation method according to claim 5, characterized in that: The physical motion parameters include the softness of the skeleton chain. The middle segment animation of the middle segment and the tail segment animation of the tail segment are generated based on the physical motion parameters of the head segment, including: Display softness controls in the page; When a softness modification operation for the softness control is detected, obtaining the softness of the skeleton chain corresponding to the softness modification operation; Based on the physical motion parameters of the chain head segment and the flexibility of the skeleton chain, the middle segment animation of the middle segment and the chain tail segment animation of the chain tail segment are generated.
8. The animation generation method according to claim 1, characterized in that: After generating the object animation corresponding to the object skeleton chain based on the chain head segment animation, the method further includes: When a frame cleaning trigger operation is detected, a waste frame screening operation is performed on the object animation to obtain a plurality of waste frames in the object animation; Eliminate the waste frames from the object animation to obtain a cleaned frame animation; Displaying information corresponding to the waste frame on the page; The game character model executes the character animation while the game object model executes the object animation, including: While the game character model executes the character animation, the game object model executes the post-cleaning frame animation.
9. The animation generation method according to claim 8, characterized in that: The animation includes a plurality of animation frames, and the performing of a waste frame screening operation on the object animation to obtain a plurality of waste frames in the object animation includes: Get the preset reference range of waste frames; When the animation frame in the object animation meets the waste frame reference range, the animation frame is determined as a waste frame in the object animation.
10. The animation generation method according to claim 9, characterized in that: The waste frame reference range includes a position reference range, a rotation reference range, and a scaling reference range. When the animation picture in the object animation meets the waste frame reference range, determining the animation picture as a waste frame in the object animation includes: When the animation frame in the object animation meets the position reference range, determining the animation frame as a waste frame in the object animation; When the animation frame in the object animation meets the rotation reference range, determining the animation frame as a waste frame in the object animation; When the animation frame in the object animation meets the scaling reference range, the animation frame is determined as a waste frame in the object animation.
11. The animation generation method according to claim 1, characterized in that: The method further comprises: while the game character model executes the character animation and before the game object model executes the object animation: Based on the character skeleton of the game character model, the game character model is subjected to skinning and binding processing to obtain a bound game character model; Based on the object skeleton chain of the game object model, the game object model is subjected to skinning and binding processing to obtain a bound game object model; The game character model executes the character animation while the game object model executes the object animation, including: While the bound game character model executes the character animation, the bound game object model executes the object animation.
12. An animation generating device, characterized in that: include: An acquisition unit, used for acquiring a character skeleton of a game character model and a character animation corresponding to the character skeleton, wherein the character skeleton includes a connecting sub-skeleton, and the connecting sub-skeleton corresponds to the connecting sub-skeleton animation in the character animation; A construction unit, used for constructing an object skeleton chain of a game object model on the character skeleton of the game character model, wherein the object skeleton chain includes a chain head segment located at the front end of the object skeleton chain, and the chain head segment is mounted on the connecting sub-skeleton; A chain head animation unit, used for constructing a chain head segment animation corresponding to the chain head segment based on the link sub-skeletal animation; An object animation unit, used to generate an object animation corresponding to the object skeleton chain based on the chain head segment animation; An execution unit, configured to cause the game character model to execute the character animation while the game object model executes the object animation; The animation includes multiple frames of animation pictures, and the chain head animation unit is used to: Show frame alignment controls in the interface; When a trigger operation for the frame alignment control is detected, determining the generation time of each frame of the linked sub-skeleton animation picture; Generate a blank frame of the chain head segment according to the generation time of each frame of the connected sub-skeleton animation picture; Based on the animation creation operation for the one blank frame, a frame of chain head segment animation picture corresponding to the chain head segment is obtained.
13. A terminal, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps in the animation generation method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the animation generation method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Three-dimensional virtual object swinging method and device, storage medium and computer equipment
CN108961365A