Hints, tips and tutorials for 3D modelling & content creation
|
KatsBits
Creating 3D models, meshes &
game content
3D modelling & meshing, level editing and textures makingHints, tips and tutorials for 3D modelling & content creation [back]Using Blender 3D's IK system for game animatingResources
The above videos (no audio) should play without any problems in Windows Media Player, if they don't you may need to install the XVid codec. Contents
What's this all about? ^As of Blender 2.41 Blender 3D has a new and improved skeletal animation rigging system that is very useful for game animation, but becuase of the way game characters are often contructed it means having to work around some of the problems they present when using Blenders IK system. Limitations of Automatic IK ^Because setting up IK constraints in Blender can be a tricky thing to do and often breaks a skeleton if you don't set it up correctly in relation to what Blender is wanting to see, the Blender developers implemented an 'Automatic IK' system. Enabled in POSE mode 'Automatic IK' applies a set of inverse kinetic limitations and constraints based on the structure of a skeleton; 'child' bones automatically effect a bone directly above itself and on up through the 'chain';
The main problem with the autoIK system is that it tends to 'lock' the position of individual bones in such as way as to prevent those that aren't part of a direct parent > child chain from being moved away for their point of origin (point around which a bone rotates) when grabbed (key 'G'). The video clip below show this; the head bones move as the should; tilt/rotate back and forth, but the bones associated with the 'eyes' don't - they should 'free float', move around without restriction - currently all they can do is rotated around their individual origin points. Using IK chains in 'manual' mode ^Because of this 'problem' (it's not really a problem in the literal sense but a result of the way IK works) Blender allows the creation of a skeleton that has a 'special relationship' between bones in a chain; an IK 'contraint' (limit) can be set that allows IK behaviour up through a chain whilst not impeding the individual movement/rotation of any bones not directly contained in part of the IK.
The video below shows how setting up the IK chains manually allows individual bones to be manipulated free from the IK chain; those within the chain to still effect the whole IK object as normal. Why is this useful? ^Game character animation usually has different requirements to that of rendered animations, as a result skeletons are often set up in a specific way to compensate for the ability to do one thing but not another; It's during this process that the limitations of the skeleton become apparent; bones being 'locked' mean that certain types of movement are impossible to do using the autoIK system. By manually setting the IK restrictions the behaviour of a skeletal rig can be tailored to exactly what is required. Setting up a manual IK chain ^As mentioned above, using a rig that's been automatically IK'd doesn't always yield the desired results, this means assessing a characters rig and figuring out which bones need to act as an IK 'root' for a chain.
In the example video below two control bones are used; one at the front of the foot which is used to manipulate the whole leg, allowing the foot to bend relative to the pose being made. The other extra bone behind the heal manipulates the leg bones only, allowing the posing of the leg without touching to foot. In other words;
The 'knee' bone in this setup needs to be 'free floating' - it's the reason for setting up the IK constraints manually; it's movement is clearly restricted when it's part of either an Automatic IK chain or is given it's own IK solver both of which 'lock' it's position. Adding an IK control ^Setting up an IK chain manually is pretty straightforward, the only tricky part is deciding which bones need to have the IK parameters applied to it - one of the other reasons to use control bones. Before beginning you need to determine how you want an IK bone chain to deform; a leg for instance typically starts at the foot and ends at the hip or upper leg depending on the physical traits of the character being animated; a dog obviously needs a different set up to a humanoid.
Once the IK chain has been set up you should find that grabbing (key 'G') the control bone (in POSE mode) will position and pose the mesh and skeleton relative to the new IK chain. Because the IK's haven't been 'forced' as they are with Automatic IK, only the IK Solved bones control the chain which in turn allows ancillary bones to move relatively freely. |