1 / 15

Assignment 6 IK + Interpolation

Assignment 6 IK + Interpolation. Objective. Get key poses by IK Implement the Catmull -Rom algorithm to interpolate poses for in-between frames Display interpolated motions. Lamp Model. A 2D lamp character. 3. Part I: Inverse Kinematics. Fixed Constraints

cid
Download Presentation

Assignment 6 IK + Interpolation

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. Assignment 6 IK + Interpolation

  2. Objective • Get key poses by IK • Implement the Catmull-Rom algorithm to interpolate poses for in-between frames • Display interpolated motions

  3. Lamp Model A 2D lamp character 3

  4. Part I: Inverse Kinematics • Fixed Constraints • Choose a point F on the arm and keep it the same as the current global position (fixX,fixY) . • Where is F located? • Calculate its position in the corresponding arm local coordinate • Moving Constraints • Choose a point M on the arm and drag it to (movX,movY) • Where is M located? • Calculate M’s position in the corresponding arm local coordinate

  5. How to Calculate the position in local coordinate • Project P into its local Axes. P

  6. One Click • What do we get from one click • A constraint position • A point located on the local coordinate of a bone • What we are going to do • Make the point’s position is the same as the constraint.

  7. Inverse Kinematic Cost Function Minimize the difference between the solution and a reference pose Satisfy the constraints Distance between F and (fixX,fixY) + Distance between M and (movX,movY) Smoothness term

  8. IK Environment Setup • IK environment setup • levmar : Levenberg-Marquardt nonlinear least squares algorithms in C/C++ • http://www.ics.forth.gr/~lourakis/levmar/ • Function: dlevmar_dif to implement IK Please check the link above for function usage

  9. How it work • 1. intial configuration p; constraints: c1, c2; two corresponding points’ local coordinate. • 2. start from p • 3. Calculate those two points’ position based on p and their local coordinate. (we call it FK) • 4. cost evaluation, get cost E; • 5. update p by p = p+ T(E). • 6. if E is small enough, stop; else go back to 2.

  10. How it work You should implement it in costEvaluation. • 1. intial configuration p; constraints: c1, c2; two corresponding points’ local coordinate. • 2. start from p • 3. Calculate those two points’ position based on p and their local coordinate. (we call it FK) • 4. cost evaluation, get cost E; • 5. update p by p = p+ T(E). • 6. if E is small enough, stop; else go back to 2.

  11. Usage for 1 fixed and 1 moving • dlevmar_dif(costEvaluation,p,x,6,10,1000,0,0,0,0,0); • p[6]: six degrees of freedom • X[10]: measurements • 2 for one fixed constraint • 2 for moving constraint • 6 for smoothness • costEvaluation: do forward kinematic to get F and M based on the current p first, and evaluate the cost function.

  12. Inverse Kinematic Cost Function Minimize the difference between the solution and a reference pose Satisfy the constraints Distance between F and (fixX,fixY) + Distance between M and (movX,movY) Smoothness term

  13. X: Measurement • From the click, we get a point T and a constraint C1 • X[0] = Tx - C1x • X[1] = Ty - C1y

  14. Part II (125 points) • You will implement it by yourself • Save key poses obtained by IK • Do Interpolation by Catmull-Rom • Display the interpolated motion

More Related