Blender2.5 humanoid rig
Ok this is a work in progress, which will hopefully turn into a OGA colaboration project, as described here:
http://opengameart.org/forumtopic/unified-blender-game-rig
Currently it is mostly based on this tutorial:
http://www.blendercookie.com/2010/07/30/using-the-human-meta-rig/
But I hope we can make this even better and more suitable for a game.
Updated preview picture below (but already outdated again).
V2 has an improved foot rig based on this tutorial:
http://www.youtube.com/watch?v=tApdSx_4b0Q
V3 has an improved hand rig (and some other smaller changes) based on this tutorial:
http://www.youtube.com/watch?v=wkzK2CYx9RA
V4 has a improved arm and shoulder rig and some smaller changes (v4.1 even further improved shoulder; v4.2 fixed some issues)
V5 has an automated hand control, and a further tweaked shoulder
v6 has an second copy-rotation rig for weighting to a mesh; see second bone layer (+ some smaller tweaks)
v7 has an upper torso and head control... rather unusual setup I guess, but try it out, I think it works nicely.
v71 has an tweaked spine and pelvis control
V72 FIXED A BIG BUG REGARDING THE COPY ROTATION RIG (moved in second armature)
Comments
The 2.5 rig i posted a month or 2 ago is also based on wards rigging tutorial :P their the exact same rig.
Lol, ok. Should have checked that ;) I worked a bit on the proportions however.
Have you made any further progress in improving it? Because currently I think it is still not really usable as a game rig.
Depending on the type of game, it might be useful to include a 2nd version of the rig with only 1 finger instead of 4. Hope you know what I mean :D Would reduce the bone count by 6
Also, for games based on the Cal3D skeletal animation library, they don't support "detached bones", that is like your legs and arms, they are detached from the main body (dashed lines). Replacing the empty spots by bones would increase the bone count by 4 though :/
Well I was told that modern skeletal formats only save those bones that are weighted to the mesh, so if you just use one for the fingers for your mesh, the others should never "leave" Blender.
Same should apply for the disconnected bones, but of course one would have to add them.
Oh, yeah you're right I totally didn't think about that!
Though I don't know what they do if the unused bone is in between of two other used.
Well judging from the total bone mess imported md5 models give you, they just represent them as disconnected bones (in fact all bone seems to be disconnected and lack any length information, i.e. only their point of rotation and the weighted vertixes are stored it seems).
But I would be happy if someone more knowledgeable about this could reconfirm this.
Maybe this is true for MD5 models (I don't know them at all), but for Cal3D I can say that this is not the case. Cal3D is the exact opposite: it stores the hierarchy of the bones and has problems (read: cannot handle) "detached" bones. For every bone it stores: parent bone, "translation" (aka: parent bone's length, NOT "how far from parent bone's end I am" like in detached bones you use for the legs) and bone rotation.
How is it possible to support blender and not support detached bones?
Anyways its a bit of an misunderstanding on my part that you need 2 separate hierarchy
What you need is only tag a root bone(somewhere around pelvis) that will separate the rig into 2 parts in a md5 file so thats not really a problem
On the detached bone note however dashed lines are actually connected I believe as they are still parent and child,not sure about how Cal3d handles it though
As for gpu accelaeration it does not take into account bones that are not weighted and aren't linked as parent and child so be careful of that,separate copy rotation rig with only weighted bones is an absolute must to keep things clear
On to the rig make the hand have 1 bone instead of 4(I'm NOT talking about fingers)and as previously suggested duplicate the weighted bones and use copy rotate on them(I know I repeated 11 times but its that important) so as to be linked only in blender not in the gpu,the weighted duplicate can be a whole hierarchy rig without any detachment for the Cal3D users,you would just need a exporter that ignores the rest
You could probably could the weighted duplicate as an FK rig too and just blend it between the IK with a slider(100% would give full IK while 0% would give you the weighted duplicate with no IK influence,not sure its possible directly as what examples I have seen used 3 rigs with 1 of them that was blended between them)
I recently had a closer look at the Md5/iqm implementation in Sauerbraten/Cube2 (which I think would be a good reference implementation if this is to become a unified game rig), and there all you need to do is to specify at which bone the hirachy is split in a simple .cfg file by adding the bones name. Furthermore you need to specify the torso and head bones which follow the mouse movement.
Overall it's a pretty strait forward implementation however.
I will probably add the copy rotation rig and the things necassary for iqm comatibility in the next following weeks, but it might be delayed a bit since I just fried my laptop yesterday :( (no data lost though).
The four hand bones btw are a pretty nice way of animating the fingers... maybe it would be sufficient if I simply omit these in the copy rotation rig? that way we could get the benefits of them for animation, but they would never show up in the exported model. The same could be done for quite a few additional bones btw.
Oh and what about a face rig? Does anyone have some pointers for a simple game face rig, or how to set up the rig that one could easily added if necessary?
sorry for the confusion, with "detached bones" I was talking about the bones with the dashed lines in blender, where their start is not the same as the tail of their parent, cal3d can't handle those.
As for the face rigs, I don't know, they are usually done using "morph targets", I have never seen it done with bones, though you may try it.
>>Julius
The hand bones(like I said not talking about fingers) are completely redundant because no current gen game uses hands at that resolution for games to actually see the changes,not even fps hand models, heck most games don't even bother with the last 3 fingers to keep them separate
Thats used for video animation not games,and since this is supposed to be a game rig i prefer you don't add extras for animated movies,as there gonna have more advanced rigs anyway
>>Pompei
I don't think making a complete hierarchy rig is a problem as its only 4 bones diffrence(2 pelvis 2 shoulders)and since a separate weighted copy rotation rig is needed anyway there will be no problem with helper bones and stuff
On the comparability issue does anyone know any engines other that cube2/quake hybrids? how does Ogre handle models?
I apologise, Cal3D indeed can handle those "detached" bones without any problems!
Updated the rig with a better foot (v2) and hand (v3)
Updated the arm and shoulder rig
delete please
Julius, is it possible to somehow connect the control and deform armatures in edit mode? I mean, for reflecting the change of a bone in edit mode in one armature to the other one.
That is because an armature never exactly fits a model. When using your armature with another model, I need to move the bones around a bit. The problem is that in order to use it right, I'd have to move the bones exactly the same in both armatures, which is a near-impossible task!
Any ideas?
I have the same issue as Julius, how can we adapt this to our mesh ?
It's awesome so far, but been able to adapt it is vital, any tutorials ?
some spontaneous workaround:
move the first bone-tip to its desired place; shift-S -> "cursor to selection"; switch to other armature, select corresponding bone-tip; switch pivot point to 3D cursor; scale zo zero (S, 0, Enter) what makes it hop to the 3D cursor location
It sounds painful, though.
Ahh, well I should probably really have another look at this.
When I made this two part rig I was pretty oblivious to any problems this would cause, and right now I think it was probably a bad idea.
However if I was to update it (sorry no promises, since I am really busy in "real-life") I would probably have a look at the relatively new animation retargeting system in Blender:
http://wiki.blender.org/index.php/User:Benjycook/GSOC/Manual
That way I imangine one could change the rig for skinning quite freely and have the animation rig retarget it's animation onto that regardless.