1 characters. 2introduction the characters are the actors of the games. the characters are the...

34
1 Characters Characters

Upload: briana-todd

Post on 17-Dec-2015

227 views

Category:

Documents


1 download

TRANSCRIPT

1

CharactersCharacters

2

IntroductionIntroduction The Characters are the Actors of the Games.The Characters are the Actors of the Games. Three Types of Characters :Three Types of Characters :

– SegmentedSegmented– MeshMesh– Bone-skinBone-skin

Root-base Concept (P.128-129)Root-base Concept (P.128-129) Production :Production :

– 3D animation tools3D animation tools» 3dsMax3dsMax» MayaMaya» SoftimageSoftimage» ……

– Motion capture (Mocap)Motion capture (Mocap)» For motion dataFor motion data

Base

3

A character is composed by a set of models A character is composed by a set of models with motion data to simulate a live creature with motion data to simulate a live creature in real worldin real world

P. 126-127P. 126-127 BenefitsBenefits

– Hierarchical structureHierarchical structure– Easy to implement in a scene treeEasy to implement in a scene tree

DrawbacksDrawbacks– Segment-likeSegment-like

A Segmented CharacterA Segmented Character

4

Vertex animation on skinsVertex animation on skins– Animated positional data on skinsAnimated positional data on skins– 3D warping3D warping

BenefitsBenefits– Easy to implementEasy to implement– Flexible mesh in animationFlexible mesh in animation

DrawbacksDrawbacks– No hierarchyNo hierarchy– No keyframesNo keyframes– Massive datasetMassive dataset

A Mesh CharacterA Mesh Character

5

Bone-Skin SkeletonBone-Skin Skeleton– Hierarchical Hierarchical bbonesones– Skin deformation Skin deformation run-timelyrun-timely

BenefitsBenefits– Hierarchical structureHierarchical structure– Not segmented lookNot segmented look

DrawbacksDrawbacks– More complicated than the More complicated than the

other solutionsother solutions– Skin deformation need more Skin deformation need more

CPU cost than transformation CPU cost than transformation onlyonly

Bone A

Skin

Bone B

A Bone-skin CharacterA Bone-skin Character

6

Motion DataMotion Data

Euler AnglesEuler Angles Angular DisplacementAngular Displacement QuaternionQuaternion

– SlerpSlerp But Finally They Will Be Converted into But Finally They Will Be Converted into

“Matrix”“Matrix”

7

Optical Motion CaptureOptical Motion Capture

Data AcquiredData Acquired– From skin to joint (Mocap)From skin to joint (Mocap)– From joint to skeleton (Post-processing)From joint to skeleton (Post-processing)– From skeleton to skin (In-game)From skeleton to skin (In-game)

DeviceDevice The Shooting PlanThe Shooting Plan

8

Raw Data (Positional Data)

Joint

End Point

Bio-Data

Data Acquirement During the MocapData Acquirement During the Mocap

9

Skeletons Skin

Skeletons

Bone-Skin

Bone-skin Implementation In GameBone-skin Implementation In Game

10

Mocap DevicesMocap Devices

11

Starting Out – Reviewing the Animation List and Flowchart

Planning a Mocap ShootPlanning a Mocap Shoot

12

13

Creating a Shot List Create a Database File Names Preliminary Shot List

A Data Record of Shot List

14A Shoot List

15

Getting Ready for the Shoot When to Shoot ? Find a Studio Make Sure No Technical Blocks Casting

Preparing a Shooting Schedule Organize the Shot List Daily Schedule Do You Need a Rehearsal Day ?

Take Care of Your Performer

16

A Daily Schedule

17

18

19

20

Apply motion data on bonesApply motion data on bones

Joint = pivot(px,py,pz) in A

A

B

(x,y,z,,axis)

(,axis)

<v’> = <V> [RB][TB][RA][TA]

From pivot From position

Motion for CharactersMotion for Characters

21

To Create More Animation from Limited OnesTo Create More Animation from Limited Ones RRun-time or Pre-processingun-time or Pre-processing IIssues :ssues :

– MMotion re-targetingotion re-targeting» Run-timeRun-time

– RRe-key-framinge-key-framing» Pre-processingPre-processing

– IInterpolationnterpolation» Run-timeRun-time

– MMotion blendingotion blending» Run-timeRun-time

Motion EditingMotion Editing

22

A Set of Frame Data to Describe the A Set of Frame Data to Describe the Character’s MotionCharacter’s Motion

WWalk, Run, Attack, …alk, Run, Attack, … KKeyframed or Non-keyframedeyframed or Non-keyframed

walk run attack fall

PosesPoses

23

walkraw_start_frame raw_end_frame

cut_frame

Parameter { raw_start_frame raw_end_frame start_frame end_frame cut_frame play_speed length transition_mode}

start_frame end_frame

A Pose Definition ExampleA Pose Definition Example

24

walk

0 4 8

Frame 5.3

1. If the motion data is in quaternion form2. Get the motion data on frame 5 & 63. Convert the data into quaternion format4. Apply slerp(5, 6, 0.3) to get the interpolation on frame 5.35. Convert the result of step 3 into a rotation matrix6. Apply the matrix to the object for its transformation

Play a PosePlay a Pose

25

Pose 1

Pose 2

cut_frame

start_frame

length

Pose ConnectionPose Connection

26

Motion blending in run-timeMotion blending in run-time QQuaternion is useduaternion is used ““ Blend Tree”Blend Tree”

– CCross fadeross fade– CCountinuous blendingountinuous blending– FFeather blendingeather blending

Pose BlendingPose Blending

27

RReferenceeference– GGame ame DevelopersDevelopers Conference 2003 Conference 2003– PProceedings CD, Programming Trackroceedings CD, Programming Track– ““AAnimation Blending : Achieving Inverse nimation Blending : Achieving Inverse

Kinematics and More”Kinematics and More”– JJ erry Edsallerry Edsall– MMech Warrior blend treeech Warrior blend tree

Fall Transition

ForwardMotion

FallDown

Walk

Run

Blend TreeBlend Tree

28

Pose 1

Pose2

0

1

0

1

Cross FadeCross Fade

29

Pose 1

Pose 2

0

1

0

1

Continuous BlendingContinuous Blending

30

左右搏擊左右搏擊

Pose 1 Pose 2

Pose 3

Feather BlendingFeather Blending

31

Weights to Assign the Influences of the Weights to Assign the Influences of the Deformation by Bones on Skin VerticesDeformation by Bones on Skin Vertices– 1-weight1-weight– 2-weight2-weight– N-weightN-weight

CCPU costPU cost IIt’s Very Good for GPU to Perform the t’s Very Good for GPU to Perform the

Calculation Using Vertex Shader on DirectXCalculation Using Vertex Shader on DirectX

Skin DeformationSkin Deformation

32

Bone A(root object)

Bone B(Bone A’s child)

base

base

1. Apply motion data to bones2. Convert the vertex from “base” space to its associated

bone’s space using the natural pose’s inverse transformation

3. Multiple the influence weight4. Accumulate all influences5. Then the vertex is deformed by the bone in “base” space

33

Mb = RbTpivot

Ma = RaTposition

Mvb = Mnb-1 MbMa

Mva = Mna-1Ma

vin_base = vs*waMva + vs*wbMvb

A two-weight skin vertex example

34

Network GamingNetwork Gaming