This topic explains how to install the LiveLink Datastream plugin for streaming segment data from Vicon software into Unreal Engine 4.



Installation and setup

Before you begin

  1. Ensure you are using Windows 10.
  2. Install the relevant version of Unreal Engine.
  3. Download the LiveLink plugin from 
    https://www.vicon.com/software/third-party/unreal-engine/

Install the LiveLink plugin

  1. Before running the installer, ensure the engine version that you downloaded matches the desired version of Unreal Engine.

  2. Run the installer by double-clicking on the MSI file.

  3. Accept the license agreement and click Next.
    The installer should automatically detect the installed version of the engine.
  4. If the installer did not detect the engine, click Browse.
  5. Navigate to the installed engine location (by default C:\Program Files\Epic Games\UE_4.x), and click OK.

Set up the plugin in the editor

  1. Create and launch an existing project or open an existing one.
  2. Navigate to Edit > Plugins to open the Plugins browser.



  3. In the Plugins window, scroll down to the MOCAP section.

  4. Ensure the Vicon Datastream LiveLink plugin is enabled.



  5. If required, restart the editor.

Create a Live Link source

This section describes how to use Unreal Engine's Live Link functionality with the LiveLink plugin from Vicon to connect to the Vicon Datastream.

Before you begin

Ensure you have set up and installed the following components.

  • 1 x PC with Vicon software (Shogun) installed
  • 1 x PC with Unreal Engine 4 installed
  • PCs are connected via LAN
  • Vicon LiveLink Datastream plugin is installed (see Installation and setup)
  • Unreal Engine 4 project open

Set up Live Link using the GUI

  1. Navigate to Window > Live Link.



  2. Click Add and choose Vicon Datastream Source.



  3. In Vicon Server Name field, enter the IP address of the Vicon machine.

  4. In the Port Number field: enter 801 (Vicon default) or 804 (Evoke Low Latency output/Shogun Always Live Output). For more information, see Unreal Plugin source machine settings.
  5. Click Create to create the Live Link connection.



    The connection is displayed in the Source pane and the subjects are displayed in the Subject pane.

Set up Live Link using blueprint functions

Create a new blueprint

  1. In the content browser, right-click and under Create Basic Asset choose Blueprint Class.



  2. In the dialog box, choose Actor so that it can be spawned or placed in the level.
  3. Give the resulting blueprint a suitable name and open it.
  4. In the new blueprint, in the toolbar along the top, navigate to Event Graph.

Set up the blueprint function

  1. Right-click in an empty space in the graph and search for Create Vicon LiveLink Source.



  2. Select this function to spawn a node in the graph.
  3. Connect an event trigger to the input of the node. (In this example the event "EventBeginPlay" is used. This causes the Live Link connection to be created when play has been started.)



  4. Enter the parameters in the same way as the GUI method of creating a source (see Set up Live Link using the GUI).



  5. Compile and save the blueprint.
  6. Drag the blueprint from the content browser directly into the level.


Tip

When a source has been created, it continues to exist until it is manually removed, so you may accidentally create multiple sources during your work. 

Ensure the final node graph looks like this:

Check the source has been created successfully

  1. With the blueprint placed in the level, navigate to the toolbar at the top and click Simulate.
  2. Navigate to Window > Live Link.



  3. Ensure that a source has been successfully created.



  4. Navigate to Window > Developer Tools > Output Log .



  5. Ensure that the log reports that the connection was successful using the correct parameters input in the function.

Set up Live Link using Presets

  1. Create a Live Link source using the GUI.



  2. With an active source, click the Presets button next to Add Source.

  3. Click Save As Preset and choose an appropriate name.

Add source using the Preset GUI

  1. Ensure all Live Link connections are removed.
  2. Click the Presets button.
  3. Choose the created preset.



  4. Ensure the connection is created after choosing the preset.

Add Source using Preset on Play

  1. Navigate to Edit > Project Settings.



  2. In the search bar, enter LiveLink.

  3. Under Plugins - Live Link, navigate to the Default Live Link Preset.
  4. Choose the preset that was created earlier.



  5. Ensure all Live Link connections have been removed and click Play.

Create Animation Blueprint (body)

Import the character FBX

Important
This step uses the default Vicon FBX as an example. This FBX skeleton MUST match the skeleton exactly streaming from Vicon software. Both naming conventions and bone hierarchy MUST be the same.

  1. Right-click in empty space to create a new folder in the content browser.



  2. Name the folder appropriately (eg, ViconCharacter).

  3. In the new empty folder, click Import in the Content Browser toolbar.



  4. In the dialog box, locate the FBX character file and click Open. The default Shogun skins can be found in:
    C:\Program Files\Vicon\ShogunLive1.#\Configuration\Skins

  5. In the FBX Import Options dialog box, expand the Mesh section.

  6. Ensure that Skeletal Mesh, Import Mesh, Update Skeleton Reference Pose and Use T0 As Ref Pose are all selected.



  7. Click Import All to import the character.

Set up the Animation Blueprint for the subject

  1. Locate the Skeletal Mesh for the character FBX.
    In UE4 this has a purple-colored outline.
  2. Right-click the Skeletal Mesh asset and navigate to Create > Anim Blueprint.



    This creates an Animation Blueprint asset that can be used to map animation data from the Live Link source.
    In UE4 this has an orange-colored outline.

  3. Give the Animation Blueprint a suitable name for the subject that will be streaming.



  4. Open the Animation Blueprint.
    If the animation graph doesn't open, you can find it in the My Blueprint box on the left:



  5. Right-click in an empty spot in the graph and search for Live Link Pose.



  6. In the Live Link Pose node, select or enter the name of the subject from the Live Link source.



  7. Drag a link between the node and the Final Animation Pose.



  8. In the top left corner, click Compile.
    As soon as the Animation Blueprint is compiled, the character data is streamed into UE4 onto the Character FBX.
    This can be seen in the preview window on the left side.



  9. Close the Animation Blueprint, navigate to it in the Content Browser and add it into the scene.
  10. Zero out the Animation Blueprint's position and set the X-axis to -90.

Create Animation Blueprint (prop/object)

Import the prop FBX

Important

  • Shogun and Evoke props are always created with a root bone called "root". For the easiest setup, also name the prop FBX root bone "root". You can remap this using Live Link Remap Asset. As this is a Live Link/UE4-specific feature, to learn more, see the Live Link Plugin | Unreal Engine Documentation.
  • This prop/object workflow is for versions of Unreal Engine 4.26 and earlier. For Unreal Engine 4.27 and later, see Set up Prop/Object using Transform Role.
  1. Right-click in empty space to create a new folder in the content browser.



  2. Name the folder appropriately (eg, Sword).

  3. In the new empty folder, click Import in the Content Browser toolbar.



  4. Locate the desired prop FBX. Shogun and Evoke are installed with a few basic FBX files found here:
    C:\Program Files\Vicon\ShogunLive1.#\PropMeshes
    C:\Program Files\Vicon\Evoke1.#\PropMeshes

  5. In the FBX Import Options dialog box, expand the Mesh section.
  6. Ensure that Skeletal Mesh, Import Mesh, Update Skeleton Reference Pose and Use T0 As Ref Pose are all selected.



  7. Click Import All to import the prop.

Set up the Animation Blueprint for the prop

  1. Locate the Skeletal Mesh for the Character FBX.
    In UE4 this has a purple-colored outline.
  2. Right-click the Skeletal Mesh asset and navigate to Create > Anim Blueprint.



    This creates an Animation Blueprint asset that can be used to map animation data from the Live Link source.
    In UE4, this has an orange-colored outline.

  3. Give the Animation Blueprint a suitable name for the prop/object that will be streaming.
  4. Open the Animation Blueprint.
  5. Right-click in an empty space in the graph and search for Live Link Pose.



  6. In the Live Link Pose node, select the name of the subject in Shogun.

  7. Drag a link between the node and the Final Animation Pose.



  8. In the top left corner, click Compile.
    As soon as the Animation Blueprint is compiled, the character data is streamed into UE4 onto the character FBX. This can be seen in the preview window in the left side.



  9. Close the Animation Blueprint, navigate to it in the Content Browser and add it into the scene.
  10. Zero out the Animation Blueprint's position and set the X-axis to -90.

Set up Prop/Object using Transform Role

This method uses a Skeletal Mesh.

  1. Right-click in empty space to create a new folder in the content browser.



  2. Name the folder appropriately (eg, Sword).

  3. In the new empty folder, click Import in the Content Browser toolbar.



  4. Locate the desired FBX. Shogun and Evoke are installed with a few basic FBX files found here:
    C:\Program Files\Vicon\ShogunLive1.#\PropMeshes
    C:\Program Files\Vicon\Evoke1.#\PropMeshes

  5. Add the imported mesh to the scene and zero out its position.



  6. In the World Outliner, select your mesh and then click Add Component and find and add a component called LiveLinkController.



  7. Select the new LiveLinkComponentController and in the Subject Representation, select the name of the required subject.


Moving the object
Due to the way the Live Link Controller works, with this method you must use a parent object to move the object's origin point, as shown in the following image.

Set up camera transforms and lens distortion

Before you begin

Before you begin, ensure you have the following:

  • 1 x PC with Vicon software installed
  • 1 x PC with Unreal Engine 4.27 or later installed
  • PCs connected via LAN
  • Vicon DataStream SDK installed, correct version for Unreal Engine version
  • SDI set up in Vicon software and Unreal Engine
  • Unreal Engine 4 project open
  • LiveLink source created and connected

Set up camera tracking in Unreal Engine

  1. In the Actor Placement panel, search for CineCamera, add it to the scene, and zero out the position of the camera.
  2. In the World Outliner, select CineCameraActor and then click Add Component and find and add a component called LiveLinkController.



  3. Select the new LiveLinkComponentController and in the Subject Representation, select the name of the camera subject.

    selectVCAM.png

  4. In the Component to Control dropdown select the CameraComponent.



  5. In the Camera Role field, select Live Link Vicon Camera Controller.



  6. Select the CineCameraActor and in Filmback>Sensor Width/Height set the width and height to match the camera's sensor size.
    The Output Log notifies you if the aspect ratio did not work for automatically setting the focal length.


Set up lens distortion in Unreal Engine

Important
Ensure you have completed the previous section (Set up camera tracking in Unreal Engine).

On the Composure Layer tab, complete the following steps for each CG Layer.

  1. Select a CG Layer.



  2. In the Details panel, select Apply Distortion.



  3. Ensure Distortion Source is set to the same subject as set in the CineCamera from the previous section.

  4. For information on how to add actors to CG Layers, see here: Real-Time Compositing Tools | Unreal Engine Documentation.

Tip

If, after following these steps, the props are misaligned with their real world counterpart when viewing the final composure, go back to Shogun and recalibrate the SDI. This realigns the final composure.