CS 148: Summer 2016 Introduction of Graphics and Imaging Zahid Hossain
Animation CS 148: Summer 2016 Introduction of Graphics and Imaging - - PowerPoint PPT Presentation
Animation CS 148: Summer 2016 Introduction of Graphics and Imaging - - PowerPoint PPT Presentation
Animation CS 148: Summer 2016 Introduction of Graphics and Imaging Zahid Hossain Animation Animation Art Driven Physics Driven 2 CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) Zahid Hossain Animation Animation
Animation
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 2
Art Driven Physics Driven Animation
Animation
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 3
Art Driven Physics Driven Computer Graphics Animation
Animation
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 4
Art Driven Physics Driven Computer Graphics Engineering Science Art Animation Story Telling
Animation
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 5
Art Driven Physics Driven Computer Graphics Engineering Science Art Animation Story Telling
Luxo Jr. (Pixar Animation 1986)
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 6
Principles of Animation
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 7
1981
Squash and Stretch
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 8
Rigidity/Flexibility Lively Expressions
Anticipation
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 9
Slow In And Slow Out
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 10
Arcs
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 11
Principles of Animation
https://www.youtube.com/watch?v=5l2Aem7Ll3A
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 12
Keyframe Animation
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 13
Keyframes
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 14
- Specify significant
poses
- Automatically fill in
motion between these points in time.
http://graphics.stanford.edu/courses/cs148-10-summer/docs/10_anim_interact.pdf
Not a New Idea
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 15
Tweening: Not a fun job!
CAPS
Computer-Aided Production System: 1980
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 16
Tweening : Computer Does Interpolation
Animation Curves
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 17
Curves specify paths that
- bjects take over time
Knots are positions Tangents are velocities
Catmull-Rom Spline
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 18
?
𝑞" 𝑞# 𝑞$ 𝑞%
Catmull-Rom Spline
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 19
𝑔 𝑢 = 𝑏* + 𝑏"𝑢 + 𝑏$𝑢$ + 𝑏%𝑢%
𝑢 = 0 𝑢 =1 𝑔 0 = 𝑞$ 𝑔 1 = 𝑞% 𝑞" 𝑞#
Catmull-Rom Spline
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 20
𝑔 𝑢 = 𝑏* + 𝑏"𝑢 + 𝑏$𝑢$ + 𝑏%𝑢%
𝑢 = 0 𝑢 =1 𝑔 0 = 𝑞$ 𝑔 1 = 𝑞% 𝑔. * = 𝑞% − 𝑞" 𝑔′ 1 = 𝑞# − 𝑞$ 𝑞" 𝑞#
Catmull-Rom Spline
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 21
𝑔 0 = 𝑏* = 𝑞$
𝑢 = 0 𝑢 =1 𝑔 0 = 𝑞$ 𝑔 1 = 𝑞% 𝑔. * = 1 2 (𝑞% − 𝑞") 𝑔′ 1 = 1 2 (𝑞# − 𝑞$) 𝑞" 𝑞#
𝑔 𝑢 = 𝑏* + 𝑏"𝑢 + 𝑏$𝑢$ + 𝑏%𝑢%
𝑔 1 = 𝑏* + 𝑏" + 𝑏$ + 𝑏% = 𝑞% 𝑔′ 0 = 𝑏" = 1 2 (𝑞% − 𝑞") 𝑔.(1) = 𝑏" + 2𝑏$ + 3𝑏% = 1 2 (𝑞# − 𝑞$)
Catmull-Rom Spline
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 22
Writing the control points 𝑞5 in terms of the parameters 𝑏6
Catmull-Rom Spline
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 23
Fundamentals of Computer Graphics - Shirley Page: 365
𝑫𝟐 Continuity
Catmull-Rom Spline: Continuity
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 24
𝑞" 𝑞# 𝑞$ 𝑞%
Catmull-Rom Spline
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 25
𝑞" 𝑞# 𝑞$ 𝑞% Incoming Tangent Outgoing Tangent
Catmull-Rom Spline
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 26
𝑞" 𝑞# 𝑞$ 𝑞% Incoming Tangent Outgoing Tangent “Outgoing Tangent” becomes “Incoming Tagent” for the next Segment
Framework for Animation Curves
- Tension
- Sharpness near keyframes
- Continuity
- Different in/out tangents
- Bias
- Overshoot or undershoot
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 27
Framework for Animation Curves
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 28
Fundamentals of Computer Graphics - Shirley Page:420
Bezier Curve
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 29
Fundamentals of Computer Graphics - Shirley Page:365
Slow-In-Slow-Out
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 30
t u Bezier Curve is tunable way to implement this Replace an animation parameter 𝒖 with 𝒗(𝒖)
Key Values vs Key Frames
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 31
- Animation composed of several parameters
- Parameters may not agree on which “frame” is important, i.e. there is no “key-
frame” per-se.
- Create path for each parameter, which has key-values specified in appropriate
frames.
Specialized Curves for Animation
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 32
“Wiggly Splines”
Kass and Anderson, SIGGRAPH 2008
Interpolating Orientations
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 33
Interpolating Matrices ?
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 34
90° CW 90° CCW Not a rotation !
Euler Angles
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 35 http://www.chrobotics.com/wp-content/uploads/2012/11/Inertial-Frame.png
Gimbal Lock
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 36
Spherical Linear Interpolation (SLERP)
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 37
LERP: Linear Interpolation
Spherical Linear Interpolation (SLERP)
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 38
Quaternions [Hamilton 1843]
Quaternions
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 39
Quaternions Euler Matrix
https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles
For conversion formulae
Character Animation
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 40
Recall: Hierarchical Modeling
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 41
Body Torso Head Shoulder LeftArm UpperArm LowerArm Hand RightArm UpperArm LowerArm Hand Hips LeftLeg UpperLeg LowerLeg Foot RightLeg UpperLeg LowerLeg Foot
Forward Kinematics (FK)
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 42
Manipulate degrees
- f freedom directly,
construct geometry hierarchically.
Inverse Kinematics (IK)
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 43
Determine change in parameters from position
- f end effector.
Inverse Kinematics (IK)
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 44
Determine change in parameters from position
- f end effector.
Skinning and Bone Animation
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 45
- Skeleton
- Nodes represents joints
- Joints are local Coordinate Systems (frames)
- Edges represents bones
- Skin
- 3D model/surface driver by skeleton
Both are designed in a reference pose (rest pose)
http://www.cs.cmu.edu/~yaser/Lecture-9-Skinning%20and%20Body%20Representations.pdf
Skeleton in Reference Pose
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 46
- Root Frame expressed with respect to the world: 𝑆*
- Relative Joint Coordinate Frames - 𝑆", 𝑆$, 𝑆% … 𝑆6
http://www.cs.cmu.edu/~yaser/Lecture-9-Skinning%20and%20Body%20Representations.pdf
Skeleton in Reference Pose
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 47
- Root Frame expressed with respect to the world: 𝑆*
- Relative Joint Coordinate Frames - 𝑆", 𝑆$, 𝑆% … 𝑆6
- Mapping from local frame to world
- 𝐵6 = 𝑆* … 𝑆? 6 𝑆6, 𝑞 𝑘 : Parent of joint j
http://www.cs.cmu.edu/~yaser/Lecture-9-Skinning%20and%20Body%20Representations.pdf
Animating Skeleton
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 48
Rotation at a joint j
Mapping from Local Frame to World in Reference Pose Mapping from Local Frame to World in Animated Pose
http://www.cs.cmu.edu/~yaser/Lecture-9-Skinning%20and%20Body%20Representations.pdf
Character Rigging
- Embed Skeleton into a Mesh (Skin)
- Assign Mesh Vertex to one or more
bones to allow
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 49 http://www.cs.cmu.edu/~yaser/Lecture-9-Skinning%20and%20Body%20Representations.pdf
Character Rigging
- Embed Skeleton into a Mesh (Skin)
- Assign Mesh Vertex to one or more
bones to allow
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 50
Vertex Assignments Often Done Manually (Choose the closest “bones”)
http://www.cs.cmu.edu/~yaser/Lecture-9-Skinning%20and%20Body%20Representations.pdf
Rigid Skin Limitations
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 51
Reference Pose Animated Pose
http://www.cs.cmu.edu/~yaser/Lecture-9-Skinning%20and%20Body%20Representations.pdf
Rigid Skin Limitations
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 52
Reference Pose Animated Pose
Leads to abrupt motion near the joint
http://www.cs.cmu.edu/~yaser/Lecture-9-Skinning%20and%20Body%20Representations.pdf
Linear Blend Skinning
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 53
Weight needs to be convex
http://www.cs.cmu.edu/~yaser/Lecture-9-Skinning%20and%20Body%20Representations.pdf
Linear Blend Skinning
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 54
Linear Blend Skinning
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 55
Artists paint these weights
Maya
Linear Blend Skinning: Limitations
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 56
Candy Wrapper Effect
http://www.cs.cmu.edu/~yaser/Lecture-9-Skinning%20and%20Body%20Representations.pdf
Why Candy-Wrapper in LBS ?
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 57 http://www.cs.cmu.edu/~yaser/Lecture-9-Skinning%20and%20Body%20Representations.pdf
Why Candy-Wrapper in LBS ?
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 58
Linear SLERP
http://www.cs.cmu.edu/~yaser/Lecture-9-Skinning%20and%20Body%20Representations.pdf
Solution to Candy-Wrapper
- Dual Quternion Skinning [Clifford 1873]
- Kavan et al.,ACMTOG 2008
- Model rigid transformation (Rotation+Translation)
- Map 6 dimensional manifold into 8 dimensional
space
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 59 http://www.cs.cmu.edu/~yaser/Lecture-9-Skinning%20and%20Body%20Representations.pdf
LBS vs Dual-Quaternion Skinning
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 60
Linear Blend Skinning Dual-Quaternion Skinning
http://www.cs.cmu.edu/~yaser/Lecture-9-Skinning%20and%20Body%20Representations.pdf
Physically Based Animation
Teaser (David will teach next week)
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 61
Two-way Solid-Fluid Coupling
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 62
Detailed Cloth Simulation
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 63
Fracture and Rigid Body
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 64
Hybrid Daisy Chain
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 65
Fluid Simulation
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 66
CS 148: Summer 2016 Introduction of Graphics and Imaging Zahid Hossain