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
If I knew more about rigging i would try to make something more "game friendly" but i only started rigging and animating a few weeks ago, I'm not real sure what FK is but ill definately reasearch it a bit. I wouldnt mind trying to put something together and sharing it with everyone so we have a base rig/model to base our main toons off of.(then people can alter it to suit their needs). Good topic!
Also, do you do rigging in blender at all? i noticed in the original post you said "if someone wants to make it", you seem to be pretty knowledable on the topic, have you made something to submit so we kinda get what your looking for?
The rigs I use for creatures/heros in OSARE are amateurish. No weights, just vertex groups. I'm not even sure how to set up kinematics (I barely know what kinematics means).
One very nice thing for a "unified blender game rig" would be easily sharing poses and animation. I would probably convert my models to all use a standard rig if one was available.
I'm not an expert and haven't made a successful rig(cause this things can get complicated) but did do a bit of research on it
I found this sets of tutorial for rigging the best
http://www.youtube.com/watch?v=tApdSx_4b0Q
And is also what the make human rig is based on(also might want to check the make human rig)
However that rig does tend to be heavy on helper bones which are a pain to setup
Although I wonder if we can cheat and use the foot drivers from the privious video
Btw FK stands for forward kinematics and basically is the opposite of ik, aka manually rotating the bones
I dont see why "helper bones" are a problem, for example the 2 knee bones i have placed in front of the armature are just parented to the foot bone, so if you rotate the foot the knee rotation follows it, just makes it a bit more realistic. wasnt a pain to set them up, it was as easy as extruding a bone from the knee joint, pulling it out a bit and parenting it to the foot. Other than all the hand ik's and rotation setting the rest of the rig i submitted is basic stuff. If you want to simplify the hand rig just delete the hand all together make 1 single bone for the hand and add some fingers :)
Why
http://www.youtube.com/watch?v=D-rDyASHn3Q
Maybe you'll like to make something based on the makehuman.org effords:
http://www.youtube.com/watch?v=zeLM7EZTcqY&feature=related
If someone wants to learn more about rigging (not just the "dumb" follow-me tutorials, but also the explanation behind it) you can take a look at the Mancandy FAQ DVD by the Blender foundation. It's all about rigging and also a bit about animating. http://www.blender3d.org/e-shop/product_info.php?products_id=99
Having said that, you don't have to buy the DVD, as it's released under some form of CC, so you can legally torrent it or similar. If you do buy the DVD, the earnings go to support future Blender cause. All I can say is a proper rig can make animating things so much easier, I really recommend going through the videos (especially since they are also released under CC).
For the more specific things:
FK = Forward kinematics. Here the control goes from the highest bone in the hierarchy to the lowest bone. You rotate the tigh bone, calf bone follows, foot bone follow, toe bones follow. You rotate the calf bone, foot bone follow, toe bone follow, but the tight bone is unaffected. It's like posing these lego technic figures http://www.1000steine.com/brickset/images/8712-1.jpg
IK = Inverse kinematics. Here the whole chain of bones is controled by the end (target) bone. For example, you position the foot bone and the whole chain of bones in the leg will automaticly adjust to follow the target bone as best at it can. Instead of manually rotating each bone in the leg, you simply position the foot. And by controlling the foot bone, it stays firmly on the ground right where you want it.
Both methods have their uses. IK allows you to control limbs with very few control bones, while FK is superior when it comes to arcs (like swinging arms in a walkcycle).
Regards,
Lamoot
@ adrix: Hes got like 6 controller bones on a foot with 2 deform bones on it, lol. Not to mention hes using Bone shapes to simplifiy that clutter that is a foot rig.
Not an expert either, but from these free rigs (for Blender 2.5):
http://blenderartists.org/forum/showthread.php?t=187051
For sure a few nice tricks could be taken. I really like for example the idea used in the spider rig of having an IK controller that can be rotated and moved as usually, but when you scale it it rotates the knee (thus you don't have to swich selection when animating).
Otherwise, well here is an old 2.49 rig I build a long time ago:
http://opengameart.org/content/blender-humanoid-rig
I guess it's not really good, but it's down to the basics, and the proportions are pretty good too I think.
--
http://freegamedev.net
I could post up one of my generic rigs... Athough it has no IK.
http://www.blendercookie.com/2010/07/30/using-the-human-meta-rig/
Could be usefull ;)
--
http://freegamedev.net
Ok I made a first base. Still pretty basic, but usable:
http://opengameart.org/content/blender25-humanoid-rig
@adrix89 what do you think we have to do to seperate the mesh to allow for better animation blending?
--
http://freegamedev.net
Bump... check the discussion in the linked rig from me too ;)
Here is a nice way to rig a mouth that would also lend itself well to a game model (few bones), so we could also make a optional face rig:
http://blenderartists.org/forum/showthread.php?t=201712
Still planning to improve this some time but my PC with an actual GPU broke, thus working in Blender is extremly slow on this machine :(
--
http://freegamedev.net
This is awesome, thanks for the link! Would be great if it worked nearly well for midpoly and lowpoly models too. I will try that out soon!
I might try to put this (human) rig onto pfunked's human base model, and add a mouth to it, will be interesting!
Actually rigging seems to work surprisingly well on my slow PC (well at 10fps or so)... tonight I strongly improved the foot rig (according to the tutorial above, that with the action target, not the python script) and once I have cleaned up the rig a bit I will publish a version 2.0. Stay tuned ;)
--
http://freegamedev.net
Updated the rig with a better foot:
http://opengameart.org/content/blender25-humanoid-rig
I left out the widgets and the foot tumble control, since that seemed unnecessary and also slowed down my pc too much ;)
Should be now much more walk cycle friendly.
--
http://freegamedev.net
My recomandation is to remove all palm bones as they are simply a waste
You also absolutely need shoulders,they are a must!
The pelvis bone doesn't make much sense better use the first spine as root if you can
It would be nice if we have no disconnected bones on the main hierarchy(pelvis) like Pompei2 said to have maximum compabilty
Also I;m not sure how useful the foot tumble is but I would prefer to not limit the animators
Other then that rig the hand and make a FK switch and your done
Na I wouldn't call this even close to done... this isn't supposed to be a quick rig, but a all bells and whisles first choice for humanoid game models ;)
Concerning the palm bones... well they offer a nice way to strech the hands and if you just don't skin them they are simple helper bones that never show up in the exported model. But I am planning to make that more clear by putting all the helper bones on a seperate layer. Maybe some widgets would be nice after all, so that one can hide all the helper bones...
Concerning the shoulders... well make a suggestion. I am really unsure how to set them up. Right now there is this "upper shoulder bone", which I think prevents the shoulder from deforming strangely. But I am not sure if that is the best solution.
The pelvis bone is there for better "hip-swing" animation, which I think is a pretty usefull feature, especially for female models ;) Could you elaborate in more detail what you mean with your comment regarding the disconnected pelvis bone? I currently don't see what the problem is there.
Regarding the foot tumble... well maybe I will still include this... but it's a really rarely used motion that can be done FK also. Besides... modern engines have a foot snapping system that does align the foot with the ground automatically thus doing most of the work where a tumble might be used.
What is further needed to rig the hand? It is already working fine... just some wigets and maybe some "action constraits" for typical movements would be nice... a FK switch would be indeed nice... I have seen that in a nother rig... but how do you actually make one? Got a tutorial on that?
Other remarks:
I am really unsure if a seperated copy rotation rig is really needed... the way the rig is set up, the main hiracy is exactly what you would want for skinning. So unless we significantly change that I don't really see the need for that (and it might just confuse the users). I think one of the main reasons such a setup is used in professional environments is that thus the modlers and skinners can already work on their parts while the riggers and animators might still be refining things on the main rig. Thus this way no time is lost waiting for the final version of the rig. In this case however the rig will be final before used as an asset, so I don't really see the need. But I would be happy if someone else would give some additional ideas why it might be worthwhile to make a copy-rot rig.
I am also thinking about creating a custom bone psydo mesh, like the did with the tarsal bone in the tutorial... there are several very nice rigs doing that (Alex's horse rig on this website for example), but I fear my current pc might be to slow to work with that than... and other that looking nice, I can't see the actual benefit right now. But maybe there is some other reason why it would be nice to have something like that?
But once this rig has reached a "final" state we really need to start making a animation preset. Is anyone around who has some previous animation experience? Mine is very limited to be honest.
--
http://freegamedev.net
Pelvis is hierarchical so its exported to the gpu,so is the palm bones
Any bone that is parent or child to a skinned bone gets exported
I'm not really sure exactly how gpu skinning works but thats my current understanding
For sholders just connect them to the spine, on a spine bone lower then the arm and it should be fine
For hand something like this? from what i have seen in your rig the hand is just bones
http://www.youtube.com/watch?v=wkzK2CYx9RA
Also it might be a good idea to add a hand target to the ik,not sure how though
A copy/rot rig is very important,first you are absolutely sure what gets sent to the gpu cause there absolutely no helper bones at all,every bone is skinned
Second you can make it as compatible on all platforms as your not limited to only one,you can easily make a totally connected rig for Pompei2 (which I just realize you have too because otherwise the fingers cannot be connected to the arm) and a disconnected but without the palm bones(which on gpu needs as less bones as possible) for me so as to have maximum compatibly(which is the point for an unified rig)
BUT depending on the total amount of bones we will have for the connected one we might just go with that
Also you can use the copy pos/rot as an fk which you can switch which is why animators use 3 septate hierarchies fk ik and the blend, but we might be able to just use the copy pos/rot for the blend
Also there is a difference between confusing the users and making there life hell
This rig is not for fools who just started playing with blender and want a simple rig to play with, this is a rig especially tailored for games,this is our priority,giving them all they need to easily export there rigs into there game engines as well as making the animators life easy is a must
Ok updated the rig again with a hand rig according to the tutorial you posted. It's still a bit uncomfortable to use without the widgets, but I will add those in the end.
Otherwise... I removed the lowest spine bone (seemed sufficient to have the pelvis), added a central "body" bone (not sure if needed) to move the entire rig, and added some "shoulder blade" bones... I hope that is what you ment with your shoulder remark.
I think the hand has a target... the bigger bone around the hand bone... maybe I should rename that.
You might have convinced me regarding the copy-rot. rig... (but again will add this in the end). However I am a bit confused about the GPU skinning. I am well aware that (especially on older hardware) you have only a limited number of bones that are "for free/hardware accelerated", but does that really concern us much in this case? AFAIK the exporter from Blender just exports the skinned bones, so if we have helpers as parents or childs those would never show up in the binary file and thus would also never be rendered in the GPU right? So as long as the number of skinned bones is low enough, how should the rest of the rig be of any concern?
Any more ideas or improvments?
--
http://freegamedev.net
http://blenderartists.org/forum/showthread.php?t=202260&p=1737552#post17...
Maybe something comes out of that too ;)
--
http://freegamedev.net
All connected bones DO get exported if they are parent/child to a skinned bone,that's the problem
The idea with the shoulder is that the arm is limited to the neck level so to go above your head you have to use your shoulder
Now that I look at it the arm hierarchy is kind bad,the shoulder thing that acts like a target would be better replaced with an actual target(like the leg)
And the arm IK needs some constrains so as to not go above the neck without the shoulder
Ok, then we definitly need a copy-rot. rig.
Concerning the soulder... well I will think about it. What I like about the current setup is that it might be very usefull to conteract shoulder deformation if skinned to the mesh. But I agree it is a strange setup... however it is the one implemented in Blender's meta-rig.
Alternatives would be a sort of targetless IK setup like explained in the Mancandy FAQ videos... but that is not really functional IK and thus can not be used to animate holding a weapon well. Of course we could also set it up as the legs, but even though that sounds somewhat logical, I have never seen a rig doing it like that (for what ever reason).
Any hints on setting up the constrains you mentioned? As you can tell this is my first experience with an advance rig, before a simple IK chain was already rocket science for my rigs ;)
--
http://freegamedev.net
Ok I found out what the reason for that strange shoulder bone is:
http://wiki.blender.org/index.php/Doc:Tutorials/Animation/Armatures/BSoD...
Given that I think will switch to an elbow target design.
--
http://freegamedev.net
I don't think thats why there using it
Anyways do switch to elbow because we do need a sholder
http://opengameart.org/content/blender25-humanoid-rig
Updated it again.
Changed to pole target IK both the fingers (simplified but same functionality) and the arms (still a bit strange in movement, not exactly sure why).
Also tried to have a shoulder that follows the arm a bit... tried to find any good infomation on how to set up a shoulder, but either there was simply a FK setup or a hugly complex 50 bones containing super rig... seemed impossible to find a nice but simple setup. This way it somewhat works, but I really don't like that the IK snapping between edit and pose mode is that big.
Also made it possible to move the hand a bit by FK, by lowering the copy-rot. contraint to .8 influence.
--
http://freegamedev.net
You don't have to use IK on sholder
There is this set of scripts being developed to massively simplify rigging in Blender and it plans to include all of these more advanced approaches to rigging legs, arms and fingers etc. It's being developed by the main rigger for Big Buck Bunny and Sintel open movies. Here's a thread at Blenderartists . And some interesting youtube WIP videos:
http://www.youtube.com/watch?v=6lgwJWQ9_JE
http://www.youtube.com/watch?v=eUSyoO2BmaQ
I don't want to undermine your effort, but I'm wondering how usable this project will be with rigify in development.
@adrix89: I really want to have an automatic setup that moves the shoulder according to the arm movement... that really adds a lot to character animation to have some realistic shoulder movement. First I tried it with a follow target constrain, but the IK does the job much better. But I am open for other suggestions.
@Lamoot: I am aware of that, but unless they make it really fexible so that all sort of strange multipedal rigs can be made I don't really see the point. Once you have a nice rig for a regular human it is very easy and quick to adjust it to the proportions of the individual models.
In any case making this rig is really just a mean to an end, what I really want to have/create is a "plug-in" human animations set for all sorts of games (many FPS for now though). That is what is really lacking in open-source game development (and one of the main reasons people stick to modding games like Half-Life, where such a thing exists). That riggify system is really of no need or use regarding that.
--
http://freegamedev.net
Can't say how flexible or unflexible the rigify system will be. In one video he showed how it's possible to create a biped with 2 sets of arms. Not sure about the legs, especially those alien knees that bend forward. I'm keeping my hopes high for it though.
So the real goal is to provide a flexible and robust rig and also animations? In that case it does make much more sense to have an actual rig compared to the rigify approach.
Lamoot a rigify system is inherently flawed to use because its tailored for use in blender not for exporting for games which can have there own set of rules and limitations
Julius An IK shoulder doesn't make much sense because the shoulder is animated in only some instances and I don't think it moves around that much
@Lamoot: Yes, animations. But who knows when this will actually happen. I am still hopeing that a skilled animator shows up and just quickly does it... since I have never done walkcycles etc before... so it will be a slow progress (but hey great learning experience :-/ ).
@adrix89: You think so? If I move my arm around the shoulder always moves with it a bit. Especially when lifting the arm above the shoulder joint all the movement comes from the shoulderblade. I tried to limit the movement if arm movement is below the joint however... but somehow the IK and Target contraints override the limit rotation ones :( But with the low influence (.2) it has right now it seems to be ok... maybe the shoulder movement is a bit exagertated now... but real actors also do that to give their performance more life ;)
Concering the FK-IK switch... it seems to me that that is a lot of effort to set up (additional set of FK bones etc) while giving very little benefit (in fact all the movement can be done with IK, it might just be a bit more comfortable to do certain movements with FK). But maybe I will lower the influence of a few IK controlers a bit, like I did with the hand to allow for some fine tuning with FK. But feel free to correct me on that stance... I might be overlooking something where FK is actually needed.
--
http://freegamedev.net
FK is an absolute must,don't limit the animators!
Besides you already going to set up a copy rot/pos for the exported so use that as FK
for switch look a at this tutorial http://www.youtube.com/watch?v=S8IsnFG9NUU
With this setup you can even add limit rotation on full influenced IK
Hmm... it's not like the rig doesn't have FK... it's just that I don't see a really good reason why it should have complete FK control via a switch. But you are right that the copy-rot. rig we are planning to do anyways could be used for that (unless the copy-rot. contrain interferes). But I will have a look at the tuts for sure.
Oh and I made a small update to the rig... limit rot. is working after all on the shoulder bone, I was just stupid and tested it with 100% IK weight. Now it limits the movement of the shoulder downwards a bit and also minimized the edit/pose mode snapping.
I think the current shoulder setup is pretty neat... but of course I know little about animating. It just seems too simple of a solution... and I wonder why it was absolutly impossible to find a good reference rig with an automatic shoulder. Maybe I am just a genius :p
--
http://freegamedev.net
Or maybe it doesn't make sense,like I said the shoulder doesn't move that much if you don't try to go with your arm above the neck
Also the upper arm needs the needs the rot limiter
Also if you still want to have the shoulder IK put it in a separate switch
He? I can't aprehend what you just wrote... With the current setup the shoulder does not move much unless the arm moves above the head. But small subtile movement can make a big difference.
I don't see the need for a rot-limt of the upper arm at all, could you explain further?
The last bit doesn't make sense to me at all :-/
--
http://freegamedev.net
Damn was posting on the rig comments not the forum thread
Bah i made some big mistakes
The previous shoulder controller is better because the taget doesn't move arround everyehre and can be easily rotated
Also is better to keep the last spine and use that for copy rotate
Use this rig and forget about IK
Focus on getting the copy rot/pos FK right
http://dl.dropbox.com/u/1027218/Blender/humanoidrig25_v22.blend
Set the shoulder only on the FK,as it will inherit the position from the IK when the target is moved
Edit:damn the foot controler shouldn't have been deleted
Eidt2:fixed
Edit3:RIg is still broken
The upper arm needs to limited because its the only part that cannot get above the shoulder which is the point of adding the shoulder in the first place
Try stretching you arm and move it above your head without using the shoulder and you will see that you cannot
Best bet is to go with the above so subtle movements can be made directly by moving the target
I like the IK and the shoulder as it is ;)
But you are right the elbow target was messed up... I think by parenting it to the shoulder instead I pretty much fixed that. Have a look at v4.2 I just uploaded.
I also experimented with a IK controller for the spine in that version. I think it might be quite handy to position the head, and since it is targetless you can still FK controll the individual bones.
The main question I have now is though... will it work for animation too? I read a lot of times that certain IK setups work fine for posing a model but break apart when actually animating it. Does anyone have further insight into that?
--
http://freegamedev.net
First a shoulder doesn't work that way,position the arm in a hold gun position and see for yourself that the IK is horrbile
Second the shoulder target is better then the elbow target
I don't think a spine IK is a good idea, at least not without finding a way to constrain it
http://imgur.com/lBsjN.jpg
Looks pretty good to me. Maybe I will add a small farward and backward rotation constrain to the shoulder so that is doesn't move quite as much forward... but it is really only a little too much I think.
About the spine IK, well you might be right, it does act a bit flakey. It is really nice that the torso follows the neck this way however, turned out to be useful in the pose above (which took only a few seconds to make).
--
http://freegamedev.net
That isn't looking good AT ALL
You try positioning your shoulders in your neck
The point I'm trying to make
http://www.youtube.com/watch?v=SzWxM_W4DNA
Maybe I am a bit stupid right now, but I don't get your point. Currently the shoulders are in that position still as wide as the hips (maybe the head is a bit oversized and thus give the impression of having a very think neck), but I agree that they might be better a bit further apart, but really only a tiny bit.
If I lift my arms to such a position in real life, the shoulders also move inwards as they move upwards to level the gun with the eyes.
Last but not least... yes such extreme yoga movements might be a bit difficult to achive with the current rig (for that FK is needed), but seriously... who is going to make a yoga game ;)
--
http://freegamedev.net
but seriously... who is going to make a yoga game ;)
Nintendo? :)
I think this project is at the point where having revision control is going to help it by allowing a easier merging and collabaration.
Some place like http://gitorious.org or http://gitorious.org will work fine. Then do periodic releases here and elsewhere.
Julius The point is that you actually have a mesh it would look like the shoulder is at the neck like that guy is when he shrugs upwards
The point is shoulder IK sucks
verbalshadow there blend files,git isn't going to help you that much for this files, although I do agree there might be better places to update it then this
I dont know much about rigs, but currently one thing that is way off is hand movement.
There is this bone hand_target.R and when i move it everything before it follows (arm) but hand does not.
For example if i move that bone in front of character hand will still point to side, also there is no bone to control whole hand (all fingers).
GrizzLyCRO
You can do it FK style for the moment,I don't think it is to hard to create a target
But sincerely I'm not that intrastate in the hand,there are bigger problems then this
I dont want to make any animations now, i will wait until rig is complete,i dont know how to make good rigs, but i think that i can animate and i want to share my animations...
This will sound rude, but if it is not hard to create target, why not do this right away? It only has sense if hand rig will change, but if it will not change, i dont see point in making it later..
And Julius thank you very much for your effort :)
Pages