A quadruped biological animation generation method and system

By layering the skeleton of quadrupeds and applying the inverse kinematics algorithm, the problem of low efficiency in generating quadruped animation is solved, and efficient and automatic adaptation to the environment animation generation is achieved, generating high-quality animation that conforms to the laws of biological movement.

CN118887326BActive Publication Date: 2025-10-10ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411005182.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2025-10-10
Estimated Expiration
2044-07-25

AI Technical Summary

Technical Problem

In traditional technologies, the animation generation of quadruped creatures is inefficient and requires long periods of human-computer interaction, resulting in low work efficiency.

Method used

A multi-level skeletal motion hierarchical method is adopted to divide the quadruped skeleton into virtual pelvic nodes, foot-leg nodes and virtual pelvic-spine nodes. Combined with the inverse kinematics algorithm and Hermite spline curve interpolation algorithm, the joint rotation angle and spinal curvature are calculated to generate high-quality animation.

Benefits of technology

It realizes the block calculation of quadruped biological kinematics simulation, improves the efficiency and quality of animation generation, can automatically adapt to the foot-end targets in different environments, and generate high-quality animations that conform to the laws of biological movement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118887326B_ABST
    Figure CN118887326B_ABST
Patent Text Reader

Abstract

The application discloses a quadruped biological animation generation method and system. The quadruped biological skeleton is divided into virtual pelvic bone nodes, foot end-leg nodes and virtual pelvic bone-spine nodes according to motion levels through an input module, a motion state management module and an animation generation module, whole body kinematics simulation of the quadruped is split into multiple subparts for approximate solution, animation postures of each part of the quadruped are obtained, motion parameters on key bones of different parts are calculated, and the whole body posture matching the current motion state is generated by comprehensively integrating each part. The application helps rapid development of quadruped biological animation production in games by establishing a quadruped biological motion generation model. For quadrupeds with different bone structures, animation effects can be applied and previewed in a short time. Meanwhile, for animators, by adjusting relevant motion parameters, the change effect of gait and motion style can be directly observed in real time, which helps animation designers to control the animation style.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and system for generating quadruped creature animation. Background Art

[0002] With the rapid development of virtual reality technology in recent years, real and fictional animals are increasingly appearing in virtual scenes, such as video games, movies, and virtual world simulations. In these contexts, animated virtual multi-legged characters, such as quadrupeds like cats, dogs, and horses, or any fictional multi-legged robots or creatures, make these virtual worlds more realistic and vivid. The movement of these creatures is primarily influenced by their morphology, as their complex anatomical structures impose constraints on how they can move. They move in a variety of gait patterns, exhibiting different movement styles.

[0003] Traditionally, designers first design the virtual character's image, and then animators assign motion to it. Specifically, they manipulate the character's skeleton to modify its movements to achieve the desired effect. This traditional technique requires lengthy human-computer interaction to create animations, resulting in low efficiency. Summary of the Invention

[0004] In view of the deficiencies in the prior art, the present invention aims to provide a method and system for generating quadrupedal creature animation.

[0005] The object of the present invention is achieved through the following technical solution: A method for generating quadrupedal creature animation, comprising the following steps:

[0006] S1. Divide the quadruped skeleton into a virtual pelvic node, a foot-leg node, and a virtual pelvic-spine node according to the movement level;

[0007] The virtual pelvis node represents the spine bones directly connected to the front and back thigh bones of the quadruped creature; the foot-leg node represents the bone chain from the end bone of any leg of the quadruped creature that contacts the ground to the leg root bone directly connected to the virtual pelvis; the virtual pelvis-spine node is a bone chain consisting of the virtual pelvis as the endpoint and the spine bone in the middle;

[0008] S2. Based on the quadruped's position information in the virtual environment and the user's input gait pattern, the swing period of each leg of the quadruped and the rotation angle of each joint are calculated. The gait manager then controls the phase difference between multiple legs to express different gaits.

[0009] S3. Based on the spatial relationship between the foot's position and the virtual environment, an inverse kinematics algorithm is used to iteratively determine the optimal leg animation pose achievable by the foot, ensuring that the leg remains in contact with the ground and does not clip through the model. Rotational constraints are applied to the knee joint based on biological structure. For creatures with inverse joints (knees that bend backward during contraction, such as wolves, dogs, and other canines), the rotation range of the middle bone is limited based on the rotation of the front and rear joints, eliminating the potential for multiple solutions in the IK algorithm.

[0010] S4. Apply the model's orientation rotation on the horizontal plane to calculate the curvature of each spine. If the current rotation affects the virtual pelvic nodes, the same rotation needs to be applied to the target points generated by the gait. After determining the vertical position of the front and rear virtual pelvises, the front and rear virtual pelvic nodes are used as the endpoints of the curve generation. The tangents of each virtual pelvis in the direction of the two legs' swing are used as the tangents of the spline endpoints. Finally, the Hermite spline interpolation algorithm is used to calculate the curvature of the spine. Finally, the intermediate spine is fitted to the curve to generate the final spinal posture.

[0011] S5. Based on the multi-level motion hierarchy, calculate the motion parameters of different parts applied to key bones, and integrate the various parts to generate a full-body posture that matches the current motion state.

[0012] Furthermore, in step S1, the interaction relationship between the three nodes is as follows:

[0013] The position and motion state of the virtual pelvic node are initially determined by user input and motion trends; the foot-leg node uses the corresponding virtual pelvic node as the starting point, determines the appropriate foot landing point based on the environment, calculates the leg posture, and then the leg root bone transmits the motion state of each leg to the corresponding virtual node; the virtual node state is determined by the two endpoints of the virtual pelvic-spine node, and then the intermediate bone is determined according to the spine algorithm.

[0014] Furthermore, the calculation of the rotation angle of each joint in step S2 adopts the CPG oscillation generation formula, which is as follows:

[0015]

[0016] Among them, x and y represent the current rotation values ​​of a single joint around the x-axis and around the y-axis respectively. and They represent the speed of motion along the x-axis and y-axis on the limit cycle at the current moment, r represents the disturbance of the system, r = x 2 +y 2 ;α is used to control the speed at which the oscillator converges to the limit cycle; are the radius of the limit cycle and the amplitude of the oscillator; represents the oscillation frequency of the limit cycle.

[0017] Furthermore, in step S2, the specific method of the gait manager controlling the phase difference between multiple legs is as follows: the gait pattern is constructed by the topological relationship within the foot, and the phase difference relationship between multiple legs is managed by the gait manager. The switching of different gaits is achieved by the transition of the phase difference. After the phase difference is introduced, the CPG oscillator formula of the associated phase of the i-th leg is as follows:

[0018]

[0019] Among them, u1 and u2 are external feedback inputs, which are introduced to better control the oscillation characteristics of the oscillator and make the output more adjustable; is the gait weight matrix, which uses the coordinate transformation principle to generate the signal phases between different legs and joints according to the phase relationship given by the gait matrix θij (i = 1, ..., 4; j = 1, ..., 4, representing the phase relationship between legs);

[0020] The formula is:

[0021]

[0022] Furthermore, step S3 further includes: in each round of iteration, the inverse kinematics algorithm loops along the foot end to the leg root bone, rotating the currently selected bone toward the target point, and the iteration exit condition is that the spatial distance between the end bone and the target point is less than a set minimum distance; for bones that require angle constraints, the rotation angle of specific joints is limited by comparing the relative rotation of the parent node and the child node before rotation;

[0023] The rotation value of an intermediate bone in each iteration is calculated as follows:

[0024]

[0025] θ=arcos((p e -p i )·(p taget -p i ))

[0026] Among them, p taget It is the target position of the foot end, which is obtained by detecting the landing point on the ground when the leg swing phase switches to the standing phase. The target position of the foot end remains unchanged in the subsequent standing phase, so that the character movement animation will not slide in the world coordinates; e is the position of the end bone, which can be obtained by forward kinematics from the parent bone space transformation on the bone chain, p i Indicates the initial position of the bone calculated in the current iteration, is the rotation axis of the current bone to the target point, and θ is the expected rotation angle.

[0027] Further, for the bones that need to apply angle constraints, the rotation angle of a specific joint is limited by comparing the relative rotation between the parent node and the child node before rotation, and the constraint formula of the rotation angle θ of the specified joint in the loop is: i

[0028]

[0029] Further, by dividing the whole body motion into foot motion, leg motion and spine motion, the connection between foot motion and leg motion is realized by IK algorithm, and the connection between leg motion and spine motion is realized by the motion parameters generated by each leg CPG acting on the virtual pelvic bone directly connected to the spine through the leg root bone.

[0030] A quadruped animation generation system, comprising the following modules:

[0031] Input module: read the algorithm preset parameters during editing and collect the input from the user and the environment during runtime;

[0032] Motion state management module: responsible for storing and calculating the motion state of the role; the module is divided into a role controller and a gait manager, the role controller is responsible for the overall movement of the quadruped role, and is realized by using the capsule movement component provided by the Unreal Engine, which can support the role to move, pathfinding and obstacle avoidance operation; and the gait manager is realized by using the improved CPG gait algorithm, and manages the gait generation of multiple legs;

[0033] Animation generation module: according to the motion state data provided by the state layer, the position of the virtual pelvic bone is preliminarily determined; the foot position is determined according to the surrounding environment and the foot target point, and the leg posture from the leg to the foot is generated by using the improved CCDIK; according to the motion state of the role controller and the support force of the virtual pelvic bone provided by the gait manager in the current motion cycle, the vertical position of the current pelvic bone is calculated; finally, the tangent line between the leg root bone and the virtual pelvic bone is calculated, and the spline curve algorithm is applied to the intermediate spine with the virtual pelvic bone as the end point to generate the bone posture of the intermediate spine.

[0034] ​The beneficial effects of the present invention are as follows: the present invention realizes the block calculation of the kinematic simulation of quadruped creatures by proposing a multi-level skeletal motion hierarchical method, which can reduce the overhead of whole-body kinematic calculations and provide good scalability for creating virtual multi-legged creatures. The present invention provides a method for generating whole-body animations of quadruped creatures under various gaits and controllable motion state parameters by modeling the motion laws of quadruped creatures. By using the constrained CCDIK algorithm, the leg posture matching that automatically adapts to foot-end targets in different environments is achieved, thereby improving the quality of the generated animation. The spline algorithm is used to simulate the animation of the spinal bending and deformation during movement, thereby achieving the generation of continuous and natural turning animations. By adopting the above method, only the skeleton and initial posture of the quadruped creature can be input, and the animator can generate high-quality animations that conform to the biological motion laws and posture changes by adjusting the relevant motion parameters, which is conducive to improving the work efficiency of the animation generation process. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A flowchart for generating full-body animation of a quadruped creature according to the present invention;

[0036] Figure 2 This is a schematic diagram of the hierarchical structure of the quadrupedal movement of the present invention;

[0037] Figure 3 Generate a motion posture spline curve schematic diagram for the spine of the present invention;

[0038] Figure 4 Schematic diagram of a quadruped walking animation generated using the present invention, where (a) is a graph showing the swing angles of the hip and knee joints of the four legs over time under walking gait parameters, (b) is a graph showing the joint angles of a single leg within a single cycle, and (c) is a graph showing the movement position of the foot within a single cycle.

[0039] Figure 5 Schematic diagram of a quadrupedal trotting animation generated using the present invention, wherein (a) is a graph of the hip and knee swing angles of the four legs under trotting gait parameters versus time, (b) is a graph of the joint angles of a single leg within a single cycle, and (c) is a graph of the foot end motion position within a single cycle;

[0040] Figure 6 Schematic diagram of the system flow of the present invention. DETAILED DESCRIPTION

[0041] The present invention will be described in detail below with reference to the accompanying drawings. Unless there is any conflict, the features of the following embodiments and implementations may be combined with each other.

[0042] The quadruped creature animation generation method of the present invention uses a multi-level motion layering method to simplify the whole-body motion simulation of a character, and provides a feasible solution for programmatic generation of quadruped creature motion animation.

[0043] like Figure 1 As shown, a method for generating full-body animation of a quadruped creature includes the following specific implementation steps:

[0044] Step 1: If Figure 2 As shown in the figure, the quadruped skeleton is divided into movement levels, the circles represent the key bone joints, and the lines represent the connection relationship between the joints. Figure 2 In the figure, the red nodes represent the two front and back spine bones that connect the four legs, which can be called virtual pelvic nodes (pelvis or shoulders). The yellow nodes represent the bones in the four legs connected to the spine. They serve as the starting bones for leg posture generation after gait generation and the transmission points for the forces affecting the movement of the corresponding spine bones in each leg. They are called virtual pelvic-spine nodes. The green nodes at the bottom are the bones at the end of the foot, which are used to apply the results of gait generation and are called foot-leg nodes.

[0045] The three-layer hierarchical structure proposed in this invention divides the entire skeleton of a quadruped into three parts. First, the purple cross-section represents multiple legs belonging to the same spinal skeleton (in quadrupeds, each pelvis is affected by two legs, which is called the foot-pelvis structure in this article. This concept can be extended to multi-legged creatures such as spiders and millipedes). The blue part represents the bone chain with two endpoints connected to the spine of the legs.

[0046] Step 2: Based on the character's position information in the virtual environment and the gait pattern input by the user, calculate the single leg swing period and the rotation angle of each joint; the single leg CPG oscillation generation formula is:

[0047]

[0048] where x and y describe the oscillator harmonic output, and represents the axial velocity on the limit cycle at the current moment, r is the disturbance of the system, r = x 2 +y 2 ;α is used to control the speed at which the oscillator converges to the limit cycle; are the radius of the limit cycle and the amplitude of the oscillator; represents the frequency of the limit cycle (oscillation frequency);

[0049] The gait pattern is constructed through the topological relationship within the foot. The gait manager is used to manage the phase difference relationship between multiple legs. The switching of different gaits is achieved by the transition of phase difference. The phase topological relationship of the leg joints in each gait is shown in Table 1. After introducing the phase difference, the CPG oscillator formula of each leg is:

[0050]

[0051] The first half is the matrix representation of the formula in step 2. u1 and u2 are external feedback inputs, which are introduced to better control the oscillation characteristics of the oscillator and make the output more adjustable. is the gait weight matrix. This matrix uses the coordinate transformation principle to generate the signal phase between different legs and joints according to the phase relationship given by the gait matrix θij (i = 1, ..., 4; j = 1, ..., 4, representing the phase relationship between legs); The formula is:

[0052]

[0053] Step 3: Based on the spatial position relationship between the foot end target point and the virtual environment, the optimal leg animation pose that can be reached by the foot end is iteratively solved through the inverse kinematics algorithm.

[0054] In each iteration, the algorithm loops along the leg skeleton chain from the end bone to the root bone, rotating the currently selected bone toward the target point. The iteration exit condition is that the spatial distance between the end bone and the target point is less than the set minimum distance. The rotation value of an intermediate bone in each iteration is calculated as follows:

[0055]

[0056] θ=arcos((p e -p i )·(p taget -p i ))

[0057] where p taget It is the target position of the foot end, which is obtained by detecting the landing point on the ground when the leg swing phase switches to the standing phase. The target position of the foot end remains unchanged in the subsequent standing phase, so that the character movement animation will not slide in the world coordinates; e is the position of the end bone, which can be obtained by forward kinematics from the parent bone space transformation on the bone chain. is the rotation axis of the current bone toward the target point, and θ is the expected rotation angle.

[0058] For bones that need to apply angle constraints, the rotation angle of a specific joint is limited by comparing it with the relative rotation of the parent node and the child node before rotation. The constraint formula for the rotation angle of a specified joint in the cycle is:

[0059]

[0060] Step 4: First, calculate the curvature of each spine on the horizontal plane according to the orientation rotation of the quadruped model, which is usually expressed as squeezing on one side and stretching on the other side. If the current rotation affects the pelvic node, the same rotation needs to be applied to the target point of the gait generation; the vertical generation method is as follows Figure 3 ,After determining the positions of the virtual pelvis of the front and back legs, these two points are used as the endpoints of the curve generation. Then, the tangent of each virtual pelvis affected by the swinging direction of the two legs is used as the tangent of the endpoints of the spline. Finally, the Hermite spline curve interpolation algorithm is used to calculate the degree of spinal curvature, and finally the middle spine is fitted with the curve.

[0061] Step 5: According to the multi-level motion hierarchical structure proposed by the present invention, the motion parameters of different parts applied to key bones are calculated, and the whole body posture matching the current motion state is generated by integrating various parts.

[0062] To more intuitively demonstrate the effectiveness of the present invention, the present invention uses a two-segment quadruped robot dog character as a basis and compares the gait generation results using two different gait modes, walk and trot. Common gait phase parameters are shown in Table 1.

[0063] Table 1: Phase relationships of various gaits

[0064]

[0065] Example 1: In the walking gait, the phase difference of the four legs is [0, 0.5, 0, 0.5] with the left front leg as the reference. Assume that the load factor of the single leg is 0.75, the period is 0.8s, and the forward speed is 0.2m / s. Figure 4 As shown, (a) is a diagram of the swing angles of the hip joint (θh) and knee joint (θk) of each leg during the current gait, (b) is a diagram of the angle changes of the left forefoot (LF) during the swing cycle, and (c) is a diagram of the motion trajectory of the foot end in the local spatial coordinates of a single leg. In this example gait, the robot dog's left foreleg and right hindleg maintain cyclical synchronization, and the right foreleg and left hindleg maintain cyclical synchronization, with the latter maintaining a phase difference of half a cycle with the left foreleg. This is manifested by alternating swings of the left and right legs on the same side, with a smooth single-leg support and backswing phase and a rapid forward swing of the leg. When a single leg crosses the vertical plane during the backward swing, the knee joint is almost straightened and then the angle constraint stops the swing.

[0066] Example 2: In the trot gait, the phase difference of the four legs is [0, 0.5, 0.5, 0] with the left front leg as the reference. Assume that the load factor of the single leg is 0.5, the period is 0.4s, and the forward speed is 0.6m / s. Figure 5As shown in the figure, (a) shows the swing angles of the hip joint (θh) and knee joint (θk) of each leg during the current gait, (b) shows the angle changes of the left front foot (LF) during the swing cycle, and (c) shows the motion trajectory of the foot end in the local spatial coordinates of a single leg. In this gait, the robot dog's front and back legs on the same side swing simultaneously, with the left front leg and right hind leg maintaining cyclic synchronization, and the right front leg and left hind leg maintaining synchronization, with the latter having a phase difference of 0.5 with the left front leg.

[0067] like Figure 6 As shown, a quadruped creature animation generation system includes the following modules:

[0068] Input module: reads the algorithm preset parameters during editing and collects input from users and the environment during runtime.

[0069] Motion state management module: responsible for storing and calculating the character's motion state; it consists of two parts. The character controller is responsible for the overall movement of the quadruped character, implemented using the capsule movement component provided by Unreal Engine, and can support the character's movement, pathfinding, obstacle avoidance and other operations; while the gait manager is implemented using an improved CPG gait algorithm to manage the gait generation of multiple legs.

[0070] Animation generation module: Based on the motion state data provided by the state layer, the position of the virtual pelvis is preliminarily determined; the foot end position is determined based on the surrounding environment and the foot end target point, and the improved CCDIK is used to generate the leg posture from the leg to the foot end; based on the motion state of the character controller and the gait manager, the support force provided by the current leg to the virtual pelvis in this motion cycle is obtained, and the vertical position of the current pelvis is calculated; finally, the tangent between the leg root bone and the virtual pelvis is calculated, and with the virtual pelvis as the endpoint, the spline curve algorithm is applied to the middle spine to generate the skeletal posture of the middle spine.

[0071] Those skilled in the art will understand that the foregoing descriptions are merely preferred embodiments of the invention and are not intended to limit the invention. Although the invention has been described in detail with reference to the foregoing examples, those skilled in the art will still be able to modify the technical solutions described in the foregoing examples or substitute equivalents for some of the technical features therein. Any modifications, equivalent substitutions, etc. made within the spirit and principles of the invention shall be included within the scope of protection of the invention.

Claims

1. A method for generating quadrupedal creature animation, characterized in that: The steps include: (S1) The quadruped skeleton is divided into virtual pelvic nodes, foot-leg nodes, and virtual pelvic-spine nodes according to the movement level; The virtual pelvis node represents the spine bones directly connected to the front and back thigh bones of the quadruped creature; the foot-leg node represents the bone chain from the end bone of any leg of the quadruped creature that contacts the ground to the leg root bone directly connected to the virtual pelvis; the virtual pelvis-spine node is a bone chain consisting of the virtual pelvis as the endpoint and the spine bone in the middle; (S2) determining the initial posture of the virtual pelvis based on the position information of the quadruped in the virtual environment; calculating the single leg swing cycle and the rotation angle of each joint of the quadruped according to the gait pattern input by the user; Then, the phase difference between multiple legs is controlled by the gait manager to express different gaits; (S3) Based on the spatial relationship between the foot position and the virtual environment, an inverse kinematics algorithm is used to iteratively solve the optimal leg animation pose that the foot can reach, ensuring that the leg always touches the ground and does not penetrate the model. The knee joint of the foot is rotationally constrained according to the biological structure. For creatures with inverse joints, the rotation range of the middle bone is limited according to the rotation of the front and rear joints, eliminating the multi-solution problem of the IK algorithm. (S4) Calculate the curvature of each spine based on the orientation rotation of the quadruped model on the horizontal plane. If the current rotation affects the virtual pelvic node, the same rotation needs to be applied to the target point of the gait generation. After determining the vertical position of the virtual pelvis of the front and rear legs, use the two virtual pelvic nodes as the endpoints of the curve generation. Then, use the tangent of each virtual pelvis in the direction of the two legs' swing as the tangent of the spline endpoint. Finally, use the Hermite spline curve interpolation algorithm to calculate the curvature of the spine. Finally, fit the intermediate spine to the curve to generate the final spinal posture. (S5) According to the multi-level motion hierarchical structure, the motion parameters applied to the key bones of different parts are calculated, and the user input obtained in step (S2) is integrated with the initial posture of the virtual pelvis, the leg animation posture obtained in step (S3), and the final posture of the spine obtained in step (S4) to generate a full-body posture that matches the current motion state.

2. A method for generating quadrupedal creature animation according to claim 1, characterized in that: In the step (S1), the interaction relationship between the three nodes is as follows: the position and motion state of the virtual pelvic node are preliminarily determined by user input and motion trend; the foot-leg node uses the corresponding virtual pelvic node as the starting point, determines the appropriate foot landing point according to the environment, calculates the leg posture, and then transmits the motion state of each leg to the corresponding virtual node by the leg root bone; the virtual node state is determined by the two endpoints of the virtual pelvic-spine node, and then the intermediate bone is determined according to the spine part algorithm.

3. A method for generating quadrupedal creature animation according to claim 1, characterized in that: The calculation of the rotation angle of each joint in step (S2) adopts the CPG oscillation generation formula, which is as follows: ; in, and Respectively represent the current rotation value of a single joint around the x-axis and around the y-axis, and They represent the speed of motion along the x-axis and y-axis on the limit cycle at the current moment, r represents the disturbance of the system, ; It is used to control the speed at which the oscillator converges to the limit cycle; are the radius of the limit cycle and the amplitude of the oscillator; represents the oscillation frequency of the limit cycle.

4. A method for generating quadrupedal creature animation according to claim 1, characterized in that: In step (S2), the specific method of the gait manager controlling the phase difference between multiple legs is as follows: the gait pattern is constructed by the topological relationship within the foot, and the phase difference relationship between multiple legs is managed by the gait manager. The switching of different gaits is achieved by the transition of the phase difference. After the phase difference is introduced, the CPG oscillator formula of the associated phase of the i-th leg is as follows: ; in, and It is an external feedback input, which is introduced to better control the oscillation characteristics of the oscillator and make the output more adjustable; is the gait weight matrix, which uses the coordinate transformation principle to make the signal phases between different legs and joints be consistent with the gait matrix Given the phase relationship generation, i=1,...,4; j=1,...,4, represents the phase relationship between the legs; The formula is: 。 5. A method for generating quadrupedal creature animation according to claim 1, characterized in that: The step (S3) includes: in each round of iteration, the inverse kinematics algorithm loops along the foot end to the leg root bone, rotating the currently selected bone toward the target point, and the iteration exit condition is that the spatial distance between the end bone and the target point is less than a set minimum distance; for the bones that need to apply angle constraints, the rotation angle of the specific joint is limited by comparing the relative rotation of the parent node and the child node before rotation; The rotation value of an intermediate bone in each iteration is calculated as follows: ; ; in, The target position of the foot is obtained by detecting the ground point when the leg swing phase switches to the stance phase. The target position of the foot remains unchanged during the subsequent stance phase, so that the character's movement animation does not slide in the world coordinate. is the position of the end bone, which can be obtained by forward kinematics from the parent bone space transformation on the bone chain. Indicates the initial position of the bone calculated in the current iteration, It is the rotation axis of the current bone turning to the target point. is the expected rotation angle.

6. A method for generating quadrupedal creature animation according to claim 5, characterized in that: For bones that need to apply angle constraints, the rotation angle of a specific joint is limited by comparing it with the relative rotation of the parent node and the child node before rotation. The specified joint rotation angle is set in the loop. The constraint formula is: 。 7. A quadruped creature animation generation system, used to implement the method according to any one of claims 1 to 6, characterized in that: Includes the following modules: Input module: reads the algorithm preset parameters during editing and collects input from users and the environment during runtime; Motion State Management Module: This module is responsible for storing and calculating the character's motion state. It consists of a character controller and a gait manager. The character controller is responsible for the overall movement of the quadruped character, implemented using the capsule movement component provided by Unreal Engine. It supports the character's movement, pathfinding, and obstacle avoidance. The gait manager, on the other hand, uses an improved CPG gait algorithm to manage the gait generation of multiple legs. Animation generation module: Based on the motion state data provided by the state layer, the position of the virtual pelvis is preliminarily determined; the foot end position is determined based on the surrounding environment and the foot end target point, and the improved CCDIK is used to generate the leg posture from the leg to the foot end; based on the motion state calculated by the character controller and the support force of the virtual pelvis provided by the gait manager in this motion cycle, the vertical position of the current pelvis is calculated; finally, the tangent between the leg root bone and the virtual pelvis is calculated, and with the virtual pelvis as the endpoint, the spline curve algorithm is applied to the middle spine to generate the skeletal posture of the middle spine.

Citation Information

Patent Citations

  • Virtual character walking animation generation method and device, equipment and storage medium

    CN114283229A

  • Method and apparatus for generating walking animation of virtual character, and device and storage medium

    WO2023088041A1