Three extraction types are available to use on a given set of markers to get the rotation and the translation of a given goal: Position and rotate joint in markers, Rotate joint in markers, and Aim joint at markers.
Extraction types
This extraction type requires at least three markers to be assigned to a given joint. If less than three markers are assigned, "Aim joint at marker(s)" extraction type is used. Translation vector can easily be extracted from a set of three markers simply by computing their average. Extracting a rotation can also be done in different ways: MotionBuilder does it by creating a rotated referential from the three markers. First, a vector is defined from the first marker to the second, and a second vector from the first marker to the third. The cross-product of these vectors gives the Z axis of the rotated referential. The sum of these two vectors is perpendicular to the Z axis (by property of cross-product) and is used as the X axis of the rotated referential. The remaining Y axis can easily be computed as the cross-product of Z axis and X axis. This rotated referential constitutes rotation extracted from the three markers.
This rotation is not used directly as the goal rotation. At snap time, i.e. when markers were assigned to the joint, a "snap offset" was computed as the difference between the joint's rotation and translation and the extracted rotation and translation at snap time. These offsets allow computation of goal position and rotation at any time by simply removing them from extracted rotation and translation. If more than three markers are available for this extraction type, the extracted position and rotation are averaged between all possible combinations of three markers to get the final extracted values.
Extraction is performed from the root of the hierarchy (i.e. the hips) and follows hierarchy down. For this reason, hips joint should always use the Position and rotate joint in marker(s) extraction type for the hierarchy root to be positioned properly. Once the hips are positioned, anything down the hierarchy can either use position information from extraction (i.e. use Position and rotate joint in marker(s) type) or use position that is coming from the hierarchy (i.e. use Rotate joint in marker(s) or Aim joint at marker(s) extraction types) because the hips position is known and thus can be propagated down the hierarchy.
This extraction type computes goal rotation in exactly the same way as the Position and rotate joint in marker( extraction type. However, instead of using markers to compute goal position, it simply uses hierarchical information from the character to position the goal at the same place as its associated joint. Therefore, markers are only used to extract rotation in this extraction type. "Snap offsets" are used the same way as before to compute actual goal rotation.
This extraction type can take only two markers to extract rotation. The joint position coming from the hierarchy (i.e. the one used for position in previous extraction type) is used as a third point to perform the same rotation extraction as in the Position and rotate joint in marker(s) extraction type and Rotate joint in marker(s) extraction type. Like all extraction types, "snap offsets" are used to compute actual goal rotation.
If the Aim joint at marker(s) extraction type is used because a Position and rotate joint in marker(s) and Rotate joint in marker(s) extraction was chosen but only two markers were available, the position extracted from the set of points composed by the two markers and the joint position from the hierarchy are used as the extracted position. This one can be different than the joint position from the hierarchy if the three points do not perfectly respect a rigid body constraint.