Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMP 304 Computer Graphics II LECTURE 8 MOTION CONTROL – FORWARD KINEMATICS Dr. Mehmet Gokturk Asst. Prof., Gebze Institute of Technology.

Similar presentations

Presentation on theme: "COMP 304 Computer Graphics II LECTURE 8 MOTION CONTROL – FORWARD KINEMATICS Dr. Mehmet Gokturk Asst. Prof., Gebze Institute of Technology."— Presentation transcript:

1 COMP 304 Computer Graphics II LECTURE 8 MOTION CONTROL – FORWARD KINEMATICS Dr. Mehmet Gokturk Asst. Prof., Gebze Institute of Technology

2 © M. Gokturk2 Some Timeline The Illusion of Motion n 1824, Peter Mark Roget," Persistence of Vision with Regard to Moving Objects n a series of images shown in rapid sequence can appear to move fluidly (i.e. a flip book or film projector)

3 © M. Gokturk3

4 4 Timeline Movies n (1895) age of movie camera and projector begins –experimentors discover they can stop the crank and restart it again to obtain special effects n (1914) Gertie, Windsor McCay (newspaper cartoonist) –first popular animation n (1928) Steamboat Willie, Disney –an early cartoon w/ sound –cartoons seem plausible as entertainment n (1933) King Kong, Willis OBrien n (1930s & 40s) Golden age of cartoons –Betty Boop, Popeye, Porky Pig, Daffy Duck, Bugs Bunny, Woody Woodpecker, Mighty Mouse, Tom & Jerry n (1937) Snow White, Disney –animated feature film –cost is $1.5M

5 © M. Gokturk5 Timeline Movies (cont) n (1982) Tron, MAGI –movie with a computer graphics premise n (1984) Last Starfighter –computer graphics was used interchangably with actual models of the spaceship n (1993) Jurassic Park –computer graphics is used to create living creatures that are meant to appear realistic n (1995) Toy Story, Pixar –full-length feature film done entirely with 3D computer animation n (2000) CyberWorld 3D, IMAX –3D IMAX full-length feature film including characters from popular 3D movies such as ANTZ and The Simpsons Homer

6 © M. Gokturk6 Conventional Animation Techniques n Drawing on film n Multiple drawings n Rotoscoping (project film of real actors onto drawing paper) n Stop motion animation n Acetate cels, multiple plane cells

7 © M. Gokturk7 Conventional Animation Process n Storyboard n Key frames drawn – Straight ahead vs. pose-to-pose n Intermediate frames filled in (inbetweening) n Trial film is made (called a pencil test) n Pencil test frames transferred to cels

8 © M. Gokturk8 Conventional Animation Process

9 © M. Gokturk9 Role of the Computer n In-betweening – artistic example: Hunger, Peter Foldes 1974 n Disneys CAPS system – scanned artist drawings are read in – "cels" are colored online (broad color palette, exact color matching) – compositing is done online (background, 2D drawings, 3D animation) – 3D effects can be created with 2D drawings (e.g. Beauty and the Beast) – used in every film since Beauty & Beast n 3D graphical worlds – can experiment more easily with actor position, camera position – can perform more complex camera moves – exchange labor to create drawings with labor to build and animate 3D world

10 © M. Gokturk10 3D Animation n 3D animation is similar to stop motion animation King Kong (1932) Flash Gordon (1972)

11 © M. Gokturk11 3D Animation n Stop motion animation (Nightmare Before Christmas) n 3D keyframing (Luxo Jr.) n Performance animation and motion capture (Donkey Kong Country) n Which must be done straight-ahead and which can be animated pose-topose?

12 © M. Gokturk12 Keyframing n Key frames mark important visual transitions (extremes of action) n Inbetweening is creation of intermediate frames between the key frames n Can easily be calculated by computer

13 © M. Gokturk13 Temporal Sampling n Film recording takes samples of an image at fixed time intervals –24 frames per second for film –30 frames per second for video n human eye "sees" continuous motion Sometimes, fewer keyframes are required to describe the motion, especially for pencil tests or rough choreography (e.g., Lost World)

14 © M. Gokturk14 n No internal energy source and move only when an external force acts on them. n Read for use when: –physical laws encoded –initial conditions specified n Pools of water, clothing, hair, leaves Smooth Motion Passive Physics

15 © M. Gokturk15 n Clothing (Geris Game) n Water (Antz) n Rigid body physics (crashing space pods in Phantom Menace) Geris Game, Pixar Animation Studios Smooth Motion Passive Physics See examples

16 © M. Gokturk16 n User specifies keyframes (start, end, middle) n User specifies constraints (e.g. laws of physics) n System searches for minimum energy motion to accomplish goals A. Witkin and M. Kass, Spacetime Constraints, SIGGRAPH 88. Smooth Motion Active Physics

17 © M. Gokturk17 Smooth Motion Active Physics and Simulation n Control an animated character as we would control a robot n behavior is simulated n a "control system" sends proper signals to the characters "muscles" over time Mark Raiberts leg lab at MIT http ://http ://

18 © M. Gokturk18 Noise Motion n We generally dont want motion to be too smooth n The eye picks up symmetries and smooth curves and interprets them as artificial or fake n By adding noise, we can add texture to smooth motion K. Perlin, An Image Synthesizer, Computer Graphics, 19(3), July Perlin, Improv system (K. Perlin and A. Goldberg, SIGGRAPH 96). Applets:

19 © M. Gokturk19 Noise Motion n Motion capture (natural noise!)

20 © M. Gokturk20 Camera Path Following n A simple type of animation everything remains static except the camera (walk throughs or flybys). n The camera just as any other object as far as orientation and positioning is concerned. n The user needs to construct a path through space for the observer to follow along with orientation information. n Path = key frame positioning + interpolation of the inbetween frames. Path

21 © M. Gokturk21 Camera Path Following ways to deal with the view direction (1) n The center of interest can be held constant while observer position is interpolated along a curve n View Direction Vector between the observer position (POS) and the center of interest (COI) n This is useful when the observer is flying over an environment inspecting a specific location such as a building.

22 © M. Gokturk22 Camera Path Following ways to deal with the view direction (2) n A path for the center of interest can be constructed, say from a series of buildings in an environment. n Often, the animator will want the center of interest to stay focused on one building for a few frames before it goes to the next building.

23 © M. Gokturk23 Camera Path Following ways to deal with the view direction (3) n Alternatively, the center of interest can be controlled by other points along the observer path. n For example, observer position for the next frame can be used to determine the view direction for the current frame. n Sometimes this is too jerky. Some nth frame beyond the current frame can be used to produce a smoother view direction.

24 © M. Gokturk24 Camera Path Following ways to deal with the view direction (4) n The center of interest can also be attached to objects in the animation.

25 © M. Gokturk25 Path following n Have position and orientation interpolation for key framing now n Combining them, get general motions of rigid objects –Add scaling, get stretching/squashing n Path following: –Have keys only for position –how to change orientation naturally n Same techniques for camera motion

26 © M. Gokturk26 Orientation along a path n Its natural to change orientation as things move n Example: looking while walking –Look in the direction one walks n Tedious to specify orientations along the way n Want to get directly from the path

27 © M. Gokturk27 Frenet frame (Moving frame) n At each point on the curve: –Get Tangent vector –Get vector in general curvature direction In the plane of tangent and curvature vector –Vector orthogonal to the two n Math: n Everything is normalized then

28 © M. Gokturk28

29 © M. Gokturk29

30 © M. Gokturk30 Frenet frame n Curvature can be zero along extended parts –Example: straight line n Solution: interpolate boundary frames –Differ only by rotation around the straight line n Zero curvature at a point: –Possible flip (ex. camera flips upside down) n Discontinuities in curvature: –Sudden changes of object orientation n These effects are NOT tolerable

31 © M. Gokturk31 Alternatives n Tangent vector is ok for objects –Poor choice for cameras n For cameras: Look at the center of interest –Fixed COI: Always look at particular point –Separate path for COI Can animate this point separately using extra key positions

32 © M. Gokturk32 Alternatives n COI (center of interest) travels in front of the camera –COI(s)=P(s+ds) –At the end, along the final tangent vector n Choose several ds, average –Smoothes motion –Trade-off: jerky motion vs. too static view direction n Up vector: –In the plane of view vector and global UP vector –Extra offset from this direction –Full key framing

33 © M. Gokturk33

34 © M. Gokturk34 Path Following w = P(u) P(u) u = P(u) x P(u) v = w x u Frenet Frame

35 © M. Gokturk35 Curvature continuity =0

36 © M. Gokturk36 Look ahead

37 © M. Gokturk37 Define look-at vector

38 © M. Gokturk38 Define up vector

39 © M. Gokturk39

40 © M. Gokturk40

41 © M. Gokturk41

42 © M. Gokturk42

43 © M. Gokturk43 Kinematics X Dynamics

44 © M. Gokturk44 Kinematics

45 © M. Gokturk45 Kinematics n Keyframing requires that the user supply the key frames n For articulated figures, we need a way to define the key frames n There are two ways to pose an articulated character – forward and inverse kinematics n Kinematics is the study of motion without regard to the forces that cause the motion Kinematics

46 © M. Gokturk46

47 © M. Gokturk47 Articulated Models Articulated models : –rigid parts –connected by joints They can be animated by specifying the joint angles (or other display parameters) as functions of time. See example animation clips

48 © M. Gokturk48 Some robotics is required !

49 © M. Gokturk49

50 © M. Gokturk50

51 © M. Gokturk51 Drawing Articulated Figures

52 © M. Gokturk52 Static Figure Transformations

53 © M. Gokturk53 Forward Kinematics Control

54 © M. Gokturk54 Example: 2-Link Structure

55 © M. Gokturk55 Forward Kinematics

56 © M. Gokturk56 Forward Kinematics

57 © M. Gokturk57 Forward Kinematics

58 © M. Gokturk58 Forward Kinematics

59 © M. Gokturk59 Forward Kinematics Hierarchical model - joints and links Joints - 1, 2, or 3 Degree of Freedom Joints - rotational or prismatic Links - displayable objects Pose - setting parameters for all joint DoFs Pose Vector - a complete set of joint parameters

60 © M. Gokturk60

61 © M. Gokturk61 T data R S Forward Kinematics

62 © M. Gokturk62 T1.1 T2.1 T1.2 T2.2 T0 R2.2 R1.2 R2.1 R1.1 User modifies Rotation (new pose vector) Re-traverse tree To get new pose Transformations at the arcs

63 © M. Gokturk63 Forward Kinematics Describes the positions of the body parts as a function of the joint angles. 1 DOF: knee 2 DOF: wrist 3 DOF: arm

64 © M. Gokturk64 q Degree of Freedom DOF Joint Limits Joint Representation

65 © M. Gokturk65 Degrees of Freedom Joint Limits Multiple q y w gimbal lock Axis-angle quaternions Joint Representation

66 © M. Gokturk66 Note User interface representation may not be the same used for internal representation and operations q y w Joint Representation

67 © M. Gokturk67

68 © M. Gokturk68 Drawing Articulated Figure

69 © M. Gokturk69

70 © M. Gokturk70

71 © M. Gokturk71

72 © M. Gokturk72 Standard method of describing relationship of one DOF to next Used extensively in robotics Used in some early animation systems Multiple DOF joints represented by zero-length parameters Denavit and Hartenberg

73 © M. Gokturk73

74 © M. Gokturk74

75 © M. Gokturk75

76 © M. Gokturk76

77 © M. Gokturk77

78 © M. Gokturk78

79 © M. Gokturk79 Skeleton Hierarchy hips r-thigh r-calf r-foot left-leg... n Each bone transformation described relative to the parent in the hierarchy:

80 © M. Gokturk80 Forward Kinematics vsvs y x z vsvs vsvs n Transformation matrix for a sensor/effecter v s is a matrix composition of all joint transformation between the sensor/effecter and the root of the hierarchy.

81 © M. Gokturk81 Example (1) : Manipulator + 3 Revolute Joints

82 © M. Gokturk82 Example (2) : (1) + Ball-and-Socket Joint

83 © M. Gokturk83 Four link deep appendage with a branch after the second link The first and third links have two degrees of freedom, the others have one. The first frame is defined by rotation angles ((0,0),0,[(30,0),-15],[(-30,0),15] The last frame is defined by rotation angles ((-30,60),-80,[(90,30),-135],[(-90,30),135]

84 © M. Gokturk84

85 © M. Gokturk85

86 © M. Gokturk86

87 © M. Gokturk87

88 © M. Gokturk88

89 © M. Gokturk89

90 © M. Gokturk90 Summary

Download ppt "COMP 304 Computer Graphics II LECTURE 8 MOTION CONTROL – FORWARD KINEMATICS Dr. Mehmet Gokturk Asst. Prof., Gebze Institute of Technology."

Similar presentations

Ads by Google