Computer Animation Rick Parent Computer Animation Algorithms and Techniques Interpolating Values.

Slides:



Advertisements
Similar presentations
Arc-length computation and arc-length parameterization
Advertisements

Curves Jim Van Verth Essential Math for Games Animation Problem: want to replay stored set of transformations  Generated by.
Computer Graphics (Spring 2008) COMS 4160, Lecture 6: Curves 1
Parametric Curves Ref: 1, 2.
© University of Wisconsin, CS559 Spring 2004
2002 by Jim X. Chen: Bezier Curve Bezier Curve.
Geometric Modeling Notes on Curve and Surface Continuity Parts of Mortenson, Farin, Angel, Hill and others.
Cubic Curves CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2006.
Jehee Lee Seoul National University
1 Introduction Curve Modelling Jack van Wijk TU Eindhoven.
Computer Animation Algorithms and Techniques
Dr. S.M. Malaek Assistant: M. Younesi
1 Curves and Surfaces. 2 Representation of Curves & Surfaces Polygon Meshes Parametric Cubic Curves Parametric Bi-Cubic Surfaces Quadric Surfaces Specialized.
Computer graphics & visualization Key frame Interpolation.
Informationsteknologi Monday, December 10, 2007Computer Graphics - Class 161 Today’s class Curve fitting Evaluators Surfaces.
Chap 3 Interpolating Values
CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves Jinxiang Chai.
Organic Modeling Using Generalised Cylinders Nina Halim Supervisor: Dr. Jon McCormack.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 12: Spline Curves (review) Ravi Ramamoorthi Most material.
Modelling: Curves Week 11, Wed Mar 23
Assignment 1 Motion Interpolation Date: 2006/9/28 TA: 彭任右 EC 229B Ext:
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Curves Week 13, Mon 24 Nov 2003.
Rotation representation and Interpolation
Rotation and Orientation: Affine Combination Jehee Lee Seoul National University.
Motion Blending (Multidimensional Interpolation) Jehee Lee.
11/19/02 (c) 2002, University of Wisconsin, CS 559 Last Time Many, many modeling techniques –Polygon meshes –Parametric instancing –Hierarchical modeling.
A D V A N C E D C O M P U T E R G R A P H I C S CMSC 635 January 15, 2013 Spline curves 1/23 Curves and Surfaces.
CS 376 Introduction to Computer Graphics 04 / 23 / 2007 Instructor: Michael Eckmann.
This Week Week Topic Week 1 Week 2 Week 3 Week 4 Week 5
Curves.
Curves. First of all… You may ask yourselves “What did those papers have to do with computer graphics?” –Valid question Answer: I thought they were cool,
110/27/ :47 Graphics II Animation Introduction and Motion Control Session 6.
June D Object Representation Shmuel Wimer Bar Ilan Univ., School of Engineering.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Parametric Curves.
CS559: Computer Graphics Lecture 19: Curves Li Zhang Spring 2008.
CS 551/651 Advanced Graphics Arc Length. Assignment 1 Due Week from Thursday Building a Cubic Bézier curve OpenGL/Glut Insert up to 100 points Render.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves Jinxiang Chai.
Review CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2005.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Parametric Curves & Surfaces Greg Humphreys University of Virginia CS 445, Spring.
CS 551/651 Advanced Graphics Technical Background.
Rick Parent - CIS681 Interpolation and Basic Techniques Representing and interpolating orientations Interpolation Speed control along curve Path following.
Animating with Quaternions
Parametric Curves CS 318 Interactive Computer Graphics John C. Hart.
CSCE 441: Keyframe Animation/Smooth Curves (Cont.) Jinxiang Chai.
CSCE 441: Keyframe Animation/Smooth Curves (Cont.) Jinxiang Chai.
(c) 2002 University of Wisconsin
Designing Parametric Cubic Curves 1. 2 Objectives Introduce types of curves ­Interpolating ­Hermite ­Bezier ­B-spline Analyze their performance.
1 Graphics CSCI 343, Fall 2015 Lecture 34 Curves and Surfaces III.
Keyframe Interpolation and Speed Control Jehee Lee Seoul National University.
Splines Sang Il Park Sejong University. Particle Motion A curve in 3-dimensional space World coordinates.
CS 325 Computer Graphics 04 / 30 / 2010 Instructor: Michael Eckmann.
CS559 – Curves Lecture These are course notes (not used as slides) Written by Mike Gleicher, Oct Updates Oct 2006, 2007 Updates Oct 2008 © 2005 Michael.
Ship Computer Aided Design
Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 12: Curves 1
Rendering Bezier Curves (1) Evaluate the curve at a fixed set of parameter values and join the points with straight lines Advantage: Very simple Disadvantages:
Rick Parent - CIS681 Interpolation of a time-space curve Interpolation (of a curve in space) Speed control along curve Reparameterizing according to arc.
Curves University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
Object Modeling: Curves and Surfaces CEng 477 Introduction to Computer Graphics.
Introduction to Parametric Curve and Surface Modeling.
CSCI480/582 Lecture 9 Chap.2.2 Cubic Splines – Hermit and Bezier Feb, 11, 2009.
CSE 167 [Win 17], Lecture 9: Curves 1 Ravi Ramamoorthi
© University of Wisconsin, CS559 Fall 2004
Rotation representation and Interpolation
© University of Wisconsin, CS559 Spring 2004
Homework Aid: Cycloid Motion
Interpolation and Basic Techniques
CSCE 441: Keyframe Animation/Smooth Curves (Cont.)
Introduction to Parametric Curve and Surface Modeling
Presentation transcript:

Computer Animation Rick Parent Computer Animation Algorithms and Techniques Interpolating Values

Computer Animation Rick Parent Animation Animator specified interpolation key frame Algorithmically controlled Physics-based Behavioral Data-driven motion capture

Computer Animation Rick Parent 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

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

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

Computer Animation Rick Parent Interpolation v. Approximation

Computer Animation Rick Parent Complexity Low complexity reduced computational cost CUBIC polynomial Point of Inflection Can match arbitrary tangents at end points

Computer Animation Rick Parent Continuity

Computer Animation Rick Parent Local v. Global Control

Computer Animation Rick Parent Information requirements just the points tangents interior control points just beginning and ending tangents

Computer Animation Rick Parent Curve Formulations Piecewise cubic polynomials Hermite Catmull-Rom Blended Parabolas Bezier B-spline Tension-Continuity-Bias 4-Point Form Lagrange Polynomial

Computer Animation Rick Parent Lagrange Polynomial

Computer Animation Rick Parent 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? Geometric information Coefficient matrix Blending Functions Algebraic coefficient matrix

Computer Animation Rick Parent Hermite

Computer Animation Rick Parent Cubic Bezier Interior control points play the same role as the tangents of the Hermite formulation

Computer Animation Rick Parent Blended Parabolas/Catmull-Rom* * End conditions are handled differently

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

Computer Animation Rick Parent Reparameterizing by Arc Length Analytic Forward differencing Supersampling Adaptive approach Numerically Adaptive Gaussian

Computer Animation Rick Parent Reparameterizing by Arc Length - analytic Can’t always be solved analytically for our curves

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

Computer Animation Rick Parent indexuArc Length Build table of approx. lengths

Computer Animation Rick Parent 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

Computer Animation Rick Parent Reparameterizing by Arc Length - quadrature Lookup tables of weights and parametric values Can also take adaptive approach here

Computer Animation Rick Parent Reparameterizing by Arc Length Analytic Forward differencing Supersampling Adaptive approach Numerically Adaptive Gaussian Sufficient for many problems

Computer Animation Rick Parent Speed Control Time-distance function Ease-in Cubic polynomial Sinusoidal segment Segmented sinusoidal Constant acceleration General distance-time functions time distance

Computer Animation Rick Parent Time Distance Function s = S(t) s t S

Computer Animation Rick Parent Ease-in/Ease-out Function s = S(t) s t S Normalize distance and time to 1.0 to facilitate reuse

Computer Animation Rick Parent Ease-in: Sinusoidal

Computer Animation Rick Parent Ease-in: Piecewise Sinusoidal

Computer Animation Rick Parent Ease-in: Piecewise Sinusoidal Provides linear (constant velocity) middle segment

Computer Animation Rick Parent Ease-in: Single Cubic

Computer Animation Rick Parent Ease-in: Constant Acceleration

Computer Animation Rick Parent Ease-in: Constant Acceleration

Computer Animation Rick Parent Ease-in: Constant Acceleration

Computer Animation Rick Parent Ease-in: Constant Acceleration

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

Computer Animation Rick Parent Curve fitting to distance-time pairs

Computer Animation Rick Parent Working with time-distance curves

Computer Animation Rick Parent Interpolating distance-time pairs

Computer Animation Rick Parent Frenet Frame – control orientation

Computer Animation Rick Parent Frenet Frame tangent & curvature vector

Computer Animation Rick Parent Frenet Frame tangent & curvature vector

Computer Animation Rick Parent Frenet Frame tangent & curvature vector

Computer Animation Rick Parent 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)

Computer Animation Rick Parent Frenet Frame - undefined

Computer Animation Rick Parent Frenet Frame - discontinuity

Computer Animation Rick Parent Other ways to control orientation Use point P(s+ds) for direction Use auxiliary curve to define direction or up vector

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

Computer Animation Rick Parent Orientation interpolation Preliminary note: 1. Remember that 2. Affects of scale are divided out by the inverse appearing in quaternion rotation 3.When interpolating quaternions, use UNIT quaternions – otherwise magnitudes can interfere with spacing of results of interpolation

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

Computer Animation Rick Parent Dual representation Dual unit quaternion representations For Interpolation between q1 and q2, compute cosine between q1 and q2 and between q1 and –q2; choose smallest angle

Computer Animation Rick Parent Interpolating quaternions Linearly interpolating unit quaternions: not equally spaced Unit quaternions form set of points on 4D sphere

Computer Animation Rick Parent Interpolating quaternions in great arc => equal spacing

Computer Animation Rick Parent Interpolating quaternions ‘slerp’, sphereical linear interpolation is a function of the beginning quaternion orientation, q1 the ending quaternion orientation, q2 the interpolant, u where

Computer Animation Rick Parent Smooth Orientation interpolation Use quaternions Interpolate along great arc (in 4-space) using cubic Bezier on sphere 1. Select representation to use from duals 2. Construct interior control points for cubic Bezier 3. use DeCastelajue construction of cubic Bezier

Computer Animation Rick Parent Smooth quaternion interpolation How to smoothly interpolate through orientations q 1, q 2, q 3,…q n Similar to first order continuity desires with positional interpolation Bezier interpolation – geometric construction

Computer Animation Rick Parent Bezier interpolation

Computer Animation Rick Parent Bezier interpolation Construct interior control points p n-1 pnpn p n+1 p n+2 anan tntn p n-1 pnpn p n+1 p n+2 anan bnbn p n-1 pnpn p n+1 p n+2 anan t n+1 a n+1 b n+1 p2p2 p1p1 p0p0 a0a0

Computer Animation Rick Parent Quaternion operators Similar to forming a vector between 2 points, form the rotation between 2 orientations Given 2 orientations, form result of applying rotation between the two to 2 nd orientation q1q1 q2q2 q1q1 q2q2 qdqd double(q 1, q 2 ) bisect(q 1, q 2 ) qbqb

Computer Animation Rick Parent Quaternion operators Bisect 2 orientations: p q

Computer Animation Rick Parent Bezier interpolation Need quaternion-friendly operators to form interior control points

Computer Animation Rick Parent Bezier interpolation Construct interior control points Bezier segment: q n, a n, b n+1, q n+1 p n-1 pnpn p n+1 p n+2 anan tntn p n-1 pnpn p n+1 p n+2 anan bnbn p n-1 pnpn p n+1 p n+2 anan t n+1 a n+1 b n+1

Computer Animation Rick Parent Bezier construction using quaternion operators Need quaternion-friendly operations to interpolate cubic Bezier curve using ‘quaternion’ points de Casteljau geometric construction algorithm

Computer Animation Rick Parent Bezier construction using quaternion operators t 1 =slerp(q n, a n,1/3) t 2 =slerp(a n, b n+1,1/3) t 3 =slerp(b n+1, q n+1,1/3) t 12 =slerp(t 1, t 2,1/3) t 23 =slerp(t 12, t 23,1/3) q=slerp(t 12, t 23,1/3)

Computer Animation Rick Parent Working with paths Smoothing a path Determining a path along a surface Finding downhill direction

Computer Animation Rick Parent Smoothing data

Computer Animation Rick Parent Smoothing data

Computer Animation Rick Parent Smoothing data

Computer Animation Rick Parent Smoothing data

Computer Animation Rick Parent Smoothing data

Computer Animation Rick Parent Smoothing data

Computer Animation Rick Parent Smoothing data

Computer Animation Rick Parent Smoothing data

Computer Animation Rick Parent Smoothing data

Computer Animation Rick Parent Smoothing data

Computer Animation Rick Parent Smoothing data

Computer Animation Rick Parent Smoothing data

Computer Animation Rick Parent Path finding

Computer Animation Rick Parent Path finding - downhill