Py’otrMuhammad Toheed Sahar

Stereo pose capture from two phones for game animation

I built a pipeline that turns photos from two ordinary phones into a 3D skeleton a game artist can open in Blender, and proved it on the studio's own shoot before any paid build.

Client
A UK games studio
Year
2026
Type
AI apps & ML · Featured

The problem

A small UK games studio posed figurines and then rigged every pose by hand in Blender, which took hours per pose and left drift and wrong limb lengths. Commercial motion capture was too expensive, so they wanted two phone cameras to do the job instead.

How I built it

We agreed a free one-week proof of concept first, so the studio could judge the maths on its own photos before paying for the full tool. The 5 cm ArUco markers already on the studio's wall became the calibration target, so no separate calibration shoot was needed. Red dots on the figurine are detected in both camera views, matched along epipolar lines, triangulated into centimetre-scale 3D joints and written out as a Mixamo-named BVH skeleton and a CSV. The paid build was planned as a packaged Windows app with labelled joint detection, bone-length locking, smoothing, a drag-to-correct joint editor and FBX export.

What got hard

  1. The two phones shot at different resolutions (3072 by 4080 and 1536 by 2048) and there was no calibration data, so triangulating with default camera settings gave an error of about 626 px.

    I calibrated both cameras and the stereo pair from the wall markers already in the frames (144 marker views, camera error 1.67 and 2.21 px, camera spacing recovered at 38.2 cm). Mean reprojection error on the figurine dots fell to about 8 px, and the marker-size thresholds scale with image size so one detector works on both phones.

  2. The first joint fitter sorted the red dots by height. When the smaller camera lost parts of the figurine in the last frames, several joints collapsed onto one point and bone lengths changed on a rigid figure (hips to neck ranged from 0 to 14.7 cm).

    I put that limit in the delivery notes up front, then ran a pretrained pose model (RTMPose) on five of the studio's own frames before the paid milestone. Bone lengths stayed within about 0.2 to 2.6 cm, and locking each bone to its median length moved joints by only 0.12 cm at the median.

  3. BVH animation files are strict about how child joints are positioned, and an early export came into Blender at the wrong scale.

    I rewrote the writer so each child position is an offset from its parent, imported the result into Blender and checked that the hips travel 3.45 units over 13 frames.

  4. The studio's questions after the first delivery were specific: a thigh looked missing in the overlay, there was no 3D view, bone lengths should be locked, and a single forehead dot cannot give head direction.

    The overlay had been drawn in green over a green screen, so I redrew it in magenta. I added a rotating 3D plot of the triangulated joints (about 44 to 56 cm from the camera), a bone-length lock demo, and a test that recovers full yaw, pitch and roll from a single wall tag, which is how a small tag on the head would give head direction.

The result

I handed over the working proof of concept in June 2026: 26 stereo pairs processed end to end, with an overlay animation, BVH, CSV and a metrics summary, plus a labelled-joint preview on five of the studio's own frames. Every limitation was written up before the studio opened the files.