Pose Lab

v0.7.0
io.github.hpdkhoa/poselab-mcp Checked 3 days ago Published 1 month ago

Measured spatial answers for posing first-person arms and a rifle in Blender

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_rigs

The rigs to load: the built-in sample and those in the rigs file (POSELAB_RIGS).

load_rig

Loads a rig: the arms on their idle pose, the rifle on the gun bone, its clips. Returns the frames, sign rules, named points, clips and moving parts. Call first.

ParameterTypeDescription
rig *string

describe

What is loaded and the conventions every tool uses.

pose_idle

The arms back on the idle pose, every rifle part home.

pose_clip

The arms as a clip has them at a time in seconds. The rifle follows the gun bone; its parts stay where move_part left them.

ParameterTypeDescription
clip *string
seconds *number

move_part

Draws a moving part of the rifle (such as carrier) back along the barrel, cm from home.

ParameterTypeDescription
cm *number
part *string

move_gun

Moves the rifle from where it stands: roll + turns its right side up (about the bore); swing + takes the muzzle left, pitch + the muzzle up (about the pivot); right, forward, up move it in the view, cm. The hands in keep_hands keep their hold. Returns how far each hand ended from its hold and the barrel's angle off the view line.

ParameterTypeDescription
forwardnumber
keep_handsarrayhands that keep their hold on the rifle as it moves (arm IK)
pitchnumber
pivota rig point (stock, bore) or [x, y, z] in the gun frame
rightnumber
rollnumber
swingnumber
upnumber

reach

Puts a wrist on a point by arm IK; the hand keeps its turn. Returns how far the wrist ended from the point. Trying poles while the wrist stays put moves only the elbow: a way to clear a forearm.

ParameterTypeDescription
side *string
target *a name (a bone such as hand_l, a fingertip such as index_tip_l, a rig point such as port) or [x, y, z] in the frame
framestringgun: the gun bone, cm (+X gun's left, +Y barrel, +Z up); arms: the arms' space, cm; view: from the eye, cm (+X right, +Y forward, +Z up)
polewhere the elbow points, arms frame cm

turn_bone

Turns one bone by degrees about an axis through its head; the bones below it follow and nothing else moves. Use it to bend or straighten a finger joint, turn a wrist, or turn a whole arm at the shoulder. bone: a bone's name (an unknown name lists them all). The two signs of degrees turn opposite ways. The rifle does not move: use move_gun.

ParameterTypeDescription
axis *array[x, y, z]: the axis's direction in the frame
bone *string
degrees *number
framestringgun: the gun bone, cm (+X gun's left, +Y barrel, +Z up); arms: the arms' space, cm; view: from the eye, cm (+X right, +Y forward, +Z up)

snapshot

Saves or loads a named pose (the arms and the rifle's parts).

ParameterTypeDescription
action *string
name *string

where

Where bones, fingertips (<finger>_tip_<l|r>) and rig points are, in a frame.

ParameterTypeDescription
names *array
framestringgun: the gun bone, cm (+X gun's left, +Y barrel, +Z up); arms: the arms' space, cm; view: from the eye, cm (+X right, +Y forward, +Z up)

distance

The distance between two points, cm, and b minus a in the frame.

ParameterTypeDescription
a *a name (a bone such as hand_l, a fingertip such as index_tip_l, a rig point such as port) or [x, y, z] in the frame
b *a name (a bone such as hand_l, a fingertip such as index_tip_l, a rig point such as port) or [x, y, z] in the frame
framestringgun: the gun bone, cm (+X gun's left, +Y barrel, +Z up); arms: the arms' space, cm; view: from the eye, cm (+X right, +Y forward, +Z up)

clearance

How deep the rifle sits inside the arms (capsules: forearm 3 cm, palm 1.8 cm, finger segments 0.75 cm). worst_cm 0 means nothing touches. The deepest contacts by segment, with the rifle point in the frame.

ParameterTypeDescription
framestringgun: the gun bone, cm (+X gun's left, +Y barrel, +Z up); arms: the arms' space, cm; view: from the eye, cm (+X right, +Y forward, +Z up)
ignorearraysegment names, prefixes or wildcards to leave out (thumb, index3_r, *_l)
partsstring
topinteger

anatomy

Each arm against the human arm's limits. Rules: the elbow stays at least 2 cm below the shoulder while the hand works the gun; the elbow is a hinge bent 5 to 150 degrees; the wrist stays within 30 degrees of the forearm's line and inside its joint range (flexion 80, extension 70, radial 20, ulnar 30: the AAOS normal values); the hand's roll belongs to the forearm, not the wrist joint: the forearm turns at most 80 degrees each way from thumb up (pronation and supination, forearm_rotation_deg), and on a rig with forearm twist bones no link along the forearm rolls more than 50…

ParameterTypeDescription
fingersboolean
sidestring

grip

How each hand touches the rifle: with the palm or with the back. A hand holds with its palm and the palm sides of its fingers. The back of the hand toward the rifle, or the rifle inside the back of the hand or of a finger, is a physical error; clearance with palms and fingers ignored never shows it. For each hand: touching (some part within hold_within_cm), holding (touching, the palm facing the rifle and its surface within palm_within_cm: palm_gap_cm; a fingertip on the rifle with the palm off it is not holding), palm_faces_rifle (1 square on, below 0 the back of the hand…

ParameterTypeDescription
back_max_cmnumber
contact_cmnumber
framestringgun: the gun bone, cm (+X gun's left, +Y barrel, +Z up); arms: the arms' space, cm; view: from the eye, cm (+X right, +Y forward, +Z up)
frictionnumber
graspboolean
holdboolean
hold_within_cmnumber
palm_max_cmnumber
palm_within_cmnumber
sidestring

arm_ranges

The research behind anatomy's limits: for each joint of the arm (shoulder, elbow, forearm, wrist, finger knuckle, middle and end joints, thumb), the AAOS normal range (the 1965 table; tables_differ shows where other tables disagree), the range daily tasks use (Morrey 1981, Palmer 1985, Ryu 1991, Bain 2015), the value anatomy checks, and why it differs from the standard where it does. Full citations included. Needs no rig.

faces_eye

How squarely a surface faces the eye: facing 1 square on, 0 edge on, below 0 turned away.

ParameterTypeDescription
normalthe surface's normal, gun frame; a rig normal by the point's name if left out
pointa name (a bone such as hand_l, a fingertip such as index_tip_l, a rig point such as port) or [x, y, z] in the frame

visible

The share of a small disc round a point that the eye sees with nothing (arms, rifle) in the way.

ParameterTypeDescription
pointa name (a bone such as hand_l, a fingertip such as index_tip_l, a rig point such as port) or [x, y, z] in the frame
radius_cmnumber

screen

Where a point falls on a 90 degree, 16:9 screen from the eye: x and y from -1 to 1, and whether it is on screen.

ParameterTypeDescription
point *a name (a bone such as hand_l, a fingertip such as index_tip_l, a rig point such as port) or [x, y, z] in the frame

solve

Searches rifle moves from the current pose for one meeting every goal, and leaves the scene there. Reports each goal at the best move and how often it was met across samples: a goal never met is a fact of the geometry.

ParameterTypeDescription
dofs *objectroll, swing, pitch, right, forward, up -> [min, max]
goals *arrayeach {type: faces_eye|visible (point, min), on_screen (point), clearance (parts, ignore, max_cm), anatomy (side, fingers), grip (side, back_max_cm, palm_max_cm), barrel (max_deg), distance (a, b, max_…
keep_handsarrayhands that keep their hold on the rifle as it moves (arm IK)
maximizea goal's index to push higher once all are met
pivotstring
samplesinteger

record_clip

Builds a clip from poses you set: start (a name), key (the current pose at a time in seconds), stop (bakes the frames, each bone eased from key to key). Between keys the bones blend by rotation, so hands can drift off the rifle between keys.

ParameterTypeDescription
action *string
clip
easeboolean
fpsnumber
secondsnumber

load_clip

Adds a clip from a file: .pose.json bone data, an FBX animation, or a BVH (for example a text-to-motion model's output). A relative path is taken from the rigs file's folder. Reports how well its skeleton fits.

ParameterTypeDescription
clip *string
path *string
bone_mapthe file's bone names -> this rig's

scan_clip

Plays a clip frame by frame and runs each check. Reports for each check whether it passed, the worst value and when, and the time spans where it fails.

ParameterTypeDescription
checks *arrayeach {type, ...}: clearance (parts, ignore, max_cm), anatomy (side both|l|r, fingers: the rules broken, counted), grip (side, back_max_cm, palm_max_cm: the hand's wrong-side or too-deep contacts, coun…
clip *string

fix_clip

Mends a clip against the checks and stores a new clip (out, default <clip>_fixed): pops are blended again from the good frames round them; a hold puts the hand back on its grip; a contact moves the wrist until the point touches its mark; clearance swings each elbow about its shoulder-wrist line (the wrist kept) by the least angle that clears, spread over neighbouring frames; anatomy swings the elbow the same way until it sits under the shoulder inside its bend, then turns the wrist back inside its limits and each finger joint back inside its range. Reports the scan before a…

ParameterTypeDescription
checks *arrayeach {type, ...}: clearance (parts, ignore, max_cm), anatomy (side both|l|r, fingers: the rules broken, counted), grip (side, back_max_cm, palm_max_cm: the hand's wrong-side or too-deep contacts, coun…
clip *string
max_swing_degnumber
out
spread_framesinteger

view_cover

The share of the player's view the arms cover (all, its lower left third, its bottom middle third): the arms rendered alone from the eye as a mask. A forearm or sleeve that fills the lower left hides the gun and the world.

solve_grip

Searches a hand's hold on the rifle: the palm on mark (moved along the barrel), the elbow toward each pole. A hold counts when the palm holds the rifle (grip), nothing clips past clearance_max_cm (ignore: declared contacts), every arm and finger rule holds, and the view stays within view_budget. The nearest hold to the mark that counts wins and the rig is left in it; the table shows what failed where.

ParameterTypeDescription
mark *a name (a bone such as hand_l, a fingertip such as index_tip_l, a rig point such as port) or [x, y, z] in the frame
side *string
alongarray[from_cm, to_cm] along the barrel from the mark
clearance_max_cmnumber
framestringgun: the gun bone, cm (+X gun's left, +Y barrel, +Z up); arms: the arms' space, cm; view: from the eye, cm (+X right, +Y forward, +Z up)
ignorearray
poleselbow poles, arms frame cm; the idle elbow and four round it if left out
rollsarraythe hand's roll about the barrel to try, degrees
stepsinteger
view_budget{lower_left, bottom_middle}: the most of each third the arms may cover

retarget_clip

Plays another rig's clip on this rig with one hand held on this gun's own hold (its rest hold, or mark) by arm IK, fingers mended: shared motion, the gun's own grip. keep_from_s..keep_to_s: a span the hand leaves the gun (a reload), kept as the clip has it. Stores the result as out (default <clip>_retarget).

ParameterTypeDescription
clip *string
side *string
framestringgun: the gun bone, cm (+X gun's left, +Y barrel, +Z up); arms: the arms' space, cm; view: from the eye, cm (+X right, +Y forward, +Z up)
gun_movemove_gun's arguments applied to every frame first (the other hand keeps its hold): a rifle carried lower or closer
holdstringthe rig's idle hold, or the hold it stands in now (after solve_grip)
keep_from_s
keep_to_s
mark
out
polewhere the elbow points (arms frame, cm), as solve_grip's best gives it

shift_hand

Moves one hand frame by frame by the given deltas (gun frame, cm): a hand that holds a part whose track changed follows the part's new path. The hand keeps its turn against the gun, its elbow its direction, its fingers their curl; the wrist and fingers are mended.

ParameterTypeDescription
clip *string
deltas *array[[seconds, [x, y, z]], ...]: the hand's move in the gun frame (cm), straight lines between
side *string
out

check_set

Every check on a clip in one summary for a gate: the worst clearance and when, the frames that break an arm or finger rule, the frames a hand in hold_sides is not holding, and each frame's numbers.

ParameterTypeDescription
clip *string
clearance_max_cmnumber
hold_sidesarray
ignorearray
sidesstring

save_clip

Writes a clip to the output folder's clips/: pose.json bone data, and fbx for a game engine.

ParameterTypeDescription
clip *string
formatsarray
root_namethe armature's name in the FBX (Unreal reads it as the root bone)

render

Renders the pose as one labelled contact sheet: eye is the player's camera (90 degrees, 5 cm near plane); right, left, top and front look at the rifle from outside. Every tile is a Blender view, labelled so.

ParameterTypeDescription
viewsarray