Difference between revisions of "Sandbox"

(6.)
(Live Link Rigid Body Tracking)
Line 53: Line 53:
 
The first step is to set up your object to track. To do this, right-click on a skeleton mesh object you would like to track in the content browser, choose → Create → Anim Blueprint''. ''The mesh must be a skeleton mesh''.
 
The first step is to set up your object to track. To do this, right-click on a skeleton mesh object you would like to track in the content browser, choose → Create → Anim Blueprint''. ''The mesh must be a skeleton mesh''.
  
[[Image:LiveLink_CreatingAnimBlueprint.png|center]]
+
[[Image:LiveLink_CreatingAnimBlueprint.png|center|thumb|550px|Creating Anim blueprint.]]
 
</div>
 
</div>
  
 
====2. Open Animation Blueprint====
 
====2. Open Animation Blueprint====
 
<div class="padded">
 
<div class="padded">
This will create an Animation Blueprint version of your object file. Double-click the created animation blueprint to edit it.  
+
This will create an Animation Blueprint of the selected mesh. In the content browser, double-click the created animation blueprint to edit it.  
  
[[Image:LiveLink_AnimBlueprint..png|center]]
+
[[Image:LiveLink_AnimBlueprint..png|center|thumb|300px|Animation blueprint create in the content browser.]]
 
</div>
 
</div>
  
Line 67: Line 67:
 
In the blueprint, access the ''AnimGraph'' tab. There should be an output pose node in there already. Then right-click in the empty space and search for "Live Link" to find the "Live Link Pose" and add it to the graph.
 
In the blueprint, access the ''AnimGraph'' tab. There should be an output pose node in there already. Then right-click in the empty space and search for "Live Link" to find the "Live Link Pose" and add it to the graph.
  
[[Image:LiveLink_AnimGraph1.png|center]]
+
[[Image:LiveLink_AnimGraph1.png|center|thumb|550px|Adding Live Link Pose node.]]
 
</div>
 
</div>
  
Line 74: Line 74:
 
On the Live Link Pose node, you should see the Live Link Subject Name property. Use the dropdown and select the name of a rigid body to use.  Then, drag the pose output and connect it to the Output Pose.
 
On the Live Link Pose node, you should see the Live Link Subject Name property. Use the dropdown and select the name of a rigid body to use.  Then, drag the pose output and connect it to the Output Pose.
  
[[Image:LiveLink_ConnectOuputPose.png|center]]
+
[[Image:LiveLink_ConnectOuputPose.png|center|thumb|550px|Live Link Pose of a Bat rigid body connected to the output pose.]]
 
</div>
 
</div>
  
 
====5. Set the retarget asset====
 
====5. Set the retarget asset====
 
<div class="padded">
 
<div class="padded">
Select the “Live Link Pose” node and in the Details pane select the “OptiTrackLiveLinkRetarget” option in the “Retarget Asset” property.  
+
Select the “Live Link Pose” node and select the “OptiTrackLiveLinkRetarget” option in the “Retarget Asset” property in the Details pane.  
  
[[Image:LiveLink_RetargetAsset.png|center]]
+
[[Image:LiveLink_RetargetAsset.png|center|thumb|550px|Selecting Retarget Asset.]]
 
</div>
 
</div>
  
Line 88: Line 88:
 
Compile and save the blueprint. Once the changes have been compiled, you should see the object animating according to the rigid body tracking in the mini 3D viewport.  
 
Compile and save the blueprint. Once the changes have been compiled, you should see the object animating according to the rigid body tracking in the mini 3D viewport.  
  
[[Image:LiveLink_RB_Tracking.png|center]]
+
[[Image:LiveLink_RB_Compiled.png|center|thumb|750px|Compiled blueprint with the mesh being animated.]]
 
</div>
 
</div>
 
</div>
 
</div>
  
 
==Live Link Camera Plugin==
 
==Live Link Camera Plugin==

Revision as of 13:36, 7 October 2020

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.

Live Link Rigid Body Tracking

After you are connected to Motive through the Live Link plugin and have at least one rigid body tracking, then you can start animating an object in Unreal Engine as well.

1. Set up the object to track

The first step is to set up your object to track. To do this, right-click on a skeleton mesh object you would like to track in the content browser, choose → Create → Anim Blueprint. The mesh must be a skeleton mesh.

Creating Anim blueprint.

2. Open Animation Blueprint

This will create an Animation Blueprint of the selected mesh. In the content browser, double-click the created animation blueprint to edit it.

Animation blueprint create in the content browser.

3. Add Live Link Pose to the blueprint

In the blueprint, access the AnimGraph tab. There should be an output pose node in there already. Then right-click in the empty space and search for "Live Link" to find the "Live Link Pose" and add it to the graph.

Adding Live Link Pose node.

4. Connect Live Link pose to the Output Pose

On the Live Link Pose node, you should see the Live Link Subject Name property. Use the dropdown and select the name of a rigid body to use. Then, drag the pose output and connect it to the Output Pose.

Live Link Pose of a Bat rigid body connected to the output pose.

5. Set the retarget asset

Select the “Live Link Pose” node and select the “OptiTrackLiveLinkRetarget” option in the “Retarget Asset” property in the Details pane.

Selecting Retarget Asset.

6. Compile and save

Compile and save the blueprint. Once the changes have been compiled, you should see the object animating according to the rigid body tracking in the mini 3D viewport.

Compiled blueprint with the mesh being animated.

Live Link Camera Plugin