Qexpo Tutorial Day 5

<-Day 4

Day 6->

Here’s the fifth tutorial, on rigging a humanoid using a skeleton so it can be animated. For this tutorial you will need a human model to work with. Unlike the tutorial on the fusion blaster, the exact details of the model won’t affect how you do the tutorial very much, so if you have your own human model you’d like to use then by all means give it a go. If you don’t have a model or don’t feel like straying too far from the path of this tutorial download this one, which I’ll be working from.

http://www.quaketastic.com/files/models/knight_gmax.zip
t5i01

There’s a gmax file, and a tga skin. Make yourself a new material and apply it as before, but unlike last time where we used check.tga, use the provided knight.tga as the map. It’s a 30 minute skin job, but I think it’s nice to have something to look at that isn’t red and white. Having just applied that skin, we’re gonna make it disappear. Select the knight, right click and select freeze selection from the right hand side of the pop up menu. The model should become greyed out. This is handy for animating, as we can select the bones without moving the model about. What bones I hear you cry?

Margin note 6
Quick tip I’ve since discovered if you don’t like the way the skin disappears on a frozen entity. In the right hand pane open the Display tab, and at the bottom there’s a checkbox called Show Frozen in Grey. Clear it, and your model looks normal while frozen.

t5s01Time to create some bones. 1: Go to the create tab. 2:Press the “systems” button on the far right. 3: Select “bones”. 4: Change both width and height to 2, so they fit the model well. Now left click inside a viewport to create the first point of your bone, then drag the bone out. Left click again to fix the endpoint of that bone, and start a new bone. Make a chain of three or four bones to practice, then right click to end the chain.

t5s02Although this is a quick way to make several bones, it’s not really as practical as it looks. You need to position bones in 3d, not 2d, so you really need to rotate after each bone is created in most cases. So, we’re now gonna practice joining a new bone to an existing one. Select all but one of the bones you just created and delete them. Then select the create bone tool again, and point the cursor at the remaining bone so that the cursor turns into a crosshair(pictured). Then left click, and start drawing the bone. You’ll notice that it’s automatically generated as a child of the existing bone. Finish it by left clicking, then right clicking. You’ll see a third little bobble of a bone has also been draw at the top of the second bone, and is currently selected. Delete this, and then rotate the second bone to your heart’s content.

t5s03So we’ve mastered creating bones, get rid of the practice ones you’ve made and we’ll start. First, we make a pivot bone, basically the stick which the puppet sits on so we can move it about the stage. Make a bone as pictured, going vertically from floor to the lower torso, move it so that it’s tip is at the base of the spine. Finally name it Pivot – it’s helpful to name all the bones so you can keep track of what’s happening later.

t5s04Next we will do the spine. The human body has 33 bones in the spine, we’ll get away with the two pictured here. Using the technique learnt above, make sure they are created as children of the pivot. Call them upper and lower torso, you should be fine just drawing them in the side view. You want to ensure that the upper torso ends where the neck should begin.

t5s05The natural thing seems to be to continue to the neck and head. Make these in the same way as the torso bones. The neck should be fairly short, and in the position you’d imagine. The head is just a rough thing to indicate the skull. Since nothing attaches to it, all that matters really is the position of the neck/head joint. The bone shown is a good size, it’s easy to manipulate, without protruding.

t5s06Time for the arms, and for this you’re gonna have to backtrack a little. You want these to be children of the upper torso, so they’ll have a pivot at the same point as the neck. Select the bone tool and point to the lower torso, then left click and start drawing. You’ll want to draw each of these bones seperately, as they need careful rotation to follow the curve of the shoulder and arm. Do them one at a time, delete the little bobble bone at the end then rotate it into position in all the windows. If you rotate it and find it’s too short or too long, don’t worry, just delete it and draw a new one. The end point of the shoulder should be so that the line between it and the elbow runs straight down the arm. Similarly the line from elbow to wrist should be straight down the arm. The elbow itself should be in line with the edges of the polygons of the upper and lower arms. Refer to the screenshot when in doubt, and don’t forget to label the bones: Left Shoulder, Left Upper Arm, Left Forearm and Left Hand.

t5s07Do the same for the right arm of course, but don’t worry about the sword for now. Then it’s time to do the leg. Go back to the “pivot” bone when starting to draw these bones. We start with a pelvis bone, which like the shoulder bone ensures that the limb is pivoting about the natural part of the body, further forward than the base of the spine. Basically it’s just like for the arm, get the bones to line up down the length of the limb, put the knee on the join of the polygons, and the ankle in the right spot inside the foot. Do this on both sides too.

t5s08Finally we’ll deal with the sword. Make a completely separate bone of about the length of the sword, somewhere away from the main model. Unfreeze the model by right clicking and selecting unfreeze all, then select it and go to the modify panel. In the selection panel click the cube to go to element selection mode and select the sword in the viewport. Move and rotate the sword to line up with the bone. The sword is shown in red and the bone in yellow.

t5s09Go out of selection mode and with the model still selected apply a skin modifier. The skin modifier allows you to assign the vertices of the model to be controlled by different bones, so you can animate it just by moving those bones. The assignment is done in two ways, using envelopes and painting the vertices. The former is quicker, although less precise, and so we’ll use it for the first pass on the model. Click “Add Bone”, then select all the bones on the list except for “Pivot”. Click Select, and then click “Edit Envelopes”.

t5s10Select the sword bone from the list, and a red thing should appear about your sword bone. The envelopes are quite confusing, especially when mixed in with the rest of a model, so I’m going to try and explain the parts of the interface so you get an idea of how to edit the envelopes. The numbered arrows in this screenshot indicate numbered features of interest, rather than things you should be doing in order.

  1. Outer handle. This allows you to move the outer edge of an envelope. Any vertices inside this will be (at least partially) controlled by the bone it belongs to.
  2. Inner handle. This allows you to resize the inner envelope, which controls how sharply the strength of the envelope falls off. When two or more envelopes cover a vertex, it will be partially controlled by each bone, and the degree of control each gets will be determined by the strength this sets
  3. Orientation Handle. This allows you to rotate one end of an envelope about the other end, and drag it up and down to shorten or lengthen the envelope. I used this to put the envelope at the titled angle you see in the screenshot – it’s a useful feature for the torso bones, as the bones aren’t perfectly vertically aligned, but it makes sense for their envelopes to be so.
  4. Selected vertices. The vertices selected by the envelope are coloured according to how strongly they are assigned to this bone. As there are no other envelopes covering the sword, these are red – 100%. The colours go blue->yellow->orange->red.
  5. Radius control. Although you can set the radius by dragging the inner/outer handle, it’s a sensitive control, so sometimes it’s easier to just click the handle then manually type in the desired radius.

Taking your time to get used to the interface, adjust the envelope for the sword so that all the vertices in the sword are selected, but nothing else is. Turn off “Edit Envelopes” and select the Sword bone. By moving the sword bone about you should find the sword moves with it.

t5s11Go back to the model and edit envelopes again. This time look at the Head bone. We can see that the envelope here isn’t large enough. Using the outer handles, we must enlarge the envelope enough so that all the head is covered. Enlarge the inner envelope on the bottom, as this will make it easier to pick out the head vertices without getting too many of the torso ones. Don’t worry overly about this though, we’ll correct the few wrongly assigned vertices later.

t5s12Notice that you don’t have to select bones from the list by name, you can just click on the handles in the viewport. Select the left shoulder, and adjust the envelope to look something like this. The important things to note are that all the vertices on the right side are selected, but none of the central ones are. You might think we’re selecting some verts that belong to the left upper arm, bear in mind that the weights of these will change as we do the envelopes of other bones. I find it’s best to try and get the vertices on these kinds of joints to be orange for both bones, although you have to wait until the second bone to see if you’ve pulled this off.

t5s13While you have the left shoulder selected, 1: press the copy button. Then select the right shoulder and 2: press the paste button. The envelope you created is duplicated. Since the model is pretty much symmetric, you can just do this all the way down, saving you almost half the workload. However, notice that while the the inner and outer envelopes are copied over, the adjustments to the Orientation Handle are not, so do these manually.

t5s14Moving on to the left upper arm. I’ve tweaked the bottom of the envelope to be just orange. The loop of arm just above these should be assigned to this bone 100%, but they are all caught in the envelope of the shoulder. So rather than struggle with getting the envelope just right to grab them all, we’re gonna use the paint tool. 1: Select Paint Weights. 2: Change the radius to 0.2, 24 is huge on screen. 3: Go to a viewport and position the circle centred over one of the vertices you want to grab. Click it and you should see it painted. If it’s not yet red, paint it over again until it is. This manual painting overrides the envelopes, which comes quite in handy. Do this for the whole loop of the arm. Don’t forget the two verts at the back!

This is all there really is to using the skin modifier. You just have to work your way through the whole body like this. The forearm, and the corresponding leg limbs should all be weighted in the same way as this upper arm, red for the vertices that just belong to the bone, orange/yellow for the vertices on the joint. The feet and hands should just be ball like, covering everything beyond the ankle/wrist with a 100% weight. You can be quite messy with these in fact, letting them extend well beyond the end of the limb. The pelvis doesn’t usually need anything assigned to it that strongly, maybe a little of the tops of the legs. These can otherwise be assigned to the lower torso, it’s not often these parts are moved independently. The upper and lower torso are often the hardest parts to get right, so leave them to the end. That way you can use the Paint Weights tool lots to grab all the parts. A model specific recommendation for the knight is that the pads on the upper and lower legs should be rigidly assigned to their respective bones. That way they look like real plates of metal.

Once you’re happy with the way the assignments look, turn Edit Envelopes off and give it a test. The first thing to check is that every vertex has been assigned to something. Do this by moving the pivot forward a fair distance. Most of the model should move forward, but you may get stretched bits likes this:

t5s15

Each of those is a vertex that isn’t assigned to anything. You can undo a few steps, try bigger envelopes and then go again. Or you can use the Paint Weights tools from here, as you assign them to a bone, they’ll jump into the correct position again. Just make sure the bone you assign them to is correct! Once this is done, test rotating the bones, then undo. You’ll probably find it helpful to freeze the model again, so you don’t keep selecting it when you want to grab a bone. Don’t worry, it still deforms according to the bones, even when frozen. You want to make sure that things are assigned correctly, that when you move the arm only bits of the arm move with it, that kind of thing. If you aren’t happy, change the assignments about. You can in fact do this later on, even when we start animating, but it’ll affect all the animations you’ve made, so it’s good to have it right.

And what of those animations? Well, next time we’ll get round to making some, and also looking at the QC code that controls monster animation, so we can test it out. Stay tuned!

<-Day 4

Day 6->

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s