Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 450: COMPUTER GRAPHICS ANIMATION SPRING 2015 DR. MICHAEL J. REALE.

Similar presentations


Presentation on theme: "CS 450: COMPUTER GRAPHICS ANIMATION SPRING 2015 DR. MICHAEL J. REALE."— Presentation transcript:

1 CS 450: COMPUTER GRAPHICS ANIMATION SPRING 2015 DR. MICHAEL J. REALE

2 CREDIT WHERE CREDIT IS DUE An excellent tutorial on computer animation and bones: http://what-when-how.com/advanced- methods-in-computer-graphics/skeletal-animation-advanced-methods-in-computer-graphics-part-1/ Many of the images from this slide deck come from this tutorialhttp://what-when-how.com/advanced- methods-in-computer-graphics/skeletal-animation-advanced-methods-in-computer-graphics-part-1/

3 INTRODUCTION Hitherto, our objects/primitives have more or less stayed put At most, the camera has moved around However, when simulating a real-world 3D scene, objects should move around  we need to animate them Animation of objects can happen for two broad reasons: Object is performing an action E.g., a human walking, a car driving Object is acted upon by outside forces E.g., an apple falling, collision of two objects

4 ARTICULATED CHARACTER MODELS If an object is completely rigid with no moving parts, we can use matrix transformations to translate, rotate, etc. the object as we see fit E.g., every time step, apply a transformation matrix downwards to make an apple fall to the ground However, a lot of objects have moving parts (e.g., human models) We’re going to focus on articulated character models Basically a model that has limbs of some description Has vertices for object itself + skeleton

5 SKELETONS AND BONES Bone = affects certain vertices on a model Bone moves  affected vertices move Skeleton = set of all bones and how they are dependent on each other Contains hierarchy of bones E.g., leg bone connected to the thigh bone One can create a model with a skeleton in two ways: a) Make separate, unconnected parts  each bone just affects each part b) Make a single mesh  each bone affects certain vertices (some more than others)

6 VERTEX BLENDING The problem with using separate parts is what happens to vertices at joints: Bending at joints produces a gap and/or folding into itself Solution: vertex blending Also called skinning, enveloping, or skeleton-subspace deformation Basic idea: separate moveable parts slightly, then fill gap with additional geometry Can also be implemented by having bones only affect certain vertices in mesh by a certain weight

7 BONE ANIMATION Given a skeleton, an animation will transform one or more bones using matrix transformations: p = original vertex u(t) = transformed vertex at time t w i = weight of bone i for vertex p M i -1 = transforms from world to bone’s initial coordinate system B i (t) = i th bone’s world transform that changes with time to animation object Both M and B matrices are typically concatenation of matrices  hierarchy of previous bone transforms and local animation matrix

8 ANIMATION BLENDING Animation blending = when more than 1 animation is applied to a given model Implementing by using different weights per vertex for each animation

9 PROBLEMS WITH VERTEX BLENDING Two issues can come up with vertex blending: a) Collapsing elbow effect = angle of bend at joint is very large b) Candy-wrapper effect = one bone is twisted while the other is not

10 KEYFRAMES Usually, when creating an animation, you won’t define every single frame of that animation Lots of work Doesn’t allow you to make the animation arbitrarily slower or faster Alternative: create keyframes (target positions/transforms for each animation), then interpolate intermediate frames

11 4 keyframes for a walking animation

12 INTERPOLATING KEYFRAME VALUES There are different ways you can interpolate the keyframe values in an animation sequence: Step – sudden, results not natural Linear – better, but sudden changes in direction at keyframes Spline – much smoother


Download ppt "CS 450: COMPUTER GRAPHICS ANIMATION SPRING 2015 DR. MICHAEL J. REALE."

Similar presentations


Ads by Google