1. Trang chủ
  2. » Văn Hóa - Nghệ Thuật

Computer Animation doc

37 303 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Basics of Character Animation
Tác giả Taku Komura
Chuyên ngành Computer Animation
Thể loại Lecture notes
Định dạng
Số trang 37
Dung lượng 913,53 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

3DOF rotational joints  Shoulder, hip, neck  Two ways to represent the rotations  Gimbal joint Euler Angles  Free joint Quaternions... Gimbal joint : Euler Angles  3DOF joints 

Trang 1

Computer Animation

Lecture 2

Basics of Character Animation

Taku Komura

Trang 3

Characters include

 Human models

 Virtual characters

 Animal models

Trang 4

Controlling the skeleton

 Although we see the skin

of the 3D character

moving, their movements

are produced by the

control of the skeleton

model

 The skin follows the

movement of the skeleton

Trang 5

Representation of postures

How can we specify the

posture of the avatars?

The body has a lot of degrees

of freedom

And has a hierarchical

structure

Trang 6

Hierarchical structure of the body

The position of the joints lower

in the hierarchy are affected by

The “Root” of the body has 3

degrees of freedom for the

translation

Trang 7

Joints

 The Degrees of Freedom (DOF) is defined

for various joints

 There are several kinds of joints

 Translational joint (1,2,3DOF)

 hinge joints (1 DOF)

 Universal joint (2 DOF)

 Gimbal joint (3 DOF)

 Free joint (3DOF)

Trang 8

Translational joint

 A sliding joint

 Can be 1,2 or 3 DOF

Trang 9

Hinge Joint

 A 1 DOF rotational joint

 Can be defined by the

axis of rotation

Knee, elbow

Trang 11

3DOF rotational joints

 Shoulder, hip, neck

 Two ways to represent the rotations

 Gimbal joint (Euler Angles)

 Free joint (Quaternions)

Trang 12

Gimbal joint : Euler Angles

 3DOF joints

 Comes from Robotics

 3DOF joints in robots were designed by

connecting three motors pointing different axes

Trang 13

Gimbal joint : Euler Angles

 Rotation defined by the three axes and the

angle of rotation around them

 the rotation order has to be specified such as X-Y-Z, Z-X-Y, Y-Z-X, etc

The one below is Z-X

Trang 14

Gimbal Lock

 two rotational axis of an object pointing in the same

direction

 For example for rotation defined in the order of X-Y-Z

 Gimbal lock occurs when you rotate the object down

the Y axis 90 degrees

 The X and Z axis get pointed down the same axis

 1DOF is lost

http://flashsandy.org/tutorials/eulerangles

Trang 16

Free joint : Quaternion

Do not have to worry about gimbal lock

The rotation is represented by a vector of four

Trang 17

Animation of the whole body

I have explained about each joints

Now let me explain about how to make the whole body animation

Trang 18

Generalized coordinates

A vector to specify the posture of the body

Usually, the first three numbers : location of the root The next three numbers : orientation of root

The rest: the joint angles of the body

) , ,

, ,

, ,

, ,

( q1 q2 q3 q4 q5 q6 q7 qn

q

Trang 19

A motion is a series of generalized

coordinates

) , ,

, ,

, ,

, ,

(

) , ,

, ,

, ,

, ,

(

) , ,

, ,

, ,

, ,

(

7 6

5 4

3 2

1

7 6

5 4

3 2

1 2

7 6

5 4

3 2

1 1

n n

n n

q q

q q

q q

q q

q q

q q

q q

q q

q q

q q

q q

q q

Trang 20

How to produce the movements of

the skeleton?

 There are three methods

Keyframe animation (today)

 Use real human motion

 Use physically based simulation

Trang 22

q q

q(t)  ( 1  t)t

Trang 23

Uniform Cubic B-splines

1 i i

1 i

q q q

q q(t)

0 1

4 1

0 3

0 3

0 3

6 3

1 3

3 1

1 , ,

, 6

t t

t

Trang 24

) 1 ( t

Interpolation of Quaternions

 Interpolation of two rotations (SLERP)‏

 Changing the orientation from q1 to q2 by rotating around a

single axis u

angle of rotation around u to change from q1 to q2

2 1

2 1

sin

sin sin

) 1

(

sin )

(

) arccos(

q

t q

t t

q

q q

Trang 25

Keyframe animation by Poser

 Poser is a commercial software to generate

human animation

 There is another free software called

MikuMikuDance

Trang 26

Keyframe animation

 Each postures are created by the user interface

 Virtual Track Ball (Forward Kinematics)

 The user clicks the segment and rotates it around the joint origin

 The movement of the mouse is mapped to the rotation of the joint

 Inverse Kinematics (IK)

 The user clicks the segment and drags it in the 3D coordinate

 The motion of the mouse is mapped to the translation in 3D coordinate

 The movement of the segment is achieved by moving each joint of the body

Trang 27

Problems with interpolating the

generalized coordinates

Problem:

 Important constraints might not be satisfied

 The feet on the ground can slide

 Solutions

 Insert many keyframes

 Specify the position of the joints and use inverse

kinematics to calculate the joint angles

Trang 28

Inverse Kinematics

 Forward Kinematics: calculating the joint

positions from the joint angles

 Inverse Kinematics : Calculate the joint

angles based on the joint positions

 Many different approaches

 Analytical approaches (analytical solution exists)

 CCD (Cyclic Coordinate Descent)

 Jacobian-based methods (compute by optimization)

 Particle-based approach

 Often used in robotics

Trang 29

Analytical Approaches

 Using an analytical solver for

calculating the joint angles

 e.g suppose the positions of

the wrist and shoulder are

given, calculate the elbow

angle

Trang 30

Cyclic-Coordinate Descent

 Moving the joints closest to the end effectors first and

minimize the distance between the end effector and the

target

 Move up the hierarchy and move the next joint to minimize

the distance between the end effector and the target

 Repeat the process until the base is reached

 Move to the first joint again and repeat the same process until

the end effector reaches the target or it has been repeated for

a number of times

 This is needed to handle cases that the target is not reachable

Trang 31

Pseudo-inverse method

Iteratively updating the generalized

coordinates so that the position constraints

are satisfied

e: end effector position

g: target location

while (e is too far from g) {

compute the Jacobian matrix J

compute the pseudoinverse of the Jacobian matrix J

compute change in joint DOFs: Δq=J Δe

apply the change to DOFs, move a small step of

q=q+ Δq

}

Δe=JΔq

+ +

Trang 32

Jacobian matrix

Correlates the movement of the end effector

Δe with movements of the joints Δq i

Each column describing how much Δe changes

when the Δqi is changed

n

y y

n

x x

q

e q

e

q

e q

e

q

e q

e q

1 1

JΔ Δe

Trang 33

Computing the Jacobian matrix

 If there is only one end effector, the

Jacobian will be a 3xN matrix (N is

the number of DOFs)

 We can handle multiple end effectors

simultaneously

 The minimal joint angle movements

that achieves the end effector

movement e can be computed by the

pseudo inverse matrix

 

e J

q

J J

Trang 34

Which method will be good for controlling each of the below?

Trang 35

Cons and Pros of IK

 Analytical : Fast, but for most cases

have no analytical solution

 CCD : simple, fast, easy to implement,

can take into account the limit of the

joint angles, may have oscillation

problems

 Pseudo Inverse:

 Used in robotics often, can handle any

topological structure

 Can incorporate physics

 Singularity problems (unstable when the limb

is fully extended)

Trang 36

Summary

 Representation of the Posture

 Euler angles, generalized coordinates,

Ngày đăng: 08/03/2014, 11:20

TỪ KHÓA LIÊN QUAN