MotionRiver Unreal 5.3 (with 5.4 soon)

How to use MotionRiver to stream mocap over the internet from Optitrack.

To test the setup I’m using 2 PCs on a local network. Its almost the same if Unreal and Motive were running on the same PC.
if the Motive machine is on a remote network, it’s very convenient for the network to have a static IP Address.

Note there is no difference between playing back a pre-recorded take or using Motive in Live mode with a performer present. Here for testing, it’s more convenient to playback an existing take.

Mocap PC

Mocap PC – this machine is running Motive. We’re working with Motive 2.1.1 I have a mocap take open with a motive Asset performer Hannah

Motives Data Streaming pane is set up in a vanilla configuration like this: For testing I’m on my local network. (If Motive & Unreal were on the same PC, I would use the loopback IP address

Its a good idea to test if the Unreal and the Mocap machines can ping each other…using CMD prompt to make sure there are no networking issues.

On the motive machine, Run the MotionRiver Server and then the MotionRiver Source, both very simple apps like these images

You can see in the MotionRiver Source it is Connecting to server (and it will show the external IP address -I redacted that part )

Unreal PC

Now to the Unreal PC. The MotionRiver Plugin begins in the default engine location, usually. C:\Program Files\Epic Games\UE_5.3\Engine\Plugins\Marketplace -put the MotionRiver folder in here. Open a project and under Edit/Plugins/Installed/Mocap look for Motion River, enable it and restart the editor.

Now open Window/Virtual Productuion/Livelink and click the +Source button, then enter <Mocap Machine IP Address>, then hit Connect -if you are on the same network use the <Mocap Machine IP Address> OR use <Mocap Network External IP Address>. If you plan to move the mocap machine to a new location then best to use <Mocap Network External IP Address>.

This will add a MotionRiver Server with your IP – now if you see nothing under Subject Name like image below then:
1. Make sure that the mocap machine is playing the take, or is live.
2. Restart the MotionRiver Source & MotionRiver Server.

When its connecting you will see the Asset (performer name under Subject. If you have several performers then you would see a list of names)

The next stage is to target a Skeleton and do Bone Remapping. Under skeleton choose <YourSkeleton> (mine is RuthMotionRiver_Skeleton). Under the Bone Name Remaps on the left is a series of bones that are the incoming performers bones from Motive. On the right choose the appropriate bone in your skeleton.
E.g Hannah_Hip retargets to Pelvis,
Hannah_Ab retargets to Spine_01

here’s my list before tweaking:

As you start tweaking the list the yellow indicator dot will turn green to show data is streaming

Now if you close the LiveLink window and reopen it, a new setting appears Bone Map Presets and if you hit the Presets drop down and choose Create Preset from Current you can save this remapping for use with another skeleton (assuming skeletons you use have the same hierarchy. (The bone remap folder can be opened – the file is a simple .uasset that opens and can be edited in notepad, too.

Bone Map Presets

And you can select the Presets under Live Link to create a preset for the MotionRiver Server source. (the IP address really) which can be handy for swapping locations or networks.

Live Link presets

Now we need to set up the character to get the mocap. First R Click your Skeletal mesh and choose Create Anim Blueprint, open it, R Click add a Live Link Pose, hook it up and choose the Live Link Subject Name, (in my case Hannah). Hit Compile and Save.

In the content browser, R-click Create a Blueprint class of type Character, open it up and add Your Skeletal Mesh and set its Anim Class to the Animation Blueprint we just created. Add a Live Link Skeletal Animation Component. Compile & Save.

Character blueprint

The Live Link Component will make the character animate even before you play the map. Drop the character in the world and you are good to go. The animation can be scrubbed in Motive and can even change which mocap file is playing OR go live with real performers.

Character in the map

To help with setup look in Project Settings under Plugins/LiveLink. The Default Live Link preset from earlier can be set here, so when the project opens it will pick up the streaming mocap.

The IP address can be set to the external IP address of the network where the Mocap machine is, in case you move to a different site.
You may need to set up a NAT forwarding rule on the Mocap machines Internet router to allow the Mocap machines IP address to communicate via TCP or UDP over port 60000.

Tips (needs a rewrite for clarity, I think)
If playing back Motive mocap files during setup and changing takes, you will need to restart the MotionRiver source to pick up the changes, which get reflected in LiveLink, see below…

For live performance setups its best to have a LiveLink Preset with ALL the subjects added, then when setting up in Unreal, you can do a skeleton for each performer and your LiveLink presets can expect mocap from each performer. If particular performer are not present there’s no problem, the ones that are streaming data will be green. You may have to write some code to hide unwanted characters in your level though.

The method I use is to open a take with a few performers in it. Then restart the MotionRiver Source, then in Unreal delete (with the small trashcan icon) then reload the LinkLink Preset. The new performer /subject will show up in the Subject Name list in LiveLink. Save this preset.
Then repeat -open another Motive take with other performers, restart Source, reload Livelink to see new subject then Save the preset.
The MotionRiver Server and MotionRiver Source and Unreal can be closed at this point, the Live Link preset should have all you potential subjects in it. However you must set up the skeletons for each incoming subject you want. And remember that if you are testing and have one character that you want animated by a different subject – you need to go into the Animation blueprint and choose the new Live Link Subject Name

Packaging a project

Make sure you have a Default Live Link Preset set in Project Settings/Plugins/Live Link . This is so the thing knows where to look for streaming mocap.

The plugin has to be moved into <your project folder>/Plugins

Depending on your project open the MotionRiver.uplugin file with notepad – it’s inside the Plugin folder. Look for TargetAllowList they should be blank like this:

If you dont see  TargetAllowList then look for WhitelistTargets: [“Editor”] and set that to be blank like this

For reference my current version 5.3 MotionRiver.uplugin is this:

When you are done restart the editor, then you can package for Windows. I’ve been testing with Shipping Builds.

Rigidbody streaming (coming soon)