Computer Animation CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2004 CSE169 (was 190B) Computer Animation Programming Instructor: Steve Rotenberg steve@graphics.ucsd.edu TA: Nick Gebbie Lecture: Center Hall 222 (TTh 6:30-7:50pm) Office: AP&M 3349A (TTh 5-6pm) Lab: AP&M 2444 Web page: http://graphics.ucsd.edu/courses/cse169_w04/index.html Prerequisites CSE167 or equivalent introduction to computer graphics Familiarity with: Vectors (dot products, cross products…) Matrices (4x4 homogeneous transformations) Polygon rendering Basic lighting (normals, Gouraud, Phong…) OpenGL, Direct3D, Java3D, or equivalent C++ or Java Object oriented programming Basic physics Undergraduate Computer Graphics at UCSD CSE 167: Introduction to Computer Graphics CSE 168: Rendering Algorithms CSE 169: Computer Animation Reading Papers Chapters Suggested books 3D Computer Graphics: A Mathematical Introduction with OpenGL (Buss) Advanced Animation and Rendering Techniques (Watt & Watt) Angel Studios Movies: Videos: Peter Gabriel’s “Kiss That Frog” Games: The Lawnmower Man Enertopia (stereoscopic IMAX) Midnight Club 1 & 2 (PS2, XBox) Transworld Surf (PS2, XBox, GameCube) Smuggler’s Run 1 & 2 (PS2, XBox, GameCube) Midtown Madness 1 & 2 (PC) Savage Quest (Arcade) Test Drive Offroad: Wide Open (PS2) N64 version of Resident Evil 2 (N64) Ken Griffey Jr.’s Slugfest (N64) Major League Baseball Featuring Ken Griffey Jr. (N64) Sold to Take Two Interactive (Rockstar) in November, 2002 Angel Games Programming Projects Project 1: Due Beginning of Week 3 Project 2: Due Beginning of Week 5 Skin: Load .skin file and attach to the skeleton Project 3: Due Beginning of Week 7 Skeleton Hierarchy: Load a .skel file and display a 3D pose-able skeleton Animation: Load .anim file and play back a key-framed animation on the skeleton Project 4: Due Beginning of Week 10 (Choose one of the following) Cloth: Implement a simple cloth simulation Fancy Particles: Implement a particle system with collision detection and some fancy forces Locomotion & Inverse Kinematics: Implement an IK algorithm and use it to achieve a walking character Rigid Bodies: Implement a simple rigid body system with collisions Choose your own project (but talk to me first) Grading 15% Project 1 15% Project 2 15% Project 3 20% Project 4 15% Midterm 20% Final Course Outline 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Introduction Skeletons Skinning Keyframes Facial Animation Advanced Skinning & Facial Animation Inverse Kinematics 1 Inverse Kinematics 2 Animation State Machines & Blending Locomotion 1 Locomotion 2 12. 13. 14. 15. 16. 17. 18. 19. 20. Particle Systems Collision Detection Clothing & Hair Simulation Rigid Bodies Character Dynamics Deformable Bodies & Advanced Physical Simulation Behavioral Animation & Artificial Intelligence Motion Capture Demonstrations Computer Animation Overview Applications Special Effects (Movies, TV) Video Games Virtual Reality Simulation, Training, Military Medical Robotics, Animatronics Visualization Communication Computer Animation Physics (a.k.a. dynamics, simulation, mechanics) Character animation Artificial intelligence Physics Simulation Particles Rigid bodies Collisions, contact, stacking, rolling, sliding Hinges, constraints Deformable bodies (solid mechanics) Fluid dynamics Articulated bodies Elasticity, plasticity, viscosity Fracture Cloth Vehicle dynamics Fluid flow (liquids & gasses) Combustion (fire, smoke, explosions…) Phase changes (melting, freezing, boiling…) Cars, boats, airplanes, helicopters, motorcycles… Character dynamics Body motion, skin & muscle, hair, clothing Character Animation Rigging Skeletons Skin, face, & deformations Visual properties (materials, lighting…) Secondary motion (clothing, hair, fur…) Animation Motion playback Motion synthesis Keyframing Blending, sequencing Locomotion (walking, flying, swimming, slithering…) Inverse kinematics Procedural animation Warping & retargetting Physics (inverse dynamics, optimization…) Motion input Motion capture (& other motion input techniques) Vision based capture Artificial Intelligence Behavioral animation Background characters (flocks, herds, armies, crowds…) Video game animation Rigging Rigging refers to the construction and setup of an animatable character, similar to the idea of building a puppet A ‘rig’ has numerous degrees of freedom (DOFs) that can be used to control various properties DOFs can represent things like the rotation of the elbow joint, the percentage that an eyelid is open, or any other ‘animatable’ property The animation system specifies values for these DOFs over time, thus animating the rig The rig can also have built in secondary animation such as hair and clothing The difference between rigging & animation makes a nice conceptual separation, and is often reflected in the software architecture The rigging system can encapsulate other systems such as the skeleton, skinning, facial expressions, clothing, and hair The animation system can encapsulate systems such as playback, inverse kinematics, dynamics, locomotion, and motion synthesis Animation Process while (not finished) { MoveEverything(); DrawEverything(); } Interactive vs. Non-Interactive Real Time vs. Non-Real Time Frame Rates Film Imax NTSC TV PAL TV HDTV Computer 24 fps 48 fps 30 fps (interlaced) 25 fps (interlaced) 60 fps ~60 fps Frame Rate Issues Strobing, temporal aliasing Motion blur Interlacing Double buffering (& tearing) Animation Tools Maya 3D Studio Lightwave Filmbox Blender Many more… Animation Production Conceptual Design Production Design Modeling Materials & Shaders Rigging Blocking Animation Lighting Effects Rendering Post-Production Principles of Animation Squash and Stretch Timing Anticipation Staging / Presentation Follow Through / Overlapping Actions Straight Ahead vs. Pose-to-Pose Slow In and Out Arcs Exaggeration Secondary Motion Appeal