In this How-to, we use the Live Link Plugin to connect Unreal Engine to Maya, which enables us to control our Skeletal Mesh and animations inside Maya while live previewing them on a rendered Skeletal Mesh in Unreal Engine in real-time.
Using the Live Link Plugin can speed up your animation workflow as you no longer need to export your content and import it into Unreal Engine to see how it looks. You can now work directly inside Maya, and through Live Link, preview what it will look like inside the Engine in real-time. In this How-to, we go through the process of getting Live Link set up for Maya, and control a Skeletal Mesh animation in Maya while previewing it in Unreal Engine.
For this guide we are using the Blueprint Third Person Template Project and Maya 2017.
Live Link works with other versions of Maya and other DDC tools. For more information, please refer to the Live Link Plugin documentation pages.
1 - Enabling the Live Link Plugin
-
Inside your project, from the Menu Bar under Edit, select Plugins.
-
Under the Animation section, click Enabled for Live Link, and Yes on the confirmation window, then restart the Editor.
This will enable the Live Link plugin, which can be used to connect to external DDC tools. In order for your DDC tool to connect to Unreal Engine, you will need to enable the corresponding plugin. For this How-to, we are focusing on Maya, and need to enable the plugin inside Maya.
-
Download the MayaLiveLink Code Plugin files from the Unreal Engine Marketplace.
Unless you've tweaked your install locations, these files will likely be installed to: C:\Program Files\Epic Games\UE_4.25\Engine\Plugins\Marketplace\MayaLiveLink.
-
Copy the folder for your version of Maya, then navigation to your Maya installation folder, and paste it in the plug-ins folder.
There are pre-built binaries for Maya versions 2016-2019, for this guide we are using Maya 2017.
In the next step, we will enable the Live Link plugin inside of Maya, and open the Maya Live Link UI window. This enables you to see the connection status to a running version of the Unreal Engine Editor.
2 - Enabling Maya Live Link
-
Open Maya, then under Windows and Settings/Preferences, select Plug-in Manager.
-
Click the Browse button, and then navigate to the copied MayaLiveLink folder, then add the .mll file.
-
Repeat the previous step and add the .py file from the Plug-in Manager.
Once added, you will see the plugins inside the Plug-in Manager as Loaded.
-
In the MEL console in the lower-left of Maya, enter MayaLiveLinkUI then press Enter.
The MEL console command is case-sensitive, so you will need to enter it as specified in the step above.
This will open the Maya Live Link UI Connection Status window.
In the upper-right of the window, the connection status is displayed to indicate if you are connected to a running version of the Unreal Engine Editor. You can use the lower window to name and add/remove Subjects that you wish to stream to Unreal Engine, which we will do later in this guide.
For now, we are not connected, however in the next step we will establish a connection to Unreal Engine. We will also export an animation asset and Skeletal Mesh that we can use to work with in Maya, then add it as a Subject to stream back to Unreal Engine for live previewing.
3 - Establishing a Connection to Unreal Engine
-
In Maya, select an object (i.e. a cube, sphere, etc.) and select "Add Selection in Maya Live Link UI." This will help UE recognize the newly enabled plug in.
-
Inside the Unreal Engine Editor, from the Menu Bar under Window, select Live Link.
-
In the Live Link window, click the Source button, then under Message Bus Source, select your Maya Live Link source and click Ok.
If you return to Maya, the Maya Live Link Connection Status window will update to reflect the new connection status.
Now that we are connected, we need a Subject to preview and test the connection.
-
Inside Unreal Engine, in the Content/Mannequin/Animations folder, open the ThirdPersonRun asset.
-
From the Toolbar, click Export Asset and select Preview Mesh.
-
Select Yes to export the Skeletal Mesh, enable Export Preview Mesh, choose an export location, then select Export at the FBX Export Options window.
-
Inside Maya, under File select Import, and import the FBX asset from the previous step.
-
Switch to Animation mode, and then select the Root bone for the character.
-
In the Maya Live Link UI window, click the Add Selecton button.
This will add the selection (or selections) as the Subject to stream to Unreal Engine.
The plugin knows that this is a joint hierarchy and labels the Subject as a Character. The name Root is the name of the Subject which you can change in the text entry box. This name will be the Subject name reflected inside Unreal Engine. By default, the Stream Type will be set based on the type data being streamed. You can change this to stream over the information you want inside the Stream Type setting.
If you have more than one Network Adapater in your machine and want to specify which one to recieve data from, you will need to specify the Unicast Endpoint in your Project Settings.
Maya is now set up to stream our Subject to the Unreal Engine Editor. In the next step, we will set up Unreal Engine to receive the streamed Subject so that we can start to live preview the content from Maya inside Unreal Engine.
4 - Live Link Preview Controller
-
Inside Unreal Engine, under the Content/Mannequin/Character/Mesh folder, open the SK_Mannequin asset.
-
Click the Preview Scene Settings tab, and then under Preview Controller, select Live Link Preview Controller.
-
Under Live Link Subject Name, click the drop-down menu, and select root.
The viewport will update and the character will enter the pose that the character is using inside Maya.
-
Enable the Enable Camera Sync option.
This will sync Unreal Engine's camera to the last viewport camera used inside Maya. Anytime you move the camera in Maya, Unreal Engine's camera will update to match.
-
Go to your Editor Preferences, and under Performance, disable the Use Less CPU when in Background option.
This option throttles background performance on the Editor and stops the Editor from rendering while Maya has focus, which will prevent us from seeing the updates in real time.
If you want the Editor to continue evaluating while you are idle, you can also adjust the Valid Engine Time in the Live Link Connection window to give you more time before the Editor stops evaluating.
-
Return to Maya and scrub the animation, or move the camera in the viewport.
For this example, we are using the Live Link Preview Controller, however you can also stream data through the Live Link Component attached to an Actor.
5 - End Result
As you scrub the animation in Maya or move the camera, the character and camera movement in Unreal Engine will update to match what you see in Maya. A typical workflow would be to author your content in Maya, export the Skeletal Mesh and import it into Unreal Engine, follow the connection setup steps outlined in this guide to establish a connection, then preview animations authored in Maya on the Live Link Subject in Unreal Engine.
You can also make changes to your animations and those will be reflected in real-time inside Unreal Engine on the Live Link Subject.
Above, we re-key the position of the head so the character is looking around while running, and see what it would look like inside Unreal Engine. While this is a simplistic example of how to use the Live Link Plugin, there are many more advantages to this feature which you can find on the Live Link Plugin documentation page.
If you are using the Maya Live Link Plugin prior to 4.23, when driving a camera through Blueprint, it may not have the correct transform. You can fix this by adding an Add Relative Rotation node set to 0, 180, 90 as indicated below.
