COMPUTER GRAPHICS CHAPTER 35 CS 482 – Fall 2017 ANIMATION ANIMATION PROCESSES INTERPOLATION-BASED ANIMATION HARDWARE ISSUES KINEMATICS DYNAMICS
ANIMATION PROCESSES MOTION PERCEPTION CS 482 – Fall 2017 CHAPTER 35: ANIMATION PAGE 257
TRADITIONAL ANIMATION PROCESS ANIMATION PROCESSES TRADITIONAL ANIMATION PROCESS Storyboards Dialogue Sketching In-Betweening Inking Painting Backgrounds Photographing Editing CS 482 – Fall 2017 CHAPTER 35: ANIMATION PAGE 258
COMPUTER ANIMATION PROCESS ANIMATION PROCESSES COMPUTER ANIMATION PROCESS Storyboards Staging Set Modeling Keyframing Shading Effects Lighting CS 482 – Fall 2017 CHAPTER 35: ANIMATION PAGE 259
INTERPOLATION-BASED ANIMATION KEYFRAMES CS 482 – Fall 2017 CHAPTER 35: ANIMATION PAGE 260
INTERPOLATION-BASED ANIMATION ARTICULATION VARIABLES CS 482 – Fall 2017 CHAPTER 35: ANIMATION PAGE 261
HARDWARE ISSUES SCREEN REFRESH Among the tasks of the video controller is the refreshing of the display. Two primary approaches have arisen over the years: progressive scan, in which scanlines are refreshed in a top to bottom fashion, and interlaced scan, in which refreshes alternate between the odd-numbered and even-numbered scanlines. The interlaced approach cuts the required bandwidth in half, and is therefore preferred by most television broadcasters. Progressive scan reduces the “comb” effect and “twitter” in the image, and is therefore preferred by most computer and software manufacturers. CS 482 – Fall 2017 CHAPTER 35: ANIMATION PAGE 262
HARDWARE ISSUES DOUBLE BUFFERING When a display refreshes faster than the processor can render the next frame, the swapped buffer contains a “torn” image (with some pixels filled with the previous frame’s image and some from the current one). When vertical synchronization is activated, the buffer swap is delayed until the current frame has been completely processed, eliminating the image quality issue, but the animation suffers latency problems. CS 482 – Fall 2017 CHAPTER 35: ANIMATION PAGE 263
HARDWARE ISSUES TRIPLE BUFFERING By keeping two back buffers at all times, and alternating their being filled, the front buffer can be swapped with the most recently filled back buffer, reducing latency while maintaining image quality. Double Buffering w/o vsync: Double Buffering w/vsync: TRIPle Buffering: CS 482 – Fall 2017 CHAPTER 35: ANIMATION PAGE 264
KINEMATICS STANDARD JOINT TYPES Revolute Joint (1 DOF) Translational Joint (1 DOF) Cylindrical Joint (2 DOF) Spherical Joint (3 DOF) Planar Joint (3 DOF) CS 482 – Fall 2017 CHAPTER 35: ANIMATION PAGE 265
TREE-BASED HIERARCHICAL MODEL KINEMATICS TREE-BASED HIERARCHICAL MODEL CS 482 – Fall 2017 CHAPTER 35: ANIMATION PAGE 266
KINEMATICS SKELETON HIERARCHY CS 482 – Fall 2017 CHAPTER 35: ANIMATION PAGE 267
KINEMATICS TWO APPROACHES Inverse Kinematics Forward Kinematics The modeler rotates or moves individual joints to pose and animate the joint chains Inverse Kinematics The modeler moves a handle to pose the entire joint chain CS 482 – Fall 2017 CHAPTER 35: ANIMATION PAGE 268
KINEMATICS FORWARD KINEMATICS When rigging a character using forward kinematics, any given joint can only affect parts of the skeleton that fall below it on the joint hierarchy. For example, rotating a character's shoulder changes the position of the elbow, wrist, and hand. However, moving the hand only moves the hand and fingers. When using forward kinematics, an animator typically needs to set the rotation and position of each joint individually. To achieve a desired pose, the animator works through the joint hierarchy sequentially: root, spine, shoulder, elbow, etc. The final position of a terminating joint (like a knuckle) thus depends on the joint angles of every joint above it in the hierarchy. CS 482 – Fall 2017 CHAPTER 35: ANIMATION PAGE 269
KINEMATICS INVERSE KINEMATICS Inverse kinematics is the reverse process from forward kinematics, and is often used as an efficient solution for rigging a character's arms and legs. With inverse kinematics, the terminating joint is directly placed by the animator, while the joints above it on the hierarchy are automatically interpolated by the software. For example, when moving the hand's inverse kinematics controls, all unconstrained joints above the hand will be affected. Inverse kinematics is most appropriate when the animation calls for a terminating joint to be placed very precisely; the animator merely positions certain body parts in a goal position rather than the having to adjust their position joint-by-joint. CS 482 – Fall 2017 CHAPTER 35: ANIMATION PAGE 270
CASE STUDY: TWO-LINK ARM KINEMATICS CASE STUDY: TWO-LINK ARM Forward Kinematics: 𝑥= 𝐿 1 cos 𝜃 1 + 𝐿 2 cos 𝜃 1 + 𝜃 2 𝑦= 𝐿 1 sin 𝜃 1 + 𝐿 2 sin( 𝜃 1 + 𝜃 2 ) Inverse Kinematics: 𝑥 2 = 𝐿 1 2 cos 2 𝜃 1 +2 𝐿 1 𝐿 2 cos 𝜃 1 cos ( 𝜃 1 + 𝜃 2 ) + 𝐿 2 2 cos 2 ( 𝜃 1 + 𝜃 2 ) 𝑦 2 = 𝐿 1 2 sin 2 𝜃 1 +2 𝐿 1 𝐿 2 sin 𝜃 1 sin ( 𝜃 1 + 𝜃 2 ) + 𝐿 2 2 sin 2 ( 𝜃 1 + 𝜃 2 ) 𝑥 2 + 𝑦 2 = 𝐿 1 2 + 𝐿 2 2 +2 𝐿 1 𝐿 2 cos 𝜃 1 cos 𝜃 1 cos 𝜃 2 − sin 𝜃 1 sin 𝜃 2 + sin 𝜃 1 ( sin 𝜃 1 cos 𝜃 2 + cos 𝜃 1 sin 𝜃 2 ) = 𝐿 1 2 + 𝐿 2 2 +2 𝐿 1 𝐿 2 cos 𝜃 2 𝜃 2 = cos −1 𝑥 2 + 𝑦 2 − 𝐿 1 2 − 𝐿 2 2 2 𝐿 1 𝐿 2 L2 tan 𝜃 3 = 𝑦 𝑥 tan 𝜃 4 = 𝐿 2 sin 𝜃 2 𝐿 2 cos 𝜃 2 + 𝐿 1 𝜃 1 = 𝜃 3 − 𝜃 4 tan 𝜃 1 = tan ( 𝜃 3 − 𝜃 4 ) = tan 𝜃 3 − tan 𝜃 4 1+ tan 𝜃 3 tan 𝜃 4 = 𝑦 𝑥 − 𝐿 2 sin 𝜃 2 𝐿 2 cos 𝜃 2 + 𝐿 1 1+ 𝑦 𝑥 𝐿 2 sin 𝜃 2 𝐿 2 cos 𝜃 2 + 𝐿 1 = 𝑦 𝐿 2 cos 𝜃 2 + 𝐿 1 −𝑥 𝐿 2 sin 𝜃 2 𝑥 𝐿 2 cos 𝜃 2 + 𝐿 1 +𝑦 𝐿 2 sin 𝜃 2 𝜃 1 = tan −1 𝑦 𝐿 2 cos 𝜃 2 + 𝐿 1 −𝑥 𝐿 2 sin 𝜃 2 𝑥 𝐿 2 cos 𝜃 2 + 𝐿 1 +𝑦 𝐿 2 sin 𝜃 2 y L1 2 4 3 1 x CS 482 – Fall 2017 CHAPTER 35: ANIMATION PAGE 271
DYNAMICS MASS-SPRING SYSTEMS Various movements may be simulated by means of spring models. Musculature Curly Hair Energy Storage & Release During Running CS 482 – Fall 2017 CHAPTER 35: ANIMATION PAGE 272
DYNAMICS COLLISION DETECTION Animation frequently requires the detection of collisions occurring between objects in the scene. Determining collisions against a bounding box or a bounding sphere is computationally simple, but might detect collisions that might not be accurate against the original mesh Determining collisions against the convex hull (the smallest convex polyhedron containing the original mesh) is a reasonable compromise – more precise than using a bounding box or sphere, and less computationally complex than using the original mesh Determining precise collisions with a non-convex polyhedron is usually too computationally complex to implement CS 482 – Fall 2017 CHAPTER 35: ANIMATION PAGE 273