---
id: "fabrik-ik"
title: "FABRIK inverse kinematics"
aliases: [Forward And Backward Reaching Inverse Kinematics]
domain: "simulation"
stage: "simulation"
realtime: "realtime"
platforms: [cpu, webgl2, webgpu, unity, unreal, godot]
year_introduced: 2011
inputs: [skeleton]
outputs: [skeleton, animation]
style: "both"
dynamic: "dynamic"
cost: "cheap"
authority: "Aristidou & Lasenby, 2011"
url: "https://texelatlas.vercel.app/t/fabrik-ik/"
sources_verified_at: "2026-11-29"
---
# FABRIK inverse kinematics (Aristidou & Lasenby, 2011)

> Heuristic IK solver that moves joints along lines (backward from the target, forward from the root) instead of rotating angles, converging fast with natural motion.

## Reach for it when

- feet or hands need to reach a target naturally
- tentacles and tails should follow a moving point
- jacobian ik is unstable or too complex to implement
- procedural spider legs must plant on terrain

## How it works

Treat the chain as points. The backward pass places the end effector on the target and, moving toward the root, positions each joint on the line from the next joint at its original bone-length distance. The forward pass then fixes the root back at its base and repeats outward. Iterating the two passes converges in a few iterations. If the target is unreachable the chain simply stretches in a line towards it. Joint limits are applied by clamping or re-projecting directions after each placement. Branched chains (fingers, spines with arms) are handled by solving sub-chains and averaging at the junction.

## When to use it

Choose it for foot placement, hands reaching, tentacles, tails and procedural spiders where robustness and simplicity beat exact joint control. Prefer analytic two-bone IK for arms and legs when you need exact elbow/knee control, Jacobian-based IK for tight constraints, and [Motion matching](https://texelatlas.vercel.app/t/motion-matching.md) or authored animation when the pose quality matters more than reaching accuracy.

## Cost

cheap — Cheap: a few passes over a handful of joints.
Measured GPU Weight: 11.02× baseline (moderate) — 0.3625 ms median / 0.3691 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 8.73× baseline (moderate) — 0.1388 ms median (2.61× faster on L4).
Ampere A100 scaling: 7.58× baseline (moderate) — 0.2183 ms median (1.66× faster on A100).

## Failure modes

- Joint-limit handling is approximate and can oscillate
- No natural twist control: needs a pole/up vector added separately
- Ambiguous solutions flip between frames without a bias towards the previous pose
- Multi-chain solutions with end effectors in conflict converge unpredictably

## Engine support

- godot: builtin — `Add FABRIK3D (IKModifier3D) under a Skeleton3D` (evidence: https://github.com/godotengine/godot/blob/4.7.2-stable/doc/classes/FABRIK3D.xml, checked 2026-12-01) — Legacy SkeletonIK3D also solves with FABRIK.
- unity: official — `Package Manager > Animation Rigging > Chain IK Constraint` (evidence: https://docs.unity3d.com/Packages/com.unity.animation.rigging@1.3/manual/constraints/ChainIKConstraint.html, checked 2026-12-01) — Official Animation Rigging package.
- unreal: builtin — `Animation Blueprint > FABRIK node or Control Rig > Multi FABRIK (RigUnit_MultiFABRIK)` (evidence: https://dev.epicgames.com/documentation/en-us/unreal-engine/python-api/class/RigUnit_MultiFABRIK, checked 2026-12-01)

## Dataflow

- Inputs: skeleton
- Outputs: skeleton, animation
- Platforms: cpu, webgl2, webgpu, unity, unreal, godot

## Presets

### FABRIK on a 5-joint chain: pose after 1 vs 6 backward/forward sweeps (glsl-fragment; rendered 2026-11-29)

```json
{
  "J": 5,
  "ITER": 6,
  "SEG": 0.2
}
```

```glsl
// FABRIK on a 5-joint chain: orange = pose after 1 iteration, white = after 6; target moves with time.
const int J = 5;
const int ITER = 6;
const float SEG = 0.2;
float segd(vec2 p, vec2 a, vec2 b) {
    vec2 pa = p - a, ba = b - a;
    return length(pa - ba * clamp(dot(pa, ba) / dot(ba, ba), 0.0, 1.0));
}
void solve(inout vec2 p[J], vec2 base, vec2 tgt, int iters) {
    for (int it = 0; it < ITER; it++) {
        if (it >= iters) break;
        p[J - 1] = tgt;
        for (int i = J - 2; i >= 0; i--) p[i] = p[i + 1] + normalize(p[i] - p[i + 1]) * SEG;
        p[0] = base;
        for (int i = 1; i < J; i++) p[i] = p[i - 1] + normalize(p[i] - p[i - 1]) * SEG;
    }
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
    vec2 uv = fragCoord / iResolution.xy;
    vec2 base = vec2(0.5, 0.12);
    vec2 tgt = vec2(0.5 + 0.34 * cos(iTime * 1.3), 0.45 + 0.25 * sin(iTime * 1.3 + 0.5));
    vec2 a[J], b[J];
    for (int i = 0; i < J; i++) { a[i] = base + vec2(0.04 * float(i), SEG * float(i)); b[i] = a[i]; }
    solve(a, base, tgt, 1);
    solve(b, base, tgt, ITER);
    vec3 col = mix(vec3(0.05, 0.06, 0.09), vec3(0.1, 0.12, 0.17), uv.y);
    float reach = SEG * float(J - 1);
    col = mix(col, vec3(0.2, 0.25, 0.35), smoothstep(0.004, 0.0, abs(length(uv - base) - reach)) * 0.6);
    float da = 1e9, db = 1e9, jd = 1e9;
    for (int i = 0; i < J - 1; i++) { da = min(da, segd(uv, a[i], a[i + 1])); db = min(db, segd(uv, b[i], b[i + 1])); }
    for (int i = 0; i < J; i++) jd = min(jd, length(uv - b[i]));
    col = mix(col, vec3(1.0, 0.55, 0.2), smoothstep(0.008, 0.005, da) * 0.8);
    col = mix(col, vec3(0.95), smoothstep(0.012, 0.009, db));
    col = mix(col, vec3(0.2, 0.5, 1.0), smoothstep(0.02, 0.016, jd));
    float tg = length(uv - tgt);
    col = mix(col, vec3(0.3, 1.0, 0.4), smoothstep(0.004, 0.0, abs(tg - 0.025)) + smoothstep(0.01, 0.007, tg));
    col = mix(col, vec3(1.0, 0.9, 0.3), smoothstep(0.022, 0.018, length(uv - base)));
    fragColor = vec4(pow(col, vec3(0.8)), 1.0);
}

```

Attribution: written for this index

## Sources

1. [primary] Andreas Aristidou, Joan Lasenby (2011) FABRIK: A fast, iterative solver for the Inverse Kinematics problem. Graphical Models. https://doi.org/10.1016/j.gmod.2011.05.003 (verified via crossref on 2026-11-29)
2. [tutorial] Andreas Aristidou FABRIK - Forward And Backward Reaching Inverse Kinematics. andreasaristidou.com. https://www.andreasaristidou.com/FABRIK.html (verified via http on 2026-11-29)

## Cite this entry

Texel. "FABRIK inverse kinematics." https://texelatlas.vercel.app/t/fabrik-ik/ (accessed 2026-12-01).
