Extraction Types

You can use these extraction types on a set of markers to get the rotation and translation of a goal: position and rotate joint in markers, rotate joint in markers, and aim joint at markers. The following figure shows the extraction types.

Position and Rotate Joint in Markers

This extraction type requires at least three markers to be assigned to a joint. The aim joint at markers extraction type is used if less than three markers are assigned to the joint.

You can extract a translation vector from a set of three markers by computing their average. Rotation is extracted by creating a rotated referential from the three markers. A vector is defined from the first marker to the second marker, and another vector is defined from the first marker to the third marker. The cross product of these vectors is the Z axis of the rotated referential. The sum of these two vectors is perpendicular to the Z axis (by property of the cross product) and is used as the X axis of the rotated referential. You can compute the Y axis as the cross product of the Z axis and X axis.

The rotation is not used directly as the goal rotation. When markers are assigned to a joint, a snap offset is computed as the difference between the joint’s rotation and translation and the extracted rotation and translation at snap time. These snap offsets are used for computing the goal position and rotation at any time by simply removing them from the 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 the three markers to get the final extracted values.

Note: Rotations are averaged using the quaternion linear addition followed by normalization of the result.

Rotate Joint in Markers

This extraction type computes the goal rotation in the same way as the position and rotate joint in markers extraction type.

However, instead of using markers to compute the goal position, this extraction type 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.

The snap offsets are used in the same way as in the position and rotate joint in markers extraction type for computing the actual goal rotation.

Aim Joint at Markers

This extraction type can take only two markers to extract the rotation. The joint position from the hierarchy (as in the rotate joint in markers extraction type) is used as a third point to extract the rotation as in other extraction types. Like other extraction types, snap offsets are used for computing the actual goal rotation.

If this extraction type is used because less than three markers are assigned in the position and rotate joint in markers extraction type, the position extracted from the set of points composed by the two markers and the joint position from the hierarchy is used as the extracted position. This might be different than the joint position from the hierarchy if the three points do not perfectly respect a rigid body constraint.

The extraction is performed from the root of the hierarchy (the hips joint) and it propagates down the hierarchy. For this reason, the hips joint must always use the position and rotate joint in markers extraction type so that it is properly positioned. After the hips are positioned, anything down the hierarchy can either use the position information from the extraction (use the Position and rotation joint in marker extraction type) or use the position from the hierarchy (use the rotate joint in marker or aim joint at marker extraction type).