comp 304 computer graphics ii n.
Skip this Video
Loading SlideShow in 5 Seconds..
COMP 304 Computer Graphics II PowerPoint Presentation
Download Presentation
COMP 304 Computer Graphics II

COMP 304 Computer Graphics II

445 Views Download Presentation
Download Presentation

COMP 304 Computer Graphics II

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

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

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

  3. © M. Gokturk

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

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

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

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

  8. Conventional Animation Process © M. Gokturk

  9. Role of the Computer • In-betweening • artistic example: Hunger, Peter Foldes 1974 • Disney’s 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 • 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 © M. Gokturk

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

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

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

  13. Temporal Sampling • Film recording takes samples of an image at fixed time intervals • 24 frames per second for film • 30 frames per second for video • 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) © M. Gokturk

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

  15. Smooth Motion  Passive Physics • Clothing (Geri’s Game) • Water (Antz) • “Rigid” body physics (crashing space pods in Phantom Menace) Geri’s Game, Pixar Animation Studios © M. Gokturk See examples

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

  17. Smooth Motion  Active Physics and Simulation • Control an animated character as we would control a robot • behavior is simulated • a "control system" sends proper signals to the character’s "muscles" over time Mark Raibert’s leg lab at MIT © M. Gokturk

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

  19. Noise Motion • Motion capture (natural noise!) © M. Gokturk

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

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

  22. Camera Path Following  ways to deal with the view direction (2) • A path for the center of interest can be constructed, say from a series of buildings in an environment. • 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. © M. Gokturk

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

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

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

  26. Orientation along a path • It’s natural to change orientation as things move • Example: looking while walking • Look in the direction one walks • Tedious to specify orientations along the way • Want to get directly from the path © M. Gokturk

  27. Frenet frame (Moving frame) • 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 • Math: • Everything is normalized then © M. Gokturk

  28. © M. Gokturk

  29. © M. Gokturk

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

  31. Alternatives • Tangent vector is ok for objects • Poor choice for cameras • 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 © M. Gokturk

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

  33. © M. Gokturk

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

  35. Curvature continuity =0 © M. Gokturk

  36. Look ahead © M. Gokturk

  37. Define “look-at” vector © M. Gokturk

  38. Define “up” vector © M. Gokturk

  39. © M. Gokturk

  40. © M. Gokturk

  41. © M. Gokturk

  42. © M. Gokturk

  43. Kinematics X Dynamics © M. Gokturk

  44. Kinematics © M. Gokturk

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

  46. © M. Gokturk

  47. 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 © M. Gokturk

  48. Some robotics is required ! © M. Gokturk

  49. © M. Gokturk

  50. © M. Gokturk