Skip to content
Janis Sprenger edited this page Jan 3, 2023 · 8 revisions

MMUs - Modular Motion Units

Modular Motion Units enable the avatar to perform certain actions. Actions are usually goal-directed, e.g. walking to a position, reaching toward an object, etc. Which action to perform is send as an MInstruction to the co-simulator. Based on the motion type and name, the co-simulator selects the respective MMU. Based upon the properties and constraints, the MMU is synthesizing motion in every frame.

Thrift Interface of MInstruction:

struct MInstruction 
{
    1: required string ID; // ID of this instruction
    2: required string Name; // human-readable name of this instruction
    3: required string MotionType; // motion type to be simulated, e.g. Pose/Idle
    4: required string AvatarID; // ID of the MAvatar, which should be simulated
    5: optional map<string,string> Properties; // properties to configure the MMU
    6: optional list<constraints.MConstraint> Constraints; // constraints to configure the MMU
    7: optional string StartCondition; // start condition, to control the sequencing of MMUs
    8: optional string EndCondition; // end condition, to control the sequencing of MMUs
    9: optional string Action;
    10: optional list<MInstruction> Instructions;
}

The ID of each instruction should be unique. However, in case of a direct-control of the Avatar (e.g. providing the walk direction and velocity in every frame), it is possible to send "UpdateInstructions" by keeping the ID consistent for multiple frames.

Properties and Constraints are used to control the MMU. Properties is a simple key-value map of strings, which is parsed by the MMU and thus depends on the MMU or the MotionType. Constraints are defined as MConstraints and provide the possibility to send information in a well-typed manner. In most of the cases, the Constraints are referred by Properties. For example in the UnityLocomotionMMU (see below), the property "Trajectory" should contain the ID of the MPathConstraint provided in the Constraints list.

Inside the launcher, the list of usable MMUs is presented and should contain the most up-to-date description of Properties and Constraints, which can be used to control the motion. In addition, the Name and Type of MMUs can be derived there. The MotionType is case-sensitive!

Idle MMU

Idle (Pose/Idle)

The Idle MMU replays a simpel idle animation without any further constraints or parameters.

Unity Locomotion MMU

UnityLocomotionMMU (Locomotion/Walk)

The Unity Locomotion MMU enables the Avatar to walk to a specific position or goal

Property Name Property Semantics Required
TargetName Name of the MOSIM MSceneObject (e.g. the object "WalkTarget1") either TargetName or TargetID
TargetID Walk Target as a constraint (ID) either TargetName or TargetID
Velocity Velocity in m/s (float with decimal point) no
Trajectory Trajectory as a MPathConstraint (ID) no
Constraints Reference
MGeometryConstraint defining the goal position referred with TargetID
MPathConstraint definining the trajectory referred with Trajectory

Reach MMU

ReachMMUConcurrent (Pose/Reach) Reaches towards a specific object or a specific geometric constraint. The goal hand position and rotation must be described, hence in case of a goal object it is recommended to create an new empty game object as a child as the goal object and adjust the position and rotation of this virtual game object respectively.

Property Name Property Semantics Required
TargetID The id of the target location (object) or MGeometryConstraint Yes
Hand {Left,Right} The hand of the reach motion Yes
SingleShotIK {bool} Specifies if the ik is used once for the initial computation and blending is carried out afterwards. No

Grasp MMU

GraspMMUSimple (Pose/Grasp) Performs the grasping motion of the hand. The hand should be positioned at the correct position with for example the Reach MMU. The MMU allows to manipulate the finger joints by means of motion blending.

Property Name Property Semantics Required
Hand {Left, Right} Which hand should be animated Yes
HandPose (string) ID of the posture constraint describing the target hand pose Yes
UseGlobalCoordinates (bool) bool whether global or wrist local coordinates should be reached (default true) No
Duration (float) desired duration for the animation No
KeepHandPose (bool) Specifies whether the MMU finishes once the hand pose is establish, or if the MMU continues actively holding the posture No
Constraints Reference
MPostureConstraint defining the goal posture referred with HandPose

Most important for the animation is the constrained defined at the id of the parameter "HandPose", describing the goal posture of the hand. The constraint only utilizes the set of joint constraints for the finger tips and wrist:

Exemplary finger-tips of the left hand: MJointType.LeftIndexTip, MJointType.LeftLittleTip, MJointType.LeftMiddleTip, MJointType.LeftRingTip, MJointType.LeftThumbTip, MJointType.LeftWrist.

In case of the UseGlobalCoordinates set to true, you must provide the constraint for the LeftWrist. Fingers, which do not have a corresponding finger tip constraint will not be animated.

For more information, please consider the implementation of the MMU.

Clone this wiki locally