Lightweight physical virtual human standing posture balancing method based on kinematics
By adopting a lightweight physical virtual human standing posture balance system based on kinematics in virtual humans, the problem that virtual humans are difficult to maintain stable standing when combined with the IK drive framework is solved, and more realistic and natural action performance and environmental interaction are achieved.
Patent Information
- Application Number
- CN202411992491.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-16
AI Technical Summary
Physical-based virtual people have difficulty maintaining a stable standing posture when combined with the IK drive framework, and their behavior is not real or accurate enough in complex environments.
A lightweight physical virtual human standing posture balance system based on kinematics is adopted. By adding a doll system and joint constraints, kinematic embedded processing is performed, and a virtual human standing posture method and balance framework are designed. A triangular function is used to calculate the height of the crotch and balance judgment algorithm to achieve stable standing and balance of the virtual human.
It improves the accuracy and stability of virtual human movements, enables virtual humans to show more realistic and natural behaviors in complex environments, and enhances their ability to interact with the environment.
Smart Images

Figure CN120014126A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of virtual human motion control, and in particular to a standing balance method of a lightweight physical virtual human based on kinematics. Background Art
[0002] With the continuous advancement of computer graphics technology, people can create more realistic graphics and animations on computers, which provides more possibilities for the design and performance of virtual humans, allowing virtual humans to simulate human movements and behaviors more realistically. The emergence of physics engines provides powerful tools for simulating and calculating physical phenomena in virtual environments, which allows virtual humans to show more realistic physical properties in virtual environments, such as gravity, collision, friction, etc., and motion capture technology has also been greatly developed, which allows virtual humans to more accurately simulate human movements in the real world, and the movements of virtual humans are more realistic and natural.
[0003] Although the performance of physics-based virtual humans in virtual environments is realistic, there are also some limitations. For example, using physics engines to simulate the movement and behavior of virtual humans usually requires a lot of computing resources, especially in complex virtual environments. This can lead to performance issues, especially on mobile devices or low-performance computers. And although physics engines can simulate many physical phenomena, in some cases, the behavior of virtual humans may still not be realistic or accurate enough, especially in complex environments, such as high-speed motion environment interaction, simulation of smooth movements, etc. There are certain limitations. The behavior of traditional physical virtual humans usually needs to be manually designed and controlled. Later, the rapid development of artificial intelligence technologies such as deep learning and reinforcement learning also provided new impetus for the development of virtual humans. These technologies enable virtual humans to learn and adapt to different environments, while being able to make more intelligent and autonomous decisions. Of course, although artificial intelligence technologies such as deep learning and reinforcement learning can enable virtual humans to make more intelligent and autonomous decisions, these technologies also have some limitations, such as requiring a lot of training data and computing resources.
[0004] Research on physics-based virtual humans began very early. In the early stages of computer graphics, the standing posture of virtual humans was usually achieved through simple static models, lacking real physical simulation and dynamic balance. With the development of physical engine technology, some dynamic balance algorithms have been introduced, allowing virtual humans to more realistically show the characteristics of dynamic balance when simulating standing, such as making small adjustments to maintain balance when standing. The most common and universal balance model is the inverted pendulum model.
[0005] The inventors have found that a physics-based virtual human combined with IK (Inverse Kinematics, a technology that uses a skeletal system to simulate the movement of objects in computer animation) can solve the instability problem of the PD controller, while allowing more possibilities for the interaction between the virtual human and the environment. For example, the virtual human can accurately push or avoid objects according to the different properties and weights of the objects.
[0006] Therefore, the present invention proposes to mix the physics-based virtual human with IK, and use IK as a controller to control the body movements of the virtual human. During this period, the inventor's research found that the inverted pendulum feedback model is not applicable to the body system containing IK. Specifically, in the physical role model driven by IK action, there is a parent-child relationship between body parts, and the parent and child will affect each other. The hip is the root node of the whole body. When people apply spring force to the feet, the position attributes of the hip will be affected. Since the hip is a parent node, it will in turn affect the position attributes of the feet. This closed-loop effect will cause the body to shake and be unable to maintain a stable standing posture. Summary of the invention
[0007] In view of the background technology, the purpose of the present invention is to provide a new virtual human balance posture system for a physics-based virtual human combined with an IK driving framework, which is used to solve the physics-based virtual human balance object with hybrid IK as the driving framework, and the solution can also be applied to a physical body frame without IK in the body.
[0008] The objective of the present invention is achieved through the following technical solutions:
[0009] A kinematics-based lightweight physical virtual human standing balance system comprises the following steps:
[0010] Adding a ragdoll system to the body of the virtual human model and performing joint constraints on the virtual human model to obtain a lightweight physical virtual human;
[0011] Performing kinematics embedding processing on the lightweight physical virtual human to obtain a kinematics-based lightweight physical simulation virtual human;
[0012] Designing a standing posture method for a virtual human so that the lightweight physical simulation virtual human can be supported according to different needs;
[0013] A balance framework for lightweight physical simulation virtual humans is designed based on the principle of balance.
[0014] The method of adding a ragdoll system to the body of the virtual human model and constraining the joints of the virtual human model to obtain a lightweight physical virtual human includes:
[0015] The virtual human model is subjected to ragdoll setting processing, and rigid bodies and physical collision detection devices are added to different body parts of the virtual human; the mass of the rigid body is configured in proportion to the mass of the corresponding body part, and the shape of the physical collision detection device is a simple geometric shape corresponding to the body part, most of which are capsule bodies, and the head is a sphere;
[0016] Adding joint hinges to the physical virtual human, hinge the body parts configured with the rigid body, and setting different constraints according to the different torque degrees of freedom of different parts to limit the torsion of the joints;
[0017] The joint hinge is hinged with the hip as the root part and the limbs and the head as the end parts.
[0018] The kinematics embedding processing of the lightweight physical virtual human includes:
[0019] Dividing the body of the lightweight physical virtual human into extremity parts and non-extremity parts;
[0020] The position data of the extremities are copied as the expected position, and the rigid body and physical collision detection device of the extremities are transplanted to the expected position. The weight of the rigid body at the expected position can be ignored to reduce the physical properties of the rigid body and prevent body disorder. Joint hinge components are added to the IK controller for non-extremities, extremities and target position control points, so that the target position control points fit the extremities to prevent the target position control points from being scattered in the environment.
[0021] The method for designing the standing posture of a virtual human enables the lightweight physical simulation virtual human to support according to different needs, wherein the support refers to calculating the height required for the hips to stand by using the data under the feet of the physical virtual human, and the support is calculated by the following method:
[0022] Step 1, selecting a foot for calculating the standing hip height according to the current state of the virtual person;
[0023] Step 2, obtaining the ground height position H under the foot;
[0024] Step 3, using the standing hip height algorithm to calculate the hip position P;
[0025] Step 4, using position P as the fixed end position of the spring, and stretching the hips of the virtual person to lift it up so that the virtual person stands on the ground.
[0026] Step 3 includes:
[0027] The position P of the hip, that is, the height of the hip of the virtual person in standing posture, is calculated based on the principle of triangular function, and the specific formula is as follows:
[0028]
[0029] In formula 1, P is the vertical height of the hips in standing position, L sf is the length of the virtual person's hips and feet on the same plane, L f is the length of the virtual person's lower limbs, and H is the height of the ground under the virtual person's feet. The vertical height specifically refers to the result y calculated vertically from the position (x, y) of the hips perpendicular to the world coordinates (x, y, z) in the standing posture, where x represents front and back, y represents up and down, and z represents left and right.
[0030] The design of a lightweight physical simulation virtual human balance framework based on the balance principle includes:
[0031] According to the three-level balance classification method, the standing balance maintained by the virtual person is divided into static balance, external force recovery balance and dynamic movement balance, wherein the dynamic movement balance and static balance are both achieved by the virtual person by moving the hips to achieve self-balance, the external force recovery balance is achieved by the virtual person by moving the limbs to recover the balance, and the static balance is used not only to maintain the balance of an action, but also as a transition between external force recovery balance and dynamic movement balance.
[0032] The three-level balance classification method divides the standing balance maintained by the virtual person into static balance, external force recovery balance and dynamic motion balance, which is achieved by the following algorithm:
[0033] Step 10, calculating the center of gravity of the virtual person;
[0034] Step 20, determining whether the virtual person is in an unbalanced state, if the virtual person is in a balanced state, go to step 6, if the virtual person is in an unbalanced state, go down to step 30;
[0035] Step 30, determine the state of the virtual human to maintain balance according to the user command, static balance and dynamic motion balance go to step 40, and external force balance go to step 50. The user command refers to the result that the user wants the virtual human to achieve. The command can be in many ways, such as using a handle to control in VR, pulling the trigger to modify the body state; the PC keyboard control to modify the body state; the mobile phone touches the screen button;
[0036] Step 40, pull the hips of the virtual person to shift the horizontal plane until the center of gravity returns to a balanced state, and then go to step 60;
[0037] Step 50, generating a foot motion curve trajectory, and restoring the virtual human's balance by adjusting the leg position;
[0038] Step 60, return to step 10.
[0039] Step 10 includes: calculating the center of gravity position by formula 2: using Varignon's theory:
[0040] P b =∑ i m i P i ∑ i m i (2)
[0041] P b is the center of gravity, m i is the weight of each part of the body, P i It is the location of the center of gravity of each part of the body;
[0042] During the calculation process, the weight of each part of the virtual person is multiplied by the data of the center of gravity position of each part, and then divided by the weight of the whole body to obtain the center of gravity of the virtual person's body.
[0043] Step 20 includes: determining whether to perform balance restoration through the virtual human balance judgment. When the virtual human balance judgment is based on the support point, it includes:
[0044] Single-point balance judgment: When the virtual person is in the state of standing on one leg, lifting one foot when walking, or holding upside down with one hand, and only one supporting part is in contact with the ground, a circle is drawn with the supporting point as the center and the maximum length of the supporting part as the diameter. The range within the circle is set as the balance range. When the center of gravity falls within the balance range, the virtual person is balanced; otherwise, when the center of gravity falls outside the balance range, the virtual person is unbalanced.
[0045] Two-point balance judgment: When the virtual person is standing, lunging, or handstand with only two supporting parts touching the ground, a circle is drawn with the midpoint of the supporting points as the center and half the length of the line connecting the two points as the diameter. The range within the circle is the balance range. When the center of gravity falls within the balance range, the virtual person is balanced; otherwise, the virtual person is unbalanced. The reason why only half of the length is set as the diameter is that when the center of gravity is completely on one supporting point, the other bottoming part does not serve as a support. If this support range is exceeded, the posture or state of the body will change.
[0046] Multi-point balance judgment: When there are three or more support points, the convex hull algorithm is used to judge the balance of the virtual person. When the center of gravity is used as a point to construct the convex hull, it means that the center of gravity falls outside the balance range and the virtual person is unbalanced; conversely, when the center of gravity is not used as a point to construct the convex hull, it means that the center of gravity falls within the balance range and the virtual person is balanced.
[0047] Transition balance judgment: When performing a change in movement, if the movement tends to increase the support point, the balance judgment is made based on the original support point and the support point that is about to become the support point; if the movement tends to decrease, the balance judgment is made after removing the support point that is about to be lost.
[0048] The convex hull algorithm is:
[0049] d=(ax-bx)*(by-cy)-(ay-by)*(bx-cx) (3)
[0050] In formula 3, d is the convex hull point, a is the previous convex hull point, d is the point currently judging the convex hull, c is the judging base point, and x and y are the x-axis position and y-axis position of these points respectively.
[0051] When judging the balance of multiple points, the leftmost point is first selected to be collected as a convex hull point, and then starting from the points adjacent to the point, a cross product calculation is performed with all other remaining points. The remaining points are used as judgment base points in the judgment process. When the values obtained by the cross product calculation with all the judgment base points are greater than 0, the point currently being judged is a convex hull point and is included in the collection of convex hull points; otherwise, if the value obtained by the cross product calculation is less than 0, the calculation is stopped, the judged point is not put into the collection of convex hulls, and the judgment base point is used as the judgment point to continue the judgment; when all convex hull points are obtained and are in a set, the center of gravity point is retrieved to see if it is in the set. When the center of gravity point is in the set, it means that the virtual person is unbalanced; otherwise, when the center of gravity point is not in the set, it means that the virtual person is balanced.
[0052] Compared with the prior art, the present invention has the following advantages:
[0053] The present invention is used to solve the complex process of the prior art for controlling the movements of lightweight physical virtual humans, enhance the accuracy of the movements, and designs a standing balance system for the new frame, so that the lightweight physical virtual humans under this type of frame can stand upright.
[0054] Specifically, compared with traditional virtual humans, most of which are FK, which requires setting the action first and then gradually modifying the body's action from the root to the end, the virtual human of the present application uses IK to control the action, and calculates the body's proper position and rotation based on the target point to achieve the purpose of changing the body posture. This feature allows the virtual human to interact with the environment with more possibilities. In later work, the virtual human can complete tasks based on the target point, such as accurately picking up a cup, lifting a chair, stepping on a certain place, and other tasks that require interaction with the environment, while it is much more difficult for traditional physical virtual humans to complete such tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1It is a flowchart of the standing balance system of a lightweight physical virtual human based on kinematics;
[0056] Figure 2 This is a schematic diagram of the virtual human body structure, where Figure 2 A) is a schematic diagram of a virtual human model. Figure 2 B) is a schematic diagram of a physical collision detection device;
[0057] Figure 3 A schematic diagram of the division of balancing functions;
[0058] Figure 4 A schematic diagram of a lightweight physical virtual human based on kinematics;
[0059] Figure 5 A flow chart for maintaining balance for the virtual person. DETAILED DESCRIPTION
[0060] This embodiment provides a kinematics-based lightweight physical virtual human standing balance system. Figure 1 As shown, the following steps are included:
[0061] The body of the virtual human model is added to the ragdoll system, and joint constraints are performed to obtain a lightweight physical virtual human;
[0062] Perform kinematic embedding processing on the lightweight physical virtual human to obtain a kinematics-based lightweight physical simulation virtual human;
[0063] Design the virtual human's standing posture method so that the virtual human can support itself according to different needs;
[0064] Design the balance framework of the virtual human based on the balance principle.
[0065] When making a lightweight physical virtual human, it includes:
[0066] The model is processed by ragdoll setting, and rigid bodies and physical collision detection devices are added to different parts of the virtual person; the mass of the rigid bodies of different parts is configured according to the proportion of the mass of the corresponding body parts in the total body mass, specifically: the rigid body is configured in direct proportion to the mass of the corresponding body parts, and the shape of the physical collision detection device is a simple geometric shape of the body parts, most parts are set as capsules, and the head is a sphere. The rigid body described in the present invention has mass; and the collision detection device component is an interactive detection device of a geometric shape, which has no mass and can only recognize that it has crossed with other objects, that is, a collision has occurred, and then relies on the rigid body reaction.
[0067] Adding joint hinges to the physical virtual human, articulating the body parts configured with the rigid body, and setting different constraints according to the different torque degrees of freedom of different parts to limit the torsion of the joints;
[0068] The joint hinge should be hinged with the hip as the root part and the limbs and head as the end parts.
[0069] When processing kinematics inline, this includes:
[0070] The virtual human is divided into the extremities and non-extremities. When rigid bodies and interactive elements are added to these parts, the physical effects of the body can be preliminarily realized, such as Figure 2 (A). Next, we copy the position data of the extremities as the desired position, and then transplant the rigid body components and physical collision detection devices of the extremities to the desired position. The rigid body is configured to have a small mass so that its weight can be ignored, which can reduce the physical properties to prevent body disturbance, such as Figure 2 (B).
[0071] Next is the improvement of IK controller, such as Figure 4 As shown in FIG. 1 , four positions are placed at the front and rear parts of the limbs of the virtual human (bipedal) model in this embodiment as elbow and knee orientation points to adjust the overall orientation of the limbs. Then, on this basis, IK controllers are added to the end parts of the limbs, the control chain length is 2, the controlled joints reach the roots of the limbs, the expected position is used as the target position control point, and the orientation is the elbow and knee orientation point. The final effect is as follows: Figure 4 The right picture is Figure 4 C. To ensure the compactness of the virtual human body, the joint hierarchy of the model takes the hip as the root, adds joint hinge components to the non-limb end parts, limb end parts and target position control points, and makes the target position control points fit the limb end parts to prevent the target position control points from being scattered in the environment.
[0072] Regarding the method for designing the standing posture of a virtual person, the support is calculated based on the data of the virtual person's feet based on physics to obtain the height required for the hips to stand. The following are the algorithm steps of the support:
[0073] Step 1: Select the foot for calculating the standing hip height according to the current state of the virtual person.
[0074] Step 2, the foot moves downward to obtain its ground height position H;
[0075] Step 3, using the standing hip height algorithm to calculate the hip position P;
[0076] Step 4, using the position P as the fixed end position of the spring, and stretching the hips of the virtual person to lift it up, so that the virtual person stands on the ground.
[0077] When calculating the hip height using the trigonometric principle, include:
[0078] The height of the hips in the virtual person's standing posture mainly utilizes the principle of triangular function, and the specific formula is as follows:
[0079]
[0080] In formula 1, P is the vertical height of the hips in standing position, L sf is the length of the hip and foot in one plane, L f is the length of the lower limb, and H is the height of the ground under the foot.
[0081] Design the virtual human's balance framework based on the balance principle, such as Figure 3 As shown, including:
[0082] According to the three-level balance classification method, the standing balance maintained by the virtual human is divided into static balance, external force recovery balance, and dynamic motion balance.
[0083] The purpose of setting balance is to enable the virtual person to maintain balance. Dynamic balance and static balance are achieved by the virtual person moving the hips to achieve self-balance, and external force balance is achieved by the virtual person moving the limbs to restore balance. In addition to maintaining the balance of an action, static balance is also used as a transition between external force balance and dynamic balance. The specific process is as follows: Figure 5 As shown:
[0084] Step 10, calculating the center of gravity position by formula 2;
[0085] Step 20, using the center of gravity position obtained by Formula 2 and the balance judgment algorithm of Formula 3 to determine whether the virtual person is in an unbalanced state, if the virtual person is in a balanced state, go to Step 60, if it is in an unbalanced state, go down to Step 30;
[0086] Step 30, determining the state of the virtual human maintaining balance according to the user input, static balance and dynamic motion balance go to step 40, and external force restores balance go to step 50;
[0087] Step 40, pull the hips of the virtual person to shift the horizontal plane until the center of gravity returns to a balanced state, and then go to step 60;
[0088] Step 50, generating a motion curve trajectory of the foot by formula 40, and restoring the balance of the virtual human by adjusting the leg position;
[0089] Step 60, return to step 10.
[0090] When calculating the center of gravity, include:
[0091] Varignon's theorem, also known as the resultant moment theorem, is used - for the same point or axis, the resultant moment of a system of forces is equal to the sum of the component moments of the system.
[0092] P b =∑ i m i P i ∑ i m i (2)
[0093] In Formula 2, P b is the center of gravity, m i is the weight of each part of the body, P i It is the center of gravity of each part of the body.
[0094] During the calculation process, the weight of each part of the virtual person is multiplied by the data of the center of gravity position of the part, and then divided by the weight of the whole body to obtain the center of gravity of the virtual person's body. After obtaining the center of gravity of the body, the balance judgment of the virtual person is used to decide whether to restore balance.
[0095] When judging the balance of a virtual person based on the support point, it includes:
[0096] Single-point balance judgment: Single-point balance judgment means that when the virtual person is in a state of standing on one leg, lifting one foot while walking, or supporting himself with one hand, and only a single supporting part is in contact with the ground, a circle is drawn with the supporting point as the center and the maximum length of the supporting part as the diameter. The range within the circle is set as the balance range. When the center of gravity falls within the balance range, the virtual person is balanced; otherwise, the virtual person is unbalanced when the center of gravity falls outside the balance range.
[0097] Two-point balance judgment: Two-point balance judgment means that when the virtual person is standing, lunging, or handstand, and only two supporting parts are in contact with the ground, a circle is drawn with the midpoint of the supporting points as the center and half the length of the line connecting the two points as the diameter. The range within the circle is the balance range. When the center of gravity falls within the balance range, the virtual person is balanced; conversely, when the center of gravity falls outside the balance range, the virtual person is unbalanced. The reason why only half of the length is set as the diameter is that when the center of gravity is completely on one supporting point, the other bottoming part does not serve as a support. If this support range is exceeded, the posture or state of the body will change.
[0098] Multi-point balance judgment:
[0099] Multi-point balance judgment is more special than the previous two types of balance judgment. It is generally used for actions such as kneeling on both knees, kneeling on one knee, picking up things, and standing on all fours. At this time, there are three or more support points, and the convex hull algorithm is used to judge the balance of the virtual person. Convex hull means that in the case of multiple points, some points are connected to form a closed loop, and the closed loop can wrap all the points without being concave inward. When the center of gravity point is used as a point to construct the convex hull, it means that the center of gravity falls outside the balance range and the virtual person is unbalanced; conversely, when the center of gravity point is not used as a point to construct the convex hull, it means that the center of gravity falls within the balance range and the virtual person is balanced.
[0100] There are many ways to calculate the convex hull. The convex hull range is divided by taking the left side of the cross product. The following is the specific convex hull algorithm formula:
[0101] d=(ax-bx)*(by-cy)-(ay-by)*(bx-cx) (3)
[0102] In formula 3, d is the convex hull point, a is the previous convex hull point, d is the point currently judging the convex hull, c is the judging base point, and x and y are the x-axis position and y-axis position of these points respectively.
[0103] When judging the balance of multiple points, the leftmost point will be selected first and collected as the convex hull point. Then, starting from the nearest point, the cross product calculation will be performed with all the remaining points. These remaining points will be used as the judgment base points in the judgment process. When the values obtained by the cross product calculation with all the judgment base points are greater than 0, it means that the outermost point can no longer be found at this time. The point currently being judged is the convex hull point and will be collected into the collection of inverted convex hull points. On the contrary, if the value obtained by the cross product calculation is less than 0, it means that the judgment base point being compared is further outside than the current judgment point, then the calculation will be stopped, the judgment point will not be put into the collection of convex hull, and the judgment base point being compared will be selected as the judgment point, and then the judgment will be performed. When all the convex hull points are obtained and are in a set, the center of gravity point is retrieved to see if it is in the set. When the center of gravity point is in the set, it means that the virtual person is unbalanced; on the contrary, when the center of gravity point is not in the set, it means that the virtual person is balanced.
[0104] Transition balance judgment: When the virtual person is performing an action evolution and the support point has a numerical change, if the balance judgment is still performed according to the original support point, the action may appear stiff or even incomplete. For example, when the virtual person is walking, one of his feet is stepping upwards. At this time, the center of gravity is always in a balanced state, the hip position does not change, and the foot cannot step on the ground when it steps downward. Therefore, when the action changes, if the action tends to increase the support point, the balance judgment is based on the original support point and the support point that is about to become the support point; if the action tends to decrease, the balance judgment must first remove the support point that is about to be lost and then make a judgment.
Claims
1. A standing balance method for a lightweight physical virtual human based on kinematics, characterized in that: The following steps are involved: Adding a ragdoll system to the body of the virtual human model and performing joint constraints on the virtual human model to obtain a lightweight physical virtual human; Performing kinematics embedding processing on the lightweight physical virtual human to obtain a kinematics-based lightweight physical simulation virtual human; Designing a standing posture method for a virtual human so that the lightweight physical simulation virtual human can be supported according to different needs; A balance framework for lightweight physical simulation virtual humans is designed based on the principle of balance.
2. The standing balancing method according to claim 1, characterized in that: The method of adding a ragdoll system to the body of the virtual human model and constraining the joints of the virtual human model to obtain a lightweight physical virtual human includes: The virtual human model is subjected to ragdoll setting processing, and rigid bodies and physical collision detection devices are added to different body parts of the virtual human; the mass of the rigid body is configured in proportion to the mass of the corresponding body part, and the shape of the physical collision detection device is a simple geometric shape corresponding to the body part; A joint hinge is added to the physical virtual human, the body parts configured with the rigid body are hinged, and different constraints are set according to the different torque degrees of freedom of different parts to limit the torsion of the joints.
3. The standing balancing method according to claim 2, characterized in that: The joint hinge is hinged with the hip as the root part and the limbs and the head as the end parts.
4. The standing balancing method according to claim 1, characterized in that: The kinematics embedding processing of the lightweight physical virtual human includes: Dividing the body of the lightweight physical virtual human into extremity parts and non-extremity parts; Copy the position data of the extremities as the desired position, transplant the rigid bodies and physical collision detection devices at the extremities to the desired position, and the weight of the rigid bodies at the desired position can be ignored; Four position points are placed on the front and back parts of the virtual person's limbs as elbow and knee orientation points to adjust the overall orientation of the limbs. On this basis, IK controllers are added to the end parts of the limbs to control the joints to reach the roots of the limbs. The desired position is used as the target position control point, and the orientation is the elbow and knee orientation point.
5. The standing balancing method according to claim 4, characterized in that: The joint hierarchy of the virtual person takes the hip as the root, and adds joint hinge components to the non-limb end parts, limb end parts and target position control points, so that the target position control points fit the limb end parts.
6. The standing balancing method according to claim 1, characterized in that: The method for designing the standing posture of a virtual human enables the lightweight physical simulation virtual human to support according to different needs, wherein the support refers to calculating the height required for the hips to stand by using the data under the feet of the physical virtual human, and the support is calculated by the following method: Step 1, selecting a foot for calculating the standing hip height according to the current state of the virtual person; Step 2, obtaining the ground height position H under the foot; Step 3, using the standing hip height algorithm to calculate the hip position P; Step 4, using position P as the fixed end position of the spring, and stretching the hips of the virtual person to lift it up so that the virtual person stands on the ground. Step 3 includes: The position P of the hip, that is, the height of the hip of the virtual person in standing posture, is calculated by using the principle of trigonometric function, and the specific formula is as follows: In formula 1, P is the vertical height of the hips in standing position, L sf is the length of the virtual person's hips and feet on the same plane, L f is the length of the virtual person's lower limbs, and H is the height of the ground under the virtual person's feet.
7. The standing balancing method according to claim 1, characterized in that: The design of a lightweight physical simulation virtual human balance framework based on the balance principle includes: According to the three-level balance classification method, the standing balance maintained by the virtual person is divided into static balance, external force recovery balance and dynamic movement balance, wherein the dynamic movement balance and static balance are both achieved by the virtual person by moving the hips to achieve self-balance, the external force recovery balance is achieved by the virtual person by moving the limbs to recover the balance, and the static balance is used not only to maintain the balance of an action, but also as a transition between external force recovery balance and dynamic movement balance.
8. The standing balancing method according to claim 7, characterized in that: The three-level balance classification method divides the standing balance maintained by the virtual person into static balance, external force recovery balance and dynamic motion balance, which is achieved by the following algorithm: Step 10, calculating the center of gravity of the virtual person; Step 20, determining whether the virtual person is in an unbalanced state, if the virtual person is in a balanced state, go to step 6, if the virtual person is in an unbalanced state, go down to step 30; Step 30, determining the state of the virtual human maintaining balance according to the user's instruction, static balance and dynamic motion balance go to step 40, and external force restores balance go to step 50; Step 40, pull the hips of the virtual person to shift the horizontal plane until the center of gravity returns to a balanced state, and then go to step 60; Step 50, generating a foot motion curve trajectory, and restoring the virtual human's balance by adjusting the leg position; Step 60, return to step 10.
9. The standing balancing method according to claim 8, characterized in that: Step 10 includes: calculating the center of gravity position by formula 2: using the Varinon principle: P b =∑ i m i P i / ∑ i m i (2) P b is the center of gravity, m i is the weight of each part of the body, P i It is the location of the center of gravity of each part of the body; During the calculation process, the weight of each part of the virtual person is multiplied by the data of the center of gravity position of each part, and then divided by the weight of the whole body to obtain the center of gravity of the virtual person's body.
10. The standing balancing method according to claim 8, characterized in that: Step 20 includes: determining whether to perform balance restoration through the virtual human balance judgment. When the virtual human balance judgment is based on the support point, it includes: Single-point balance judgment: When the virtual person is in the state of standing on one leg, lifting one foot when walking, or holding upside down with one hand, and only one supporting part is in contact with the ground, a circle is drawn with the supporting point as the center and the maximum length of the supporting part as the diameter. The range within the circle is set as the balance range. When the center of gravity falls within the balance range, the virtual person is balanced; otherwise, when the center of gravity falls outside the balance range, the virtual person is unbalanced. Two-point balance judgment: When the virtual person is standing, lunging, or handstand with only two supporting parts touching the ground, a circle is drawn with the midpoint of the supporting points as the center and half the length of the line connecting the two points as the diameter. The range within the circle is the balance range. When the center of gravity falls within the balance range, the virtual person is balanced; otherwise, the virtual person is unbalanced. The reason why only half of the length is set as the diameter is that when the center of gravity is completely on one supporting point, the other bottoming part does not serve as a support. If this support range is exceeded, the posture or state of the body will change. Multi-point balance judgment: When there are three or more support points, the convex hull algorithm is used to judge the balance of the virtual person. When the center of gravity is used as a point to construct the convex hull, it means that the center of gravity falls outside the balance range and the virtual person is unbalanced; conversely, when the center of gravity is not used as a point to construct the convex hull, it means that the center of gravity falls within the balance range and the virtual person is balanced. Transition balance judgment: When performing a change in movement, if the movement tends to increase the support point, the balance judgment is made based on the original support point and the support point that is about to become the support point; if the movement tends to decrease, the balance judgment is made after removing the support point that is about to be lost.
11. The standing balancing method according to claim 10, characterized in that: The convex hull algorithm is: d=(ax-bx)*(by-cy)-(ay-by)*(bx-cx) (3) In formula 3, d is the convex hull point, a is the previous convex hull point, d is the point currently judging the convex hull, c is the judging base point, and x and y are the x-axis position and y-axis position of these points respectively.
12. The standing balancing method according to claim 11, characterized in that: When judging multiple points, the leftmost point is first selected as the convex hull point, and then the cross product calculation is performed with all the remaining points starting from the points adjacent to the point. The remaining points are used as judgment base points in the judgment process. When the values obtained by the cross product calculation with all the judgment base points are greater than 0, the point currently being judged is the convex hull point and is included in the collection of convex hull points. On the contrary, if the value obtained by the cross product calculation is less than 0, the calculation is stopped, the judged point is not put into the collection of the convex hull, and the judgment base point is used as the judgment point to continue the judgment; when all the convex hull points are obtained and in a set, the center of gravity is retrieved to see if it is in the set. When the center of gravity is in the set, it means that the virtual person is unbalanced; on the contrary, when the center of gravity is not in the set, it means that the virtual person is balanced.