1 / 29

Spacetime Constraints

Spacetime Constraints. Andrew Witkin Michael Kass. Early Computer Animations. Pixar’s Luxo, Jr. 1986. Can we generate those motions automatically?. Some Context. What have we learned about animation? Forward simulation is possible Assignment 1 and Timewarp paper Constraints can be met

Download Presentation

Spacetime Constraints

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Spacetime Constraints Andrew WitkinMichael Kass

  2. Early Computer Animations Pixar’s Luxo, Jr. 1986 Can we generate those motions automatically?

  3. Some Context • What have we learned about animation? • Forward simulation is possible • Assignment 1 and Timewarp paper • Constraints can be met • Inverse Kinematics • Monte Carlo • Sampling Plausible Solutions… • Constrained optimization • Through the Lens

  4. Forward Simulation • Given initial state and equations defining changes in state… • Integrate (simulate) • Rigid body simulations, collisions, kinematic chains, brittle fracture, cloth, water, gas molecules

  5. Meeting Constraints • Inverse Kinematics • The end-effector must reach a desired point • Linearize (using the Jacobian) • Subdivide (linear model fails quickly) • Iterative technique with an animation that is not guaranteed to be optimal in any sense • Bad decisions in beginning are offset at the end

  6. Meeting Constraints • Monte Carlo • A random initial value, followed by simulation, will not likely lead to constraint-satisfying outputs • Random exploration of initial values will take too long • Guided exploration of initial values is feasible • Identifying the initial values to change and how much to change them is nontrivial • Benefits greatly from orthogonality of inputs and locality of good solutions

  7. Meeting Constraints • Through the Lens • Like IK, but equations are a bit more general • Iterative • Local linearizations • Constrained optimization • Minimize camera movement subject to a specific velocity of the projection of a point on world space to screen space • Lagrangian kicked in to balance between violating constraints and increasing camera movement

  8. Spacetime Constraints • We have a physical simulation that can be driven as an initial-value problem • Given a sequence of torques that are applied to a bicyclist, we can simulate its final path • We don’t have the inverse • Given a sequence of landmarks, compute the torques required to make a bicyclist ride through them… make the torques “optimal”

  9. Spacetime Constraints • Given a sequence of landmarks, compute the torques required to make a bicyclist ride through them… make the torques “optimal” • One could propose trajectories that go through landmarks but require unreasonable amounts of energy • One could propose low-energy trajectories that don’t go through landmarks

  10. Spacetime Constraints • Balancing between constraint satisfaction (in space) and evaluation function minimization (in time) is the key! • Globally optimal solutions are once again impossible to find, so a good local method is proposed

  11. Roadmap • A Particle Example • SQP Method • Extension to Complex Models • Discussion • A Tiny Movie Demo

  12. Problem Statement Governing Equation (Motion Equation): Boundary Conditions: f(t) g Object Function (Energy Consumption):

  13. Discretize continuous function Discretize unknown function x(t) and f(t) as: x1, x2, …xi, … xn-1, xn f1, f2, …fi, … fn-1, fn Our goal is to solve these discretized 2n values… x1xn satisfies goals while optimizing f1fn Next step is to discretize our motion equation and object equation. i 1 n

  14. Difference Formula h h xi - 0.5 xi + 0.5 xi - 1 xi xi + 1 Backward Forward Middle Middle

  15. Discretized Function Motion equation: x x4, f4 x3, f3 x2, f2 Boundary Conditions: x1, f1 t Object Function: When does R have minimum value?

  16. Roadmap • A Particle Example • SQP Method • Extension to Complex Models • Discussion • A Tiny Movie Demo

  17. Generalize Our Notation Unknown vector: S = (S1, S2, …Sn) x x4, f4 Constraint Functions: Ci(S) = 0 x3, f3 x2, f2 x1, f1 Minimize Object Function R(S): t S = (x1, x2, x3, x4, f1, f2, f3, f4)

  18. Sequential Quadratic Programming (SQP) Step One Pick a guess S0, evaluate Most likely Taylor series expansion of function f(x) at point a is: Similarly, we have: Set equal to 0 Omit Sa is the change to S0 that makes derivative equal to 0

  19. SQP Step Two Now we got S1’, evaluate our constraints Ci(S1’), if equal to 0, we are done but most likely it will not evaluate to 0 in the first several steps. So, let’s say Ci(S1’) ≠ 0, let’s apply Taylor series expansion on the constraint function Ci(S) at point S1’ : Omit Set equal to 0 Sb is the change to S0 that makes derivative equal to 0 Then we will continue with step one and step two until we got a solution Sn which minimizes our object function and also satisfies our constraints. S0  S1’ S1  S2’  S2  …  Sn

  20. Graphical Explanation of SQP C(S) S1 S2’ S2 S S0 S1’

  21. Roadmap • A Particle Example • SQP Method • Extension to Complex Models • Discussion • A Tiny Movie Demo

  22. Difficulties • Set up the motion equations • Define the objective equation • Evaluate the derivatives • Fit them into our SQP solver

  23. Derive Motion Equation Use Lagrangian Dynamics (another use of Lagrangian) to derive our motion equations dynamically: T – Kinetic Energy q – Generalized Coordinates Q – Generalized Forces

  24. The Authors’ Automatic System Graphical User Interface T, Q, q J Dynamic System SQP Solver Function Boxes R H

  25. Roadmap • A Particle Example • SQP Method • Extension to Complex Models • Discussion • A Tiny Movie Demo

  26. Define Objective Functions • Walking on hot coals • Walking on eggs • Carrying a bowl of hot soup • Pursued by a bear Define appropriate objective functions may be extremely difficult:

  27. The Author’s Automatic System Symbolic Analysis is really complex, especially for complex system. The state of art symbolic analysis tool is Matlab, Maple. The author’s automatic system may work for some relatively simple systems.

  28. Local Optimization vs Global Optimization R S0 S* S* S

  29. Roadmap • A Particle Example • SQP Method • Extension to Complex Models • Discussion • A Tiny Movie Demo

More Related