CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of...
Transcript of CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of...
![Page 1: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/1.jpg)
CS230 : Computer GraphicsLecture 12: Introduction to Animation
Tamar ShinarComputer Science & Engineering
UC Riverside
![Page 2: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/2.jpg)
Types of animation
• keyframing
• rotoscoping
• stop motion
• procedural
• simulation
• motion capture
![Page 3: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/3.jpg)
Performance capture
Lord of the Rings, 2001
Rise of the Planet of the Apes, 2011
Avatar, 2009Andy Serkis - Gollum, Lord of the Ringschallenges - resolution, occlusion,
![Page 4: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/4.jpg)
Rachel Weinstein, Joey Teran and Ron Fedkiw
Rigid body simulation
![Page 5: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/5.jpg)
Rachel Weinstein, Joey Teran and Ron Fedkiw
Rigid body simulation
![Page 6: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/6.jpg)
5N. Molino, Z. Bao, R. Fedkiw
Deformable object simulation
![Page 7: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/7.jpg)
Selle et al., 2008
![Page 8: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/8.jpg)
Facial animation
![Page 9: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/9.jpg)
Facial animation
![Page 10: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/10.jpg)
Fluid simulation
![Page 11: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/11.jpg)
Fluid simulation
![Page 12: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/12.jpg)
Control of virtual character
issues: control algorithms, interaction with environment
![Page 13: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/13.jpg)
Control of virtual character
issues: control algorithms, interaction with environment
![Page 14: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/14.jpg)
rigid/deformable simulator in Pixar’s WALL-E
![Page 15: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/15.jpg)
rigid/deformable simulator in Pixar’s WALL-E
![Page 16: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/16.jpg)
Crowd simulation
Treuille et al., 2006
- agent-based, model behavior- also, “global effects” - e.g., incompressibility- emergent phenomena
![Page 17: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/17.jpg)
Artificial life
• plants - movement and growth
• evolving artificial life
virtual worlds, special effects, games
![Page 18: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/18.jpg)
history
![Page 19: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/19.jpg)
Gertie the Dinosaur
link
191412 minuteshand drawnkeyframe animationregistrationcycling
![Page 20: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/20.jpg)
Traditional animation
• Cels
• Multiplane camera
Wikimedia Commons
Sleeping Beauty, Disney, 1959
![Page 21: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/21.jpg)
Realistic 3D animation
• Disney’s Tron, 1981
• Pixar’s Toy Story, 1995, first 3D feature
![Page 22: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/22.jpg)
Performance Capture
• Final Fantasy 2001
• Lord of the Rings 2001
• Beowulf 2007
• Avatar, 2009
• Adventures of Tintin, 2011
Lord of the Rings, 2001
![Page 23: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/23.jpg)
animation principles
![Page 24: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/24.jpg)
- animation can bring even a flour sack to life- animations principles common to any type of animation
![Page 25: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/25.jpg)
12 principles of animation
1. Squash and stretch2. Anticipation3. Staging4. Straight ahead action and pose to pose5. Follow through and overlapping action6. Slow in and slow out7. Arcs8. Secondary action9. Timing10. Exaggeration11. Solid drawing12. Appeal
principles are related to the underlying physics of motiontiming: important information. ease in/ease out
![Page 26: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/26.jpg)
Physics-based animation
• Many animation principles follow from underlying physics
• anticipation, follow through, secondary action, squash and stretch, ...
• Spacetime Constraints, Witkin and Kass 1988
![Page 27: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/27.jpg)
Physics-based animation
• Many animation principles follow from underlying physics
• anticipation, follow through, secondary action, squash and stretch, ...
• Spacetime Constraints, Witkin and Kass 1988
![Page 28: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/28.jpg)
keyframe animation
![Page 29: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/29.jpg)
Keyframe animation
• draw a series of poses
• fill in the frames in between (“inbetweening”)
• computer animation uses interpolation
http://anim.tmog.net
![Page 30: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/30.jpg)
Keyframe character DOFs
3 translational DOFs
48 rotational DOFs
Each joint can have up to 3 DOFs
![Page 31: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/31.jpg)
Interpolation of keyframes
linear interpolation spline interpolation
Straightforward to interpolate position but what about orientation?
![Page 32: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/32.jpg)
general rotations
![Page 33: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/33.jpg)
27
Rotation
X axis
Y axis
Z axis
The rows and columns are orthonormal
![Page 34: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/34.jpg)
28
Rotation about an arbitrary axis
Rotating about an axis by theta degrees
• Rotate about x to bring axis to xz plane• Rotate about y to align axis with z -axis• Rotate theta degrees about z• Unrotate about y, unrotate about x
• Can you determine the values of Rx and Ry?
M = Rx-1 Ry-1 Rz(θ) Ry Rx
![Page 35: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/35.jpg)
29
Composite Transformations
• Rotating about a fixed point- basic rotation alone will rotate about origin
but we want:
![Page 36: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/36.jpg)
30
Composite Transformations
• Rotating about a fixed point• Move fixed point (px,py,pz) to origin• Rotate by desired amount• Move fixed point back to original position
M = T(px, py, pz) Rz(θ) T(-px, -py, -pz)
![Page 37: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/37.jpg)
Euler’s Rotation Theorem
Any displacement of a rigid body such that a point on the rigid body remains fixed, can be described as a rotation by some angle about some axis
![Page 38: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/38.jpg)
euler angles
![Page 39: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/39.jpg)
33
Euler Angles
• A general rotation is a combination of three elementary rotations: around the x-axis (x-roll) , around the y-axis (y-pitch) and around the z-axis (z-yaw).
![Page 40: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/40.jpg)
Gimbal and Euler Angles
Wikimedia Commons
Z-X’-Z’’
![Page 41: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/41.jpg)
Extrinsic vs. Intrinsic rotations
Wikimedia Commons
![Page 42: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/42.jpg)
36
Euler Angles and Rotation Matrices
![Page 43: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/43.jpg)
![Page 44: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/44.jpg)
quaternions
![Page 45: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/45.jpg)
![Page 46: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/46.jpg)
Quaternions
• axis/angle representation
• interpolates smoothly
• easy to compose
<whiteboard>
![Page 47: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/47.jpg)
Quaternion Interpolation
linear spherical linear“slerp”
linear: treat quaternions as 4-vectors, note non-uniform speedspherical linear: constant speed
![Page 48: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/48.jpg)
Higher order interpolation
• Bezier curve
• Shoemake, Animating rotation with quaternion curves, 1985
![Page 49: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/49.jpg)
43
Matrix form
![Page 50: CS230 : Computer Graphicsshinar/courses/cs230-winter-2012/Lecture12.pdf · Rise of the Planet of the Apes, 2011 Avatar, 2009 Andy Serkis - Gollum, Lord of the Rings ... - animations](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f648b9920399a017b2634a1/html5/thumbnails/50.jpg)
44
Rotations in Reality
• It’s easiest to express rotations in Euler angles or Axis/angle
• We can convert to/from any of these representations
• Choose the best representation for the task- input:Euler angles- interpolation: quaternions- composing rotations: quaternions, orientation matrix