Paper Summaries � Any takers? Interpolation � Papers for interpolation… Projects Logistics � Proposals due Wednesday. � E-mail…. � Who didn’t get any? Jobs, Jobs, Jobs Plan for today � …and I don’t mean Steve! � Keyframing and Interpolation � Intel is looking for Graphics people � 2D � But first… � MPEG/video � 3D � For those graduating soon. � Resumes to Raun Krisch (by Friday) 1
Motivation Films Motivational Film � Two early attempts of significant use of � TRON CG elements in film � Disney (1982) � Clips shown at SIGGRAPH 82 Motivational Film Motivational Film � Interesting TRON Factoid � Question from SIGGRAPH Bowl � No polygons! � Q: Which special effects company was � All objects were defined using responsible for the effects of TRON? mathematical formula. � A: ALL OF THEM � Lesson Learned from TRON � MAGI � Great effects � Triple I � Bad movie � Robert Abel & Associates � Overestimated the “Geek Factor” � Digital Effects Motivational Film Motivational Film � The Last Starfighter (1985) � Last Starfighter factoids � First movie to do all special effects (except � Effects by Digital Productions makeup) on a computer. � Universal Pictures � All shots of spacecraft, space, etc. were generated on a Cray computer. � Lesson Learned from Last Starfighter � Great effects � Bad movie � Overestimated the “Geek Factor” 2
Motivational Film Let’s get started � Life imitating art imitating life… � Key framing and interpolation � Sort of… � A prototype for A Last Starfighter video game was produced by Atari (remember them?) but was never distributed. � Note that there WAS a TRON video game (made by Bally/Midway – 1983) 6. Straight ahead action and Pose-to-pose Key framing action � The two main approaches to hand drawn � The simplest form of animating an object. animation. � Object has: � Straight ahead action � A beginning state � “the animator works straight ahead from his first drawing in the scene.” � An end state � Pose-to-pose (keyframing) � A number of intermediate “key” states � the animator plans his actions, figures out just what � It is up to the keyframe system to determine drawings will be needed to animate the business, makes the drawings concentrating on the poses, ... and then the states for inbetween frames draws the inbetweens.” � Link Key Framing Key Framing � 60 sec animation P 4 � Video: 30 frames / sec = 1800 frames P 2 P 5 � We have 6 key frames Time = 50 Time = 10 Time = 55 P 1 � Need to create position of objects for the P 6 P 3 remaining 1794 frames. Time = 0 Time = 60 Time = 35 3
Interpolation Interpolation � Things to consider: � According to webster.com � Interpolation or approximation? � in·ter·po·late (n) - to estimate values of � Interpolation – Control points fall on the curve (a function) between two known values � Approximation – Control points fall outside the curve. � Note: “state” can be defined as a function � F(u) Interpolation Interpolation – Continuity � Things to consider: � Continuity – defines “smoothness” of curve. � Determined by how many derivatives are continuous No positional Order 0 2 nd order � 0 th order – are the curves attached at the points Order 1 continuity continuity themselves (positional continuity) Continuity continuity � 1 st order – is the first derivative continuous (tangential continuity) � 2 nd order – is the 2 nd derivative continuous (curvature For animation purposes, Tangential (1 st continuity) Order) continuity is usually sufficient Interpolation Interpolation � in·ter·po·late (n) - to estimate values of (a � Things to consider: function) between two known values � Local vs. Global control � Does changing one point change the entire � Function f (u) function? � u = interpolation control variable � Two known values � P 1 = f(0) � P 2 = f(1) � Questions? � Interpolation scheme will provide value of the function for u between 0 and 1 � Some interpolation schemes will require additional points to perform interpolation 4
Linear Interpolation Linear Interpolation � The simplest solution � Pros = − ⋅ + ⋅ � Straight-forward P ( u ) ( 1 u ) P u P 0 1 � Easy to implement P(u) P(1) = P 1 Also can be � Cons expressed as � Lacks tangential continuity = − ⋅ + P ( u ) ( P P ) u P 1 0 0 � Why is this important? P(0) = P 0 Remember our principles of Cubic Interpolation animation? � 8. Arcs � x, y, z given as function of u � “The visual path of action from one � Approximated by cubic polynomials extreme to another is always described by = + + + 3 2 x ( u ) a u b u c u d x x x x an arc.” = + + + 3 2 y ( u ) a u b u c u d y y y y = + + + 3 2 z ( u ) a u b u c u d z z z z This is not an arc! Cubic Interpolation Cubic Interpolation � Separate C matrix into basis + ⎡ ⎤ a a a y x z geometry ⎢ ⎥ [ ] b b b ⎢ ⎥ = ⎡ ⎤ = ⎡ ⎤ Q ( u ) x ( u ) y ( u ) z ( u ) x y z m m m m G G G C 11 12 13 14 1 x 1 y 1 z ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ c c c G m m m m G G y ⎢ ⎥ ⎢ ⎥ [ ] ⎢ x z ⎥ = 2 y 21 22 23 24 2 x 2 z C U = ⎢ ⎥ 3 2 ⎢ ⎥ ⎢ ⎥ u u u 1 ⎣ d d d ⎦ m m m m G G G x y z 31 32 33 34 ⎢ 3 x 3 y 3 z ⎥ ⎢ ⎥ ⎢ ⎥ ⎣ ⎦ G m m m m ⎣ G G ⎦ = ⋅ 4 y 1 4 41 4 4 4 42 2 4 43 4 4 4 44 3 1 4 2 4 4 x 4 3 4 4 z Q U C basis matrix control points 5
Cubic Interpolation Cubic Interpolation � Hermite Curves = ⋅ ⋅ � specified by endpoints and tangent vectors Q ( u ) U M G { { from each endpoint basis control � Basis & Control points distinguishes types of curves Cubic Interpolation Cubic Interpolation � Hermite Curves � Problem with Hermite Curves � Animator generally will not enjoy specifying − ⎡ ⎤ ⎡ ⎤ 2 2 1 1 P i ⎢ ⎥ ⎢ ⎥ tangent vectors − − − 3 3 2 1 P ⎢ ⎥ ⎢ ⎥ = = + i 1 M G ⎢ ⎥ H ⎢ ′ ⎥ H 0 0 1 0 P ⎢ ⎥ ⎢ i ⎥ ′ � Solution: The Catmull-Rom spline ⎣ ⎦ 1 0 0 0 ⎣ P ⎦ + i 1 Let’s go to the video tape Cubic Interpolation Cubic Interpolation � Catmull-Rom spline � Catmull-Rom � Uses previous and next control point to determine − − ⎡ ⎤ ⎡ ⎤ 1 3 3 1 P tangent vector − ⎢ ⎥ i 1 ⎢ ⎥ − − 1 2 5 4 1 P ⎢ ⎥ ⎢ ⎥ = = i M G ⎢ ⎥ CR − ⎢ ⎥ CR 2 1 0 1 0 P + ⎢ ⎥ i 1 ⎢ ⎥ ⎣ ⎦ 0 2 0 0 ⎣ ⎦ P + i 2 Note: for interpolation between P i and P i+1 you need 4 points � Spline goes through all control points! Let’s go to the video tape 6
Cubic Interpolation Cubic Interpolation � Bezier Curves � Bezier Curves � specified by endpoints and intermediate ⎡ − − ⎤ ⎡ ⎤ 1 3 3 1 P points, not on the curve, that approximate 0 ⎢ ⎥ ⎢ ⎥ − − 3 6 3 0 the tangent vectors ⎢ ⎥ P ⎢ ⎥ = = 1 M G H ⎢ − ⎥ ⎢ ⎥ B 3 3 0 0 P ⎢ ⎥ 2 ⎢ ⎥ ⎣ 1 0 0 0 ⎦ ⎣ P ⎦ 3 Let’s go to the video tape Cubic Interpolation Cubic Interpolation � Bezier Curves suffer from same problem as � B-Splines Hermite Curves � Control points are outside of the curve � Animator generally will not enjoy specifying � Local control tangent vectors…even from control points � Moving one control point only affects a portion � Exception: Provide animator with an interactive curve of the entire curve. editor � Individual curve segments share control � DeCasteljau Construction points. � Algorithm to automatically define Bezier control points � Knots - points connecting individual curve � Described in Parent Appendix and Shomake Quat. paper segments. Cubic Interpolation Cubic Interpolation � B-Splines � B-Splines - local control 7
Cubic Interpolation Cubic Interpolation � Segment Q i uses control points P i-3 , P i-2 , P i-1 and P i � B-Splines − − ⎡ ⎤ ⎡ ⎤ 1 3 3 1 P − i 3 ⎢ ⎥ ⎢ ⎥ − − 1 3 6 3 0 P ⎢ ⎥ ⎢ ⎥ = − = M i 2 G ⎢ ⎥ − ⎢ ⎥ B H 6 3 0 3 0 P − ⎢ ⎥ i 1 ⎢ ⎥ ⎣ ⎦ 1 4 1 0 ⎣ ⎦ P i Let’s go to the video tape Cubic Interpolation Cubic Interpolation � Rational Splines � Uniform Nonrational B-Splines � expressed using homogeneous coordinates � uniform - knots are equally spaced [ ] = � nonrational - does not use homogeneous Q ( u ) X ( u ) Y ( u ) Z ( u ) W ( u ) coordinates (more on this later) � B - basis -- curves are weighted sums of a ( ) ( ) ( ) X u Y u Z u = = = x ( u ) , y ( u ) , z ( u ) basis function W ( u ) W ( u ) W ( u ) Cubic Interpolation Cubic Interpolation � Rational splines -- why bother? � NURBS � Invariant under rotation, scaling, � Non-uniform Rational B-Splines translation, and perspective transforms � Non-uniform - knots need not be equally � Can define precisely any of the conic spaced. sections. (spheres, ellipsoids, parabolids, � Most useful and used method for etc) representing surface curves in CG. � Probably overkill for cubic interpolation 8
Recommend
More recommend