Difference between revisions of "OptiTrack Unreal Engine LiveLink Plugin"

(Using the Plugin)
(Live Link Timecode Setup)
Line 91: Line 91:
  
 
<div class="padded">
 
<div class="padded">
====1. Check the camera system frame rate.====
+
====1. Set Timecode Provider under project settings====
 
<div class="padded">
 
<div class="padded">
In Motive, double-check and make sure the camera frame rate is a multiple of the genlock/timecode input. If this is not the case, then you will get warning messages, since there will not be a regular one-to-one assignment of timecode frames/subframes and motion capture frames.
+
From ''Edit &rarr; Project Settings'', search timecode and under Engine - General settings, you should fine settings for the timecode. Here, set the the Timecode Provider to LiveLinkTimeCodeProvider.
</div>
+
 
+
====2. Configure Evaluation Mode ====
+
<div class="padded">
+
In the LiveLink pane, select the OptiTrack source, then set the Evaluation Mode to ''Timecode'' under the settings. Once that's done, the Timecode Frame Rate should get set automatically.
+
 
+
<center><ul>
+
<div class="thumblist">[[Image:LiveLink_Timecode_2.png|center|thumb|550px]]</div>
+
<div class="thumblist">[[Image:LiveLink_Timecode_1.png|center|thumb|550px|]]</div>
+
</ul></center>
+
</div>
+
 
+
====3. Create a Timecode blueprint====
+
<div class="padded">
+
Click '''Add New''' button on the Content Browser and select Blueprint Class. Then, search and select LiveLinkTimecodeProvider as the parent class to add. Name the created blueprint to something such as "OptitrackTimeCode".
+
 
+
<center><ul>
+
<div class="thumblist">[[Image:LiveLink_Timecode_4.png|center|thumb|550px]]</div>
+
<div class="thumblist">[[Image:LiveLink_Timecode_3.png|center|thumb|550px]]</div>
+
</ul></center>
+
</div>
+
 
+
====4. Set Subject Key====
+
<div class="padded">
+
Open the created blueprint and select one of the rigid body asset as the Subject Key, then compile and save it.
+
  
[[Image:LiveLink_Timecode_5.png|center|thumb|452px]]
+
[[Image:LiveLink_Timecode1.png|center|650px|]]
 
</div>
 
</div>
  
====5. Set Timecode Provider under project settings====
+
====2. Set OptiTrack source in the Live Link pane as the Timecode Provider====
 
<div class="padded">
 
<div class="padded">
From ''Edit &rarr; Project Settings'', go to General Settings and for Timecode Provider enter the name of the blueprint created in step 4:
+
Open the Live Link pane, and select the OptiTrack subject that we created when first setting up the plugin connection. Then, under its properties, check the Timecode Provider box.
  
[[Image:LiveLink_Timecode_6.png|center|550px|]]
+
[[Image:LiveLink_Timecode2.png|center|650px|]]
 
</div>
 
</div>
  
====6. Check the timecode in the Take Recorder pane====
+
====3. Check the timecode in the Take Recorder pane====
 
<div class="padded">
 
<div class="padded">
Check that the correct timecode is now seen in the Take Recorder pane.  
+
The timecode from Motive should be seen in the Take Recorder pane.  
  
 
[[Image:LiveLink_Timecode_7.png|center|550px|]]
 
[[Image:LiveLink_Timecode_7.png|center|550px|]]
 
</div>
 
</div>
 
</div>
 
</div>

Revision as of 10:49, 8 October 2020

Warning2.png

Note: Contents in this page are still preliminary and the instructions are subject to be changed

Overview

This page provides instructions on how to use OptiTrack UE LiveLink plugin.

Plugin Setup


1. [Motive] Setup rigid body streaming in Motive.

Get Motive streaming with at least one rigid body. Make sure the Streaming settings are set up correctly, and the rigid body is active under the Assets pane.

2. [UE] Install the OptiTrack plugins in Unreal Engine (UE).

You can install the OptiTrack - NatNet Streaming Client plugin by putting the plugin files into one of the following directories:

  • A global engine plugin can be placed in C:\Program Files\Epic Games\[Engine Version]\Engine\Plugins
  • A project-specific plugin can be placed in [Project Directory]\Plugins

3. [UE] Enable the plugins in UE project.

Go to Edit → Plugins and enable the OptiTrack - LiveLink plugin as well as the Built-In LiveLink plugin in UE.

OptiTrack - Live Link plugin. Make sure the plugins are placed in the plugins folder either in the project or engine directory.
Built-In Live Link plugin.

4. [UE] Open the LiveLink pane

The LiveLink pane can be accessed from Window → Live Link from the toolbar in UE.

    LiveLine pane in UE.
    LiveLine pane in UE.

5. [UE] Configure and create a new OptiTrack source

In the LiveLink pane under Source options, go to the OptiTrack Source menu and configure the proper connection settings and click Create. Please make sure to use matching network settings configured from the Streaming pane in Motive.

Creating OptiTrack source with client streaming settings.

6. [UE] Check the Connection.

If your settings were correct, then the plugin will list out all of the detected rigid bodies, and they should have green dots next to them signifying that the asset has been created and is receiving data. If the dots are yellow, then either your take is paused, or there is some sort of connection error.

Connected to the rigid body data stream.

Using the Plugin


Moving Camera / Static Mesh Actors

1. Add a camera object or a static mesh object that you wish to move

Add a camera actor from the Place Actors pane or a static mesh from the project into your scene. For the static meshes, make sure their Mobility setting is set to Movable.

    LiveLink Camera CameraObject.png
    LiveLink Camera CubeObject.png

2. Add LiveLinkController Component

Select an actor you want to animate, click the “Add Component” button on the details pane, and add LiveLinkController.

LiveLink Camera AddLiveLinkController.png

3. Configure the LiveLinkController component

Under the Live Link Controller component that has been added, configure the following properties. You will need to expand the settings to change this:

  • Live Link → Subject Representation → Target rigid body name
  • Live Link → Subject Representation → Role → LiveLinkTransformRole
  • Role Controllers → Transform Role → Live Link Transform Controller
LiveLink Camera ConfigLiveLinkController.png

4. Check

Now the objects with the LiveLinkController component attached and configured will be animated in the scene.

Live Link Timecode Setup

When the camera system is synchronized to another master sync device and a timecode signal is feeding into eSync, then the received timecode can be used in UE project through the plugin.

1. Set Timecode Provider under project settings

From Edit → Project Settings, search timecode and under Engine - General settings, you should fine settings for the timecode. Here, set the the Timecode Provider to LiveLinkTimeCodeProvider.

LiveLink Timecode1.png

2. Set OptiTrack source in the Live Link pane as the Timecode Provider

Open the Live Link pane, and select the OptiTrack subject that we created when first setting up the plugin connection. Then, under its properties, check the Timecode Provider box.

LiveLink Timecode2.png

3. Check the timecode in the Take Recorder pane

The timecode from Motive should be seen in the Take Recorder pane.

LiveLink Timecode 7.png