100 likes | 253 Views
Skeletal Animation and Skinning. A (hardware friendly) software approach. By: Brandon Furtwangler. What is skeletal animation?. The idea: Define a hierarchy of ‘bones’ Define animations that transform the bones Deform the vertices of a mesh based on the bones that they are attached to
E N D
Skeletal Animation and Skinning A (hardware friendly) software approach By: Brandon Furtwangler
What is skeletal animation? • The idea: • Define a hierarchy of ‘bones’ • Define animations that transform the bones • Deform the vertices of a mesh based on the bones that they are attached to • Common alternative • Key frame animation • Pro’s • Easier to understand • Quicker • Con’s • More memory usage • Less flexible
Why is skeletal animation better? • Allows you to ‘skin’ meshes • Matrix Palette Skinning (hardware friendly) • Multiple bones per vertex (weights) • Greater flexibility • Play multiple animations on a single mesh • combine run animation on legs with salute animation on arms • Mix animations together • overlap walk with run to get a smooth transition
Implementing MPS • Things we need: • Model • Vertex • Bone IDs • Weights • Skeleton • Bones (in a hierarchy) • Parent • Static Transform (bind pose) • Dynamic Transform (animation controlled) • Palette entry (to be multiplied by vertex)
Implementing MPS part 2 • The skinning process: • Update Dynamic Transforms from animations • Recalculate matrix palette • Transform vertex positions/normals by matrix palette entries • Multiple bones per vertex? • How to handle normals?
Demo 1 • Single bone per vertex • Limited rotations • Joints overlap • Ugly • Quick • What if we want to model an elbow?
Demo 2 • 2 bones per vertex • linear combination • Outside edge looks great • Inside edge is pinched • Why? • How do we fix it? • More bones? • Any other ideas?
Demo 3 • 4 bones/weights per vertex • 4 bones for a single joint • Limitation for hardware (constant registers) • Evenly blend between 4 bones with Bernstein polynomials • Both outside and inside of joint look reasonable • More bones for complicated muscle simulation
Ideas for an animation system • Quaternion based rotations • Nice interpolation • Animation State • Multiple animations with blend factor • Animation • Multiple Tracks (one per bone in animation) • Track • Quaternion Spline (for joint rotations)
Questions? • demo’s at http://www.msu.edu/~furtwan1