What is IK?
Posted: 04 Feb 2010, 16:50
Since people tend to bring up IK in situations where it doesn't belong I suspect too many people have no idea what IK means so I'll explain it here.
Inverse kinematics means forming the animation from influences in an order that does not follow the direction of the hierarchy. Or in more practical terms: IK lets you move the hand or foot of a skeleton and automatically rotates the arm/leg bones to allow that position without scaling the bones. IK includes things like constraints (bones can only move in certain arcs, e.g. no backwards elbows) and indirect links (e.g. making a cable that connects to two parts of the model without being the parent of either part).
If you just move your bones to certain angles that's forward kinematics (FK). For a predefined animation you can bake an IK solution into FK keyframes, the result will have a static solution for the IK chain but unless you're altering the animation later on that bake will still be accurate and not require the processing time to solve the IK again.
For games you use FK almost exclusively. IK solvers are extremely rare in games and that's in a large part because they make no sense there. I'm uncertain if ragdoll or cloth simulations count as IK but I don't think so (since they only perform FK and a bit of upward force propagation, not solving the chain to get a certain end point). IK in games can be seen e.g. in Doom 3 to make the character's feet always stay on the ground no matter how the ground is shaped (e.g. on stairs the feet will have different heights). IK does NOT include aiming a weapon at something, that is simple FK with some rotation offsets, the base pose points the weapon straight forward and that pose is modified by rotating the spine bones like a turret.
I think some of the really advanced TA walkscripts also include IK to keep the feet planted on the ground no matter how the unit moves but almost nobody does that for units used in Spring mods.
In conclusion, when talking about Spring IK is most likely irrelevant and will only appear in your animation software before you bake it into FK keyframes if Spring ever gets a proper skeletal animation system.
Inverse kinematics means forming the animation from influences in an order that does not follow the direction of the hierarchy. Or in more practical terms: IK lets you move the hand or foot of a skeleton and automatically rotates the arm/leg bones to allow that position without scaling the bones. IK includes things like constraints (bones can only move in certain arcs, e.g. no backwards elbows) and indirect links (e.g. making a cable that connects to two parts of the model without being the parent of either part).
If you just move your bones to certain angles that's forward kinematics (FK). For a predefined animation you can bake an IK solution into FK keyframes, the result will have a static solution for the IK chain but unless you're altering the animation later on that bake will still be accurate and not require the processing time to solve the IK again.
For games you use FK almost exclusively. IK solvers are extremely rare in games and that's in a large part because they make no sense there. I'm uncertain if ragdoll or cloth simulations count as IK but I don't think so (since they only perform FK and a bit of upward force propagation, not solving the chain to get a certain end point). IK in games can be seen e.g. in Doom 3 to make the character's feet always stay on the ground no matter how the ground is shaped (e.g. on stairs the feet will have different heights). IK does NOT include aiming a weapon at something, that is simple FK with some rotation offsets, the base pose points the weapon straight forward and that pose is modified by rotating the spine bones like a turret.
I think some of the really advanced TA walkscripts also include IK to keep the feet planted on the ground no matter how the unit moves but almost nobody does that for units used in Spring mods.
In conclusion, when talking about Spring IK is most likely irrelevant and will only appear in your animation software before you bake it into FK keyframes if Spring ever gets a proper skeletal animation system.