Couple of years ago, I saw this excellent GDC talk about an indie’s approach to procedural animation. I was amazed at the wide range of possibilities based on clever usage of procedural techniques. It stuck with me since then.
I started researching the subject recently, with the intent of improving Spider Engine‘s animation system. I explored Inverse Kinematics, and implemented the FABRIK algorithm. Here it is, running on a 6 bone structure:
I used this technique on a more complete example, and created a walking creature, with a procedural walk cycle and an IK simulation on each leg.
This is how the concept of Araknoids came to life. At this point, I knew I wanted to make robot spiders that steal each others legs. It’s just the logical conclusion from here!
Faking IK with Key-frame animation
I invested more in the animation system and decided to replace the IK simulation on spiders with simple key frame animation. This is relatively faster and will scale better to simulate more spiders with more legs. Here is how it works:
I created different key poses in the Spider Editor. A pose is simply a hierarchy of entities.
I implemented interpolation between them (by interpolating the local rotations of each entity), and orienting the root entity to wherever the “IK” target is. The final result is acceptably close to what an IK simulation would give, and reacts smoothly and naturally to changes in the “IK” target’s position:
This is pretty much the technique used for animating spiders in Araknoids! Here is a preview of applying this technique to an actual in-game character:
Thank you for reading! I will post more updates through the development.