Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves

Similar presentations


Presentation on theme: "CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves"— Presentation transcript:

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

2 Outline Keyframe interpolation Curve representation and interpolation
- natural cubic curves - Hermite curves - Bezier curves Required readings: HB 8-8,8-9, 8-10

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

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

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

6 Animation Topics - articulated motion, e.g. full-body animation
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

7 Animation Topics - articulated motion, e.g. full-body animation
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

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

9 Keyframe Animation

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

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

12 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

13 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 to produce Toy Story

14 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

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

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

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

18 Inbetween Frames Linear interpolation Cubic curve interpolation

19 Keyframe Interpolation
t=50ms t=0

20 Linear Interpolation Linearly interpolate the parameters between keyframes x1 x x0 t0 t t1

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

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

23 Smooth Curves Controlling the shape of the curve

24 Smooth Curves Controlling the shape of the curve

25 Smooth Curves Controlling the shape of the curve

26 Smooth Curves Controlling the shape of the curve

27 Smooth Curves Controlling the shape of the curve

28 Smooth Curves Controlling the shape of the curve

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

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

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

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

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

34 Natural Cubic Curves Q(t1) Q(t2) Q(t3) Q(t4)

35 Interpolation Find a polynomial that passes through specified values

36 Interpolation Find a polynomial that passes through specified values

37 Interpolation Find a polynomial that passes through specified values

38 Interpolation Find a polynomial that passes through specified values

39 Interpolation Find a polynomial that passes through specified values

40 2D Trajectory Interpolation
Perform interpolation for each component separately Combine result to obtain parametric curve

41 2D Trajectory Interpolation
Perform interpolation for each component separately Combine result to obtain parametric curve

42 2D Trajectory Interpolation
Perform interpolation for each component separately Combine result to obtain parametric curve

43 Constraints on the Cubic Curves
How many constraints do we need to determine a cubic curve? 4 - does not provide local control of the curve

44 Constraints on the Cubic Curves
How many constraints do we need to determine a cubic curve? 4 - 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

45 Constraints on the cubic curves
How many constraints do we need to determine a cubic curve? 4 - 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

46 Constraints on the Cubic Curves
How many constraints do we need to determine a cubic curve? 4 - 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

47 Constraints on the Cubic Curves
How many constraints do we need to determine a cubic curve? 4 - 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?

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

49 Hermite Curve - endpoints P1 and P4 A Hermite curve is determined by
- tangent vectors R1 and R4 at the endpoints R1 P4 R4 P1

50 Hermite Curve - endpoints P1 and P4 A Hermite curve is determined by
- tangent vectors R1 and R4 at the endpoints Use these elements to control the curve, i.e. construct control vector R1 P4 R4 P1 Mh Gh

51 Hermite Basis Matrix - endpoints meet P1 and P4
Given desired constraints: - endpoints meet P1 and P4 Q(0) = [ ] · Mh · Gh = P1 Q(1) = [ ] · Mh · Gh = P4 - tangent vectors meet R1 and R4

52 Tangent Vectors

53 Tangent Vectors

54 Hermite Basis Matrix - endpoints meet P1 and P4
Given desired constraints: - endpoints meet P1 and P4 Q(0) = [ ] · Mh · Gh = P1 Q(1) = [ ] · Mh · Gh = P4 - tangent vectors meet R1 and R4 Q’(0) =[ ] · Mh · Gh =R1 Q’(1) =[ ] · Mh · Gh =R4

55 Hermite Basis Matrix - endpoints meet P1 and P4
Given desired constraints: - endpoints meet P1 and P4 Q(0) = [ ] · Mh · Gh = P1 Q(1) = [ ] · Mh · Gh = P4 - tangent vectors meet R1 and R4 Q’(0) =[ ] · Mh · Gh =R1 Q’(1) =[ ] · Mh · Gh =R4 So how to compute the basis matrix Mh?

56 Hermite Basis Matrix We can solve for basis matrix Mh Mh

57 Hermite Basis Matrix We can solve for basis matrix Mh Mh

58 Hermite Basis Matrix P1 R1 P4 R4

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

60 Bezier Curve Indirectly specify tangent vectors by specifying two intermediate points R1 P2 P3 P4 P1 R2

61 Bezier Curve Indirectly specify tangent vectors by specifying two intermediate points R1 P2 P3 P4 P1 R4

62 Bezier Curve Indirectly specify tangent vectors by specifying two intermediate points R1 P2 P3 P4 P1 R4 How to compute the basis matrix Mb?

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

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

65 Bezier Basis Matrix Establish the relation between Hermite and Bezier control vectors Mhb Gb

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

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

68 Bezier Basis Matrix P2 P1 P4 P3

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

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

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

72 Bezier Basis Functions
Bezier blending functions are also called Bernstein polynomials

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

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

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

76 How to interpolate a 3D curve
y o x z

77 How to interpolate a 3D curve
y o x z Bezier curve

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

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

80 Complex curves Suppose we want to draw a more complex curve

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

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

83 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

84 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

85 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

86 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

87 Next lecture Spline curve and more key frame interpolation


Download ppt "CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves"

Similar presentations


Ads by Google