 d.s. wu 1 Penalty Methods for Contact Resolution interactive contact resolution that usually works pi david s wu.

Slides:



Advertisements
Similar presentations
Numeric Integration Methods Jim Van Verth Red Storm Entertainment
Advertisements

Formal Computational Skills
Nonnegative Matrix Factorization with Sparseness Constraints S. Race MA591R.
Real-Time Game Physics
Martyn Clark Short course on “Model building, inference and hypothesis testing in hydrology” May, 2012.
CSci 6971: Image Registration Lecture 14 Distances and Least Squares March 2, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart,
1cs533d-winter-2005 Notes  Assignment 1 is not out yet :-)  courses/533d-winter-2005.
SVM—Support Vector Machines
CSCI 347 / CS 4206: Data Mining Module 07: Implementations Topic 03: Linear Models.
Integration Techniques
Ordinary Differential Equations
Basis Expansion and Regularization Presenter: Hongliang Fei Brian Quanz Brian Quanz Date: July 03, 2008.
Dynamics of Articulated Robots Kris Hauser CS B659: Principles of Intelligent Robot Motion Spring 2013.
Notes Assignment questions… cs533d-winter-2005.
1cs533d-term Notes  Assignment 2 is up. 2cs533d-term Modern FEM  Galerkin framework (the most common)  Find vector space of functions that.
1cs533d-term Notes  Braino in this lecture’s notes about last lectures bending energy…
1cs542g-term Notes. 2 Solving Nonlinear Systems  Most thoroughly explored in the context of optimization  For systems arising in implicit time.
1Notes. 2 Building implicit surfaces  Simplest examples: a plane, a sphere  Can do unions and intersections with min and max  This works great for.
Prénom Nom Document Analysis: Linear Discrimination Prof. Rolf Ingold, University of Fribourg Master course, spring semester 2008.
Motion Analysis (contd.) Slides are from RPI Registration Class.
CSci 6971: Image Registration Lecture 4: First Examples January 23, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart, RPI Dr.
UNC Chapel Hill S. Redon - M. C. Lin Rigid body dynamics II Solving the dynamics problems.
Basic Concepts and Definitions Vector and Function Space. A finite or an infinite dimensional linear vector/function space described with set of non-unique.
1cs533d-winter-2005 Notes  More reading on web site Baraff & Witkin’s classic cloth paper Grinspun et al. on bending Optional: Teran et al. on FVM in.
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Implicit ODE Solvers Daniel Baur ETH Zurich, Institut.
1cs533d-winter-2005 Notes  Assignment 2 instability - don’t worry about it right now  Please read D. Baraff, “Fast contact force computation for nonpenetrating.
1Notes. 2 Time integration for particles  Back to the ODE problem, either  Accuracy, stability, and ease-of- implementation are main issues  Obviously.
MCE 561 Computational Methods in Solid Mechanics
1 Chapter 9 Differential Equations: Classical Methods A differential equation (DE) may be defined as an equation involving one or more derivatives of an.
Ordinary Differential Equations (ODEs)
Simulating Multi-Rigid-Body Dynamics with Contact and Friction Mihai Anitescu SIAM OPTIMIZATION MEETING May 10, 1999.
역운동학의 구현과 응용 Implementation of Inverse Kinematics and Application 서울대학교 전기공학부 휴먼애니메이션연구단 최광진
3.7. O THER G AME P HYSICS A PPROACHES Overview of other game engine physics approaches.
Writing a Hair Dynamics Solver Tae-Yong Kim Rhythm & Hues Studios
Neural Networks Lecture 8: Two simple learning algorithms
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Tutorial 5: Numerical methods - buildings Q1. Identify three principal differences between a response function method and a numerical method when both.
Finite Differences Finite Difference Approximations  Simple geophysical partial differential equations  Finite differences - definitions  Finite-difference.
Erin Catto Blizzard Entertainment Numerical Integration.
Numerical Integration and Rigid Body Dynamics for Potential Field Planners David Johnson.
Large Steps in Cloth Simulation - SIGGRAPH 98 박 강 수박 강 수.
Integration of 3-body encounter. Figure taken from
Progress in identification of damping: Energy-based method with incomplete and noisy data Marco Prandina University of Liverpool.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Optimization & Constraints Add mention of global techiques Add mention of calculus.
1 Finite Elements. 2 Finite elements Formally identical to spectral technique Dependent variables expanded as linear combinations of basis local, non.
A comparison between PROC NLP and PROC OPTMODEL Optimization Algorithm Chin Hwa Tan December 3, 2008.
Perfidious Polynomials and Elusive Roots Zhonggang Zeng Northeastern Illinois University Nov. 2, 2001 at Northern Illinois University.
Rigid Body Dynamics (II). Bodies intersect ! classify contacts Bodies separating –v rel >  –No response required Colliding contact (Last time) –v rel.
Trajectory Generation
Lecture 6 - Single Variable Problems & Systems of Equations CVEN 302 June 14, 2002.
Chapter 2-OPTIMIZATION G.Anuradha. Contents Derivative-based Optimization –Descent Methods –The Method of Steepest Descent –Classical Newton’s Method.
ECE 576 – Power System Dynamics and Stability Prof. Tom Overbye Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
Game Technology Animation V Generate motion of objects using numerical simulation methods Physically Based Animation.
INTRO TO OPTIMIZATION MATH-415 Numerical Analysis 1.
Ch. Eick: Num. Optimization with GAs Numerical Optimization General Framework: objective function f(x 1,...,x n ) to be minimized or maximized constraints:
LECTURE 17: BEYOND LINEARITY PT. 2 March 30, 2016 SDS 293 Machine Learning.
ADM703b, Section 5, February 2013 Copyright© 2013 MSC.Software Corporation S5 - 1 SECTION 5 STATIC ANALYSIS.
INTEGRATOR CLASSIFICATION & CHARACTERISTICS
SECTION 8 INTEGRATOR SETTINGS.
CHAPTER 2 - EXPLICIT TRANSIENT DYNAMIC ANALYSYS
Lecture 4: Numerical Stability
3.7. Other Game Physics Approaches
Autonomous Cyber-Physical Systems: Dynamical Systems
Computer Animation Algorithms and Techniques
High Accuracy Schemes for Inviscid Traffic Models
Introduction Constraint: important features in computer animation
Chapter 4 . Trajectory planning and Inverse kinematics
Computer Animation Algorithms and Techniques
Numerical Modeling Ramaz Botchorishvili
Presentation transcript:

 d.s. wu 1 Penalty Methods for Contact Resolution interactive contact resolution that usually works pi david s wu

d.s. wu  2 objective Determine the force vector to ensure appropriate behavior for contacting objects or alternatively: make the game do the right thing when objects collide with one another - also make it work when they rest on one another

d.s. wu  3 customer requirements Stability uncommon circumstances should not prevent further play Perceived accuracy behavior should appear correct Perceived precision or consistency known actions may be applied to produce consistent effect Performance avoid O(2 n ) complexity Iteration that never converges is not acceptable Stability really important Customer Satisfaction Stability Consistency Accuracy Performance

d.s. wu  4 “what methods are there for solving the problem?” Apply impulses for collisions and forces for resting contact Solve using iterative constraints Declare collision resolution “beyond the scope of this simulator” Use Potentials that “encourage” appropriate behavior (penalty methods)

d.s. wu  5 “which are you currently using?” please review title page

d.s. wu  6 “why penalty methods?” penalty methods are trivial to implement classic analytical methods have many degenerate configurations a lot of special cased code is required to ‘elegantly handle’ these penalty methods decay gracefully in awkward situations analytic methods tend to have worst case performance that is O(n!), O(2 n ), or O(n 3 ) penalty methods extend robustly to more complex problems such as deformable representations such as FEM or FFD lattice

d.s. wu  7 meeting the needs Penalty methods Stability Tends to converge Few degenerate cases Doesn’t explode

d.s. wu  8 “penalty methods are numerical hacks” Before continuing, you will need to accept the following axioms:  Penalty Methods are not all that bad They robustly solve many difficult problems Implementation is intuitive Most physics researchers and programmers don’t trust penalty methods Most programmers who are about to write their first physics code will implement penalty methods, armed with their first year physics text Potential methods are not a good place to start, before you go off and throw arbitrary potentials at every problem you encounter, learn and understand the more established methods, these will specify the desired behavior for non- degenerate situations

d.s. wu  9 more persuasion II. independence between numerical integration and contact resolution is a luxury combining the two can be justified solving the problems independently is the most most common implementation modular, independent components are nice, but in this case, they limit your potential methods for solution

d.s. wu  10 more persuasion III. Implicit Euler is not a joke First order accuracy is really not all that bad provided that it is stable Stiff decay is a good thing when things get really nasty, diminishing high frequency components is desirable A-Stability is not just an inconsequential feature of obscure integration schemes Explicit integration schemes are not suitable for stiff systems No implicit or explicit multi-step methods are A-Stable

d.s. wu  11 implementation synopsis Each contact is classified as either a collision or a resting contact if (relative velocity * normal > [insert magic threshold] ) collision otherwise, resting contact Two linear potentials are created. One acts along normal to repel objects, the other acts on the tangent plane to represent friction. nonlinear force along contact normal is approximated by a piecewise cubic spline Friction cone is approximated by a piecewise cubic patch

d.s. wu  12 Conventions (what do those obscure letters mean?) Scalar: lower case italic, e.g. ‘k’ Vector: lower case e.g. ‘q’ vector Matrix: upper case e.g. ‘M’ q = position q’ = velocity q’’ = acceleration

d.s. wu  13 more letters nf = unit vector along collision normal f = a vector constrained to the tangent plane s p = jacobian that projects the relative velocity contact point into the velocity space of the potential f n = contact normal reaction force f f = friction reaction force

d.s. wu  14 Equations Resting contact normal force: fn=L*(sn t *kb+ksn*sn t *q+kdn*sn t *q’) Collision normal force: ksn is 0 kdn is large in both cases: L is a piecewise cubic spline that smoothly interpolates (e.g. with continuity of G 2 ) 0 when |f| <= 0 1 when |f| >= [insert magic threshold]

d.s. wu  15 continued Friction forces: f f = L * (q’ / |q’| *(k1 + k2*|q’| + k3*|q’| 2 ) ) L is a piecewise cubic spline that smoothly interpolates (e.g. with continuity of G 2 ) 0 when |f| <= [insert small magic threshold] 1 when |f| >= [insert big magic threshold]

d.s. wu  16 “discontinuous potentials break my integrator” First and second derivatives w.r.t in q and q’ are continuous (due to the spline being C 2 ), this should be sufficient for robust equation solvers) the numerical integration equation is nonlinear (for Implicit Euler, q(t 1 ) = q(t 0 ) + [step size] * f(q(t 1 ), t 1 )) a technique that use a quadratic manifold to approximate equations will require multiple iterations (techniques such as Newton/Rhampson Iteration and Linear Conjugate Gradient) in my experience, Quasi-Newton and Nonlinear Conjugate Gradient are more effective

d.s. wu  17 Where do ksx, kdz, etc come from? Resting contact kdz = m sz *p ksz = m sz *sqr(p)/8.0 Over damped, velocity half life of p Collision: kdzc = Msz*p p is very high, chosen such that 95% of desired velocity will be reached one after one step

d.s. wu  18 “kdz is too high” use a stable integrator

d.s. wu  19 “you are using potentials to emulate velocity constraints and impulses” With backward Euler integration, an impulse occurring at any point within a time step is equivalent to a force during the time step with an equal integral over the time step Solving the system: q(t 1 ) = q(t 0 ) + [step size] * f(q(t 1 ), t 1 ) handles over-determined systems gracefully Each potential is given an explicit priority Solution applies a weighted least square minimization to error

d.s. wu  20 Questions Ask questions