Presentation is loading. Please wait.

Presentation is loading. Please wait.

SE 313 – Computer Graphics Lecture 14: Armatures Lecturer: Gazihan Alankuş 1.

Similar presentations


Presentation on theme: "SE 313 – Computer Graphics Lecture 14: Armatures Lecturer: Gazihan Alankuş 1."— Presentation transcript:

1 SE 313 – Computer Graphics Lecture 14: Armatures Lecturer: Gazihan Alankuş 1

2 Today Armatures and Bones Weight painting 2

3 Animations We learned how to set keyframes for positions/orientations/scales for objects Well then, how would you animate something like this? 3

4 Animating Complex Meshes Why is it difficult? There are so many vertices and edges. How are you going to manage their motions? 4

5 Animating Complex Meshes You need to be able to say “rotate your arm” without having to deal with individual vertices. It also needs to know how to get back to how it was before How can we do all this? 5

6 Idea Our muscles move our bones, to which our flesh is attached to 6

7 Armatures Similarly, we use a skeleton structure in computer graphics They are called armatures (or bones) They are much simpler than actual skeletons 7

8 How armatures work Remember the robot that you created? – Body parts formed a hierarchy by parenting parts to each other – Children were attached to parents and when parents moved children moved with them Similarly, armatures are created as a hierarchy of bones, like an actual skeleton. 8

9 How armatures work However, the armature moves – Changes the relative rotation between bones – Actually gets displaced The model needs to move accordingly – Different parts of the model should follow different parts of the armature – The model has to deform as a result 9

10 How armatures work The armature has many bones We need to identify which parts of the model will follow which bones of the armature 10

11 How armatures work We can identify parts of the model through weight painting. For each bone, you mark parts of the model with weight values When the bone moves, parts of the model will also move, proportional with their weights for that bone 11

12 How armatures work As a result, the model deforms in ways that follows multiple bones. 12

13 How armatures work This way, we can animate the armature and the complicated model will follow it We don’t have to deal with individual vertices! 13

14 Practice Creating armatures in Blender Using armatures to deform models – Using envelopes – Using auto-weighting – Through weight painting 14

15 Creating armatures in Blender Create a new scene and remove the cube Create a single-bone armature using the menu 15

16 Creating armatures in Blender Now look at the different modes available when we select the armature – We edit the armature’s details in edit mode – We move and animate the armature in pose mode 16

17 Creating armatures in Blender Now switch to edit mode Notice that there are three parts of the armature that we can select – The root 17 – The head – The tail

18 Creating armatures in Blender The root is not very important, it moves with the head of the topmost bone The head defines where the bone is attached to. You rotate the head. The tail is where the next bone can be attached to. It also defines the length of the bone. 18

19 Creating armatures in Blender Now select any part of the bone and click Extrude on the left When you move the mouse now, you see that you are adding a new bone. Click to position it. You can also add a new bone using Ctrl+click 19

20 Creating armatures in Blender You can create multiple branches by selecting a middle bone and adding a new bone using Extrude or Ctrl+left click 20

21 Creating armatures in Blender In edit mode, you can move heads and tails of bones as you wish. If you look at the Properties pane on the right, you see where they are located. As you move bones, you see their sizes change because the distance between the head and the tail changes. It’s ok. 21

22 Creating armatures in Blender When you go to Pose Mode, you can only rotate these bones or move the whole armature using the root bone. This is how you will animate them 22

23 Creating armatures in Blender Just like animating other objects, you set rotation keyframes using the I key and animate the armature in time 23

24 Creating armatures in Blender You can only rotate bones around their heads and the heads seem to be attached to tails You can make heads not attached to tails 24

25 Creating armatures in Blender To make a bone that is not attached to parent’s tail – Select the bone in edit mode – Go to the Bone tab on the right – Uncheck Connected – Now you can move the head freely 25

26 Creating armatures in Blender However, they still rotate together when you rotate the parent bone 26

27 Creating armatures in Blender When you switch between edit and pose modes, you may notice that your armature takes on different poses This is because the edit mode shows the armature in its default pose You can select which pose you want to see in the object data tab 27

28 Creating armatures in Blender There, you can also change how the bones will appear 28

29 Creating armatures in Blender Notice that when you render, bones don’t show up (cube added to prove that the camera is looking at it) This is because bones are there only for deforming meshes, not for visual display 29

30 Practice Creating armatures in Blender Using armatures to deform models – Using envelopes – Using auto-weighting – Through weight painting 30

31 Preparing the armature and the model Let’s create a simple armature and a model Create a new blender scene, remove the cube and add an armature 31

32 Preparing the armature and the model Add three more bones to the armature vertically To make them aligned vertically, switch to front view before creating the bones In edit mode, use Extrude or Ctrl+click to create the three extra bones 32

33 Preparing the armature and the model Now, switch to object mode and lets add a cube Scale it down a bit to your liking 33

34 Using armatures to deform models Go to edit mode and select the top face Move it down to make the cube shorter, then extrude many times so that we have a long box with many vertices 34

35 35

36 Using armatures to deform models Now we can’t see the armature. We will make it so that the armature is always visible Select the armature in the outliner Under the object data tab, select X-Ray Now the armature is always visible. You can select the armature after selecting the box. 36

37 Using armatures to deform models Now we want to try different ways of making the armature deform the model. This is why we want to save the current state of our model so that we can go back to it. Save it as initial.blend Then save it again as backup.blend in case you overwrite it! 37

38 Method 1: Envelope weights Select the cube and shift+select the armature to select them both Select parent with envelope weights as shown below. You will have to select it one more time… 38

39 Method 1: Envelope weights Now the cube should move with the bones, but we did not set things up correctly, yet. Try it by selecting the armature, going to pose mode and rotating the root bone You may or may not have some vertices follow the bones 39

40 Method 1: Envelope weights We need to set envelopes correctly to fix this Go to edit mode and object data tab Select envelope under display Now the bones look different. When we select a bone, we see a white halo around it. This is its envelope. If the vertices are in this envelope, they will move with the bone. 40

41 Method 1: Envelope weights To modify these envelopes, go to the properties pane and change the radius and envelope values 41

42 Method 1: Envelope weights Make sure envelopes are large enough to completely cover the vertices 42

43 Method 1: Envelope weights Now go back to pose mode and rotate the bones. If you see bad vertices, go back to edit mode and increase envelopes 43

44 Method 1: Envelope weights Save this as envelope.blend Now we want to try another method Open initial.blend that we saved before. 44

45 Method 2: Automatic Weights This is an easier way to set up weights for the mesh Select the cube and shift-select the armature. 45

46 Method 2: Automatic Weights Set parent with Automatic Weights. You have to select it again. 46

47 Method 2: Automatic Weights Now try pose mode. Wasn’t it easier? 47

48 Method 3: Weight painting We will learn one last method for cases in which we want more control over the weighting. Re-open initial.blend again 48

49 Method 3: Weight painting Select the cube only and add an armature modifier to it 49

50 Method 3: Weight painting Select our armature as the Object If you try pose mode now, it will not work. We need to tell Blender how this armature modifies the mesh – We will do this by painting weights 50

51 Method 3: Weight painting Now do these steps carefully and exactly Go to pose mode Select one of the bones Select the cube Go to weight paint mode 51

52 Method 3: Weight painting If you did the steps right, you should see something like this (notice the active bone) Now you can paint the mesh to show which vertices will move with this bone 52

53 Method 3: Weight painting You can play with the weight and strength values of the brush. You can also try turning on Spray Red parts are the most affected by the bone 53

54 Method 3: Weight painting Now when you select the armature and go to pose mode, you will see that some of the vertices follow the bone. 54

55 Method 3: Weight painting Ideally, you want closest areas to be red and the nearby areas to be green. You can do this by painting a larger green with a lower weight, and a smaller red in it with a higher weight 55

56 Method 3: Weight painting In the end, the four weight paints should look something like this 56

57 Method 3: Weight painting Deforming this in the pose mode will be similar to the other methods 57

58 Method 3: Weight painting You can also paint when you are in-pose to add corrections 58

59 Modifying weights from automatic weighting When you do automatic weighting, it automatically adds the armature modifier just like we did in manual weight painting. You can modify these weights just like you modify the weights that you created 59

60 Lab Create a T shape (optionally with a head) Use automatic weights Make its arms do a wave motion (Bonus) do this using envelope or weight painting 60


Download ppt "SE 313 – Computer Graphics Lecture 14: Armatures Lecturer: Gazihan Alankuş 1."

Similar presentations


Ads by Google