• No results found

Physics in Character Animations

N/A
N/A
Protected

Academic year: 2021

Share "Physics in Character Animations"

Copied!
12
0
0

Loading.... (view fulltext now)

Full text

(1)

Physics in Character Animations

Adrian Gier, Seminar Character Animation (Kipp/Heloir), Summerterm 2008, Saarland University

Abstract. A realistically appealing animation of a human-like skeleton is, on one hand, a major goal for character animators but on the other Hand, a challenging task. Three different physics driven behaviors (runner, bicyclist, gymnast) with their particular state machines and control equations for the different states of the behaviors are shown.

1 Introduction

Humans are very sensitive in terms of recognition of a human-like motion. To give such a motion a natural appeal, several conditions of the motion have to be complied with. The basis is a physically correct animation, every part of the body has to move like we would expect in real world, at least from a physical point of view. The other property that makes a humanlike character animation looking more natural is its particular style.

The style is determined by variations in the different gestures. Like every human face looks different, every man has an own fashion to performing gestures. This can be very nicely simulated with this physical approach, as the body does not follow a given path, like motion capture or pose to pose animation, but the animation is calculated frame by frame with the ability to set up different parameters for each style.

In this report, I summarize the approach “Animating Human Athletics” by J. K. Hodgins and W. L. Wooten and D. C. Brogan and J. F.O'Brien.

In particular, I will describe the common toolbox provided by the approach: state machines connect the phases of a behavior to its different control equations, inverse kinematics calculate the joint angles so that hands or feet can reach a determined position, low-level control is performed by proportional derivative servos.

Dividing the moves into different states based on a state machine is useful, as not every single part of a behavior needs physical simulation. In the parts between the key phases (the phases, where physical simulation is needed), inverse kinematics is used to move the limbs to determined positions.

As examples for this animation technique you will see three gymnasts performing different Motions: A runner, a bicyclist and a gymnast performing a handspring vault. Each motion comes together with its own toolbox.

(2)

2 Data Sources

2.1 Where do the control equations come from?

To provide a solid toolbox for the different motions, data and experience from three research fields are being used: robotics, biomechanics and computer graphics. Marc Raibert and his colleagues from University of Berkeley developed a series of controlled dynamic running machines that ran on two or four legs and perform motion like jumping or climbing stairs (Fig.1). The control laws, used in this approach are based on their equations and they are extended to systems with a lot more controlled Degrees of Freedom and higher requirements concerning motion styles.

Biomechanics provide tables with motion capture data, force plate data1 and muscle

activation Records for lots of different behaviors. This data helps the animator to ensure the correctness of his simulated movement by comparing his values to the measured real world values. This is data is also being used to tune the control algorithms for running, bicycling and balancing.

Further data, being used to develop the behaviors are:

• Energy curves for walking, running, and the energy usage during locomotion Cavagna [1],

• Graphs of stance duration, flight duration and step length as a function of speed, McMahon[2]

• Biomechanical studies of bicyclists, Gregor [3]

• Biomechanical data of female elite gymnasts performing a handspring related to the scores they achieved in competition.

1 The Force Plate is a large force sensor, tough enough to jump on. It is used to study

the dynamics of jumping and walking, or measure how the normal force on your feet changes during an elevator ride.

(3)

• The Jack System by Univ. of Pennsylvania contains kinematic models with the ability to balance, reach and grasp, walking and run based on Motion Capture Data and the possibility to position the interactively [4][6]

• Dynamic models and control algorithm to generate the motion of a walking human, Bruderlin and Calvert [5]

Figure 1, the “Dog”

The equations used in this report are not automatically generated, but designed by hand. Designing these equations is still very complicated. There are several approaches to generate these equations automatically, but the equations that are used here are based on physical knowledge, observation of humans performing the tasks, intuition, and biomechanical data.

2.2 The Models

The models used in this approach consist of rigid limbs connected by rotary joints with one, two or three Degrees of Freedom. The dynamic models are a combination of a graphical model (Fig. 2), taken from a commercial package, and the computed moments of inertia for each limb, which has been calculated as a uniform polygonal object of uniform density, taken from measured cadavers [17].

(4)

Each joint is provided with a simple muscle model to allow the control algorithm to apply a torque to the connected limbs. The equations of motion for each system have also been taken from a commercial package [18]. The contact points between the runner’s feet or the bicycler’s wheel and the ground or the gymnast’s hands on the vault are realized by constraints. From a practical view, for each frame of the given animation, the distance between ground and the bicyclers wheel is being measured and corrected if a fault is being detected (for a real contact, the distance in these cases should be zero).

3 The Behaviors

3.1 Running

The foot of the runner consists of two segments as it’s very important for the running cycle. The Bicyclist needs less degrees of freedom, as he has a more or less fixed position on the bicycle (neck, hips and ankles need only one DOF). The Gymnast needs the same DOF as the runner, but less segments, as his feet are less important during his behavior.

Figure DOF Segments

Runner 30 17

Bicyclist 22 15

(5)

Running is a complex cyclic motion. The complexity is caused by the system of force and counterforce to stabilize the position, direction and balance of the runner. Additionally, the different muscles play a different role during locomotion. On one hand, they provide the force to achieve a forward movement of the body, on the other hand, they provide support and balance: When the foot of a runner touches the ground, ankle, knee and hip provide the balance. After this, during the flight phase, the muscles are used to swing the leg forward. As we see, to fully understand a motion, we have to divide it into distinct steps and describe, how to come from one motion-step to the next one. What we need is a state machine, which describes the phases of motion step by step (see Fig.3) .For the animation of a running figure, the two legs are divided into an active leg (the leg, which is preparing for touchdown) and a passive leg.

On touchdown, the distance from the hip to the heel projected on the ground (seenfrom above, the x,y coordinate is the position of the foot on the ground):

passive leg

active leg

Fig.3 A State machine for the Behavior „Running“

(6)

Seen from above, the forward speed is controlled by moving the hip’s (x, y)-position over the center of the foot (and change the average point of support with this). Then the stance time of the foot’s metatarsus represents the forward speed.

On touchdown, the distance from the hip to the heel projected on the ground (seen from above, the x,y coordinate is the position of the foot on the ground):

ts is the duration of the foot’s stance period, the stance time of the foots metatarsus

represents the forward speed. x and y are the runners velocity on the projected plane, xd and yd are the desired velocities, lf measures the length of the foot. This length has to be subtracted, as the inverse kinematics, which calculates the angles for the knee and the position of the hip from the above needs the shortest path to the foot and therefore takes the ankle as a reference point. Θ Is the facing direction of the figure, k is a gain factor.

To reduce the disturbance caused by the impact of the foot at touchdown, a common technique called groundspeed matching is being used. It moves the hip further forward during flight phase and moves it back before touchdown. This impulse reduces the disturbance on the rest of the system.

During the stance phase, proportional derivative servos compute torques for the hip joint and the stance leg, which is responsible for the body’s attitude (roll, pitch, yaw)to move toward the desired values. In the stance phase, the pitch of the body is inclined a bit forward, the yaw (which represents the direction, the figure is running to) is controlled by the user or higher level control algorithms The passive (idle) leg is responsible for reducing the disturbance, that the active leg causes to the body while it is swinging.

(7)

The value for each joint is calculated by Proportional derivative servos (PD’s). Their control equation is:

k and kv are the proportional (position) and derivative (velocity) gains

3.2 Bicycling

The bicyclist figure is connected to the bicycle by the handlebar, the pedals and the bicycle seat. The Bicycle seat’s connection is being realized by a pivot joint to the bicyclers pelvis. The hands are connected to the handlebar by two sided spring/damper systems, same for the feet and the pedals. The rear wheel is connected to the crank. The two sided spring/damper systems have the advantage over pure positional constraints, that the foot can pull up a pedal like it was equipped with toe clips.

As the velocity of the bicyclist is a direct result of the torque he is applying to thec rank of the bike, the control equation for the torque, the simulation has to apply, depends on the differences between the current velocity and the desired velocity:

k: gain factor, v velocity vd desired velocity

When the left leg is pushing the left pedal downwards, the right pedal is being pulled upwards. That means, the left leg creates a positive torque, while the right leg creates a negative one. To compensate this, we have to scale the applied forces by a weighting function:

(8)

θ

crank is the angle of the crank. It is zero, when the crank is vertical and the right foot is higher than the left.

This weighting function is easy to understand:

For Tcrank>0 the forces for the left and the right leg can be computed by:

fl and fr are the desired forces for the left leg and the right leg, l is the length of the crank arm. That value is being divided, as for a longer crank length, less force is needed to apply a desired torque to the crank arm.

If Tcrank<0, the equations for the left and the right leg are switched. An inverse kinematics model of the legs computes hip and knee torques to produce the forces that will apply the forces to the pedals, and the crank.

This is the control equation to move the bicyclist forward. The wrist and the waist ofthe bicyclist is being held at a constant angle with PD’s and the Bicyclist steers to reach the yaw angle controlled by the user, The movement of the ankle joint should match data from real-world measurements.

These are the values of the weighting function for the right leg. The rotation runs counterclockwise. The legs are stronger while pushing down the pedal.

(9)

3.3 Vaulting and Balancing

The third behavior we inspect is a figure performing a full summersault over a horse. A springboard, simulated by a linear spring/damper system is used to catapult the gymnast towards the horse. The gymnast pushes off the horse with her hands, perform the summersault and lands on her feet on the other side of the horse.

This behavior can be described by a state machine with 6 stages: 1. Hurdle step

2. Board contact 3. First flight phase 4. Horse contact 5. Second flight phase 6. Landing

The handspring vault animation starts between 1 and 2 while preparing for touchdown on the springboard: As the gymnast lands on the springboard, and the springboard reaches its maximum deflection, her knees are being extended to save the kinetic energy. On rebound, the springboard launches the gymnast into the air, and the first flight phase takes its place. Now, where the gymnast flies towards the horse, the gymnast (or in this case, the control system) has to put his arms into the right angle to reach the horse at a desired position. That’s where a control equation comes into play:

γ

yd is the desired shoulder angle relative to the gymnasts body,

λ

y is the angle between vertical and a vector from the desired hand position on the vault.

Φ

is the body’s pitch.

Basically: The desired angle is the difference between the body angle and the vector to the vault. This is the angle, the arm should have to reach the vault at the exact position.

(10)

• Control system maintains a layout position, spread s feet slightly to give larger area of support at touchdown

• When feet hit the ground, system must absorb rotational and kinetic energy. Therefore, the knees and waist are bent as the gymnast must reach an upright balanced position.

• A balance controller is being activated as soon as the center of mass passes the center of the feet

• After balancing, the system straightens the knees and hip to make the gymnast stand up.

As long as the balance controller is running, the gymnast could also bow forward or throw her arms back as a sign of success without falling to the ground, as the balance controller moves the center of mass above the feet automatically.

3.4 Group Motion

One of the main advantages of physics driven animation is, that each animation in every stage can be parameterized. So, to change the style of an animation for several bodies in a scene, you can take the original animation (like walking) and change its parameters for each body.

The result is, that an animation of a group behavior is possible by deriving it from a basic animation style. With for instance motion capturing, you must take data from several people walking with different styles produce a group with a realistic behavior. With the physics driven animation it’s possible to let the drivers in a bike race to avoid obstacles, like other racers which gives them the possibility to act more intelligent than a motion captured figure could ever.

3.5 Secondary Motion

Secondary Animation can add a lot to the realism of an animated scene. These are animations like clothes, splashing water or the hair flowing in the wind. As we already have the motion for the rigid body itself, these passive animations can often be driven by the underlying body animation (like hair or clothes) or be driven by a different animation (i.e. splashing water could be driven by the motion of a platform diver, impacting the water surface).

(11)

How can the creation of control algorithms for new behavior be simplified?

Finding the control equations itself is still very hard, but the approach gives some examples and hands over a toolbox which could be a basis for the realization of new behaviors in future and as a motivation to develop further automatic methods.

How can the number of behaviors that has to be developed be optimized (minimized)?

The number of behaviors can be reduced by creating transitions between the behaviors, like it can already be done with motion capture data.

Which rules could be useful to improve the motion’s naturalness?

One rule is common for all kinds of behaviors we have seen: Dynamics constrain the characteristics of a motion. Especially for professional athletes performing a gymnast motion, there is not much space left to enhance or change a motion. In principle, there is an ideal motion that every athlete wants to reach. A swimmer could also try to swim without using his legs, but that would not lead him to Olympic Gold.

Can physics driven animation be interactive?

Basically, yes they can. But one requirement for interactivity is to compute the animations in real time. With the figures shown in this report, this is of course possible, as they are not very complex (not so much degrees of freedom, a limited number of limbs, body is rigid without elastic parts). But even if today’s processors are a lot faster than these 15 years ago, the models get more and more complex and so the computation requirements raise enormous. Another point for true interactive motion , is the ability to react on unpredicted user input..This is also hard to handle, as you have to cover a lot of possibilies and to ensure, that every possible user input leads to a natural movement.

5 Summary

In this report, summarizing the paper “Animating Human Athletics” by J. K. Hodgins and W. L. Wooten and D. C. Brogan and J. F.O'Brien, their approach on physics driven animation was presented. The examples to show, that the toolbox, consisting of final state machines, control equations and inverse kinematics is suitable for several tasks of this kind, three examples were shown: a runner, a bicyclist and a gymnast performing afull summersault over a vaulting horse.

Furthermore, a short overview about the advantages for group behaviors and secondary motion was given.

(12)

6 References

[1] Cavagna, G. A., Thys, H., Zamboni, A. 1976. The Sources of External Work in Level Walking and Running. Journal of Physiology 262:639– 657. [32] Sims, K. 1994. Evolving 3D Morphology and Behavior by Competition. Artificial Life IV, 28–39.

[2] McMahon, T. A. 1984. Muscles, Reflexes, and Locomotion. Princeton: Princeton University Press.

[3] Gregor, R. J., Broker, J. P., Ryan, M. M. 1991. Biomechanics of Cycling Exercise and Sport Science Reviews Williams & Wilkins, Philadelphia, John Holloszy (ed), 19:127–169.Synthesis Using State-Space Controllers.

Proceedings of SIGGRAPH, 225–234.

[4] Badler, N. I., Phillips, C. B., Webber, B. L. 1993. Simulating Humans. Oxford: Oxford University Press.

[5] Bruderlin, A., Calvert, T. W. 1989. Goal-Directed, Dynamic Animation of Human Walking. Proceedings of SIGGRAPH, 233–242.

[6] The authors would like to thank Debbie Carlson and Ron Metoyer Ko, H., Badler, N. I. 1993. Straight-line Walking Animation based on Kinematic Generalization that Preserves the Original Characteristics. In Proceedings of Graphics Interface ’93.

[7] Witkin, A., Kass, M. 1988. Spacetime Constraints. Proceedings of SIGGRAPH, 159–168.

[8] Cohen, M. F. 1992. Interactive Spacetime Control for Animation. Proceedings of SIGGRAPH, 293–302. Viscoelasticity, Plasticity, Fracture.

[9] Brotman, J. S., Netravali, A. N. 1988. Motion Interpolation by Optimal Control. Proceedings of SIGGRAPH, 309–315.

References

Related documents

The instrument contained 13 attitudinal statements related to the newsletter received, measured on a seven-point Likert scale: reactions to the site (newsletter frequency, drop

Results suggest that the probability of under-educated employment is higher among low skilled recent migrants and that the over-education risk is higher among high skilled

Rezakazemi M, Maghami M, Mohammadi T (2018) High Loaded synthetic hazardous wastewater treatment using lab-scale submerged ceramic membrane bioreactor. Li Y, Wang C (2008)

Results of the survey are categorized into the following four areas: primary method used to conduct student evaluations, Internet collection of student evaluation data,

Countermeasures Injury Compensation Program - for covered injuries stemming from countermeasures taken in response to the declaration of a public health emergency (see 42

The first phase of the project was mostly devoted to the creation of the Dig- ital Library infrastructure, which integrates different applications offering the most

Although there is a paucity of research on the effects of dehydration on responses to cold-weather exercise, Freund and Sawka (1 1) postulated that dehydration will have

IVCS architecture consists of three cascade control loops, including high-level vehicle control, low-level (steering torque and brake slip) control and smart actuator (EPAS and