Animation generation method and device, storage medium and electronic equipment
Patent Information
- Application Number
- CN202211297012.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-21
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2042-10-21
AI Technical Summary
但是,当游戏角色的人物动作较多、以及服装款式较多时,需要制作大量的人物骨骼动画和服装骨骼动画,这无疑给动画制作带来了相当高的制作难度和成本负担
[0017] The animation generation method, apparatus, storage medium, and electronic device provided in this application determine at least one sphere based on the thigh bone, lower leg bone, and at least one preset knee bending angle, with each preset knee bending angle corresponding to one sphere. Then, multiple first key bone postures corresponding to the main skeleton are determined based on the spheres, and second key bone postures corresponding to the accessory bones are determined based on each first key bone posture. Subsequently, motion animation of a virtual character model is generated based on the first and second key bone postures. This eliminates the need to separately create limb skeleton animation and clothing skeleton animation, thus completing the production of clothing animation, greatly reducing the number of animations produced, lowering the difficulty of animation production, and improving the efficiency of animation production.
Smart Images

Figure CN115690266B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of game technology, and in particular to an animation generation method, apparatus, storage medium, and electronic device. Background Technology
[0002] In traditional character animation production, the game characters controlled by players usually have multiple outfits, such as multiple dresses. When producing character animation, it is necessary to produce additional animations for the outfits as well.
[0003] Typically, to avoid clothing overlapping with character movements and resulting in misalignment, clothing animation is primarily based on skeletal clothing animation. This involves creating corresponding skeletal animations for the character's movements, then creating corresponding skeletal clothing animations based on those, and finally creating the clothing animations based on the clothing animations. However, when game characters have numerous movements and a wide variety of clothing styles, a large number of skeletal animations for both characters and clothing are required, undoubtedly increasing the difficulty and cost of animation production. Summary of the Invention
[0004] This invention provides an animation generation method, apparatus, storage medium, and electronic device that can produce clothing animation with a small number of animations, thus reducing the difficulty of animation production.
[0005] This application provides an animation generation method that provides a graphical user interface via an electronic device. The content displayed by the graphical user interface at least partially includes a virtual character model. The virtual character model includes a main skeleton and accessory skeletons associated with and driven by the main skeleton. The main skeleton includes a thigh skeleton and a lower leg skeleton. The animation generation method includes:
[0006] At least one sphere is determined based on the femur, the calf, and at least one preset knee flexion angle, with each preset knee flexion angle corresponding to one sphere.
[0007] The postures of multiple first key bones corresponding to the main skeleton are determined based on the sphere.
[0008] Determine the second key bone posture corresponding to the accessory bone based on each of the first key bone postures;
[0009] Based on the first key bone pose and the second key bone pose, the motion animation of the virtual character model is generated.
[0010] This application also provides an animation generation device applied in an electronic device, which provides a graphical user interface. The content displayed by the graphical user interface at least partially includes a virtual character model. The virtual character model includes a main skeleton and accessory skeletons associated with and driven by the main skeleton. The main skeleton includes a thigh skeleton and a lower leg skeleton. The animation generation device includes:
[0011] The first determining module is used to determine at least one sphere based on the femur, the calf, and at least one preset knee flexion angle, wherein each preset knee flexion angle corresponds to one sphere.
[0012] The second determining module is used to determine the poses of multiple first key bones corresponding to the main skeleton based on the sphere.
[0013] The third determining module is used to determine the second key bone posture corresponding to the accessory bone based on each first key bone posture.
[0014] The generation module is used to generate motion animation of the virtual character model based on the first key bone pose and the second key bone pose.
[0015] This application also provides a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute any of the above-described animation generation methods.
[0016] This application also provides an electronic device, including a coupled memory and a processor, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to perform any of the above-described animation generation methods.
[0017] The animation generation method, apparatus, storage medium, and electronic device provided in this application determine at least one sphere based on the thigh bone, lower leg bone, and at least one preset knee bending angle, with each preset knee bending angle corresponding to one sphere. Then, multiple first key bone postures corresponding to the main skeleton are determined based on the spheres, and second key bone postures corresponding to the accessory bones are determined based on each first key bone posture. Subsequently, motion animation of a virtual character model is generated based on the first and second key bone postures. This eliminates the need to separately create limb skeleton animation and clothing skeleton animation, thus completing the production of clothing animation, greatly reducing the number of animations produced, lowering the difficulty of animation production, and improving the efficiency of animation production. Attached Figure Description
[0018] The technical solution and other beneficial effects of this application will become apparent from the following detailed description of specific embodiments in conjunction with the accompanying drawings.
[0019] Figure 1 This is a schematic diagram illustrating an application scenario of the animation generation method provided in the embodiments of this application.
[0020] Figure 2 This is a flowchart illustrating the animation generation method provided in an embodiment of this application.
[0021] Figure 3 This is another schematic diagram of the animation generation method provided in the embodiments of this application.
[0022] Figure 4 This is a schematic diagram illustrating lower limbs with different preset knee flexion angles, provided for embodiments of this application.
[0023] Figure 5 A schematic diagram illustrating the pose of the main skeleton and accessory skeleton provided in the embodiments of this application.
[0024] Figure 6 This is a schematic diagram of the structure of the animation generation device provided in the embodiments of this application.
[0025] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0026] Figure 8 Another structural schematic diagram of the electronic device provided in the embodiments of this application. Detailed Implementation
[0027] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0028] It should be noted that the terms "first," "second," etc., used in this document are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and / or "including" as used herein specify the presence of the stated features, integers, steps, operations, units, and / or components, without excluding the presence or addition of one or more other features, integers, steps, operations, units, components, and / or combinations thereof.
[0029] This application provides an animation generation method, apparatus, storage medium, and electronic device.
[0030] This animation generation method can be applied to, for example... Figure 1 The hardware environment shown consists of electronic devices such as terminal 101 and server 102. Figure 1 In this embodiment, server 102 connects to terminal 101 via a network and can be used to provide services (e.g., animation production services) to the terminal or clients installed on the terminal (e.g., preset rendering engines). A database can be set up on server 102 or on other devices independent of server 102 to provide data storage services to server 102. Terminal 101 can provide a graphical user interface (GUI) to present animation visuals to the player and obtain the player's operation commands. The aforementioned network includes, but is not limited to, wide area networks (WANs), metropolitan area networks (MANs), or local area networks (LANs), and terminal 101 is not limited to personal computers (PCs), mobile phones, tablets, etc. The animation generation method provided in this application embodiment can be executed by server 102, terminal 101, or jointly by server 102 and terminal 101.
[0031] Please see Figure 2 , Figure 2 This is a flowchart illustrating the animation generation method provided in this application embodiment. The animation generation method is applied to electronic devices such as servers or terminals, and provides a graphical user interface through the electronic device. The content displayed by the graphical user interface includes at least a virtual character model. The virtual character model includes a main skeleton and accessory skeletons that are associated with and driven by the main skeleton. The main skeleton includes a thigh skeleton and a lower leg skeleton.
[0032] The main skeleton is typically designed for a human or animal subject, and can include the lower limbs, upper limbs, torso, and head. Each part includes multiple bones and nodes connecting adjacent bones. The lower limbs include not only the thigh and lower leg bones but also other bones, such as the foot bones. Accessory skeletons can be designed for clothing or other wearable items. This clothing can include the fabric parts corresponding to the lower limbs, such as long skirts, short skirts, and shorts, and can also include the fabric parts corresponding to parts such as the torso, such as T-shirts.
[0033] The associated and driven auxiliary bones refer to the nodes of the auxiliary bones that move when the nodes of the main bones move. The movement of the two can be consistent. For example, when a node S1 in the main bones moves a certain distance in a certain direction, the node Q1 in the auxiliary bones corresponding to node S1 also moves the same distance in the same direction. Of course, the movement of the two can also be inconsistent, which is not restricted here.
[0034] In some implementations, the specific process of this animation generation method may include the following steps S101-S104, wherein:
[0035] S101. Determine at least one sphere based on the femur, calf, and at least one preset knee flexion angle, wherein each preset knee flexion angle corresponds to one sphere.
[0036] The preset knee flexion angle mainly refers to the angle between the thigh bone and the calf bone. The number and size of the preset knee flexion angle can be determined according to actual needs. For example, its size can include 180°, 45°, 60° and 90°.
[0037] In some implementations, please refer to Figure 3 The above step S101 may specifically include:
[0038] S1011. Obtain the length dimensions of the femur and calf bones respectively;
[0039] S1012. Determine at least one sphere radius based on the length dimension and at least one preset knee bending angle, wherein each preset knee bending angle corresponds to one sphere radius;
[0040] S1013. Determine the spherical surface corresponding to the radius of each sphere.
[0041] The lengths of the femur and tibia can vary depending on the subject. Please refer to [link / reference]. Figure 4 , Figure 4 This is a schematic diagram illustrating lower limbs with different preset knee flexion angles provided in an embodiment of this application, wherein, Figure 4 Three preset knee bending angles a1, a2, and a3 are shown. The length dimension of the thigh bone is b1, and the length dimension of the calf bone is b2. Then, c1 can be calculated based on a1, b1, and b2, c2 can be calculated based on a2, b1, and b2, and c3 can be calculated based on a3, b1, and b2. Then, 1 / (2*c1) can be used as the radius r1 of the sphere corresponding to the preset knee bending angle a1, 1 / (2*c2) can be used as the radius r2 of the sphere corresponding to the preset knee bending angle a2, and 1 / (2*c3) can be used as the radius r3 of the sphere corresponding to the preset knee bending angle a3. Then, spheres can be generated with r1, r2, and r3 as radii respectively, and the outer surface of the sphere can be used as the spherical surface.
[0042] S102. Determine the poses of multiple first key bones corresponding to the main skeleton based on the sphere.
[0043] The first keybone pose is the pose of the main skeleton, primarily used to display the motion animation performed by the main object. It can include the pose of the main skeleton in at least one animation frame corresponding to the entire process of the motion animation from start to finish. The number of first keybone poses can be determined based on the number of actions performed and the complexity of each action. For example, actions may include "climbing a ladder" or "taking off." If the execution process of "climbing a ladder" is more complex than that of "taking off," then the number of first keybone poses designed for "climbing a ladder" can be greater than the number of first keybone poses designed for "taking off."
[0044] Specifically, the first keybone pose can be designed using a specified plugin, which may include a Digital Content Creation (DCC) tool. The specified plugin can be used to generate the aforementioned sphere, that is, to draw the sphere on the graphical user interface, allowing the user to adjust the pose based on the drawn sphere, thereby setting the first keybone pose.
[0045] In some implementations, when there are multiple spheres, multiple spheres can be drawn simultaneously to set all the first keybone poses at once. Alternatively, only one sphere can be drawn at a time. After setting the first keybone pose corresponding to a single sphere, the next sphere can be drawn to continue setting other first keybone poses.
[0046] In some embodiments, the aforementioned main skeleton also includes an upper node connected to the femur and a lower node connected to the tibia. Typically, the upper node connects the femur to other bones (such as the trunk skeleton), and the lower node connects the tibia to other bones (such as the foot skeleton). A node connecting the femur and tibia is also provided between them. See also... Figure 4 The above step S102 may specifically include steps S1021-S1023, wherein:
[0047] S1021. In response to the posture adjustment operation of the main skeleton, detect the first movement position of the upper node and the second movement position of the lower node.
[0048] Users can use a graphical user interface to control any movable bone in the main skeleton by dragging or other touch-based methods to adjust the skeleton's posture. Movement can include displacement and rotation. Posture adjustments primarily target the thigh and calf bones, such as dragging and rotating the thigh and / or calf bones to change the angle between them. Adjustments can also be made to other bones in the main skeleton besides the thigh and calf bones.
[0049] Typically, during posture adjustments to the main skeleton, some or all of the nodes within the skeleton will change. At this time, the changes in the upper and lower nodes can be detected in real time, that is, their displacement can be detected in real time. For example, please refer to the above... Figure 4 When the angle between the femur and calf changes from a1 to a2, the position of the upper node N1 moves.
[0050] S1022. Determine the reference moving point based on the first moving position and the second moving position.
[0051] In some implementations, step S1022 may specifically include:
[0052] Determine the line segment connecting the first and second movement positions;
[0053] Determine the midpoint of the connecting line segment and use the midpoint as a reference point for movement.
[0054] During attitude adjustment, the first and / or second moving positions typically change, and correspondingly, the position and length of the line segment connecting them also change; the midpoint of the line segment does not necessarily refer to a point on the same line segment. For example, in the above... Figure 4 In the process, when the angle between the thigh bone (the bone corresponding to b1) and the calf bone (the bone corresponding to b2) changes from a1 to a2 (the posture is adjusted), the line segment connecting the upper node N1 and the lower node N2 changes from c1 to c2, and both its length and position change. The midpoint of the line segment (i.e., the reference moving point) changes from M1 to M2.
[0055] In other embodiments, the reference moving point can be any point on the connecting line segment other than the upper and lower nodes, and there is no limitation here.
[0056] S1023. Determine the poses of multiple first key bones corresponding to the main skeleton based on the reference movement point and the sphere.
[0057] When drawing a sphere, the upper node mentioned above can be used as the center of the sphere. Since the sphere is designed based on parameters such as the length of the thigh bone, the length of the calf bone, and the preset knee flexion angle, and each sphere corresponds to a preset knee flexion angle, each point on the sphere represents all the ideal positions that the reference movement point can move to when the angle between the thigh bone and the calf bone is the preset knee flexion angle. Therefore, users can design all poses corresponding to the preset knee flexion angle by adjusting the position of the reference movement point on the sphere.
[0058] It should be noted that, considering that the human thigh and calf cannot actually rotate 360°, but have certain limitations, it is not necessary to draw the entire sphere when designing the pose. The sphere can be drawn based on the normal rotation angle range of the thigh and calf.
[0059] In some implementations, step S1023 may specifically include:
[0060] Determine the locations of multiple targets on the surface of a sphere;
[0061] When the reference movement point is detected to have moved to the target position, the current skeletal pose of the main skeleton is taken as the first critical skeletal pose.
[0062] The target position can be randomly selected by the system or the user, or selected according to certain rules, such as selecting a certain number of spherical positions at specified intervals as the target position. When the reference movement point moves to the target position, it means that the main skeleton (mainly referring to the thigh and lower leg bones) has been adjusted to the required skeletal posture. At this time, the skeletal posture can be directly used as the first key skeletal posture. Alternatively, the user can be prompted to further confirm the skeletal posture by highlighting the reference movement point.
[0063] In some implementations, step S1023 may specifically include:
[0064] When the reference moving point is detected to be located on the sphere, in response to multiple sphere position selection operations for the reference moving point, each selected sphere position is used as the target position;
[0065] The corresponding bone pose of the main skeleton at the target location is taken as the first key bone pose.
[0066] The target location can be manually selected by the user. For example, when the user controls the reference point to move on the sphere, the location of the reference point can be selected by touch or other means.
[0067] S103. Determine the second key bone pose corresponding to the attachment bone based on the pose of each first key bone.
[0068] Since the main skeleton and the accessory skeletons are driven in a correlated manner, when the main skeleton is adjusted to the pose of the first critical bone, the accessory skeletons will be simultaneously driven to make corresponding pose adjustments based on the correlated driving rules. For example, please refer to [link to relevant documentation]. Figure 5 , Figure 5 The diagram illustrates the poses of the main skeleton and accessory skeletons. The pose of the accessory skeletons is currently driven by the first key skeleton pose of the main skeleton (primarily the lower limbs). Users can also manually adjust the poses of the accessory skeletons to obtain the second key skeleton pose.
[0069] In some implementations, step S103 may specifically include:
[0070] S1031. Determine the initial bone posture of the accessory bones based on the posture of the first key bone.
[0071] The initial skeletal pose of the attachment bone does not refer to the skeletal pose of the attachment bone without any pose adjustment (the default skeletal pose), but rather to the skeletal pose of the attachment bone corresponding to the first key bone pose when the attachment bone is driven in conjunction with the main bone. Specifically, the changes that the attachment bone needs to perform can be determined based on the changes in the first key bone pose relative to the default skeletal pose of the main bone. Then, based on the changes that need to be performed and the default skeletal pose of the attachment bone, the initial skeletal pose of the attachment bone is determined.
[0072] Typically, before adjusting the pose of the attachment bones and the main skeleton, the system sets a default bone pose for them. When the pose of the main skeleton changes, the pose of the attachment bones also changes accordingly, thus achieving correlated driving. The changes can be consistent; for example, if a bone in the main skeleton rotates by a certain angle, or a node moves by a certain distance, the corresponding bone in the associated attachment bones will also rotate by the same angle, or the corresponding node will also move by the same distance. Alternatively, the pose changes of the attachment bones and the main skeleton can be inconsistent. That is, while the rotation of a bone or the movement of a node in the main skeleton can drive the corresponding bone or node in the attachment bones to rotate or move, the magnitude of the rotation or movement will not be the same. The magnitude of the attachment bone's rotation or movement can be calculated based on the magnitude of the main skeleton's rotation or movement using a set calculation method. For example, a fixed increment can be added to the magnitude of the main skeleton's rotation or movement to obtain the magnitude of the attachment bone's rotation or movement.
[0073] It should be noted that since the design of the first key skeleton pose is achieved by controlling the movement position of the reference movement point (which can be considered as the spatial position of the leg bone), and each movement position corresponds to the skeleton pose of the main skeleton, it can be considered that when designing the first key skeleton pose, the only input source is the reference movement point. Furthermore, since the accessory skeleton is driven by the association with the main skeleton, it can be considered that the skeleton pose of the accessory skeleton is also based on the spatial position of the leg bone.
[0074] In other implementations, the skeletal pose of the accessory skeleton is designed based on the rotation of the leg bones. For example, for short skirts, the skeletal pose of the skirt hem can be set based solely on the rotation of the thigh bone. However, for long skirts, since the hem position is affected not only by the rotation of the thigh but also by the rotation of the calf, the skeletal pose of the accessory skeleton needs to be designed based on the rotation of both the thigh and calf bones. This means that both the rotation of the thigh and calf bones need to be used as input sources, resulting in two input sources. The problem with this is that the number of first key skeleton poses that need to be created is very large. For example, if the thigh bone rotates by 5 angles and the calf bone rotates by 3 angles, there may be 5*3=15 poses, meaning 15 poses need to be created. Furthermore, the data coherence between these poses is relatively high. This high data coherence will affect the interpolation results of subsequent interpolation algorithms. For instance, if the calf bone rotation angle remains unchanged and only the thigh bone is rotated, the change in leg position will be very large, but the change in angle is only reflected in the thigh bone rotating by a very small angle, indicating high data coherence.
[0075] In this embodiment, since the first key skeletal pose is designed based on the spatial position of the leg bones, one spatial position (i.e., the movement position of the reference movement point) corresponds to one pose. The poses corresponding to different spatial positions are very different from each other, thereby reducing two input sources to one input source, effectively reducing the number of poses to be created and reducing data stickiness.
[0076] S1032. In response to the pose adjustment operation of the attachment skeleton, update the initial skeleton pose.
[0077] During the posture adjustment of the accessory skeleton, the posture of the accessory skeleton changes in real time. Similar to the posture adjustment of the main skeleton, users can use the graphical user interface to control the movement of any movable bone in the accessory skeleton by dragging or other touch methods to adjust the posture of the accessory skeleton.
[0078] S1033. During the update process, in response to the pose selection command, the current skeletal pose of the attachment bone is used as the second key bone pose.
[0079] The graphical user interface can provide selection buttons such as "Confirm". When the skeletal pose of the attached skeleton is updated to the expected pose, the user can trigger the generation of pose selection instructions by clicking the selection button.
[0080] S104. Generate motion animation of the virtual character model based on the poses of the first and second key bones.
[0081] The first and second keybone poses can be set using the aforementioned preset plugins, while motion animation generation can be achieved using the preset engine. It should be noted that when creating the first and second keybone poses using the preset plugins, interpolation plugins, such as Radial Basis Function (RBF) plugins, can be used to check the interpolation results. This allows for timely adjustments to the first and second keybone poses before importing them into the preset engine to generate motion animation.
[0082] In some implementations, the aforementioned virtual character model also includes a cloth mesh model associated with the attachment skeleton and a main object mesh model associated with the main skeleton. In this case, please refer to [link to relevant documentation]. Figure 4 The above step S104 may specifically include:
[0083] S1041. Import the first key skeleton pose, the second key skeleton pose, the cloth mesh model, and the main object mesh model into the preset engine;
[0084] S1042. Using the imported preset engine, generate motion animations for the virtual character model.
[0085] The preset engines are mainly engines that provide animation generation capabilities, such as Unreal Engine (UE). Preset engines can be used to perform physical simulation (CG) of virtual character models to generate motion animations. CG refers to the technology of using knowledge of physics, mathematics, and numerical manipulation to reproduce various natural phenomena in a computer.
[0086] In some implementations, step S1042 may specifically include:
[0087] 1-1. Using the imported preset engine, determine the dynamic bones in the attachment skeleton and the dynamic configuration parameters of the dynamic bones;
[0088] In some implementations, step 1-1 above may specifically include:
[0089] By importing a preset engine, a parameter setting interface is provided for the corresponding attachment skeleton;
[0090] In response to settings operations on the parameter settings interface, determine the dynamic bones in the attachment skeleton and the dynamic configuration parameters of the dynamic bones.
[0091] Users can specify which bones in the attachment skeleton to be used as dynamic bones. Dynamic bones are bones driven by a dynamic bone algorithm, which is typically a simple algorithm based on a simulated spring oscillator to achieve physical simulation of a tree-like soft body. Dynamic configuration parameters are parameters configured for the animation effects of dynamic bones, which can include motion speed, motion acceleration, damping, elastic coefficient, gravity, and angular constraints, etc.
[0092] 1-2. Based on the poses of the first and second key bones, determine the first skeletal animation corresponding to the virtual character model;
[0093] The first skeletal animation is primarily used to demonstrate the overall skeletal movement of a virtual character model. The preset engine can use a built-in interpolation algorithm, such as a Radial Basis Function (RBF) neural network, to interpolate based on the poses of the first and second key bones (equivalent to the overall key bone poses) to obtain the RBF-driven animation (i.e., the first skeletal animation).
[0094] 1-3. Based on the dynamic skeleton and dynamic configuration parameters, determine the second skeleton animation corresponding to the dynamic skeleton;
[0095] The second skeletal animation is mainly used to demonstrate the movement of dynamic bones, which is then used to display soft body animation effects.
[0096] In some implementations, after generating the second skeletal animation, collision detection is also required for the dynamic skeleton. That is, when the dynamic skeleton is located inside the corresponding collider, the position of the dynamic skeleton is adjusted to be outside the collider to adjust the second skeletal animation and avoid the phenomenon of interlacing when generating motion animation in the future. The collider can be of various types such as sphere, capsule, cube, and plane.
[0097] 1-4. Generate motion animation of the virtual character model based on the first skeletal animation, the second skeletal animation, the main object mesh model, and the cloth mesh model.
[0098] Among them, the motion animation generated based on the first and second skeletal animations is an animation that superimposes RBF driving and physical effects.
[0099] In some implementations, steps 1-4 above may specifically include:
[0100] The first motion animation is determined based on the first skeletal animation, the main object mesh model, and the cloth mesh model;
[0101] The second motion animation is determined based on the second skeletal animation and the cloth mesh model;
[0102] Based on the first and second motion animations, generate motion animations for the virtual character model.
[0103] Before generating the first and second motion animations, the rendering and constraint information of the main object mesh model and the cloth mesh model can be set in the preset engine. The motion animation of the virtual character model is generated by combining this information.
[0104] It should be noted that an additional RBF drive function button can be set on the engine interface of the preset engine. When the RBF drive function button is turned on, motion animation can be created according to the above steps S104. When the RBF drive function button is turned off, animation can be created manually, which improves the flexibility of animation production.
[0105] As described above, the animation generation method provided in this embodiment determines at least one sphere based on the thigh bone, calf bone, and at least one preset knee bending angle, with each preset knee bending angle corresponding to one sphere. Then, it determines multiple first key bone postures corresponding to the main skeleton based on the spheres, and determines second key bone postures corresponding to the accessory bones based on each first key bone posture. Subsequently, it generates motion animation of the virtual character model based on the first and second key bone postures. This eliminates the need to separately create limb skeleton animation and clothing skeleton animation, thus completing the production of clothing animation, greatly reducing the number of animations produced, lowering the difficulty of animation production, and improving the efficiency of animation production.
[0106] Based on the methods described in the above embodiments, this embodiment will further describe the animation generation device from the perspective of the animation generation device. The animation generation device can be implemented as an independent entity and can be applied to electronic devices such as servers or terminals. The terminal can include mobile phones, tablets, personal PCs, etc., and the server can be a server that can provide game services.
[0107] Please see Figure 6 , Figure 6This application provides a detailed description of an animation generation apparatus. This apparatus is used in an electronic device and provides a graphical user interface (GUI). The GUI displays content that at least partially includes a virtual character model. The virtual character model includes a main skeleton and associated and driven accessory skeletons. The main skeleton includes connected thigh and lower leg bones. The animation generation apparatus may include: a first determining module 10, a second determining module 20, a third determining module 30, and a generation module 40, wherein:
[0108] (1) First Determination Module 10
[0109] The first determining module 10 is used to determine at least one sphere based on the femur, calf, and at least one preset knee flexion angle, with each preset knee flexion angle corresponding to one sphere.
[0110] In some implementations, the first determining module 10 is specifically used for:
[0111] Obtain the length dimensions of the thigh bone and the lower leg bone respectively;
[0112] Based on the length dimension and at least one preset knee flexion angle, determine at least one sphere radius, with each preset knee flexion angle corresponding to one sphere radius;
[0113] Determine the spherical surface corresponding to the radius of each sphere.
[0114] (2) Second determination module 20
[0115] The second determining module 20 is used to determine the poses of multiple first key bones corresponding to the main skeleton based on the sphere.
[0116] In some embodiments, the aforementioned main skeleton further includes an upper node connected to the femur and a lower node connected to the calf. In this case, the second determining module 20 is specifically used for:
[0117] In response to the posture adjustment operation of the main skeleton, the first movement position of the upper node and the second movement position of the lower node are detected.
[0118] Determine the reference moving point based on the first moving position and the second moving position;
[0119] Based on the reference movement point and the sphere, determine the poses of multiple first key bones corresponding to the main skeleton.
[0120] Furthermore, the second determining module 20 described above is used for:
[0121] Determine the line segment connecting the first and second movement positions;
[0122] Determine the midpoint of the connecting line segment and use the midpoint as a reference point for movement.
[0123] Furthermore, the second determining module 20 described above is used for:
[0124] Determine the locations of multiple targets on the surface of a sphere;
[0125] When the reference movement point is detected to have moved to the target position, the current skeletal pose of the main skeleton is taken as the first critical skeletal pose.
[0126] Furthermore, the second determining module 20 described above is used for:
[0127] When the reference moving point is detected to be located on the sphere, in response to multiple sphere position selection operations for the reference moving point, each selected sphere position is used as the target position;
[0128] The corresponding bone pose of the main skeleton at the target location is taken as the first key bone pose.
[0129] (3) Third Determination Module 30
[0130] The third determining module 30 is used to determine the second key bone posture corresponding to the attachment bone based on the posture of each first key bone.
[0131] In some implementations, the third determining module 30 is specifically used for:
[0132] The initial bone posture of the accessory bones is determined based on the posture of the first key bone.
[0133] In response to the pose adjustment operation of the attachment bones, the initial bone pose is updated;
[0134] During the update process, in response to the pose selection command, the current skeletal pose of the attachment bone is used as the second key bone pose.
[0135] (4) Generation module 40
[0136] The generation module 40 is used to generate motion animations of the virtual character model based on the poses of the first and second key bones.
[0137] In some embodiments, the generation module 40 is specifically used for:
[0138] Import the first key skeleton pose, the second key skeleton pose, the cloth mesh model, and the main object mesh model into the preset engine;
[0139] Use the imported preset engine to generate motion animations for virtual character models.
[0140] In some embodiments, the generation module 40 is further configured to:
[0141] 1-1. Using the imported preset engine, determine the dynamic bones in the attachment skeleton and the dynamic configuration parameters of the dynamic bones;
[0142] 1-2. Based on the poses of the first and second key bones, determine the first skeletal animation corresponding to the virtual character model;
[0143] 1-3. Based on the dynamic skeleton and dynamic configuration parameters, determine the second skeleton animation corresponding to the dynamic skeleton;
[0144] 1-4. Generate motion animation of the virtual character model based on the first skeletal animation, the second skeletal animation, the main object mesh model, and the cloth mesh model.
[0145] In some embodiments, the generation module 40 is further configured to:
[0146] By importing a preset engine, a parameter setting interface is provided for the corresponding attachment skeleton;
[0147] In response to settings operations on the parameter settings interface, determine the dynamic bones in the attachment skeleton and the dynamic configuration parameters of the dynamic bones.
[0148] In some embodiments, the generation module 40 is further configured to:
[0149] The first motion animation is determined based on the first skeletal animation, the main object mesh model, and the cloth mesh model;
[0150] The second motion animation is determined based on the second skeletal animation and the cloth mesh model;
[0151] Based on the first and second motion animations, generate motion animations for the virtual character model.
[0152] In practice, the above modules can be implemented as independent entities or combined in any way to be implemented as the same or several entities. For the specific implementation of the above modules, please refer to the previous method implementation examples, which will not be repeated here.
[0153] In addition, this application also provides an electronic device, which may be a smartphone, tablet computer, or other similar device. Figure 7 As shown, the electronic device 200 includes a processor 201 and a memory 202. The processor 201 and the memory 202 are electrically connected.
[0154] The processor 201 is the control center of the electronic device 200. It connects various parts of the electronic device through various interfaces and lines. By running or loading the application program stored in the memory 202 and calling the data stored in the memory 202, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole.
[0155] In this embodiment, the processor 201 in the electronic device 200 loads the instructions corresponding to the processes of one or more applications into the memory 202 according to the following steps, and the processor 201 runs the applications stored in the memory 202 to realize various functions.
[0156] Figure 8 A detailed structural block diagram of an electronic device provided in an embodiment of this application is shown. This electronic device can be used to implement the animation generation method provided in the above embodiments. The electronic device may include a smartphone or a server.
[0157] The electronic device may include a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, a radio frequency (RF) circuit 303, a power supply 304, an input unit 305, and a display unit 306, etc. Those skilled in the art will understand that the electronic device structure shown in the figures does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0158] The processor 301 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 302, and by calling data stored in the memory 302, thereby providing overall monitoring of the electronic device. Optionally, the processor may include one or more processing cores; preferably, the processor may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor.
[0159] The memory 302 can be used to store software programs (computer programs) and modules. The processor 301 executes various functional applications and data processing by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
[0160] RF circuit 303 can be used for signal reception and transmission during information transmission and reception. Specifically, it receives downlink information from the base station and hands it over to one or more processors 301 for processing; additionally, it transmits uplink data to the base station. Typically, RF circuit 303 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, RF circuit 303 can also communicate wirelessly with networks and other devices. This wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System for Mobile Communications), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), email, and SMS (Short Messaging Service).
[0161] The electronic device also includes a power supply 304 (such as a battery) that supplies power to various components. Preferably, the power supply 304 can be logically connected to the processor 301 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. The power supply 304 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0162] The electronic device may also include an input unit 305, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. Specifically, in one embodiment, the input unit 305 may include a touch-sensitive surface and other input devices. The touch-sensitive surface, also known as a touch display or touchpad, can collect user touch operations on or near it (e.g., user operations using fingers, styluses, or any suitable object or accessory on or near the touch-sensitive surface) and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 301, and can receive and execute commands from the processor 301. Furthermore, various types of touch-sensitive surfaces, such as resistive, capacitive, infrared, and surface acoustic wave, can be used to implement the touch-sensitive surface. In addition to the touch-sensitive surface, the input unit 305 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of the following: a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick.
[0163] The electronic device may further include a display unit 306, which can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. The display unit 306 includes multiple hardware display processing units, a video frame processing module, a display screen, etc. The multiple hardware display processing units and the video frame processing module can be integrated into a processing chip. The display screen may include a display panel, optionally configured as a liquid crystal display (LCD), an organic light-emitting diode (OLED), or similar form. Furthermore, a touch-sensitive surface may cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it transmits the information to the processor 301 to determine the type of touch event. Subsequently, the processor 301 provides corresponding visual output on the display panel according to the type of touch event. Although in the figures, the touch-sensitive surface and the display panel are implemented as two separate components to achieve input and output functions, in some embodiments, the touch-sensitive surface and the display panel can be integrated to achieve input and output functions.
[0164] Although not shown, the electronic device may also include a camera, Bluetooth module, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 301 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 302 according to the following instructions, and the processor 301 runs the applications stored in the memory 302 to realize various functions, as follows:
[0165] At least one sphere is determined based on the femur, the calf, and at least one preset knee flexion angle, with each preset knee flexion angle corresponding to one sphere.
[0166] The postures of multiple first key bones corresponding to the main skeleton are determined based on the sphere.
[0167] Determine the second key bone posture corresponding to the accessory bone based on each of the first key bone postures;
[0168] Based on the first key bone pose and the second key bone pose, the motion animation of the virtual character model is generated.
[0169] In some embodiments, determining at least one spherical surface based on the femur, the calf, and at least one preset knee flexion angle includes:
[0170] The length dimensions of the femur and the calf bones are obtained respectively.
[0171] Based on the length dimension and at least one preset knee flexion angle, at least one sphere radius is determined, with each preset knee flexion angle corresponding to one sphere radius;
[0172] Determine the spherical surface corresponding to the radius of each sphere.
[0173] In some embodiments, the main skeleton further includes an upper node connected to the thigh bone and a lower node connected to the lower leg bone. The step of determining the poses of multiple first key bones corresponding to the main skeleton based on the sphere includes:
[0174] In response to the posture adjustment operation of the main skeleton, the first moving position of the upper node and the second moving position of the lower node are detected;
[0175] A reference moving point is determined based on the first moving position and the second moving position;
[0176] Based on the reference movement point and the sphere, the poses of multiple first key bones corresponding to the main skeleton are determined.
[0177] In some implementations, determining the poses of multiple first key bones corresponding to the main skeleton based on the reference movement point and the sphere includes:
[0178] Determine multiple target positions from the surface of the sphere;
[0179] When the reference movement point is detected to have moved to the target position, the current skeletal pose of the main skeleton is taken as the first key skeletal pose.
[0180] In some implementations, the poses of multiple first key bones corresponding to the main skeleton are determined based on the reference movement point and the sphere, including:
[0181] When the reference moving point is detected to be located on the sphere, in response to multiple sphere position selection operations of the reference moving point, each selected sphere position is used as the target position;
[0182] The corresponding bone posture of the main skeleton at the target location is taken as the first key bone posture.
[0183] In some embodiments, determining the reference movement point based on the first movement position and the second movement position includes:
[0184] Determine the line segment connecting the first moving position and the second moving position;
[0185] Determine the midpoint of the connecting line segment and use the midpoint as a reference moving point.
[0186] In some implementations, determining the second key bone pose corresponding to the accessory bone based on each first key bone pose includes:
[0187] The initial skeletal posture of the accessory skeleton is determined based on the posture of the first key skeleton.
[0188] In response to the pose adjustment operation of the accessory skeleton, the initial skeleton pose is updated;
[0189] During the update process, in response to the pose selection command, the current skeletal pose of the attachment bone is used as the second key skeletal pose.
[0190] In some embodiments, the virtual character model further includes a cloth mesh model associated with the accessory skeleton and a main object mesh model associated with the main skeleton. Generating the motion animation of the virtual character model based on the first key skeleton pose and the second key skeleton pose includes:
[0191] Import the first key skeleton pose, the second key skeleton pose, the cloth mesh model, and the main object mesh model into the preset engine;
[0192] Using the imported preset engine, motion animation of the virtual character model is generated.
[0193] In some implementations, generating motion animations for the virtual character model using the imported preset engine includes:
[0194] Using the imported preset engine, determine the dynamic bones in the attachment skeleton and the dynamic configuration parameters of the dynamic bones;
[0195] Based on the first key bone pose and the second key bone pose, determine the first skeletal animation corresponding to the virtual character model;
[0196] Based on the dynamic skeleton and the dynamic configuration parameters, determine the second skeleton animation corresponding to the dynamic skeleton;
[0197] Based on the first skeletal animation, the second skeletal animation, the main object mesh model, and the cloth mesh model, the motion animation of the virtual character model is generated.
[0198] In some implementations, generating motion animation of the virtual character model based on the first skeletal animation, the second skeletal animation, the main object mesh model, and the cloth mesh model includes:
[0199] The first motion animation is determined based on the first skeletal animation, the main object mesh model, and the cloth mesh model;
[0200] The second motion animation is determined based on the second skeletal animation and the cloth mesh model;
[0201] Based on the first motion animation and the second motion animation, generate motion animation for the virtual character model.
[0202] In some implementations, determining the dynamic bones in the attachment skeleton and the dynamic configuration parameters of the dynamic bones using the imported preset engine includes:
[0203] The imported preset engine provides a parameter setting interface for the attachment skeleton.
[0204] In response to the setting operation of the parameter setting interface, the dynamic bones in the attachment skeleton and the dynamic configuration parameters of the dynamic bones are determined.
[0205] This electronic device can implement the steps of any embodiment of the animation generation method provided in this application. Therefore, it can achieve the beneficial effects that any animation generation method provided in this application can achieve. For details, please refer to the previous embodiments, which will not be repeated here.
[0206] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions (computer programs) or by instructions (computer programs) controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0207] Therefore, embodiments of this application provide a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps of any embodiment of the animation generation method provided in this application. For example, the computer program can execute the following steps:
[0208] At least one sphere is determined based on the femur, the calf, and at least one preset knee flexion angle, with each preset knee flexion angle corresponding to one sphere.
[0209] The postures of multiple first key bones corresponding to the main skeleton are determined based on the sphere.
[0210] Determine the second key bone posture corresponding to the accessory bone based on each of the first key bone postures;
[0211] Based on the first key bone pose and the second key bone pose, the motion animation of the virtual character model is generated.
[0212] In some embodiments, determining at least one spherical surface based on the femur, the calf, and at least one preset knee flexion angle includes:
[0213] The length dimensions of the femur and the calf bones are obtained respectively.
[0214] Based on the length dimension and at least one preset knee flexion angle, at least one sphere radius is determined, with each preset knee flexion angle corresponding to one sphere radius;
[0215] Determine the spherical surface corresponding to the radius of each sphere.
[0216] In some embodiments, the main skeleton further includes an upper node connected to the thigh bone and a lower node connected to the lower leg bone. The step of determining the poses of multiple first key bones corresponding to the main skeleton based on the sphere includes:
[0217] In response to the posture adjustment operation of the main skeleton, the first moving position of the upper node and the second moving position of the lower node are detected;
[0218] A reference moving point is determined based on the first moving position and the second moving position;
[0219] Based on the reference movement point and the sphere, the poses of multiple first key bones corresponding to the main skeleton are determined.
[0220] In some implementations, determining the poses of multiple first key bones corresponding to the main skeleton based on the reference movement point and the sphere includes:
[0221] Determine multiple target positions from the surface of the sphere;
[0222] When the reference movement point is detected to have moved to the target position, the current skeletal pose of the main skeleton is taken as the first key skeletal pose.
[0223] In some implementations, the poses of multiple first key bones corresponding to the main skeleton are determined based on the reference movement point and the sphere, including:
[0224] When the reference moving point is detected to be located on the sphere, in response to multiple sphere position selection operations of the reference moving point, each selected sphere position is used as the target position;
[0225] The corresponding bone posture of the main skeleton at the target location is taken as the first key bone posture.
[0226] In some embodiments, determining the reference movement point based on the first movement position and the second movement position includes:
[0227] Determine the line segment connecting the first moving position and the second moving position;
[0228] Determine the midpoint of the connecting line segment and use the midpoint as a reference moving point.
[0229] In some implementations, determining the second key bone pose corresponding to the accessory bone based on each first key bone pose includes:
[0230] The initial skeletal posture of the accessory skeleton is determined based on the posture of the first key skeleton.
[0231] In response to the pose adjustment operation of the accessory skeleton, the initial skeleton pose is updated;
[0232] During the update process, in response to the pose selection command, the current skeletal pose of the attachment bone is used as the second key skeletal pose.
[0233] In some embodiments, the virtual character model further includes a cloth mesh model associated with the accessory skeleton and a main object mesh model associated with the main skeleton. Generating the motion animation of the virtual character model based on the first key skeleton pose and the second key skeleton pose includes:
[0234] Import the first key skeleton pose, the second key skeleton pose, the cloth mesh model, and the main object mesh model into the preset engine;
[0235] Using the imported preset engine, motion animation of the virtual character model is generated.
[0236] In some implementations, generating motion animations for the virtual character model using the imported preset engine includes:
[0237] Using the imported preset engine, determine the dynamic bones in the attachment skeleton and the dynamic configuration parameters of the dynamic bones;
[0238] Based on the first key bone pose and the second key bone pose, determine the first skeletal animation corresponding to the virtual character model;
[0239] Based on the dynamic skeleton and the dynamic configuration parameters, determine the second skeleton animation corresponding to the dynamic skeleton;
[0240] Based on the first skeletal animation, the second skeletal animation, the main object mesh model, and the cloth mesh model, the motion animation of the virtual character model is generated.
[0241] In some implementations, generating motion animation of the virtual character model based on the first skeletal animation, the second skeletal animation, the main object mesh model, and the cloth mesh model includes:
[0242] The first motion animation is determined based on the first skeletal animation, the main object mesh model, and the cloth mesh model;
[0243] The second motion animation is determined based on the second skeletal animation and the cloth mesh model;
[0244] Based on the first motion animation and the second motion animation, generate motion animation for the virtual character model.
[0245] In some implementations, determining the dynamic bones in the attachment skeleton and the dynamic configuration parameters of the dynamic bones using the imported preset engine includes:
[0246] The imported preset engine provides a parameter setting interface for the attachment skeleton.
[0247] In response to the setting operation of the parameter setting interface, the dynamic bones in the attachment skeleton and the dynamic configuration parameters of the dynamic bones are determined.
[0248] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0249] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0250] Since the computer program stored in the storage medium can execute the steps in any of the animation generation method embodiments provided in this application, the beneficial effects that any of the animation generation methods provided in this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0251] The above provides a detailed description of an animation generation method, apparatus, electronic device, and storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. An animation generation method characterized by comprising: A graphical user interface is provided via an electronic device, the content displayed by the graphical user interface at least partially comprising a virtual character model, the virtual character model including a main skeleton and accessory skeletons associated with and driven by the main skeleton, the main skeleton including a thigh skeleton and a lower leg skeleton, the animation generation method including: At least one sphere is determined based on the femur, the calf, and at least one preset knee flexion angle, with each preset knee flexion angle corresponding to one sphere. The postures of multiple first key bones corresponding to the main skeleton are determined based on the sphere. Determine the second key bone posture corresponding to the accessory bone based on each of the first key bone postures; Based on the first key bone pose and the second key bone pose, generate the motion animation of the virtual character model; Determining at least one spherical surface based on the femur, the calf, and at least one preset knee flexion angle includes: The length dimensions of the femur and the calf bones are obtained respectively. Based on the length dimension and at least one preset knee bending angle, at least one sphere radius is determined, with each preset knee bending angle corresponding to one sphere radius; Determine the spherical surface corresponding to the radius of each sphere.
2. The animation generation method according to claim 1, characterized by, The main skeleton also includes an upper node connected to the thigh bone and a lower node connected to the lower leg bone. Determining the poses of multiple first key bones corresponding to the main skeleton based on the sphere includes: In response to the posture adjustment operation of the main skeleton, the first moving position of the upper node and the second moving position of the lower node are detected; A reference moving point is determined based on the first moving position and the second moving position; Based on the reference movement point and the sphere, the poses of multiple first key bones corresponding to the main skeleton are determined.
3. The animation generation method according to claim 2, characterized by, The step of determining the poses of multiple first key bones corresponding to the main skeleton based on the reference movement point and the sphere includes: Determine multiple target positions from the surface of the sphere; When the reference movement point is detected to have moved to the target position, the current skeletal pose of the main skeleton is taken as the first key skeletal pose.
4. The animation generation method according to claim 2, characterized by, Based on the reference movement point and the sphere, determine the poses of multiple first key bones corresponding to the main skeleton, including: When the reference moving point is detected to be located on the sphere, in response to multiple sphere position selection operations of the reference moving point, each selected sphere position is used as the target position; The corresponding bone posture of the main skeleton at the target location is taken as the first key bone posture.
5. The animation generation method according to claim 2, characterized by, Determining the reference moving point based on the first moving position and the second moving position includes: Determine the line segment connecting the first moving position and the second moving position; Determine the midpoint of the connecting line segment and use the midpoint as a reference moving point.
6. The animation generation method according to claim 1, characterized in that, Determining the second key bone pose corresponding to the accessory bone based on each first key bone pose includes: The initial skeletal posture of the accessory skeleton is determined based on the posture of the first key skeleton. In response to the pose adjustment operation of the accessory skeleton, the initial skeleton pose is updated; During the update process, in response to the pose selection command, the current skeletal pose of the attachment bone is used as the second key skeletal pose.
7. The animation generation method according to any one of claims 1-6, characterized in that, The virtual character model also includes a cloth mesh model associated with the accessory skeleton and a main object mesh model associated with the main skeleton. Generating the motion animation of the virtual character model based on the first key skeleton pose and the second key skeleton pose includes: Import the first key skeleton pose, the second key skeleton pose, the cloth mesh model, and the main object mesh model into the preset engine; Using the imported preset engine, motion animation of the virtual character model is generated.
8. The animation generation method according to claim 7, characterized in that, The step of generating motion animation for the virtual character model using the imported preset engine includes: Using the imported preset engine, determine the dynamic bones in the attachment skeleton and the dynamic configuration parameters of the dynamic bones; Based on the first key bone pose and the second key bone pose, determine the first skeletal animation corresponding to the virtual character model; Based on the dynamic skeleton and the dynamic configuration parameters, determine the second skeleton animation corresponding to the dynamic skeleton; Based on the first skeletal animation, the second skeletal animation, the main object mesh model, and the cloth mesh model, the motion animation of the virtual character model is generated.
9. The animation generation method according to claim 8, characterized in that, The step of generating motion animation for the virtual character model based on the first skeletal animation, the second skeletal animation, the main object mesh model, and the cloth mesh model includes: The first motion animation is determined based on the first skeletal animation, the main object mesh model, and the cloth mesh model; The second motion animation is determined based on the second skeletal animation and the cloth mesh model; Based on the first motion animation and the second motion animation, generate motion animation for the virtual character model.
10. The animation generation method according to claim 8, characterized in that, The step of using the imported preset engine to determine the dynamic bones in the attachment skeleton and the dynamic configuration parameters of the dynamic bones includes: The imported preset engine provides a parameter setting interface for the attachment skeleton. In response to the setting operation of the parameter setting interface, the dynamic bones in the attachment skeleton and the dynamic configuration parameters of the dynamic bones are determined.
11. An animation generation device, characterized in that, An animation generation device is used in an electronic device to provide a graphical user interface (GUI), the content displayed by the GUI at least partially including a virtual character model, the virtual character model including a main skeleton and accessory skeletons associated with and driven by the main skeleton, the main skeleton including a thigh bone and a lower leg bone, and the animation generation device including: The first determining module is used to determine at least one sphere based on the femur, the calf, and at least one preset knee flexion angle, wherein each preset knee flexion angle corresponds to one sphere. The second determining module is used to determine the poses of multiple first key bones corresponding to the main skeleton based on the sphere. The third determining module is used to determine the second key bone posture corresponding to the accessory bone based on each first key bone posture. A generation module is used to generate motion animation of the virtual character model based on the first key bone pose and the second key bone pose. The first determining module is used to obtain the length dimensions of the thigh bone and the lower leg bone respectively; determine at least one sphere radius based on the length dimensions and at least one preset knee bending angle, with each preset knee bending angle corresponding to one sphere radius; and determine the spherical surface corresponding to each sphere radius.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to execute the animation generation method of any one of claims 1 to 10.
13. An electronic device, characterized in that, The method includes a coupled memory and a processor, the memory storing a computer program, and the processor running the computer program in the memory to perform the steps of the animation generation method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Skeleton animation driving method and device, and storage medium
CN111383309A
Cloth animation processing method and device, electronic equipment and storage medium
CN114299200A