So I finally decided to update my knowledge about animating non vertex baked meshes (I know I am late
).
Thus I decided to have a look at the rigs from various id tech 4 based games (on the left prey, on the right doom3):
What I don't quite get are those "intermediate" bones, which do not seem to have any real function, as the way it is set up (at least after import in Blender) still allows only for one point of rotation.
In addition to that it seems strange that
in Prey (and Quake4) those "intermediate" bones are also in such a strange angle to the overall leg (as opposed to the Doom3 rig where they are in the same direction).
And isn't it desirable to have as little bones as possible if the rig is manipulated in realtime (e.g. ragdolls)?
I hope some of you guys have some insight into this. THX!
Replies
take a look at this post by poopinmymouth aka ben mathis
http://www.gameartisans.org/forums/showpost.php?p=3445&postcount=21
Thus you only have one point of rotation (at the base of the knee bone) as it would be the case with two simply interconnected bones.
Edit: To illustrate my point that is isn't the mesh deformation:
It's not just the knee vertexes that are weighted to the bone, but all of the lower leg, thus it's not different from a single "lower-leg bone", right?
I am guessing that if could have something to to with the reference point of the IK solvers (which are sadly lost in the "whatever"-md5 conversion), but that would only explain it in certain cases (to my limited knowldge about that stuff). However this type of bone placement is almost everywhere in these meshes.
Edit: Or could it be simply an error caused by the blender md5 importer?
Certainly our ETQW rigs just have a single joint at the knee and only one ankle/foot bone. Maybe the D3/Prey ones had more since they were singleplayer though. Seems like really odd bone locations though.
I don't have the games here so I can't check how they import into Max, I'm pretty sure there are console commands in developer mode to show the bones in the game, maybe if you look those up you can compare what the game is drawing with what your importer is giving you?
But after longer consideration I think it really is just an importer error (well the rig works just fine... it just looks odd).
I've made a few characters for The Darkmod so far and you do have to place IK solver bones.
These bones need attached to the mesh but not weighted to any verts. Their placement can be fairly random but their pivot location needs to be correct.
Basically they tell Doom which way to bend a joint when using IK to manuever stairs when the regular walk/run anims don't work.
If you look in the characters .def file you will see these named like so:
IK_Knee.
Also in the def are other leg bone names that tell Doom which bone is the thigh, kness, ankle and foot.
The important part is that the pivot of the IK bone is on the outside of the joint.
This is my post at D3World that explains everything I know about those bones.
http://www.doom3world.org/phpbb2/viewtop...974b03f7e53bd73
BTW, the bones do change size when run thru the md5 exporter. My rig did this to, I had full length bones down the calf, but once run thru the exporter they became small bones at the knee (which is the same pivot location as the original bones) so they will be weighted to the entire low leg. Nothing is wrong with that, it just looks different.
Also, the IK solvers aren't lost in conversion. Doom3 doesn't use IK Solvers as 3dsMax or Maya do. They just use IK based on the animations, the 'IK_Bones', and the .def file that tells D3 which bones to use in an IK set-up.
It's fairly primitive but really only used for making feet hit the ground over uneven terrain.
The IK is useful in 3d programs when you're animating the mesh but is not exported with the mesh or anims.
I am currently working on a generic rig:
Any ideas how to improve it? (The "floor" bone is hidden on that screenshot).
But I think I got it to a usable state:
http://freegamearts.tuxfamily.org/fga-it...=Humanoid%20rig
(Download .blend licensed under the GPLv2 or later)
But I got a question regarding such rigs:
I basicly tried to stay close to rigs found in id tech 4 games and just added IK solvers and such which were probably lost during the md5 conversion.
However this clearly isn't as comfortable as some rigs ment for non real time rigs, which have all sorts of helper bones and seperate pieces of the skeleton which have their own root etc (as typically done for rendering rigs).
It is really a general rule to not use such helper bones (which I assumed) or does it not really matter that much as long as the general limitations of the .md5 format (40 bones) are not exeeded (as someone suggested to me)?
Basically you'd just be "baking" your animation during the export process, and you'd only export the bone objects which are actually affecting the mesh, not exporting any of the helpers or other extra things which aren't actually adding any info, they're just making it easier to control the bones you want to export.
This may be slightly different to stuff like Crysis where they have IK on things, I'm not sure how that's handled. Although I think MD5s can do IK too, I'll have to check on how that's set up.
However I doubt the Blender exporter supports exporting only certain bones
Hmm, but wouldn't you still need a complete skeleton with one root bone, as opposed to individual foot rig setups (with their own root and only connected to the main rig via constrains) as often seen with rendering rigs?
At least I imagine ragdoll like effect could be quite difficult that way.
Concerning realtime IK in Doom3, well AFAIK is is really basic and controlled by an external config file in which the individual bones are named. (Edit: Baddcog already mentioned that above)
Dunno about Crysis either.