← Back to list

Unlocking FABRIK for Inverse Kinematics

Animating smarter, Not Harder

anurubha_ · 2025-06-03 10:45 · 0 claps · 2.4 min read
#inverse-kinematics #procedural-animation #fabrik #graphics-programming
Open on Medium ↗
Wiki topics: 💻 · Programming 🎬 · Film & Television

Unlocking FABRIK for Inverse Kinematics

Animating smarter, Not Harder

Inspired by the procedural animation in Rain World, I took to exploring this fascinating technique, where not everything is pre-animated, but instead calculated in real-time to respond with genuine physical reactions. What stood out to me in Rain World was how its animation system brought creatures to life by creating movements that felt organic. Here, each creature exhibits an almost life-like dynamism; their wings flap, bodies wriggle, and the animation seems to breathe life.

In an attempt to recreate the movements of the creatures in Rain World, I took to Inverse Kinematics and here is what I have.

[embed]Results from my implementation of basic FABRIK algorithm using C++ and OpenGL. The algorithm is modified to stylize the movement such that the chain slowly move towards the target rather than an instant movement.

Inverse Kinematics

As with animating human figures, in animation, we often find objects that are linked together in such a way that their movements are interconnected. In a simple animation, a number of keyframes that describe the position of the various parts of the linked object are interpolated to create the animation. However, this requires the animator to provide the position of each joint for all the keyframes and can easily be a tedious process to create an animation that looks natural. Here’s where Inverse Kinematics shines. It allows a user to simulate the motion of a linked system without having to manually control each of them. Inverse Kinematics(IK) is an animation technique that answers the question: given a desired end position, how should all parts of a linked figure move to reach this position?

IK simplifies and enhances animations by computing how a series of joints should adjust to position the end-effector exactly where intended, in real-time. While there are analytical and numerical methods to solve an IK, I chose to dive into a heuristic algorithm called FABRIK. FABRIK is computationally simple and intuitive, and yet creates animations that feel natural and realistic.

FABRIK (Forward And Backward Reaching Inverse Kinematics)

A simple explanation of the basic FABRIK algorithm, given a linked system / chain with a fixed root and no constraints in movement and a target position, is as follows:

Step 1. Reachability Check:

Start by checking if the target is reachable by the chain. For this, calculate the total length of the chain and check if the distance between the root joint and the target is less than this total length. If not, the target is unreachable; so move the chain such that it forms a straight line in the direction of the target, as if it is trying to reach the target. If the target is reachable, go to step 2.

Step 2. Forward Adjustment:

Here, we move the end-effector towards the target, with the connected joints following it (move from end-effector towards root). Begin by placing the end effector on the target. Then, for each joint, calculate the new position such that it lies on the line connecting it to the newly adjusted joint, maintaining its fixed distance from that joint.

Step 3. Backward Adjustment:

Now, since the root is fixed, we need make sure that the position of the root is same as it’s initial position. So the same procedure as forward adjustment is repeated, but now from the root towards the end effector, starting by placing the root at it’s initial position. This completes an iteration of the algorithm and if the end effector’s current position is within the tolerance distance of the target, you’ve found a good solution; stop the algorithm. If not, repeat from step 2 (Forward Adjustment) until convergence criteria are met.

The beauty of FABRIK lies in its simplicity and the ability to handle complex movements with fewer computations. The blend of efficiency, accuracy, and ease of implementation, makes this algorithm an ideal choice for real-time applications where speed and natural movements are important.


메타데이터
post_id
fd4e6b223038
slug
unlocking-fabrik-for-inverse-kinematics-fd4e6b223038
url
https://medium.com/@anurubha1998/unlocking-fabrik-for-inverse-kinematics-fd4e6b223038
canonical_url
https://medium.com/@anurubha1998/unlocking-fabrik-for-inverse-kinematics-fd4e6b223038
author_url
https://medium.com/@anurubha1998
status
ok
fetched_at
2026-07-19 14:56:01