Download presentation
Presentation is loading. Please wait.
Published byHillary Stokes Modified over 8 years ago
1
Spacetime Constraints Chris Moore CS 552
2
Purpose Physically Accurate Realistic Motion
3
Components
4
Bodies
5
Components Bodies Inputs
6
Components Bodies Inputs Constraints
7
Components Bodies Inputs Constraints Objective Function
8
Bodies Single Particle / Rigid Body Articulated Bodies Multiple Bodies
9
Inputs Denoted Force Vector Components Spring Variables –Linear and Angular –Rest Length, Damping Coefficient, etc Object Positions
10
Constraints Function of Inputs:
11
Constraints Function of Inputs: Examples: –Newton’s 2 nd :
12
Constraints Function of Inputs: Examples: –Newton’s 2 nd : –Desired Keyframes
13
Constraints Function of Inputs: Examples: –Newton’s 2 nd : –Desired Keyframes –Maximum Force Magnitude
14
Constraints Function of Inputs: Examples: –Newton’s 2 nd : –Desired Keyframes –Maximum Force Magnitude –Collision Surfaces
15
Objective Function Function of Inputs: Optimization Problem
16
Objective Function Function of Inputs: Optimization Problem Examples
17
Objective Function Function of Inputs: Optimization Problem Examples –Minimize Force or Torque Where or is derived from
18
Objective Function Function of Inputs: Optimization Problem Examples –Minimize Force or Torque –Minimize Power Used
19
Objective Function Function of Inputs: Optimization Problem Examples –Minimize Force or Torque –Minimize Power Used –Minimize Distance to Keyframe
20
Objective Function Function of Inputs: Optimization Problem Examples –Minimize Force or Torque –Minimize Power Used –Minimize Distance to Keyframe –Maximize Jumping Height / Walking Distance
21
Process Start With Initial State Until a Desired Result is Found: –Evaluate Objective Function –Optimize Result –Constrain Solution
22
Optimization
23
Broyden-Fletcher-Goldfarb-Shanno (BFGS) –Quasi-Newton Method –Gradient Descent
24
Optimization Broyden-Fletcher-Goldfarb-Shanno (BFGS) Sequential Quadratic Programming (SQP)
25
Optimization Broyden-Fletcher-Goldfarb-Shanno (BFGS) Sequential Quadratic Programming (SQP) Lagrangians
26
Optimization Broyden-Fletcher-Goldfarb-Shanno (BFGS) Sequential Quadratic Programming (SQP) Lagrangians Monte Carlo Markov Chains (MCMC)
27
Optimization Broyden-Fletcher-Goldfarb-Shanno (BFGS) Sequential Quadratic Programming (SQP) Lagrangians Monte Carlo Markov Chains (MCMC) Genetic Algorithms (GA)
28
Applications Luxo - Generating realistic movement Generating intermediate frames between BVH sequences Creating realistic walking actions Causing the desired dice roll to occur
29
My Project
30
Bodies Inputs Constraints Objective Function
31
Implementation - Bodies Current Simulation: –Single Sphere
32
Implementation - Bodies Current Simulation: –Single Sphere –Potential for Complex Bodies
33
Implementation - Bodies Current Simulation: –Single Sphere –Potential for Complex Bodies –Represented within ODE
34
Implementation - Bodies Current Simulation: –Single Sphere –Potential for Complex Bodies –Represented within ODE –ODE handles system integration and collision detection
35
Implementation - Inputs Force Vector Components
36
Implementation - Inputs Force Vector Components –Inputs Represent Keyframes of
37
Implementation - Inputs Force Vector Components –Inputs Represent Keyframes of –Keyframes are linearly interpolated
38
Implementation - Inputs Force Vector Components –Inputs Represent Keyframes of –Keyframes are linearly interpolated –Applied at Center of Mass
39
Implementation - Constraints None Implemented So Far
40
Implementation - Constraints None Implemented So Far Challenge Mixing Newton’s 2 nd With Collision Response
41
Implementation - Objective Objective Function:
42
Implementation - Objective Objective Function: Influence Coefficients –Force Minimization
43
Implementation - Objective Objective Function: Influence Coefficients –Force Minimization –Velocity Error
44
Implementation - Objective Objective Function: Influence Coefficients –Force Minimization –Velocity Error –Position Error
45
Implementation – Class Layout Class Descriptions –STCSoln Represents one possible solution Contains real-valued input variables representing the components to force vectors Force vectors represent keyframes of the force function Discretize solution into N time steps: 3N variables per STCSoln
46
Implementation – Class Layout Class Descriptions –STCSolnPop Represents a population of STCSoln solutions Stored as a square grid –display purposes –compatibility with the GA parent selection
47
Implementation – Class Layout Class Descriptions –STCSolnPopEvaluator Interface class Initializes solutions Evaluates solution fitness Unique per problem
48
Implementation – Class Layout Class Descriptions –STCSolnPopEvaluator Interface class Initializes solutions Evaluates solution fitness Unique per problem –Problem Instance of STCSolnPopEvaluator Unique methods: –Initialize / Shutdown Physical System –Initializes & Updates Solution Playback –Evaluates STCSoln Objective Values
49
Implementation – Class Layout Class Descriptions –Solver Abstract Class for Optimizing Populations Uses the Problem Class to Calculate Fitness Optimizes Solutions based upon fitness value Subclasses: –GASolver –NewtonSolver
50
Implementation - Solvers GASolver –Genetic Algorithm based
51
Implementation - Solvers GASolver –Genetic Algorithm based –Population Specifics Size of Population Grid Layout –Choosing Parents –Maintaining Multiple Minima
52
Implementation - Solvers GASolver –Genetic Algorithm based –Gene Encoding Genes represented by STCSoln class Chromosomes represented by inputs
53
Implementation - Solvers GASolver –Genetic Algorithm based –Algorithm Order of Operations Within Iterations –Order of Operations –Succession of Children –Elitism Mutation Operator Crossover Operator –Choosing Parent –Random or Pivot
54
Implementation - Solvers NewtonSolver –Quasi-Newton Algorithm (Gradient Descent)
55
Implementation - Solvers NewtonSolver –Quasi-Newton Algorithm (Gradient Descent) –Potentially BFGS / SQP
56
Implementation - Solvers NewtonSolver –Quasi-Newton Algorithm (Gradient Descent) –Potentially BFGS / SQP –Requires Gradient Calculation of the Objective Function
57
Implementation - Solvers NewtonSolver –Quasi-Newton Algorithm (Gradient Descent) –Potentially BFGS / SQP –Requires Gradient Calculation of the Objective Function Jacobian
58
Implementation - Solvers NewtonSolver –Quasi-Newton Algorithm (Gradient Descent) –Potentially BFGS / SQP –Requires Gradient Calculation of the Objective Function Jacobian Hessian
59
Implementation - Solvers NewtonSolver –Quasi-Newton Algorithm (Gradient Descent) –Potentially BFGS / SQP –Requires Gradient Calculation of the Objective Function Jacobian Hessian –Still to be implemented
60
Implementation - Interface How it all works:
61
Implementation - Interface Components: –Scene Components: Green / Red / White Model
62
Implementation - Interface Components: –VCR-Style Playback Play / Pause / Stop
63
Implementation - Interface Components: –File Menu New / Load / Save
64
Implementation - Interface Components: –Population Graph Global Fitness Shading Local Fitness Shading Displays Selected Solution
65
Implementation - Interface Components: –GA Solver Button Starts / Stops the GA Solver
66
Implementation - Interface
67
Components: –Future Implementation: More Solvers Newton Solver Button Force Function Graph User Manipulation of Inputs
68
Conclusion Demo 1 Demo 2 Demo 3
69
Sources Spacetime Constraints, Andrew Witkins, Michael Kass Spacetime Constraints Revisited, J. Thomas Ngo, Joe Marks Motion from Spacetime Constraints, Matt Ahrens, Brett Levin © 2001 Spacetime Constraints Attempted, Taylor Shaw © 2001 Spacetime Constraints for Biomechanical Movements, David C. Brogan, Kevin P. Granata, Pradip N. Sheth Automatic Control for Animation, Ron Metoyer © 2004 Efficient Generation of Motion Transitions Using Spacetime Constraints, Charles Rose, Brian Guenter, Bobby Bodenheimer, Michael F. Cohen N-Body Spacetime Constraints, Diane Tang, J. Thomas Ngo, Joe Marks © 1994 Sampling Plausible Solutions to Multi-body Constraint Problems, Stephen Chenney, D. A. Forsyth
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.