Skeletons
Skeletons are semantic assets for joints and named rigid segments. They are not renderable geometry by themselves, but they provide structured attachment targets for robot and humanoid assemblies.
Definitions
Forge skeletons use explicit joint, bone, and optional chain declarations:
skeleton Robot {
joint pelvis = vec3(0.0, 1.0, 0.0);
joint neck = vec3(0.0, 1.6, 0.0);
joint shoulder_l = vec3(-0.28, 1.55, 0.0);
joint elbow_l = vec3(-0.60, 1.30, 0.0);
joint hand_l = vec3(-0.85, 1.05, 0.0);
bone torso = pelvis, neck;
bone forearm_l = elbow_l, hand_l;
chain arm_l = shoulder_l, elbow_l, hand_l;
};
For real rigs, a chain should describe a fixed-length two-bone segment:
chain leg_l = hip_l, knee_l, foot_l;
chain arm_r = shoulder_r, elbow_r, hand_r;
Use them like any other asset:
import "Robot";
let rig = Robot {
height: 1.9
};
IK Targets
Skeleton instances can define local IK targets through an ik object. Targets are keyed by chain name or end-joint name and keep the segment lengths fixed:
let rig = Robot {
height: 1.85,
ik: {
leg_l: vec3(-0.26, -0.925, 0.10),
leg_r: vec3(0.21, -0.90, -0.05),
arm_l: vec3(-0.56, 0.02, 0.20),
arm_r: vec3(0.48, 0.10, 0.08)
}
}
.attach(stone, Top + 0.08);
This is the first kinematics slice:
- two-bone chains only
- targets are local to the skeleton instance
- segment lengths stay fixed
- bound parts follow automatically
Joints And Bones
Skeleton instances expose:
- joints as named anchors such as
"hand_l"orrig.hand_l - bones as semantic part proxies such as
rig.forearm_l
That makes them usable with the normal layout system:
let hand_marker = Sphere { radius: 0.08 }
.attach(rig.hand_l, Center);
Binding Parts
bind(...) is the rigid placement helper for bone-shaped parts.
import "Robot";
import "RobotSegment";
let rig = Robot {
height: 1.9
}
.attach(floor, Top);
let forearm = RobotSegment {
width: 0.14,
depth: 0.14,
length: 0.48,
round: 0.03
}
.bind(rig.forearm_l);
bind(...):
- centers the part on the target bone
- points local
+ZfromStart -> End - fits the part length to the bone for simple bound assets
Robot Assets
Current built-in skeleton and robot part assets:
Robot: simplified rigid biped with named joints likehead,hand_l,foot_rand bones liketorso,forearm_l,thigh_rRobotSegment: generic bindable limb segment along local+ZRobotTorso: torso block withlength,width, anddepthRobotHead: simple rounded head sphereRobotJoint: spherical robot joint partRobotFoot: forward-offset foot blockRobotBody: assembled robot object that takes askeletonplus materials and builds the full rigid robot body
See examples/robot_on_stone.ft in the repo for a posed robot standing on a procedural rock.
RobotBody
You can either bind individual robot parts yourself, or let RobotBody do the assembly:
import "Robot";
import "RobotBody";
let rig = Robot {
height: 1.9
}
.attach(floor, Top);
let robot = RobotBody {
skeleton: rig,
material: Metal { color: #c8d0d8, roughness: 0.22 },
accent_material: Material { color: #f4a261, roughness: 0.35 }
};