Streaming Mocap Data into Unity

Unity is one of the most widely used 3D and 2D game engines in the world. Its strengths lie in real-time rendering and extensive development flexibility. Unity is used not only for game development but also across a variety of industries including virtual production, animation, simulation and interactive content and installations.

With MOVIN TRACIN and MOVIN Studio, you can stream motion capture data directly to Unity, allowing for seamless integration into real-time projects such as games, XR experiences, or live productions.

circle-info

For live streaming to Unity, please download the plugin from MOVIN’s official pagearrow-up-right.

1

Download the Unity Plugin

2

Import & Retarget Your Character in MOVIN Studio

  • Please import the FBX file of the character you want to use in Unity into MOVIN Studio.

  • After importing the character, proceed with retargeting.

    • For detailed instructions on this process, please refer to Retargeting

3

After opening the unity project, please import the UnityPackage

circle-exclamation
4

Please add the Mocap Receiver script to the top-level Bone (GameObject) of the character's skeleton that receives motion data

  • Import the FBX character you want to use in the Unity project and place it into the Scene

  • Select the top-level GameObject (Root bone) of the character.

    • In this example, it is mixamorig:Hips

    • In the Hierarchy window, expand the character GameObject to view its skeleton.

      You’ll see a structure made up of multiple bones (GameObjects) connected in a parent–child hierarchy, such as the spine, arms, legs, and head.

      At the top of this skeleton hierarchy is the Root Bone, which serves as the reference point for applying motion to the character.

  • With the Root Bone selected, open the Inspector window and click : Add Component > Scripts > MOVIN.Core > Mocap Receiver. This adds the 'MocapReceiver.cs' script to the Root Bone, allowing it to receive and apply motion data.

5

(MOVIN Studio v.2.0.0 or later) In Bone Search Filter > Root Bone Name, enter the name of the root bone

triangle-exclamation
  • The Bone Search Filter searches for all bones under the hierarchy of the bone specified as Root Bone Name, and maps them 1:1 with bones that have the same names in the character imported into MOVIN Studio.

    • If the Root Bone Name is not specified, the plugin uses the character’s default Root Bone (Transform) in the skeleton hierarchy as the reference.

  • Please carefully review the character's bone hierarchy and set the Root Bone Name accordingly.

    • Depending on the Root Bone Name is set, only part of the motion data streamed from MOVIN Studio may be applied, or the motion may not be applied correctly.

6

(MOVIN Studio version earlier than v.2.0.0) Add the Actor Script to the parent

triangle-exclamation
  • Find the Hip Bone (such as mixamorig:Hips) in the Hierarchy window. Select the GameObject that is directly above it in the hierarchy (the parent GameObject).

  • Next, open the Inspector, click Add Component, and add the 'Actor.cs' script.

7

Start Streaming in MOVIN Studio

  • Return to MOVIN Studio and select the Streaming Tab.

  • If Unity and MOVIN Studio are running on the same PC, the Host should be set to 127.0.0.1 (localhost)

  • Check that the Listen Port set on the GameObject in your Unity Project matches the Port Number configured in MOVIN Studio.

  • Set the Platform to Unity in MOVIN Studio, then click the Start Streaming button to begin streaming

8

Click Play button in Unity Project

  • You should now see motion data from MOVIN Studio streaming into Unity in real time.

  • Inside the UnityPackage, MOVIN > Scenes folder includes three sample Scenes that are already set up.

  • If you run into any issues with the Unity setup, check these Scenes to check the configuration.

    • Sample_MOVINman This sample can be tested without loading a character in MOVIN Studio.

    • Sample_Ch14 and Sample_Ch29 These samples require you to load the corresponding FBX characters with matching names in MOVIN Studio.

Last updated