Saturday, November 24, 2018

Araknoids DEVLOG #1: Spider Animation

Couple 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!

Fake Inverse Kinematics using 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.
3 poses representing the extension states of a leg
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:
Interpolating between poses using the "IK" target's relative Z position as a factor

Orienting the leg towards the "IK" target

Interpolation + Orientation = Fake IK in 360 degrees!

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.

Here are handy links to follow the progress:

- Araknoids home page: araknoids.com
- Youtube: Araknoids on Youtube
- Facebook: https://www.facebook.com/franticsoft/
- Twitter: https://twitter.com/franticsoft





No comments:

Post a Comment