1 / 79

Computer Animation Algorithms and Techniques

Computer Animation Algorithms and Techniques. Interpolating Values. Animation. Animator specified interpolation key frame Algorithmically controlled Physics-based Behavioral Data-driven motion capture. Motivation. Common problem: given a set of points

Télécharger la présentation

Computer Animation Algorithms and Techniques

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. Computer AnimationAlgorithms and Techniques Interpolating Values

  2. Animation Animator specified interpolation key frame Algorithmically controlled Physics-based Behavioral Data-driven motion capture

  3. Motivation Common problem: given a set of points Smoothly (in time and space) move an object through the set of points Example additional temporal constraints: From zero velocity at first point, smoothly accelerate until time t1, hold a constant velocity until time t2, then smoothly decelerate to a stop at the last point at time t3

  4. Motivation – solution steps 1. Construct a space curve that interpolates the given points with piecewise first order continuity p=P(u) 2. Construct an arc-length-parametric-value function for the curve u=U(s) 3. Construct time-arc-length function according to given constraints s=S(t) p=P(U(S(t)))

  5. Interpolating function Interpolation v. approximation Complexity: cubic Continuity: first degree (tangential) Local v. global control: local Information requirements: tangents needed?

  6. Interpolation v. Approximation

  7. Complexity Low complexity reduced computational cost Point of Inflection Can match arbitrary tangents at end points CUBIC polynomial

  8. Continuity

  9. Local v. Global Control

  10. Information requirements just the points tangents interior control points just beginning and ending tangents

  11. Curve Formulations Lagrange Polynomial Piecewise cubic polynomials Hermite Catmull-Rom Blended Parabolas Bezier B-spline Tension-Continuity-Bias 4-Point Form

  12. Lagrange Polynomial

  13. Polynomial Curve Formulations Need to match real-world data v. design from scratch Information requirements: just points? tangents? Qualities of final curve? Intuitive enough? Other shape controls? Blending Functions Algebraic coefficient matrix Geometric information Coefficient matrix

  14. Hermite

  15. Cubic Bezier Interior control points play the same role as the tangents of the Hermite formulation

  16. Blended Parabolas/Catmull-Rom* * End conditions are handled differently

  17. Controlling Motion along p=P(u) Step 2. Reparameterization by arc length u = U(s) where s is distance along the curve Step 3. Speed control for example, ease-in / ease-out s = ease(t) where t is time

  18. Reparameterizing by Arc Length Analytic Forward differencing Supersampling Adaptive approach Numerically Adaptive Gaussian

  19. Reparameterizing by Arc Length - analytic Can’t always be solved analytically for our curves

  20. Reparameterizing by Arc Length - supersample • Calculate a bunch of points at small increments in u • Compute summed linear distances as approximation to arc length • Build table of (parametric value, arc length) pairs • Notes • Often useful to normalize total distance to 1.0 • Often useful to normalize parametric value for multi-segment curve to 1.0

  21. Build table of approx. lengths

  22. Adaptive Approach How fine to sample? Compare successive approximations and see if they agree within some tolerance Test can fail – subdivide to predefined level, then start testing

  23. Reparameterizing by Arc Length - quadrature Lookup tables of weights and parametric values Can also take adaptive approach here

  24. Reparameterizing by Arc Length Analytic Forward differencing Supersampling Adaptive approach Numerically Adaptive Gaussian Sufficient for many problems

  25. Speed Control distance • Time-distance function • Ease-in • Cubic polynomial • Sinusoidal segment • Segmentedsinusoidal • Constant acceleration • General distance-time functions time

  26. Time Distance Function S s s = S(t) t

  27. Ease-in/Ease-out Function S s 1.0 s = S(t) 0.0 1.0 t 0.0 Normalize distance and time to 1.0 to facilitate reuse

  28. Ease-in: Sinusoidal

  29. Ease-in: Piecewise Sinusoidal

  30. Ease-in: Piecewise Sinusoidal Provides linear (constant velocity) middle segment

  31. Ease-in: Single Cubic

  32. Ease-in: Constant Acceleration

  33. Ease-in: Constant Acceleration

  34. Ease-in: Constant Acceleration

  35. Ease-in: Constant Acceleration

  36. Arbitrary Speed Control Animators can work in: Distance-time space curves Velocity-time space curves Acceleration-time space curves Set time-distance constraints etc.

  37. Curve fitting to distance-time pairs

  38. Working with time-distance curves

  39. Interpolating distance-time pairs

  40. Frenet Frame – control orientation

  41. Frenet Frame tangent & curvature vector

  42. Frenet Frame tangent & curvature vector

  43. Frenet Frame tangent & curvature vector

  44. Frenet Frame local coordinate system • Directly control orientation of object/camera • Use for direction and bank into turn, especially for ground-planar curves (e.g. roads)

  45. Frenet Frame - undefined

  46. Frenet Frame - discontinuity

  47. Other ways to control orientation Use auxiliary curve to define direction or up vector Use point P(s+ds) for direction

  48. Direction & Up vector To keep ‘head up’, use y-axis to compute over and up vectors perpendicular to direction vector v = u x w w If up vector supplied, use instead of y-axis u=w x y-axis Direction vector

  49. Orientation interpolation • Preliminary note: • Remember that • Affects of scale are divided out by the inverse appearing in quaternion rotation • When interpolating quaternions, use UNIT quaternions – otherwise magnitudes can interfere with spacing of results of interpolation

  50. Orientation interpolation Quaternions can be interpolated to produce in-between orientations: • 2 problems analogous to issues when interpolating positions: • How to take equi-distant steps along orientation path? • How to pass through orientations smoothly (1st order continuous) 3. And another particular to quaternions: with dual unit quaternion representations, which to use?

More Related