84
Ken-Yi Lee Game Programming, Fall 2020 @ National Taiwan University Game Animation

Game Animation - 國立臺灣大學

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Game Animation - 國立臺灣大學

Ken-Yi Lee

Game Programming, Fall 2020 @ National Taiwan University

Game Animation

Page 2: Game Animation - 國立臺灣大學

2

Game Programming

● Rendering

● Looping and control

● Math

● Animation

● Physics

● Behaviour and navigation (AI)

● Effects

● Networking

Page 3: Game Animation - 國立臺灣大學

3

Game Programming

● Rendering

● Looping and control

● Math

● Animation

● Physics

● Behaviour and navigation (AI)

● Effects

● Networking

Page 4: Game Animation - 國立臺灣大學

4

Page 6: Game Animation - 國立臺灣大學

6

Demo : 2D Game Kit

● Play

● Introduce scene assets

Page 7: Game Animation - 國立臺灣大學

2D sprite animation

● Keyframes / image sequence

7

Page 8: Game Animation - 國立臺灣大學

8

Page 9: Game Animation - 國立臺灣大學

9

Page 10: Game Animation - 國立臺灣大學

10

Page 11: Game Animation - 國立臺灣大學

11

Page 12: Game Animation - 國立臺灣大學

12

Page 13: Game Animation - 國立臺灣大學

13

Page 14: Game Animation - 國立臺灣大學

14

Page 15: Game Animation - 國立臺灣大學

15

Page 16: Game Animation - 國立臺灣大學

16

Page 17: Game Animation - 國立臺灣大學

17

Page 18: Game Animation - 國立臺灣大學

18

Page 19: Game Animation - 國立臺灣大學

19

Page 20: Game Animation - 國立臺灣大學

20

Page 21: Game Animation - 國立臺灣大學

21

Page 22: Game Animation - 國立臺灣大學

22

Page 23: Game Animation - 國立臺灣大學

23

Sprite renderer

Page 24: Game Animation - 國立臺灣大學

24

Demo : 2D Game Kit

● Inspect Ellen [Prefab]

Page 25: Game Animation - 國立臺灣大學

25

Animation clip : keyframe animation

Page 26: Game Animation - 國立臺灣大學

26

Demo : 2D Game Kit

● Inspect Ellen prefab

● Inspect Ellen_Idle animation

Page 29: Game Animation - 國立臺灣大學

29

Page 30: Game Animation - 國立臺灣大學

Root motion

30

Page 31: Game Animation - 國立臺灣大學

Root motion

31

Page 32: Game Animation - 國立臺灣大學

Root motion

32

Page 33: Game Animation - 國立臺灣大學

Root motion

33

Page 34: Game Animation - 國立臺灣大學

34

Demo : 2D Game Kit

● Inspect Ellen prefab

● Inspect Ellen_Idle animation

Page 35: Game Animation - 國立臺灣大學

Parametric animation

35

Page 36: Game Animation - 國立臺灣大學

Parametric animation

36

Interpolation between consecutive frames ?

Page 37: Game Animation - 國立臺灣大學

37

Smooth or sharp ?

Parametric animation

Page 38: Game Animation - 國立臺灣大學

Animation clip: Curves

38

● (DEMO) Ellen [Prefab] > Animation > Ellen_IdleWithGun

Page 39: Game Animation - 國立臺灣大學

39

(DEMO)

Page 40: Game Animation - 國立臺灣大學

State machine

40

● Current state ?

● On state enter / leave ?

Jump

Idle

Walk

Page 41: Game Animation - 國立臺灣大學

State machine

41

● Current state ?

● On state enter / leave ?

● Transition between states ?

Jump

Idle

Walk

Page 42: Game Animation - 國立臺灣大學

Animation state machine

42

● Current animation ?

● On animation play / finished ?

● Blending between animations ?

Jump

Idle

Walk

Page 43: Game Animation - 國立臺灣大學

Animator controller

43

Page 44: Game Animation - 國立臺灣大學

44

Animator states

Page 45: Game Animation - 國立臺灣大學

45

(DEMO)

Page 46: Game Animation - 國立臺灣大學

Animator transition

46

Page 47: Game Animation - 國立臺灣大學

BlendTree

47

Page 49: Game Animation - 國立臺灣大學

49

Page 54: Game Animation - 國立臺灣大學

54

Page 55: Game Animation - 國立臺灣大學

55

(DEMO)

Page 56: Game Animation - 國立臺灣大學

Inverse kinematics (IK)

56

Page 57: Game Animation - 國立臺灣大學

Inverse kinematics (IK)

57

Set desired target

Page 58: Game Animation - 國立臺灣大學

Inverse kinematics (IK)

58

Always possible ?

Set desired target

Page 59: Game Animation - 國立臺灣大學

59

(DEMO)

Page 60: Game Animation - 國立臺灣大學

60

3D Model

Page 61: Game Animation - 國立臺灣大學

Skinned mesh renderer

61

Page 62: Game Animation - 國立臺灣大學

62

Rig

Page 63: Game Animation - 國立臺灣大學

63

Page 64: Game Animation - 國立臺灣大學

64

(DEMO)

Page 65: Game Animation - 國立臺灣大學

65

Avatar

Page 66: Game Animation - 國立臺灣大學

66

Page 67: Game Animation - 國立臺灣大學

67

Page 68: Game Animation - 國立臺灣大學

68

(DEMO)

Page 69: Game Animation - 國立臺灣大學

Root motion

69

Page 70: Game Animation - 國立臺灣大學

70

Page 71: Game Animation - 國立臺灣大學

71

(DEMO)

Page 72: Game Animation - 國立臺灣大學

72

Page 74: Game Animation - 國立臺灣大學

74

(DEMO)

Page 75: Game Animation - 國立臺灣大學

BlendTree

75

Page 76: Game Animation - 國立臺灣大學

76

(DEMO)

Page 77: Game Animation - 國立臺灣大學

Retargeting

77

Page 78: Game Animation - 國立臺灣大學

78

Page 79: Game Animation - 國立臺灣大學

79

(DEMO)

Page 80: Game Animation - 國立臺灣大學

Inverse kinematics (IK)

80

Page 81: Game Animation - 國立臺灣大學

Inverse kinematics (IK)

81

Page 82: Game Animation - 國立臺灣大學

Inverse kinematics (IK)

82

Page 83: Game Animation - 國立臺灣大學

83

Q & A

Page 84: Game Animation - 國立臺灣大學

References

84

● Getting Started with Unity’s 2D Animation Package @ Unity Blog

○ https://blogs.unity3d.com/2018/11/09/getting-started-with-unitys-2d-animation-package/

● Mecanim Humanoids @ Unity Blog

○ https://blogs.unity3d.com/2014/05/26/mecanim-humanoids/

● Retargeting and Reusing Animation @ Unity Blog

○ https://learn.unity.com/project/re-targeting-and-re-using-animation