Spacetime Constraints
Total Page:16
File Type:pdf, Size:1020Kb
Spacetime Constraints Andrew Witkin Michael Kass Schlumberger Palo Alto Research 3340 Hillview Avenue, Palo Alto, CA 94304 Abstract Siggraph '87 [9]. Although Luxo, Jr. showed us that the team of animator, keyframe system, and renderer can be Spacetime constraints are a new method for creating char- a powerful one, the responsibility for de®ning the motion acter animation. The animator speci®es what the character remains almost entirely with the animator. has to do, for instance, ªjump from here to there, clearing a Some aspects of animationÐpersonalityand appeal, for hurdle in between;º how the motion should be performed, exampleÐwill surely be left to the animator's artistry and for instance ªdon't waste energy,º or ªcome down hard skill for a long time to come. However, many of the prin- enough to splatter whatever you land on;º the character's ciples of animation are concerned with making the charac- physical structureÐthe geometry, mass, connectivity, etc. ter's motionlook real at a basic mechanical level that ought of the parts; and the physical resources available to the to admit to formal physical treatment. Consider for exam- character to accomplish the motion, for instance the char- ple a jump exhibitinganticipation,squash-and-stretch, and acter's muscles, a ¯oor to push off from, etc. The require- follow-through. Any creatureÐhuman or lampÐcan only ments contained in this description, together with New- accelerate its own center of mass by pushing on something ton's laws, comprise a problem of constrained optimiza- else. In jumping, the opportunity to control acceleration tion. The solution to this problem is a physically valid mo- only exists during contact with the ¯oor, because while tion satisfying the ªwhatº constraints and optimizing the airborne there is nothing to push on. Anticipation prior to ªhowº criteria. We present as examples a Luxo lamp per- takeoff is the phase in which the needed momentum is ac- forming a variety of coordinated motions. These realistic quired by squashing then stretching to push off against the motions conform to such principles of traditional anima- ¯oor. Follow-throughis the phase in which themomentum tion as anticipation, squash-and-stretch, follow-through, on landing is absorbed. and timing. Such physical arguments make nice post hoc explana- tions, but can physics be brought to bear in creating the Keywords Ð Animation, Constraints complex active motions of characters like Luxo? If so, how much of what we regard as ªniceº motion follows 1 Introduction directly from ®rst principles, and how much is really a matter of style and convention? Computer animation has made enormous strides in the past This paper presents a physically-based approach to char- several years. In particular, Pixar's Luxo, Jr. [10] marked acter animation in which coordinated, active motion is a turning point as perhaps the ®rst computer-generated created automatically by specifying: work to compete seriously with works of traditional ani- What the character has to do, for instance ªjump from mation on every front. Key among the reasons for Luxo, here to there.º Jr.'s success is that it was made by a talented animator who adapted the principles of traditional animation to the How the motion should be performed, for instance computer medium. Luxo, Jr., in large measure, is awork ªdon't waste energy,º or ªcome down hard enough to of traditional animation that happens to use a computer splatter whatever you land on.º to render and to interpolate between keyframes. John Lasseter spelled this out clearly in his presentation to What the character's physical structure isÐwhat the pieces are shaped like, what they weigh, how they're connected, etc. 0ªLuxoº is a trademark of Jac Jacobsen Industries AS. 1 What physical resources are available to the character the objects end up and how they get there as where they to accomplish the desired motion, for instance the begin. Problems cast in this form are not initialvalue prob- character's muscles (or whatever an animate lamp lems. For instance, while simulating a bouncing ball is has in place of muscles,) a ¯oor to push off from, etc. easy enough, making the ball bounce to a particular place requires choosing just the right starting values for posi- Our initial experiments with this approach have aimed tion, velocity, and spin. Making these choices manually is at making a Luxo lamp execute a convincing jump just a painful matter of trial and error. Problems such as this by telling it where to start and where to end. The re- one, in which both initial and ®nal conditions are partially sults we present in this paper show that such properties or completely constrained, are called two-point boundary as anticipation, follow-through, squash-and-stretch, and problems, requiring more elaborate solution methods than timing indeed emerge from a bare description of the mo- forward simulation.[3] tion's purpose and the physical context in which it occurs. Character animation poses a still more dif®cult problem. Moreover, simple changes to the goals of the motion or Animals move by using their muscles to exert forces that to the physical model give rise to interesting variations on vary as a function of time. Calculating the motion by the basic motion. For example, doubling (or quadrupling) simulation is straightforward once these time-dependent the mass of Luxo's base creates amusingly exaggerated force functions are known, but the dif®cult problem is motion in which the base looks heavy. to calculate force functions that achieve the goals of the Our method entails the numerical solution of large con- motion. Specifying these functions by hand would be strained optimization problems, for which a variety of hopeless, equivalent to making a robot move gracefully standard algorithms exist. These algorithms, while rela- by manually varying its motor torques. tively expensive, spend most of their time solving sparse In an effort to reconcile the advantages of simulation linear systems, and are therefore amenable to accelera- with the need for control, several researchers [1, 7] have tion by array processors and other commonly available proposed methods for blending positional constraints with hardware. The greatest dif®culty arises not in comput- dynamic simulations. The idea behind these methods is ing the numerical solution, but in setting up the intricate to treat kinematic constraints as the consequences of un- sparse matrix equations that drive the solution process. To known ªconstraint forces,º solve for the forces, then add address this problem we implemented an object-oriented them intothesimulation,exactly canceling that component symbolic algebra system that automates this dif®cult task of the applied forces that ®ghts against the constraints. almost entirely. We therefore believe the method described Constraint force methods permit parts, such as a char- here can become a practical animation tool requiring no acter's hands or feet, to be moved along prede®ned more mathematical sophistication of the end user than do keyframed trajectories, but provide no help in de®ning current keyframing systems. the trajectories, which is the central problem in creat- The remainder of the paper is organized as follows: the ing character animation. While allowing a character to following section discusses the previous use of physical be dragged around manually like a marionette, constraint methods in animation. The spacetime method is then in- forces sidestep the central issue of deciding how the char- troduced using a moving particle as a toy example. Next, acter should move. our extension of the method to complex problems is dis- These shortcomingsled us to adopt a new formulationof cussed. Finally, the Luxo model and the results obtained the constraint problem, whose central characteristic is that with it are described. we solve for the character's motion and time-varying mus- cle forces over the entire time interval of interest, rather 2 Background and Motivation than progressing sequentially through time. Because we extend the model through time as well as space, we call Recently, there has been considerable interest in incorpo- the formulation spacetime constraints. rating physics into animation using simulation methods. The spacetime formulation permits the imposition of [7, 14, 15, 1, 13, 4, 6] The appeal of physical simulation as constraints throughout the time course of the motion, with an animation technique lies in its promise to produce real- the effects of constraints propagating freely backward as istic motion automatically by applying the same physical well as forward in time. Constraints on initial, ®nal, or laws that govern real objects' behavior. intermediate positions and velocities directly encode the Unfortunately, the realism of simulation comes at the goals of the motion, while constraints limiting muscle expense of control. Simulation methods solve initialvalue forces or preventing interpenetration de®ne properties of problems: the course of a simulation is completely deter- the physical situation. Additionally, Newtonian physics mined by the objects' initial positions and velocities, and provides a constraint relating the force and position func- by the forces applied to the objects along the way. An ani- tions that must hold at every instant in time. Subject mator, however, is usually concerned as much with where to these constraints we optimize functions that specify 2 how the motion should be performed, in terms of ef®- (see [12] for a good survey.) We choose instead to rep- (t) f (t) ciency, smoothness, etc. Solving this constrained opti- resent the functions x and independently. The mization problem yields optimal, physically valid motion equation of motion then enters as a constraint that relates that achieves the goals speci®ed by the animator. the two functions, to be satis®ed along with the other constraints during the solution process.