releases/2.5.4mrtk_developmentreleases/2.1.0releases/2.2.0releases/2.3.0releases/2.4.0releases/2.5.0releases/2.5.1releases/2.5.2releases/2.5.3
  • Guides
  • API Documentation

We've moved!

Starting from MRTK 2.6, we are publishing both conceptual docs and API references on docs.microsoft.com. For conceptual docs, please visit our new landing page. For API references, please visit the MRTK-Unity section of the dot net API explorer. Existing content will remain here but will not be updated further.

  • Guides
  • Feature Overviews
  • Tools
  • Input Animation Recording
  • Input Animation File Format Specification

    Show / Hide Table of Contents
    • Getting Started with MRTK
      • Upgrading from HTK
      • Updating from RC2
      • Release Notes
      • Building and Deploying MRTK
      • Performance
      • Hologram Stabilization
    • Architecture
      • Overview
      • Framework and Runtime
      • Input System
        • Terminology
        • Core System
        • Controllers, Pointers, and Focus
    • Feature Overviews
      • Profiles
      • Profiles Configuration
      • Input
        • Input Overview
        • Input Providers
        • Input Events
        • Input Actions
        • Controllers
        • Pointers
        • Gestures
        • Speech(Voice command)
        • Dictation
        • Hands
        • Gaze
        • Eyes
      • In-Editor Input Simulation
      • UX Building Blocks
        • Interactable
        • Button
        • Bounding Box
        • Object Manipulation
        • Sliders
        • Fingertip Visualization
        • App Bar
        • Object Collection
        • Slate
        • System Keyboard
        • Tooltips
        • Solvers
        • Hand Interaction Example
        • Eye Tracking Interaction Example
      • Detecting Platform Capabilities
      • MRTK Standard Shader
      • Spatial Awareness
        • Spatial Awareness Overview
        • Configuring the Spatial Awareness Mesh Observer
        • Spatial Object Mesh Observer
        • Usage Guide
      • Multi Scene System
        • Multi Scene System Overview
        • Scene Types
        • Content Scene Loading
        • Monitoring Content Loading
        • Lighting Scene Operations
      • Teleport System
      • Boundary System
        • Boundary System Overview
        • Configuring the Boundary Visualization
      • Diagnostics System
        • Diagnostics System Overview
        • Configuring the Diagnostics System
        • Using the Visual Profiler
      • Services
        • What makes a mixed reality feature
        • What are the MixedRealityServiceRegistry and IMixedRealityServiceRegistrar
      • Packages
        • MRTK Packages
        • MRTK Componentization
      • Tools
        • Dependency Window
        • Optimize Window
        • Input Animation Recording
          • Input Animation File Format Specification
        • Extension Service Creation Wizard
      • Scene Transition Service
      • Experimental Features
    • Contributing
      • Contributing Overview
      • Feature Contribution Process
      • Coding Guidelines
      • Documentation guide
      • Developer portal generation with DocFX
      • Testing
      • Breaking Changes
    • Planning
      • Roadmap
    • Notice
    • Authors

    Input Animation Binary File Format Specification

    Overall structure

    The input animation binary file begins with a 64 bit integer magic number. The value of this number in hexadecimal notation is 0x6a8faf6e0f9e42c6 and can be used to identify valid input animation files.

    The next eight bytes are two Int32 values declaring the major and minor version number of the file.

    The rest of the file is taken up by animation data, which may change between version numbers.

    Section Type
    Magic Number Int64
    Major Version Number Int32
    Minor Version Number Int32
    Animation Data see version section

    Version 1.0

    The input animation data consists of a sequence of animation curves. The number and meaning of animation curves is fixed, but each curve can have a different number of keyframes.

    Section Type
    Camera Pose Curves
    Hand Tracked Left Boolean Curve
    Hand Tracked Right Boolean Curve
    Hand Pinching Left Boolean Curve
    Hand Pinching Right Boolean Curve
    Hand Joints Left Joint Pose Curves
    Hand Joints Right Joint Pose Curves

    Joint Pose Curves

    For each hand a sequence of joint animation curves is stored. The number of joints is fixed, and a set of pose curves is stored for each joint.

    Section Type
    None Pose Curves
    Wrist Pose Curves
    Palm Pose Curves
    ThumbMetacarpalJoint Pose Curves
    ThumbProximalJoint Pose Curves
    ThumbDistalJoint Pose Curves
    ThumbTip Pose Curves
    IndexMetacarpal Pose Curves
    IndexKnuckle Pose Curves
    IndexMiddleJoint Pose Curves
    IndexDistalJoint Pose Curves
    IndexTip Pose Curves
    MiddleMetacarpal Pose Curves
    MiddleKnuckle Pose Curves
    MiddleMiddleJoint Pose Curves
    MiddleDistalJoint Pose Curves
    MiddleTip Pose Curves
    RingMetacarpal Pose Curves
    RingKnuckle Pose Curves
    RingMiddleJoint Pose Curves
    RingDistalJoint Pose Curves
    RingTip Pose Curves
    PinkyMetacarpal Pose Curves
    PinkyKnuckle Pose Curves
    PinkyMiddleJoint Pose Curves
    PinkyDistalJoint Pose Curves
    PinkyTip Pose Curves

    Pose Curves

    Pose curves are a sequence of 3 animation curves for the position vector, followed by 4 animation curves for the rotation quaternion.

    Section Type
    Position X Float Curve
    Position Y Float Curve
    Position Z Float Curve
    Rotation X Float Curve
    Rotation Y Float Curve
    Rotation Z Float Curve
    Rotation W Float Curve

    Float Curve

    Floating point curves are fully fledged Bézier curves with a variable number of keyframes. Each keyframe stores a time and a curve value, as well as tangents and weights on the left and right side of each keyframe.

    Section Type
    Pre-Wrap Mode Int32, Wrap Mode
    Post-Wrap Mode Int32, Wrap Mode
    Number of keyframes Int32
    Keyframes Float Keyframe

    Float Keyframe

    A float keyframe stores tangent and weight values alongside the basic time and value.

    Section Type
    Time Float32
    Value Float32
    InTangent Float32
    OutTangent Float32
    InWeight Float32
    OutWeight Float32
    WeightedMode Int32, Weighted Mode

    Boolean Curve

    Boolean curves are simple sequences of on/off values. On every keyframe the value of the curve flips immediately.

    Section Type
    Pre-Wrap Mode Int32, Wrap Mode
    Post-Wrap Mode Int32, Wrap Mode
    Number of keyframes Int32
    Keyframes Boolean Keyframe

    Boolean Keyframe

    A boolean keyframe only stores a time and value.

    Section Type
    Time Float32
    Value Float32

    Wrap Mode

    The semantics of Pre- and Post-Wrap modes follow the Unity WrapMode definition. They are a combination of the following bits:

    Value Meaning
    0 Default: Reads the default repeat mode set higher up.
    1 Once: When time reaches the end of the animation clip, the clip will automatically stop playing and time will be reset to beginning of the clip.
    2 Loop: When time reaches the end of the animation clip, time will continue at the beginning.
    4 PingPong: When time reaches the end of the animation clip, time will ping pong back between beginning and end.
    8 ClampForever: Plays back the animation. When it reaches the end, it will keep playing the last frame and never stop playing.

    Weighted Mode

    The semantics of the Weighted mode follow the Unity WeightedMode definition.

    Value Meaning
    0 None: Exclude both inWeight or outWeight when calculating curve segments.
    1 In: Include inWeight when calculating the previous curve segment.
    2 Out: Include outWeight when calculating the next curve segment.
    3 Both: Include inWeight and outWeight when calculating curve segments.
    • Improve this Doc
    In This Article
    • Overall structure
    • Version 1.0
      • Joint Pose Curves
      • Pose Curves
      • Float Curve
      • Float Keyframe
      • Boolean Curve
      • Boolean Keyframe
      • Wrap Mode
      • Weighted Mode
    Back to top Generated by DocFX