For the complete documentation index, see llms.txt. This page is also available as Markdown.

OptiTrack Godot Plugin

A guide to installing and using the OptiTrack Godot plugin.

Overview

The OptiTrack Godot Plugin enables real-time streaming of Rigid Body data from Motive into Godot for visualization and recording.

Requirements

Godot Setup

Download the Plugin

The OptiTrack Godot plugin is available from the OptiTrack Plugins download page.

  • Once downloaded, unzip the plugin to a local directory.

  • In Windows Explorer, open the extracted folder, optitrack-godot-plugin_1.0.0, then open the example-project folder. Leave this folder open for a future step.

Import into the Godot Project

  • Open Godot, version 4.6 or higher.

  • The Project Manager window will open.

A screenshot of the Godot Project Manager screen, with no projects in the list.
  • Click the A screenshot of the Create button on the Godot Project Manager screen. Create button in the upper left.

  • Assign a Project Name and Browse to select the location to save the project.

A screenshot of the Godot Create Project screen.
  • Click the A screenshot of the Create button that saves the Godot project. Create button at the bottom of the screen to open the project.

  • Return to the Windows Explorer window where the extracted folder optitrack-godot-main is open. Open the example-project folder and drag the addons folder into the FileSystem tab in Godot.

If your project already has a folder called addons, open the plugin's addons folder and copy the folder named optitrack_plugin into the project's existing addons folder.

A screenshot of the Godot application just after dragging the OptiTrack Godot plugin addins folder into the Godot fileshare tab.

You may see several error messages after the application finishes registering global classes, even though the plugin has installed successfully. Look for the optitrack_plugin in the addons folder in the Godot File System to verify that the installation completed.

Activate the Plugin in Godot

Now that the plugin is available in the project, it needs to be activated.

  • From the Project menu, go to Project Settings...

A screenshot of a project in Godot, with the Project menu open.
  • Open the Plugins tab.

  • Find the Optitrack plugin in the list and check the box to Enable it.

  • Click Close to return to the project.

A screenshot of the Godot Project Settings, Plugins tab, with the Optitrack plugin enabled.

The OptiTrack tab will now be available in the left-most pane, along with the File System and History tabs. You may need to expand the width of the pane to see all three.

Once the plugin is enabled, restart Godot.

A screenshot of the Optitrack pane in Godot.

Motive Setup

Enable Streaming

In Motive, click the A screenshot of the Streaming Settings button from the Motive Control Deck. Streaming Settings button in the bottom right corner of the Control Deck.

To stream to Godot, make sure Streaming is enabled in the NatNet settings and the Transmission Type is set to Multicast.

To stream skeletons, set the Skeleton Coordinates to Local and the Bone Naming Convention to FBX. The skeleton should also be set with a Y-up axis.

For more information about streaming from Motive, please see the Data Streaming page.

A screenshot of the Motive Streaming Settings, with the "Enable" setting turned on and the "Transmission Type" setting set to Multicast. Both settings are highlighted.

Create Assets in Motive

In Motive, create the Skeletons and Rigid Bodies that you wish to stream into Godot. Refer to the Skeleton Tracking page and the Rigid Body Tracking page for detailed instructions on how to create a Skeleton or Rigid Body in Motive.

Once you have assets to track in Motive, you're ready to stream them into Godot.

Godot Plugin Connection Setup

Now that Motive is streaming, you're ready to configure the object connection in Godot.

Create an OptiTrack Rigid Body Node

In the Scene pane, in the Create Root Node options, click 3D Scene.

A screenshot of the Scene pane in Godot, with the options to Create Root Node: shown.

The Scene pane will change to show Node3D. The Inspector tab will display on the right.

  • Right click Node3D to access the context menu, then select Add Child Node...

A screenshot of the Godot project screen, with the context menu for the Node3D options displayed.

The Create New Node window will open.

  • Type Optitrack in the search bar and press enter.

  • The search results will return OptiTrackRigidBody.

  • Select OptiTrackRigidBody then click the Create button at the bottom.

A screenshot of the "Add Child Node" screen, with OptiTrack in the search criteria and OptiTrackRigidBody as the sole search results.

The child node will appear in the Scene pane. To see the list of rigid body assets from Motive in the OptiTrack pane, click the Start Connection button.

A screenshot of the Godot Scene and OptiTrack panes, with the OptiTrackRigidBody child node added and the Streaming Connection stopped.
A screenshot of the Godot Scene and OptiTrack panes, with the OptiTrackRigidBody child node added and the Streaming Connection enabled.

Add a Mesh

Apply a mesh to visualize the rigid body in the scene.

  • In the Scene tab, right click OptiTrackRigidBody and select Create Child Node.

  • Search for MeshInstance3D. When found, select it and click Create.

A screenshot of the Godot "Add Child Node" search results,with MeshInstance3d selected.
  • The MeshInstance3D properties will display in the Inspector Window.

  • Click the dropdown menu in the Mesh field to select a mesh. For testing, we recommend selecting a primitive mesh, such as a box or a sphere.

  • Once the mesh is applied, a graphical representation will display in the Inspector tab as well as in the 3D scene.

A screenshot of the Godot Inspector tab, showing the properties for the MeshInstance3D child node. No mesh has been applied yet.
Before a Mesh is added.
A screenshot of the Godot Inspector tab, showing the properties for the MeshInstance3D child node. The dropdown menu to apply a mesh is open.
Adding the Mesh.
A screenshot of the Godot Inspector tab, showing the properties for the MeshInstance3D child node. A Box Mesh is now applied.
Mesh is now applied.
A screenshot of the Godot 3D perspective window, with a box mesh applied to the rigid body asset..
Mesh shown in the 3D scene.

Add Animation

  • With the MeshInstance3D installed, select the OptiTrackRigidBody node in the Scene hierarchy.

  • In the Inspector panel, check the box to Animate in Editor.

A screenshot of the top portion of the Godot Inspector tab, for the OptiTrack plugin.
  • Use the buttons at the bottom of the OptiTrack pane to play or pause the selected take in Motive.

A screenshot of the Motive Timeline Play and Motive Timeline Pause buttons from the OptiTrack plugin in Godot.

Configure Skeletons

The OptiTrack Godot plugin includes compiled skeleton assets in both gendered avatars (female and male) for each spine model (the classic 3-segment spine or the default 7-segment spine), for a total of four skeleton options:

  • OptiTrackAvatarFemale3.tscn

  • OptiTrackAvatarFemale7.tscn

  • OptiTrackAvatarMale3.tscn

  • OptiTrackAvatarMale7.tscn

These assets are located in the addons folder under optitrack_plugin > model scenes.

Before adding a skeleton to the scene, you will need to assign the mesh if using Godot 4.6 or higher. Note that these steps are not required if using Godot 4.5.

  • double-click the .tscn file in the Godot File System. This will open the model in a new window in the 3D viewport.

A screenshot of Godot 4.6.1 with an open .tscn file that does not have a mesh assigned.
  • In the Scene panel, select the Mesh. This will display the mesh properties in the Inspector panel.

  • In the MeshInstance3D section, click the Assign button for the Skeleton property.

A screenshot of the Inspector tab in Godot, with an OptiTrack avatar mesh selected. The MeshInstance3D properties are shown, with the Skeleton property highlighted. This property is currently Unassigned.
  • Select the mesh from the list then click OK.

A screenshot of the Godot screen to select a mesh to assign to a skeleton.
  • The skeleton and avatar will now align in the 3D view:

A screenshot of Godot 4.6.1 with an open .tscn file that has a mesh assigned.
  • Close the tab for the .tscn file by clicking the x in the tab corner.

  • Godot will prompt to save the scene. Click OK and ignore any errors that display.

  • Repeat these steps for each avatar type that you plan to use in your scene.

Create an OptiTrack Skeleton Node

To add a child node for a skeleton to the project:

  • Open the addons folder and browse to optitrack_plugin > model scenes

  • Click and drag the .tscn file that corresponds to the asset in Motive into the scene, directly below Node3D.

A scene in Godot after an OptiTrack male avatar has been added.
Adding a skeleton in Godot.
  • Select the skeleton to display its properties in the Inspector tab.

  • Click the Skeleton Asset ID dropdown to select the skeleton asset from Motive.

  • Make sure the Animate in Editor option is on.

Assigning an Asset to a skeleton in Godot.
  • Click the Refresh Asset List button if the list of assets in the dropdown differs from the loaded Take in Motive.

Skeleton Asset ID - unassigned in Godot, with the Refresh Asset List button.

The skeleton should now animate properly in Godot.

Side-by-side screenshots of the same skeleton in Motive and in Godot.

Troubleshooting

If the object does not animate:

  • Restart Godot.

  • Reopen the project.

  • Click Start Connection again.

In most cases, the data stream will reconnect successfully after restarting.

Last updated

Was this helpful?