Computer animation: rigging, FK and...
Transcript of Computer animation: rigging, FK and...
![Page 1: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/1.jpg)
Computer GraphicsCMU 15-462/15-662, Fall 2016
Computer animation: rigging, FK and IK
![Page 2: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/2.jpg)
Generating Hand-Drawn Animation
Senior artist draws keyframes
Assistant draws inbetweens
keyframekeyframe keyframe
inbetweens (“tweening”)
![Page 3: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/3.jpg)
Keyframing
Basic idea:
- specify important events only, computer fills in the rest via interpolation/approximation
keyframes
interpolated frames
![Page 4: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/4.jpg)
How do you interpolate data?
![Page 5: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/5.jpg)
SplinesCommon interpolant: piecewise cubic polynomials
Q: What are the three properties we must consider when deciding which type of spline to use?
![Page 6: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/6.jpg)
But what exactly are we interpolating?
![Page 7: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/7.jpg)
A simple example
Keyframe and interpolate position of ball over time
keyframes
interpolated frames
![Page 8: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/8.jpg)
An example: camera path
Animate position, view direction, “up” direction
- each path is a function f(t) = ( x(t), y(t), z(t) )
- each component (x,y,z) is a spline
Zaha
Had
id A
rchite
cts—C
ity of D
ream
s Ho
tel To
we
r
![Page 9: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/9.jpg)
Animation Rigs
user-defined mappings between a small number of parameters and the deformations of a high-res mesh.
![Page 10: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/10.jpg)
Animation Rigs
Animations are time trajectories specified for rig parameters (avars)
![Page 11: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/11.jpg)
Simplest type of rig: Blend ShapesKeyframes represent surfaces (in correspondence)
Simplest scheme: take linear combination of vertex positions
Spline used to control choice of weights over time
![Page 12: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/12.jpg)
Blend Shape Sculpting
Traditionally a manual process
https://www.youtube.com/watch?v=8Nu3znisiBg#t=01m26s
![Page 13: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/13.jpg)
Blend ShapesIn the hands of a skilled animator…
Q: What are the pros and cons of blend shapes? When might it start to break down?
co
urte
sy F
élix
Ferran
d
![Page 14: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/14.jpg)
Cage-based deformers
Embed model in a coarse mesh (cage)
- deform coarse mesh, reconstruct hi-res geometry
![Page 15: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/15.jpg)
Cage-based deformers
Embed model in a coarse mesh (cage)
- deform coarse mesh, reconstruct hi-res geometry
- e.g. model vertices are weighted sum of cage vertices“coordinates”
Q: where do the weights come from?
![Page 16: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/16.jpg)
Many, many ways of computing interpolation weights with different properties one might care about…
![Page 17: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/17.jpg)
Working with cages can be too restrictive, hard to have direct control
![Page 18: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/18.jpg)
But very often, shape implies skeleton
[Au et al. 2008]
![Page 19: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/19.jpg)
… and skeleton imposes a fair bit of structure in how shape can deform
[Blair 1994]
![Page 20: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/20.jpg)
Skeletal Animation
Key idea: animate just the skeleton (<< DOFs), have mesh “follow” automatically
![Page 21: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/21.jpg)
Skeletal Animation – at one end of the spectrum
[Teran et al. 2005]
[Absolute Character Tools 1.6]
Simulate muscles, fatty tissues, skin, interactions with the environment, etc….
![Page 22: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/22.jpg)
![Page 23: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/23.jpg)
Skeletal Animation – at one end of the spectrum
[Teran et al. 2005]
[Absolute Character Tools 1.6]Provides the “right” answer
Very demanding computationally
Need much faster solution for interactive applications
![Page 24: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/24.jpg)
Linear Blend Skinning
![Page 25: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/25.jpg)
Rigging Animation
Linear Blend Skinning
![Page 26: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/26.jpg)
Forward Kinematics
Kinematic Skeletons
- Hierarchy of affine transformations
- Joints: local coordinate frames
- Bones: vectors between consecutive pairs of joints
- Each non-root bone defined in frame of unique parent
- Changes to parent frame affect all descendent bones
- Both skeleton and skin are designed in a rest (dress/bind) pose
![Page 27: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/27.jpg)
Forward Kinematics
Assume n+1 joints: 0, 1, ..., n (0 == root)
• each joint corresponds to a frame
• p(j): the parent of joint j (root special: p(0) = -1)
• frame of joint j expressed w.r.t. to frame of p(j)
1000
)()()()(
)()()()(
)()()()(
3
2
1
333231
232221
131211
)(jtjrjrjr
jtjrjrjr
jtjrjrjr
R jjp
10
)()( jjRot t
![Page 28: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/28.jpg)
Forward Kinematics
Assume n+1 joints: 0, 1, ..., n (0 == root)
• each joint corresponds to a frame
• p(j): the parent of joint j (root special: p(0) = -1)
• frame of joint j expressed w.r.t. to frame of p(j)
- What does this transform correspond to?
- t(j) typically comes from bind pose
- Rot(j) typically comes from animation
10
)()( jjRot tjjp R)(
![Page 29: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/29.jpg)
Forward Kinematics
• The transformation from frame j to world is:
• Each joint rotation has up to 3-DOFs
- Translation & scale also possible, but less common
- is defined the same way as , but in rest pose (e.g. no joint rotations)
B o n e
y
x
x
y
J o i n t p ( j )
J o i n t j
R ( j )
jjpjpjppwjw RRRR )()())((0 ...
)()())(())(()...0()0( jRotjTjpRotjpTRotT
jjp R)(
jw Rjw R
)( jRot
![Page 30: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/30.jpg)
Skinning
Given joint angles, we compute configuration of the skeleton using forward kinematics. What do we do about the surface mesh?
- Move vertices along with the bones!
- Attempt 1: assign each vertex to closest bone, compute world coordinates according to bone’s transformation
v e r t e x s k i n
'1vRRv jwjw
![Page 31: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/31.jpg)
Skinning
Given joint angles, we compute configuration of the skeleton using forward kinematics. What do we do about the surface mesh?
- Move vertices along with the bones!
- Attempt 1: assign each vertex to closest bone, compute world coordinates according to bone’s transformation
- Rigid skinning: fine if vertices are close to bone, fine for small rotations, used in older video games
- Can do better with only slight increase in complexity
Vertex coordinates in rest poseVertex coordinates in
coordinate frame of bone j
Skinned vertex coordinates
'1vRRv jwjw
![Page 32: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/32.jpg)
Linear Blend Skinning
Given joint angles, we compute configuration of the skeleton using forward kinematics. What do we do about the surface mesh?
- Attempt 2: assign each vertex to multiple bones, compute world coordinates as convex combination
- Weights: influence of each bone on the vertex
- Leads to smoother* deformations of the skin
j
jwjwj vRRv '1
Vertex coordinates in rest poseVertex coordinates in
coordinate frame of bone j
Skinned vertex coordinates
Skinning weights
![Page 33: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/33.jpg)
Linear Blend Skinning
f i r s t b o n e t r a n s f o r m a t i o n s e c o n d b o n e t r a n s f o r m a t i o n
r e s u l t i n g v e r t e x p o s i t i o n
![Page 34: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/34.jpg)
How are skinning weights generated?
Often they are manually painted
Can be computed automatically (active research area)
- e.g. based on distance to bones - how would you do this? What might go wrong?
![Page 35: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/35.jpg)
Linear Blend Skinning artifacts
What’s causing this?
How to fix candy-wrapper effects: better weights, introduce auxiliary joints/bones, employ better interpolation schemes for transformations, pose-space deformers (PSD)
![Page 36: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/36.jpg)
Linear Blend Skinning
jjp R)(
Widely used in industry!
![Page 37: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/37.jpg)
Forward Kinematics
Given joint angles, compute configuration of the skeleton
B o n e
y
x
x
y
J o i n t p ( j )
J o i n t j
R ( j ) jjp R)(
![Page 38: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/38.jpg)
Inverse Kinematics (IK)
Given goal(s) for “end effector” compute joint angles
Very important technique in animation & robotics!
Many, many algorithms: analytic formulations for specific cases, cyclic coordinate descent, energy-based methods, etc
![Page 39: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/39.jpg)
Pitfalls of hand-crafted animation: the Uncanny Valley
![Page 40: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/40.jpg)
Full-body motion capture
https://www.youtube.com/watch?v=zQPfxcQKr0Q
![Page 41: Computer animation: rigging, FK and IK15462.courses.cs.cmu.edu/fall2016content/lectures/20_rigging/20... · Given joint angles, we compute configuration of the skeleton using forward](https://reader030.fdocuments.in/reader030/viewer/2022040509/5e4e9236aa1e181bb950f556/html5/thumbnails/41.jpg)
Is Motion Capture the solution to the Uncanny Valley?
https://www.youtube.com/watch?v=piJ4Zke7EUw