Wednesday 9 May 2012

How to move a Rigify Rig

Once you've got as far as skining your rig and you're weight painting you kind of think, 'Hey nearly there!' and then you try and move the rig how you want so you can do the weight painting and find it doesn't really do what you want.. or anything much... Has all this time you've spent been wasted!

no

It's just not intuitive at all. The main confusing thing is that there are two sets of controls for each limb and they are the same shape as each other and on top of each other. Great. sooo....


On layer 20 of your blend file (not bone layer 20, but normal layer 20) you will find all the meshes used for the control bones and you can change them, either to make them easier to access (because your model has fat legs), or because you want to tell them apart.

For the uninitiated there are two types of control bones in the rig: FK (forward kinematics) bones -  these are like moving the joints of a doll and each limb receives the rotation of the joint nearer the body. Then there are IK bones (inverse kinematics) where you move the extremity and all the other bones move to fit they best way they can between the extremity and the body.

For the arms and the legs there is an IK bone which is about the most useful control bone for the limb. It is the same shape and position as another control bone which is the most mystifying of the limb. If you don't know what your doing you will select either at random and the limb will either move or it won't.


In the picture (we are looking at the meshes on layer 20) you will see the mesh used for the shape of the left foot control bone WGTfoot_IK.L Hidden behind it is WGTfoot.L. We want to make the useful bone different so we can select it easily and not be confused. I stuck a triangle bit at the front of the IK bone to make it easier to select.


You need to do the same with the hands as well. The 'rig hand_IK.L' control bone is just on top of the wrist and also cunning on top of the 'rig hand.L' bone. So I'm going to change it. The mesh on layer 20 is called WGThand_IK.L.


Now my hand IK bone has a nifty handle to separate it from the other bone. If you move these IK bones about, the limbs move... sort of

If we look at the arm we can see that the non IK control can come away from the arm.



The IK control is still above the wrist but the non IK or 'FK' (forward kinematics) control has move south along with the other controls we would normally associate with moving the arm.

So here is how it works. With the FK/IK (hand_ik...) slider set to 1.00 (see picture below) the IK control bone will contol the arm. To be more exact the arm will follow the controller bone but you can not rotate the controller bone so the hand will end up in some pretty strange positions.


If you move the FK/IK slider to 0 then the arm will move back over the other set of controller bones. Now you can move the arm about in the normal way; setting each bone one by one.

By pressing the Snap IK-FK button (bottom one) the IK control bone will move into exactly the same position as the FK bones. If you press the Snap FK-IK button then the FK bones will move to the position of the IK bones. So, if you have the FK/ IK slider up to 1.00. you can press Snap FK-IK to bring the FK control bones to the position of your arm. Move the non IK control bones to a new postion, and then press Snap IK- FK to move the arm to the new position.

Oh and by the way! There are some other IK bones which are influenced by the slider in the same way.



It is interesting to note that the Rig Main Properties sliders and buttons are the same for the set of controls (that was crap explanation). IE. the FK/IK slider is the same slider whether you see it when the IK control bone is selected or the non IK bone is selected.


If you have a non IK control bone selected then there is an extra slider.. Isolate Rotation. This works if the FK/IK slider is set to 0. Basically id Isolate Rotation is set to 0 and you tilt the body the arms will tilt with it. With Isolate Rotation at 1 the arms will keep there current orientation from the shoulder even if the body is tilted.

I think thats enough for now. Its the same from the legs pretty much. Once you've mastered these animation can begin.

Related Posts


How to weight paint a Rigify model

This has been quite labourious and I am not finished by any means.
(If you've not done weight painting before find some simple tutorials to get some practice before trying this)

I'm not sure I can recommend the automatic weights. It seems to give quite a low influence to the parts of the mesh you want and has a small influence over everywhere else. The result is you have to go over the whole model removing the unwanted influence from each bone and strengthening it where needed.

First things first. What to Weight paint?

It seems that in earlier versions of Rigify you needed to select a hidden layer of bones to parent them to the mesh. Now you don't, but you do need to unhide them for weight painting.


This gives you an extra set of boans which the mesh is actually boned to (it is not connected to the control bones). Remember 'Envelopes' should be unchecked as weight painting uses Vertex Groups.



You can see the new set of bones is much like the original rig we used to set up Rigify but for some reason we have two bones for each section of each major limb. (dunno why, but they both have an influence created under automatic weights.)

Secondly, you need to reduce any subdivision modifier on your model to just about 0. Weight painting seems to be a lot slower in 2.6 than it was in 2.49b and you need all the help you can get. Also, make sure that the Armature modifier is the first modifier in the modifier stack for the Model (ie. above subsurf). this seems to speed things up a bit.

Now you can spend ages weight painting everything - good luck and drink lots of tea.

Weight painting fingers is nigh impossible and needs to be taken into acount when making the model. Disregard the position of the legs and fingers in the Rigify initial rig and have the legs and fingers spread to reduce you problems later.

nice tip: See face Selection Masking here http://wiki.blender.org/index.php/Doc:2.6/Manual/Modeling/Meshes/Weight_Paint#Face_Selection_Masking
Next - How to move the arms and legs about.... not as easy or straight forward as it sounds.

Related Posts 
How on Earth do you use Rigify in Blender 2.6?
How to move a Rigify Rig

Tuesday 8 May 2012

How on Earth do you use Rigify in Blender 2.6?

I hate rigging. You spend hours copying an example out of a book or off the internet only to have your rig go into spasms in front of you and the rig does not work dispite hours of  work and frustration.

I tried to use Rigify in my last film only to give up because it did not seem to work. I came up with my own rig which was fine unless the character took more than 2 paces - so I used a fast cutting editting technique and the characters never walked more than two paces in any shot.

So now I am making another film and I need characters I am having an other look at Rigify. The answers of how it works are buried in a forum thread 11 pages long that starts in 2010 and is thus mostly out of date.

Here is the very simple 'how it works' which no doubt misses crucial features and breaks crucial rules but here we go:

1. Start a new project in Blender and open User Preferences under File and under Addons enable Rigify. It is near the bottom of the list under Rigging.

2. Create or import your model you are going to animate.

3. Shift A or Spacebar or however you bring up the Add dialogue and under Armature select Rigify. You will get a simple humanoid armature.

4. Your model and armature should have their feet at the origin of the Blender space (ie. where the red, green and blue grid lines meet.

5. Edit the armature in edit mode so the bones are in the right place for your model. ( details not covered here - you need to look at some basic armature tutorials)
tips i) switch on X Axis Mirroring in the tool bar of the 3D View window (press T) then everything you do to one side of the armature will be copied to the other side.
ii) a bit of bend in the arms and legs helps the IK (see note at the end)
iii) Also do not scale the armature as an object (scale the bones in Edit). Its worth doing Alt S to remove any scaling as the 'generated' armature (next step) will not have that scaling.

6. Shift A or Spacebar or however you bring up the Search dialoge and start typing Rigify. 'Rigify Generate Rig'. A new very complicated Rig will apear - it will appear in the wrong place. Delete the lold Armature. Move the new Armature over your model in Object mode. It should fit.

7. Select your model then select the Armature and do Control P. I select deform with automatic weights.

Voila!!!
But Wait! There are no constraints! Ah but there are. Once you have done the above proceedure all the constraints are turned down to zero. to switch them on:
1. Press 'n' in the 3D View and the right hand panel should open up.
2. Second from the bottom is Rig Main Properties and when you select a control bone the IK influences for that bone are available as sliders 
 Well if that helped no one else it helped me :)

Next -> Weight painting (not as easy as it sounds)

Related Posts
How to weight paint a Rigify model
How to move a rigify model