frametop

Hand cutouts and near input

These sections were split out of README.md to keep it readable.

Hand cutouts and near input

ft-screens reads the hands file (version 2’s skeleton when it’s there, else version 1’s points) and the gestures file once per tick (screens/handcut.cpp). It cuts only with Room View on: with it off, a hole would show the void or the game, not your hand (see “Rendered hands”). cutouts state ends with room view on|off (why); cutouts roomview auto|on|off forces it.

Off by default since 2026-10-09 (HANDS_CUTOUTS=0): ft-handview draws the hands over the panels instead (see “Rendered hands”). HANDS_CUTOUTS=1, or ft-handsctl cutouts on for the session, brings the holes back.

The matte (HANDS_MATTE=circle, the default since 2026-10-09) is a round hole per hand: a disk facing the eye, centred on the middle of what the head sees of the hand (the box around its joints, each with its half-width, the wrist’s 2.5 cm), wide enough to reach the hand’s furthest edge from there, plus the margin. Each eye sees the disk on the screen as an ellipse (a circle on a screen square to it), drawn as the stadium around it with the capsules’ soft edge (15% of its radius). It hides more of the screen than the hand needs, and with it the hand’s tracking error and the few degrees Room View’s picture of the hand sits off it, until the tracking is good enough for a hand-shaped hole. The forearm isn’t in it. Building and projecting it costs 4 us median on the desk-work replay (the mesh 26 us), the composite the same as the mesh’s or less (scripts/bench-matte.sh on probe-moves: 2 pieces per eye against 35).

HANDS_MATTE=mesh is hand-shaped: a tapered capsule per finger bone, with real fingers’ half-widths (10.5 mm at the index’s knuckle down to 7.5 mm at its tip, scaled by the hand’s palm length); the palm as a 2.4 cm slab through the wrist and the knuckles, widened to the hand’s edges; the thumb’s web; and an 18 cm stub of the forearm toward the skeleton’s elbow (along the hand’s axis without a skeleton). The palm, web and forearm are convex pieces, each drawn as its outline grown by the margin with a soft 2 px edge. HANDS_MATTE=capsules draws ft-hands’ capsules instead, as before, for comparison (cutouts matte circle|mesh|capsules switches it live).

Its margin is an angle seen from the eyes, so it covers the same share of the tracking error at any distance: HANDS_MATTE_MARGIN (1.5 degrees) with the hand still, plus HANDS_MATTE_MOTION (25 ms) of the hand’s motion, at most HANDS_MATTE_MOTION_MAX (1.5 degrees) more. The cutout placement probes of 2026-10-08 (frame-hands captures/probe-2026100*/video_analysis) measured the cutout points against the hand Room View shows: 1.8-2.4 degrees median still (p90 4.1-4.7), 2.3-3.1 moving at 0.1-0.8 m/s, 4-6 above 0.8 m/s. Part of that is the video landmark model’s own error, and an edge needs only the error across it (about 70% of a point’s). A margin covering the p90 (4.5 degrees, 3 cm at 40 cm) would turn each finger into a 7 cm blob; 1.5 covers about the median. cutouts margin DEG [MS [MAX]] changes it live, and so does the Hand cutout margin slider on the Hands page of Frametop Input Settings (0-3 degrees in quarter steps; it sends the still margin only and writes HANDS_MATTE_MARGIN). The prediction lead stays 36 ms (HANDS_MATTE_LEAD, cutouts lead): the probes’ best lead for fast hands was 6-14 ms, but 36 costs only 0.1-0.2 degrees.

The probes also saw the hand’s picture off by an amount that depended on its distance, but not the same way in any two runs, so the correction is a hook, off: HANDS_MATTE_SHIFT="0.35:0.5,-0.3 0.6:-1,0" would turn the matte’s hands by those yaw and pitch angles (degrees, right and up positive) at those distances from the head, in between linearly (cutouts shift ...|off live).

Cost, offline (scripts/bench-matte.sh on the probe-moves and lit replays, a 3440x1935 screen 0.6 m ahead, GPU time to finish each buffer on an otherwise idle GPU): the mesh 3.9-4.1 ms per full buffer against 3.8-3.9 for the capsules, and 3.4-3.6 against 3.0-3.4 when only the hands’ boxes are redrawn (the margin is wider than the capsules’ 4 mm). CPU 0.2 ms per composite either way; building and projecting the matte 14-24 us median.

Near input (screens/handinput.cpp, frame-hands notes/hand-interaction.md sections 3, 5, 16, 17, 18 and 19): a bare hand whose index tip, thumb-index contact, knuckles or palm is over a panel (or within the grab band outside it) and within HANDS_NEAR_REACH (0.075 m, about 3 inches; 0.30 on 2026-10-10 before the live test, 0.15 before that) in front of it touches it: ft-screens tells the pointer helper so (“near … 1”), which then hides that hand’s ray and leaves its pinches and grips to ft-screens. Beyond it a pinch is the ray’s or the gaze’s. A hand stays near until it’s 2.5 cm farther out, then 200 ms on, so the ray doesn’t flicker at the edge; in that margin the ray stays hidden (“near … 2”) but the hand’s pinches are the helper’s again. The ray shows again once its pointing pose has held 120 ms, about 0.35 s after the fingertip passes 10 cm. A hand resting low by the body (the poke’s resting rule below: typing, the lap) touches only within 4 cm, so a low panel within reach doesn’t take its gaze pinches. While a hand is within 0.30 m of a panel, ft-screens asks ft-hands for its full rate (want-hz), so a tap from outside the zone is seen at 30 Hz. Near a panel:

The palm menu (screens/palmmenu.cpp, frame-hands notes/hand-interaction.md sections 11 and 18), like the Vision Pro’s home indicator: turn a bare hand palm up toward your face, open, and look at it, still. After 0.3 s a small ring (2.5 cm) shows 4 cm above the palm and follows it. A plain thumb-index pinch tap by that hand opens the Steam menu (steam/ft-steam menu, what the input relay’s steam_menu runs), or closes the SteamVR dashboard if it’s open. The ring turns blue while the pinch is held, and the release does it; a pinch that’s lost, or let go after the hand turned over, does nothing. Turn the hand away for 0.15 s and the ring goes.

Grab that (screens/grabthat.cpp, 2026-10-10): hold an open hand out toward a screen, a remote display or a floating window, palm to it, then pull the arm back while making a fist, and the panel comes to arm’s reach over a quarter of a second: 45 cm ahead of your eyes (HANDS_GRAB_THAT_DISTANCE), at the fist’s height (at most 45 cm under the eyes), facing you, so the hands can poke it, carry it and turn it. A screen wider than HANDS_GRAB_THAT_WIDTH (0.6 m; 0 keeps the size) comes at that width; floating windows keep their size. It doesn’t take a panel within arm’s reach (below: Which panel); with HANDS_GRAB_THAT_FROM=0, as before the fourth live test, the same gesture at a panel that came that way and is still within arm’s reach (its centre within 0.8 m of the eyes, wherever you moved it about there) sends it back where it was (and its width), and at a panel within arm’s reach that didn’t come that way, it centres it at arm’s reach. One at a time: a panel that came and is still where it came goes back as another one comes, so they don’t stack up (three remote displays did in the live test of 2026-10-10). The reset button sends floating windows back too (the layout reset puts the screens and remote displays back itself). With the panel that near, the open hand held out to it is in its touch zone: its fingers pointing up don’t poke it, and its fist or a pinch as it closes waits on the gesture (above).

The “approach from front” rules, on recordings: in the hand recorder’s desk take (PR #3, with head poses), typing under panels 0.30-0.40 m ahead (at eye height, or 0.45 m low and tilted up) made no press; the hand on the mouse (0.37-0.40 m out, past the resting zone) made 2 presses in 13 s under the nearest ones. In its touch-the-dot take the fingertip stopped 0-2 cm short of the dot in the air, its last bone 44-63 degrees off the line from the head: with a panel 3 cm nearer, 2 of 6 touches pressed at 50 degrees, 3 at 65. HANDS_POKE_REST_NEAR=0.42 takes the mouse hand out too, but then a low dot 25 cm ahead no longer takes a poke.

Offline, scripts/test-handinput.sh [DUMP...] runs its unit tests and plays recorded hands (ft-handreplay --publish-dump) against panels placed around them. On the probe-moves (v4), lit and dim recordings, in 1 s and longer stretches where a hand held still and pointed (184 s in all; the fingertip still moved 19-23 mm in depth within each, median), a panel 3 cm beyond the fingertip got no press, 2 cm one (in 42 s of probe-moves), 1 cm 7, 0.5 cm 18. frame-hands notes/hand-interaction.md section 10 has the rest.