CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves Jinxiang Chai.

Slides:



Advertisements
Similar presentations
College of Computer and Information Science, Northeastern UniversityApril 12, CS G140 Graduate Computer Graphics Prof. Harriet Fell Spring 2007 Lecture.
Advertisements

Computer Graphics (Spring 2008) COMS 4160, Lecture 6: Curves 1
2002 by Jim X. Chen: Bezier Curve Bezier Curve.
COMPUTER GRAPHICS CS 482 – FALL 2014 OCTOBER 8, 2014 SPLINES CUBIC CURVES HERMITE CURVES BÉZIER CURVES B-SPLINES BICUBIC SURFACES SUBDIVISION SURFACES.
Lecture 10 Curves and Surfaces I
Animation Following “Advanced Animation and Rendering Techniques” (chapter 15+16) By Agata Przybyszewska.
Cubic Curves CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
CS 445/645 Fall 2001 Hermite and Bézier Splines. Specifying Curves Control Points –A set of points that influence the curve’s shape Knots –Control points.
CS 445 / 645 Introduction to Computer Graphics Lecture 22 Hermite Splines Lecture 22 Hermite Splines.
08/30/00 Dinesh Manocha, COMP258 Hermite Curves A mathematical representation as a link between the algebraic & geometric form Defined by specifying the.
Splines II – Interpolating Curves
Computer graphics & visualization Key frame Interpolation.
Curves Chiew-Lan Tai. Curves 2 Reading Required Hearn & Baker, 8-8 – 8-10, 8-12 Foley, 11.2.
Graphics Korea University Computer Animation Computer Graphics.
Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 24: Animation Many slides courtesy Adam Finkelstein,
CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves Jinxiang Chai.
1 7M836 Animation & Rendering Animation Jakob Beetz Joran Jessurun
Animation. Outline  Key frame animation  Hierarchical animation  Inverse kinematics.
Modelling: Curves Week 11, Wed Mar 23
Computer Animation In its simplest form, computer animation simply mean: using a standard renderer to produce consecutive frames wherein the animation.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Curves Week 13, Mon 24 Nov 2003.
Designing Parametric Cubic Curves
Animation CMSC 435/634. Keyframe Animation From hand drawn animation – Lead animator draws poses at key frames – Inbetweener draws frames between keys.
Lecture Fall 2001 Computer Animation Fundamentals Animation Methods Keyframing Interpolation Kinematics Inverse Kinematics.
Lecture 10Slide Fall 2003 Animation. Lecture 10Slide Fall 2003 Conventional Animation Draw each frame of the animation great control tedious.
1 7M836 Animation & Rendering Animation Jakob Beetz Joran Jessurun
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.
Interactive Graphics Lecture 9: Slide 1 Interactive Graphics Lecture 9: Introduction to Spline Curves.
CSC418 Computer Graphics n Animation Principles n Keyframe Animation.
Curves.
Review of Interpolation. A method of constructing a function that crosses through a discrete set of known data points.
Computer Graphics 2 In the name of God. Outline Introduction Animation The most important senior groups Animation techniques Summary Walking, running,…examples.
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,
Chapter VI Parametric Curves and Surfaces
June D Object Representation Shmuel Wimer Bar Ilan Univ., School of Engineering.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Computer Animation 고려대학교 컴퓨터 그래픽스 연구실.
CS559: Computer Graphics Lecture 19: Curves Li Zhang Spring 2008.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves Jinxiang Chai.
11/6/ :55 Graphics II Introduction to Parametric Curves and Surfaces Session 2.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Parametric Curves & Surfaces Greg Humphreys University of Virginia CS 445, Spring.
CISC 110 Day 3 Introduction to Computer Graphics.
CSCE 441: Keyframe Animation/Smooth Curves (Cont.) Jinxiang Chai.
CSCE 441: Keyframe Animation/Smooth Curves (Cont.) Jinxiang Chai.
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.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
College of Computer and Information Science, Northeastern UniversityFebruary 27, CS U540 Computer Graphics Prof. Harriet Fell Spring 2009 Lectures.
Curves University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
CS552: Computer Graphics Lecture 19: Bezier Curves.
Animation Animation is about bringing things to life Technically: –Generate a sequence of images that, when played one after the other, make things move.
CS552: Computer Graphics Lecture 18: Representing Cubic Splines.
Object Modeling: Curves and Surfaces CEng 477 Introduction to Computer Graphics.
Jinxiang Chai CSCE441: Computer Graphics Coordinate & Composite Transformations 0.
Introduction to Parametric Curve and Surface Modeling.
CSCI480/582 Lecture 9 Chap.2.2 Cubic Splines – Hermit and Bezier Feb, 11, 2009.
COMPUTER GRAPHICS CHAPTERS CS 482 – Fall 2017 SPLINES
CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves
Computer Animation cgvr.korea.ac.kr.
Computer Graphics Lecture 37
CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves
© University of Wisconsin, CS559 Spring 2004
Implicit Functions Some surfaces can be represented as the vanishing points of functions (defined over 3D space) Places where a function f(x,y,z)=0 Some.
UMBC Graphics for Games
CSCE 441: Keyframe Animation/Smooth Curves (Cont.)
Computer Animation Displaying animation sequences raster animation
Computer Graphics Lecture 15.
Type to enter a caption. Computer Graphics Week 10 Lecture 1.
Presentation transcript:

CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves Jinxiang Chai

Outline Keyframe interpolation Curve representation and interpolation - natural cubic curves - Hermite curves - Bezier curves Required readings: 12-6 & , & 14-7

Computer Animation Animation - making objects moving Compute animation - the production of consecutive images, which, when displayed, convey a feeling of motion.

Animation Topics Rigid body simulation - bouncing ball - millions of chairs falling down

Animation Topics Rigid body simulation - bouncing ball - millions of chairs falling down Natural phenomenon - water, fire, smoke, mud, etc.

Animation Topics Rigid body simulation - bouncing ball - millions of chairs falling down Natural phenomenon - water, fire, smoke, mud, etc. Character animation - articulated motion, e.g. full-body animation - deformation, e.g. face

Animation Topics Rigid body simulation - bouncing ball - millions of chairs falling down Natural phenomenon - water, fire, smoke, mud, etc. Character animation - articulated motion, e.g. full-body animation - deformation, e.g. face Cartoon animation

Animation Criterion Physically correct - rigid body-simulation - natural phenomenon Natural looking - character animation Expressive - cartoon animation

Keyframe Animation

Keyframe Interpolation Key frame interpolation in after effects (Click here)here

Spatial Key Framing Demo video (click here)here

Keyframe Interpolation IK can be used to create Key poses t=0 t=50ms

Keyframe Interpolation What’s the inbetween motion? t=0 t=50ms

Outline Process of keyframing Key frame interpolation Hermite and bezier curve Splines Speed control

2D Animation Highly skilled animators draw the key frames Less skilled (lower paid) animators draw the in- between frames Time consuming process Difficult to create physically realistic animation

Animating a Bouncing Ball Key frames

Animating Three Walking Steps Key frames

Playing Basketball

3D Animation Animators specify important key frames in 3D Computers generates the in-between frames Some dynamic motion can be done by computers (hair, clothes, etc) Still time consuming; Pixar spent four years producing Toy Story

3D Bouncing Ball

3D Jumping

The Process of Keyframing Specify the keyframes Specify the type of interpolation - linear, cubic, parametric curves Specify the speed profile of the interpolation - constant velocity, ease-in-ease-out, etc Computer generates the in-between frames

A Keyframe In 2D animation, a keyframe is usually a single image In 3D animation, each keyframe is defined by a set of parameters

Keyframe Parameters What are the parameters? –position and orientation –body deformation –facial features –hair and clothing –lights and cameras

Outline Process of keyframing Key frame interpolation Hermite and bezier curve Splines Speed control

Inbetween Frames Linear interpolation Cubic curve interpolation

Keyframe Interpolation t=0 t=50ms

Linear Interpolation Linearly interpolate the parameters between keyframes t x t0t0 t1t1 x0x0 x1x1

Linear Interpolation: Limitations Requires a large number of key frames when the motion is highly nonlinear.

Cubic Curve Interpolation We can use a cubic function to represent a 1D curve

Smooth Curves Controlling the shape of the curve

Smooth Curves Controlling the shape of the curve

Smooth Curves Controlling the shape of the curve

Smooth Curves Controlling the shape of the curve

Smooth Curves Controlling the shape of the curve

Smooth Curves Controlling the shape of the curve

Constraints on the cubics How many points do we need to determine a cubic curve?

Constraints on the Cubic Functions How many points do we need to determine a cubic curve?

Constraints on the Cubic Functions How many points do we need to determine a cubic curve? 4

Constraints on the Cubic Functions How many points do we need to determine a cubic curve? 4

Natural Cubic Curves Q(t 1 )Q(t 2 )Q(t 3 ) Q(t 4 )

Interpolation Find a polynomial that passes through specified values

Interpolation Find a polynomial that passes through specified values

Interpolation Find a polynomial that passes through specified values

Interpolation Find a polynomial that passes through specified values

2D Trajectory Interpolation Each point on the trajectory is associated with a time stamp t. Perform interpolation for each component separately Combine result to obtain parametric curve

2D Trajectory Interpolation Each point on the trajectory is associated with a time stamp t. Perform interpolation for each component separately Combine result to obtain parametric curve

2D Trajectory Interpolation Each point on the trajectory is associated with a time stamp t. Perform interpolation for each component separately Combine result to obtain parametric curve

Limitation? What’s the main limitation of interpolation using natural cubic curves?

Limitation? What’s the main limitation of interpolation using natural cubic curves? - does not provide local control of the curve

Constraints on the Cubic Curves What’s the main limitation of interpolation using natural cubic curves? - does not provide local control of the curve

Constraints on the Cubic Curves What’s the main limitation of interpolation using natural cubic curves? - does not provide local control of the curve Changes of any control point will change the shape of the whole curve!

Constraints on the Cubic Curves What’s the main limitation of interpolation using natural cubic curves? - does not provide local control of the curve Redefine C as a product of the basis matrix M and the control vector G: C= MG

Constraints on the cubic curves What’s the main limitation of interpolation using natural cubic curves? - does not provide local control of the curve Redefine C as a product of the basis matrix M and the control vector G: C= MG MG

Constraints on the Cubic Curves What’s the main limitation of interpolation using natural cubic curves? - does not provide local control of the curve Redefine C as a product of the basis matrix M and the control vector G: C= MG M G

Constraints on the Cubic Curves What’s the main limitation of interpolation using natural cubic curves? - does not provide local control of the curve Redefine C as a product of the basis matrix M and the control vector G: C= MG M? G?

Two Issues How to select a new set of control points for local control of the curve? How to determine M? M?

Outline Process of keyframing Key frame interpolation Hermite and bezier curve Splines Speed control

Hermite Curve A Hermite curve is determined by - endpoints P 1 and P 4 - tangent vectors R 1 and R 4 at the endpoints P1P1 R1R1 P4P4 R4R4

Hermite Curve A Hermite curve is determined by - endpoints P 1 and P 4 - tangent vectors R 1 and R 4 at the endpoints Use these elements to control the curve, i.e. construct control vector P1P1 R1R1 P4P4 R4R4 MhMh GhGh 0<=t<=1

Hermite Basis Matrix Given desired constraints: - endpoints meet P 1 and P 4 Q(0) = [ ] · M h · G h = P 1 Q(1) = [ ] · M h · G h = P 4 - tangent vectors meet R 1 and R 4

Tangent Vectors

Hermite Basis Matrix Given desired constraints: - endpoints meet P 1 and P 4 Q(0) = [ ] · M h · G h = P 1 Q(1) = [ ] · M h · G h = P 4 - tangent vectors meet R 1 and R 4 Q’(0) =[ ] · M h · G h =R 1 Q’(1) =[ ] · M h · G h =R 4

Hermite Basis Matrix Given desired constraints: - endpoints meet P 1 and P 4 Q(0) = [ ] · M h · G h = P 1 Q(1) = [ ] · M h · G h = P 4 - tangent vectors meet R 1 and R 4 Q’(0) =[ ] · M h · G h =R 1 Q’(1) =[ ] · M h · G h =R 4 So how to compute the basis matrix M h ?

Hermite Basis Matrix Taking them together Q(0) = [ ] · Mh · Gh = P1 Q(1) = [ ] · Mh · Gh = P4 Q’(0) = [ ] · Mh · Gh = R1 Q’(1) = [ ] · Mh · Gh = R4

Hermite Basis Matrix We can solve for basis matrix M h MhMh

Hermite Basis Matrix We can solve for basis matrix M h MhMh

Hermite Basis Matrix P1P1 R1R1 P4P4 R4R4

Bezier Curve Indirectly specify tangent vectors by specifying two intermediate points P1P1 P3P3 P2P2 P4P4

Bezier Curve Indirectly specify tangent vectors by specifying two intermediate points -The curve starts at P1 going towards P2 and Arrives at P4 coming from the direction P3 - usually does not pass through P2 or P3; these points are only there to provide directional information. P1P1 P3P3 P2P2 P4P4

Bezier Curve Indirectly specify tangent vectors by specifying two intermediate points P1P1 P3P3 P2P2 P4P4

Bezier Curve Indirectly specify tangent vectors by specifying two intermediate points How to compute the basis matrix M b ? P1P1 P3P3 P2P2 P4P4

Bezier Basis Matrix Establish the relation between Hermite and Bezier control vectors

Bezier Basis Matrix Establish the relation between Hermite and Bezier control vectors

Bezier Basis Matrix Establish the relation between Hermite and Bezier control vectors M hb GbGb

Bezier Basis Matrix For Hermite curves, we have For Bezier curves, we have

Bezier Basis Matrix For Hermite curves, we have For Bezier curves, we have

Bezier Basis Matrix P1P1 P3P3 P2P2 P4P4

Hermite Basis Function Let’s define B as a product of T and M B h (t) indicates the weight of each element in G h

Hermite Basis Function Let’s define B as a product of T and M B h (t) indicates the weight of each element in G h What’s function of this red curve?

Hermite Basis Function Let’s define B as a product of T and M B h (t) indicates the weight of each element in G h What’s function of this red curve? 2t 3 -3t 2 +1

Bezier Basis Functions Bezier blending functions are also called Bernstein polynomials

Bezier Basis Functions Bezier blending functions are also called Bernstein polynomials What’s function of this red curve?

Bezier Basis Functions Bezier blending functions are also called Bernstein polynomials What’s function of this red curve? B 1 = -t 3 +3t 2 -3t+1

Bezier Basis Functions Bezier blending functions are also called Bernstein polynomials What’s function of this red curve? B 2 = -t 3 +3t 2 -3t+1

Bezier Basis Functions Bezier blending functions are also called Bernstein polynomials What’s function of the Bezier curve? B 1 P 1 +B 2 P 2 +B 3 P 3 +B 4 P 4

How to interpolate a 3D curve x y z o

x y z o Bezier curve

Try this online at - Move the interpolation point, see how the others (and the point on curve) move - Control points (can even make loops) Bezier java applet

Cubic curves: Hermite curves: Bezier curves: Different basis functions

Complex curves Suppose we want to draw a more complex curve

Complex curves Suppose we want to draw a more complex curve How can we represent this curve?

Complex curves Suppose we want to draw a more complex curve Why not use a high-order Bézier? - Wiggly curves - No local control

Complex curves Suppose we want to draw a more complex curve Why not use a high-order Bézier? - Wiggly curves - No local control Instead, we’ll splice together a curve from individual segments that are cubic Béziers

Complex curves Suppose we want to draw a more complex curve Why not use a high-order Bézier? - Wiggly curves - No local control Instead, we’ll splice together a curve from individual segments that are cubic Béziers

Complex curves Suppose we want to draw a more complex curve Why not use a high-order Bézier? - Wiggly curves - No local control Instead, we’ll splice together a curve from individual segments that are cubic Béziers

Complex curves Suppose we want to draw a more complex curve Why not use a high-order Bézier? - Wiggly curves - No local control Instead, we’ll splice together a curve from individual segments that are cubic Béziers Why cubic? - Lowest dimension with control for the second derivative - Lowest dimension for non-planar polynomial curves

Next lecture Spline curve and more key frame interpolation