Unified Blender Game Rig
Tuesday, August 3, 2010 - 22:29
A recent submission got me thinking about why we really need a good blender rig that is tailored for games
So add here you bits of wisdom and if someone wants to rise up to the challenge and make it we can review it here
The general idea here is to iterate it so as to make it better
My list:
- The target for the number of bones should be around 60-70 bones that are weighted and there parent/children so for complicated ik and fk with helper bones I suggest using copy pos/rotation on the weighted bones
- The rig should be split into 2 subtrees connected by the root bone for blending of upper body and lower body animation
- Both hands should have an offset bone which represents something which it holds(a gun,a sword etc)
- Here is a tutorial I found usefull for foot rigging without any helper bones http://vimeo.com/13614039
- My suggestion is to keep the head simple(with one head bone one jaw and 2 for the eyes) because if we want something more complicated we can make a separate face rig
- We should really try using 2.53 bone layers and bone visibility but don't know of any tutorial about it
Current progress by Julius :
http://opengameart.org/content/blender25-humanoid-rig
Blende artists thread:
http://blenderartists.org/forum/showthread.php?t=202260&p=1737552#post1737552
Free Gamer thread:
http://forum.freegamedev.net/viewtopic.php?f=6&t=713
A control for all fingers the same time is on my planned to do list once I get to create the control widgets.
The hand behaviour is currently intended like that... it's a setup I got from a tutorial. I think it is done to have a single control for the rotation and the location. If I would cut the copy-rot from the actual hand bone it would do what you suggest, but then you would have to switch selection to rotate the hand. That is actually not a big deal... but the work flow is probably quicker when just pressing "g" first and the "r" and rotate a bit more. But I will see if I can set that up in a different way.
I don't think it makes much sense to start animating with that rig now... it is still far from completed, and until that is the case all animations will be wasted. It would be cool if you could experiment with the rig however, to see if every thing behaves like it should.
@adrix I will try to improve the shoulder further... but I really don't like the idea of just using FK for it. Basically you would agree that if it would move less upwards and forwards it would be fine like it is, or is there a more fundamental problem? Maybe I will quickly skin the rig to a model to see how the shoulder looks then.
Julius
Good Idea bout having the mesh
Indeed if it would be constrained it would not be a problem,however the sholders have to move upwards in some cases
Full rotation must be an option which is why I don't see the point in having IK
When you move your arm,as long as its not above the shoulder it would be pretty much fixed
Another point is if we should make a connected rig because from what I have seen it looks increasingly difficult to make one
Also i would very much like if you start on Skin/FK armature as soon as possible as there are allot of problems that can happen that would require the current IK to be changed
For version control you can use Dropbox,if you don't already have one,which you should
We can even make as shared folder for automatic syncing
http://www.dropbox.com/referrals/NTEwMjcyMTg5
Updated the rig to have an automated hand control. Also tweaked the shoulder so that the IK has a lower influence and the shoulder can now also be easily moved via FK.
--
http://freegamedev.net
I don't think GrizzLyCRO was referring to controlling the fingers,but the whole hand,like the hand target controls the arm
You could add a hold weapon bone and use the as the target for tracking maybe
Edit
There is a finger control, it a bit hard to see as it currently overlaps with the actual finger bones. Rotating it rotates the entire finger, scaling it bends the finger. But I think he also ask for a fist control earlier. Or are you referring to his rotation comment? As I stated earlier that is currently intended like that... I experimented a bit with finding a different solution... but for now the way it is set up seems the best to me (even though the hand does not rotate with the forearm).
A weapon bone is something I forgot about... yes could be usefull. Just right of my head I can't think of a different solution than parenting it of the hand_control, which would not really result in an additional control option (but it might be needed never the less for game-export).
Found this for the widgets btw:
http://www.blendswap.com/3D-models/misc-objects/metarig-shape-library/
Next step will probably be the copy-rot. rig and the widgets. Afterwards I will experiment with the spine control some more.
--
http://freegamedev.net
I mean the hand not the finger forgot to add a "don't think"
Don't parent it to the hand control,parent it to the hand
Looks like the fully connected rig isn't going to happen after all
The metarig shape library doesn't look very promising with that mesh twisted horribly like that
Ahh you are right about the hand target as a parent, fixed it.
Also added a copy-rot. rig to the file (second bone layer first row), seems to work perfectly (see v6)
I had a close look at the meta rig shape files (I just wanted to "steal" the widget wires from there) but I don't like their look so much. Maybe I find some other freely licensed ones to save the touble of making them myself.
--
http://freegamedev.net
Added a unified head and torso controler (grab moves upper torso, rotate rotates head and with 0.5 weight the neck) and a pole target to control the rotation of the upper torso. Rather unusual setup for the torso I guess, but for me it seems to work. please test it!
--
http://freegamedev.net
The spine IK doesn't work at all,it worked better in the previous version
My recommendation is to look at how other rigs handle it,if they only have fk for spine will just use fk
Could you be more precise what is not working on the spine IK? It works pretty nice on my pc. You are using the head_target to control it right?
Oh and except for a few good tuts on how to do feet, most of the blender rigs you will find on the net are either highly complex movie rigs, or basicly just a chain of bones (and most of the time quite rubbish too). I am basicly forced to innovate here, as there simply is nothing comparable out there for Blender.
I found some nice videos of rigs for Houdini and Maya, which seem to have more advanced controls, but reimplmenting the behaviour in Blender, just by looking at the vids is far from easy.
--
http://freegamedev.net
Other then the fact that if your spine moved like that you would not be human?
Seriously cut it out with the IK ,its not good to control everything with it
Also learning from movie rigs is a good thing,there made to help the animators, at least the human ones where there isn't cartoon deformation or strange limbs should be good examples,the only things you shouldn't care about them is morphs, shape keys,deformation systems, head rigs or spline bones otherwise you should learn as much as you can from whatever you can,including like you said other programs
Actually make a list of points and tricks you have discovered in those rigs and see if they are feasible to implement
Also I would suggest to look at footage showing on how a real human moves as I think this is the biggest problem you have,as you have no clear sense of how things should move
edit:
Almost forgot for spine why not go with mancandy implementation?
http://www.youtube.com/watch?v=T__WfyEFxkg
Its basically a FK setup with a a few tricks,and looks like it works really well
Just ignore the deform stuff
edit2:
Nevermind looks like the mancandy one is a little bit to complicated
*me likes IK*
My current reasoning is that I want to have as individual little controls as possible, while still keeping a maximum of movement options. AFAIK this is the general idea of good rigs.
Concerning the spine IK... I think it mirrors the movement of the human spine surprisingly well. In the extreme positions it looks a bit strange though I agree, but this is ment to be used for relative small movements really. And in that range it works quite well. Contrary to most movie rigs I develop this rig with what kind of animations are likely to be done for games in mind. There really isn't going to be a lot of extreme acrobatics going to be involved...even though I think the current rig could actually be used for animating something like Tombraider just fine.
The problem with the movie rigs is that they often use all sort of non bone animation helpers, which will be difficult to tanslate into in-game bone movement. But currently my rig can pretty much do all what is shown with the Mancandy rig.
Edit: Ok I limited the movement of the spine IK and shortend its chain by one so that you can FK control the lowest spine bone, also I improved the handling of the pelvis so that it can now be rotated independantly of the upper body, but the upper body still follows its location. See v71
--
http://freegamedev.net
In animation you >>WANT!!!!<< control thats the point,giving less control is the opposite of a good rig
Any animator will jump at your neck for what you are doing
I won't even bother following this anymore if that is your reasoning
Animators want only one thing and that is animating as easily as possible but as precisely as possible,in other words recreating accurate believable movement fast,without precision believable movement is not possible
Also any helpers can go in the rig as long as they don't modify geometry, if only the bones control geometry I don't care what is in the rig
End of rant
Hmm maybe I should rephrase my reasoning a bit... wasn't that clear I think.
For me a good rig is one that has only a few clickable controls that allow you to move a rig into more or less 99% of the positions you want it to be, while automatically dealing with all the tedious work of rotating individual bones. Of course it is nice to have the option of being able to tweak the exact locations also, but most of the time (if it is a good rig) you don't even have to bother with that. And having an easy one-click control outweights having individual precise control, if both don't work together (but of course an balance should be tried to achived).
In addition to that... this is ment to be a game rig, and in games you rarely have the close up shots you have in movies, thus I think for the sake of making the animation easier, we can sacrifice a bit of the precision if really needed.
Concerning the controller bones in movie rigs... well yes, but often that is tightly intervowen, with bones effecting one part of the mesh, while also acting as a target for another etc. And besides that, it is quite difficult to figure out how to replicate a behaviour if the rig is really complex, so these movie rigs are not exactly easy to learn from (I am looking at you man-candy >:( ).
--
http://freegamedev.net
There 2 types of animation
Good animation and Bad animation
There is no such thing as game animation and movie animation
This is a unified game rig,where all possible conditions have to be taken into account including the use of the rigs in cutscenes
If you think IK is still good for spine I challange you to recreate all this movements
http://www.cactus3d.com/FakeIKFKSpine.mov
The rig is IK with helper bones
I think it should be good enough for game cutscenes too... lets face it neither are game animations as high quality as movie animations in general, nor do open-source games have to reach that level. It's about speeding up the development to save man-hours for other more important things, while keeping the animation quality at a still very good (but maybe not perfect) level. A certain compromise has to be made.
Regarding the vid you posted (btw do you have more details on the setup of that?), I will go though the animations and try to replicate them with my rig:
1. movement of hip --- exactly the same if the pelvis bone is "grabbed"
2. movement of upper torso --- similar if head_target is grapped, but it does currently not extend as far downwards, there is some improvement possible there... but that is actually more IK rather than less.
3. rotation of hips --- similar to rotating the pelvis... doesn't move the upper body in my rig however. I am not sure if that is actually a good thing though. (It seems like the spine is a bezier curve in that mesh... possible to replicate in blender, maybe I will give it a try, not sure if that can be easily translated onto a bone only copy-rot rig)
4. rotation of upper torso --- sidewards up and down: possible (rotate spine.03), sidewards back and forth (move spine_target): possible, just back and forth: not really that possible with my rig... well sort of as that gets interpolated for most movements whem moving the head_target. Not really a very often used movement the latter... but you are right, there the rig in the vid is better in that regard.
5. Rotation of the middel torso --- possible by rotating spine.01, but again less movement resulting in the hips... maybe that's good or not.
Thanks for posting that vid! I might have a look at such a bezier spine and test it with my rig. It isn't currently a big difference however. Animations feel a bit smoother though, thus I guess you partially convinced me to try it out at least.
--
http://freegamedev.net
Arrgg... I think I figured out why there are no good tutorial on spine rigs for Blender, and why there are pretty much only FK spine setups in all rig you can download on the net. It seems like if you want to replicate the spines you can do in other animation packages (like the vid above) you need this brand new feature called "spine IK" and before it wasn't possible at all. The problem is that new feature seems wastly under-documented and also still pretty buggy :(
I had tried to use it already, but it didn't seem to work at all... that's why I didn't really had a second look at it. Turns out you need to set up a curve before. But even though that is probably easy... there are some problems that you have to seperate your rig in different armatures to avoid some bugs etc... really a mess to set up it seems.
Found two tutorials though... but both deal with non-human spine setups :(
http://users.xplornet.com/~gimble/blender/tutorials/spline_ik/spline_ik.htm
http://vimeo.com/12629274
--
http://freegamedev.net
Bah thats completely useless,do you think we can afford that many bones?
Its not even SPINE but SPLINE which is completely different
Spline think of it more like a bezier curve or photoshop path
Ehhm yes spline it is called, never the less I am quite sure that that is what is needed to duplicate the behaviour you linked in that video. It doesn't need that many bone though, you can map much less bones to the curve.
I will probably try doing a spine with that ;)
Oh and while playing with that I realized that I made a huge mistake by not putting the copy-rot rig into a seperate armature. Fixed in v72 (damn that was a lot of stupid extra work).
Edit... argg that buggy crap... in general the spline ik seems to do what I expected it to do (e.g. you would be very happy with the torso behaviour), but right now it really deforms the rest of the rig badly, and I have no idea why.
--
http://freegamedev.net
No you don't get,spline IS the many bones,its a method to control many bones using IK because the simple IK breaks down
What I wanted you to copy is the controlling mechanism and limiters
IT HAS NOTHING TO DO WITH SPLINES nor does the rig which probably has normal IK
Sorry to say that but you don't seem to know what you are talking about. Have a closer look at the vid you posted and you will see that the movement obviously follows the path of a bezier curve all the way from the hip to the shoulders.
In fact I have already a sort of working spine utilizing a spline IK that behaves very similar to the video. The problem is that there seems to be a bug in Blender 2.55 that makes it always deform the bones badly, regardless of whether or not you activate that checkbox or not:
http://blenderartists.org/forum/showthread.php?t=202910
Sadly there don't seem to be many people around who actually know this new feature in detail, and I just about tried everything now :( It's not the general feature though that is not working.
Of course you are right that a splineIK is a nice way to control many bones, but it is basically not IK at all. It is a "FK" method that makes a set of bones follow a curve. And with a curve like that you can very nicely control a human spine too. With more bones it of course animates smoother, but 3 or 4 are just fine to approximate a human spine.
--
http://freegamedev.net
Well, for now I am sick of dealing with that crappy Spline IK function... the concept is fine I guess, Blender's implementation just doesn't work properly for what I have in mind :(
How about a spine rig like this:
http://vimeo.com/3807543
Or maybe like this:
http://www.vimeo.com/10685206
?
Edit: Ahh, it really was a Blender bug... http://blenderartists.org/forum/showthread.php?t=202910&p=1742175#post17...
it's supposed to be fixed in the svn now, so I will probably wait until the next Blender 2.5 beta arrives before continuing to implement a spine. So next I will try to give the rig some widgets ;)
--
http://freegamedev.net
The rig seems made to be deformed
Not exactly what we need for a game rig
The strechy behaviour of the first one? Yes you are right, but I think you can turn that off easily.
The rest of the controls of that setup seem quite nice though. Currently I am a bit unsure what to do next, maybe I will just go ahead and implement that spine, as it seems to be a decent setup (more standard than what the rig has right now, and the spline IK rig I have in mind is something that might tun out to be much better, or not work at all...).
--
http://freegamedev.net
Just found that article, maybe it is of interest:
http://www.harkyman.com/2010/11/26/recording-ik-movement-into-fk-bones/
Ahh thanks for the article. I think what he is getting at is the FK/IK switching that was discussed earlier.
I am not so much of an expert regarding that, but it seems to me that this is mostly an issue that comes up with movie animations, where you have much more and extreme animations. While with game aninations you have a small set which you can basically keyframe "to death" and thus the problem of misbehaving IK chains between the keyframes is almost non existant. But I might be totally wrong about that... I guess I will see once I start doing some animations.
--
http://freegamedev.net
There is no difference between game animation and movie animation,rig wise,only time wise
He, you said that before, and I didn't want to start a discussion about it, but except for the fact that there is of course stricty technical speaking no difference, the actual difference in what to animate, how to animate and the amount of animation necessary is huge. Thus for all practical matters they are two completely different beasts, and this reflects on how to build a rig too.
--
http://freegamedev.net
Here's one that I made. The figure is fairly low poly so you can do whatever with it...
I was using this in one of my projects, so there might be some logic/ animations there, but you can fix that by opening a new file and just appending the rig and model.
Enjoy!
http://dl.dropbox.com/u/7417218/BasicCharacter.blend
Link is broken
Soo, what was the conclusion here? Yay/Nay?
Well, there was a bug in Blender 2.5 preventing me from further experiementing with the spline IK for the torso. Otherwise the rig is quite advanced already (needs a simple/game compatible face rig and widgets though).
If I find the time in the next couple of weeks I will see if the new version of Blender fixed the issue and then I will add widgets and so on and maye a quick face rig too. However I am really busy with real life issues, so don't count on a quick solution.
Do you want to start making animations, or why do you ask?
--
http://freegamedev.net
Well, I wanted to hook it up to CubeCreate but then I realised I don't /reeeealy/ know how to animate properly or how to assign rigs, and don't really have the time to learn
heh, story of my life. Never stopped me from doing anything though :p
--
http://freegamedev.net
Hi Julius, im hoping you still reply here. i am trying to retarget the hand to my mesh, but when ever i move the hand rig in edit mode the fingers go wierd directions when i tab back to object mode. do you know how i can fix this?
Clint Bellanger: "The rigs I use for creatures/heros in OSARE are amateurish. No weights, just vertex groups."
In Blender, every assignment of a vertex group has weight to it. If you don't use weight, it defaults to just 0 and 100. 100 is max weight, while 0 is no weight.
Syrsly
Twitch Streamer, Web/Game Developer, & Artist
syrsly.com - contact me for commissions, thanks!
Sorry didn't see your reply earlier.
Honestly I didn't have a look at the rig for a long time, and it is probably either something that changed in Blender or an amateurish error of mine back then (both equally likely I guess).
However quite often it is also easier to adjust the mesh to a rig then the other way around.
But as I wrote back then already... I am really no expert on rigs and am just struggling with an similar error on another rig I got from blendswap :(
--
http://freegamedev.net
I've noticed that a lot of the models shared on BlendSwap either do not hae rigs at all or are rigged very poorly. You're better off just looking at rigging tutorials and making a rig of your own.
Syrsly
Twitch Streamer, Web/Game Developer, & Artist
syrsly.com - contact me for commissions, thanks!
Pages