Presentation is loading. Please wait.

Presentation is loading. Please wait.

Spacetime Constraints David Coyne Joe Ishikura. The challenge of kinematics Successful animation requires control, but looks real Traditional principles.

Similar presentations

Presentation on theme: "Spacetime Constraints David Coyne Joe Ishikura. The challenge of kinematics Successful animation requires control, but looks real Traditional principles."— Presentation transcript:

1 Spacetime Constraints David Coyne Joe Ishikura

2 The challenge of kinematics Successful animation requires control, but looks real Traditional principles of animation look “right”

3 Problem Keyframe animation Artist controls each pose Time consuming Takes an expert to make it look good ControlAccuracy Physics simulations Looks realistic Almost no kinematic control  Forward simulation using time- dependent force functions looks bad

4 If only… We could produce motion to achieve a goal, rather than just simulate starting conditions The solution would show how a real model would move

5 The Spacetime Solution Represent motion as a set of equations Set constraints to represent physical forces and goals (e.g. start at P i, end at P f ) Optimize solution with respect to some objective (e.g. minimize force)

6 Propelled Particle Example We want to animate a particle that is affected by gravity and has “jet” propulsion force that can propel it We want to be able to specify a starting position and ending position and want a program to figure out how to propel itself so that it uses the least amount of energy

7 Basic Terminology Governing Equation Particle affected by gravity and a “jet” force Boundary Conditions Given start and end position Objective Function Minimize consumed energy

8 Translate to Continuous Functions Governing Equation (affected by gravity and propulsion force function) Boundary Conditions (given start and end position) Objective Function (minimize consumed energy)

9 Translate to Discrete Functions We want to represent x(t) and f(t) as a set of independent variables that we can solve for Do this by discretizing x(t) and f(t) into n + 1 samples with h step size Then translate all other equations

10 Discretizing the Governing Equation Translate New Governing Equation

11 Discretizing the Rest Boundary Conditions Objective Function

12 Goal Find values for f 0, f 1, … f n that minimizes R while adhering to constraints  Do this by finding f values where

13 Sequential Quadratic Programming “Essentially, the method computes a second- order Newton-Raphson step in R, and a first- order Newton-Raphson step in the (constraint functions), and combines the two steps by projecting the first onto the null space of the second (that is, onto the hyperplane for which all the [constraint functions] are constant to first order)”

14 Newton-Raphson Method An iterative process used to attempt to converge on a root of an function given the function and its derivative Start with a guess, call it x 0 We converge on the answer by finding source:

15 NR Example source: So let’s say we’re trying to find one root of We then guess at a value Then begin iterating…

16 NR Example cont’d xnxn f(x n )f’(x n )dxx n -dx x0x0 632122.673.33 x1x1 7.096.661.062.27 x2x2 1.154.540.262.01 x3x3 x4x4 04.0002.00 source:

17 NR Graphical Representation source:

18 NR Graphical Representation source:

19 NR Graphical Representation source:

20 NR Graphical Representation source:

21 SQP and NR With SQP we are performing the Newton- Raphson method on our constraint functions and our objective function Assuming our system is not over-constrained we should be able to get close

22 The SQP Notation Represent each guess as S i, a vector of all independent parameters at each iteration Turn all of the boundary conditions into constraint functions, call the set of them C  C(S) and R(S) must equal 0 so we can use NR

23 Step 1: Second Order NR on R For now, ignore constraints Start with an initial guess S 0 Find Hessian of objective function (do once) In our example:

24 Step 1 Continued Recall Taylor expansion With our equation: We know that

25 Step 1 Continued Our new equation becomes We can calculate and solve for (S - S 0 ) S - S 0 is the difference between the actual solution (root) and S 0 Because our Taylor series expansion is not complete (i.e. infinite), the value that we actually get is only an approximation of (S - S 0 )

26 Step 1 Continued Adding our approximation of (S - S 0 ) (call it ΔS) to our current guess S 0 should bring us closer to the actual solution True to the Newton Raphson method, our new guess at the end of this iteration is This new “S 1 ” ignores our constraint conditions

27 Step 2: First Order NR on C If C i (S 1 ) = 0 for all constraint functions we are done Otherwise, we must similarly converge onto an S value that will make C(S)=0 Find the Jacobian of each C i Use Taylor Expansion on each C i

28 Step 2 Continued We rewrite it in terms of the Jacobian and set C(S)=0 Once again, we solve for (S - S 1 ) which is again an approximation that we can call ΔS After this iteration, our new guess becomes

29 Iterating This new S 2 value is fed back into Step 1 The process repeats until C(S x )=0 and any further decrease in R requires violating the constraints

30 Graphical Explanation of SQP S0S0 S1’S1’ S1S1 S2’S2’ S2S2 C(S) S Slide taken from

31 Using constraints to animate Luxo Define the model and its laws of motion Set constraints for desired result Choose a criteria and optimize solution

32 Define model Define model: Four rigid massive links  Derive laws of motion “Muscles”: Three springs produce arbitrary time- dependent joint forces

33 Constraints Initial and final positions and poses No motion in contact with floor (simulates inelastic collision)

34 Solving Set optimization criteria  Minimize applied muscle power (muscle force times angular velocity)

35 Adding different constraints Landing force Height of jump

36 Increase mass

37 Ski Jump Added Constraints:  Base tangent to surface  Height of base in air at one time step Optimization includes “style” Removed Constraints:  Base free to slide  Initial velocity

38 More about Spacetime Original paper by Witkins and Kass written in 1988 A number of applications and further optimizations studied since

39 “Spacetime Constraints Revisited” J. Thomas Ngo, Harvard, Joe Marks, Cambridge 1993 Instead of using perturbational analysis, use global search to find optimal solution Generate possible solutions and use a genetic search algorithm to find the best source:

40 Human Motion with Spacetime Constraints Charles Rose, Brian Guenter, Bobby Bodenheimer, Michael Cohen, Microsoft Research 1996 Using Inverse Kinematics and Spacetime Constraints, the Microsoft team was able to simulate realistic human motion with 44 degrees of freedom Biggest problem: with so many degrees of freedom and so many constraints, difficult to do quickly source:

41 Human Motion with Spacetime Constraints source:

42 Motion Editing with Spacetime Constraints Michael Gleicher, Apple Research Laboratories 1997 Summary  Given an animation, allow the animator to use direct manipulation to edit any joint in any time step and, using spacetime constraints, a program figures out, in real time, what the new animation will be, attempting to mimic the style of the original as best as possible source:

43 Motion Editing with Spacetime Constraints “Best” or optimal motion is one where as much of the style is preserved as possible  Animator can specify what parts of the animation she wants to preserve Uses spacetime techniques to propagate changes across entire animation source:

44 Spacetime Constraints for Biomechanical Movements David Brogan, Kevin Granata, Pradip Sheth, University of Virginia, 2002 Use the Spacetime method to see how pathological constraints can affect movement source:

45 Arm Motion with Spacetime Constraints Dengming Zhu, Zhaoqi Wang, He Huang, Min Shi, Chinese Academy of Sciences 2003 Simulate natural arm movement using Spacetime Constraints source:

46 Questions?

Download ppt "Spacetime Constraints David Coyne Joe Ishikura. The challenge of kinematics Successful animation requires control, but looks real Traditional principles."

Similar presentations

Ads by Google