Presentation is loading. Please wait.

Presentation is loading. Please wait.

CGDD 4003 Character Animation. The Skeletal Hierarchy (aka the “rig”) Based on the concept of bones Each bone has exactly one parent Each bone has a transform.

Similar presentations


Presentation on theme: "CGDD 4003 Character Animation. The Skeletal Hierarchy (aka the “rig”) Based on the concept of bones Each bone has exactly one parent Each bone has a transform."— Presentation transcript:

1 CGDD 4003 Character Animation

2 The Skeletal Hierarchy (aka the “rig”) Based on the concept of bones Each bone has exactly one parent Each bone has a transform Not necessarily a matrix (later) How it differs from its parent If its transform is identity matrix Same translation Same rotation (orientation) The root bone has no parent (e.g. pelvis) Rotations/translations are relative to local coordinates There are also synthetic root bones (ground shadows)

3 Kinematics Forward kinematics Moving a parent bone moves the children Easy to program, hard to animate Inverse kinematics (IKs) Moving child bones affects parent bone Easier for animators Solve iteratively Need to draw this on the board…

4 Euler Angles (pronounced “Oi-luh”) 3 angles to describe orientation around 3 axes Order of rotations is important! Two rotations can result in the same orientation Usually stored in a 3x3 matrix. Two similar rotations have similar values in matrices Linear blending will be ok Size is large

5 Enter the Quaternion Another way to represent rotations Great for interpolation (thus, common) Uses 4 components (x, y, z, w) In general, (x, y, z) is the axis of rotation Length of (x, y, z) is sine of half the rotation angle w is the cosine of half the rotation angle (20° vs. 340°)

6 Animation vs. Deformation Animation Changing poses to the skeleton over time No sense of the vertices that surrounds it Deformation Applying the skeleton to the mesh No sense of animation (time) Animation Controls Need to be able to start, stop, determine time, change speed Have a control for each animation for each instance of object

7 Animation Storage

8 Eliminate unnecessary data Most bones don’t need shear, scaling Some don’t need translation (hips, knees, elbows) Some characters hardly move! Space Scaling, Shearing, Translation = 3 Rotation (quaternions) = 4 T.K. Baha from Borderlands

9 Animation Storage Note: We’re now at 110MB, still 5 times bigger than budget for Wii. Can we do better?

10 Animation Storage Obvious candidate: don’t use 30 fps! Keyframing: set important poses and then interpolate (old animation technique) On “average”, 10 keyframes per second 1/3 the space = 37MB! OK for Xbox (64MB), bad for Wii (22MB) Keyframing problems: Loses data Note: we’re at 37MB. Can we do better?

11 Animation Storage

12 Continuity Image from Autodesk.com

13 Playing Animations Local time is in reference to the animation E.g. 0.0 – 5.0 for a 5 second animation Can also normalize from 0.0-1.0 and have playback speed Global time is the elapsed time May not match the local time Can pause

14 Blending Animations Playback of multiple animations together Linear Interpolation (aka “lerp”) For quaternions Normalizing lerp (nlerp) – each component is linearly blended and then renormalized Spherical lerp (slerp) – the most common Log-quaternion lerp – complex

15 Blending Animations Bone masks: Imagine waving and walking at the same time 0.0 = don’t use this bone when blending 1.0 = completely include that bone 0.5 = fractional blend

16 Motion Extraction Things get hard when the character moves Animator may/not model at (0,0,0) What happens during walking? Sliding feet? What about climbing a ledge? Must match world/physics engine! Motion Extraction: “process of taking an animation and deriving the overall movement of a character” – from your text!

17 Motion Extraction What if the model doesn’t stay at the origin? Linear Motion Extraction Take position of root bone at first/last frame Divide by duration Works great for straight lines Not so great for running in circles Composite Motion Extraction Takes into account the rotation Variable Delta Extraction – just ask the root bone how much it moved since the last frame

18 Example

19 Mesh Deformation 1. Transform each bone into World Space 1. Start at the root of the skeleton 2. Multiply it’s transform by the instance’s transform (you now know where the root bone is in the world) 3. Take the transform of each child bone and multiply it by the root bone’s world transform 4. Use recursion all the way down

20 Mesh Deformation 2. Find the delta from the rest pose 1. Must “undo” the rest pose using the inverse transform 2. Multiply world transform by the inverse 3. Deform the vertices 1. Each vertex is affected by several bones (4 max) 2. Influential bones stored as a list of bytes 4. Deform the vertex normals

21 Other Considerations


Download ppt "CGDD 4003 Character Animation. The Skeletal Hierarchy (aka the “rig”) Based on the concept of bones Each bone has exactly one parent Each bone has a transform."

Similar presentations


Ads by Google