Connecting Unreal Engine 4 to Maya with Live Link

Describes how you can connect Unreal Engine 4 (UE4) to a version of Maya which enables you to preview content from Maya inside UE4 in real-time.

Windows
MacOS
Linux

In this How-to, we use the Live Link Plugin to connect Unreal Engine 4 (UE4) to Maya, which enables us to control our Skeletal Mesh and animations inside Maya while live previewing them on a rendered Skeletal Mesh in UE4 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 UE4 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 UE4.

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

  1. Inside your project, from the Menu Bar under Edit, select Plugins.

    Step_01-1.png

  2. Under the Animation section, click Enabled for Live Link, and Yes on the confirmation window, then restart the Editor.

    Step_02-3.png

    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 UE4, 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.

  3. Download the MayaLiveLink Plugins files from the UE4 GitHub repository and unzip to your desired location.

    Step_03-1.png

    The latest version of the plugin will work with UE 4.23. Previous versions of UE will require version 1.0.

  4. Copy the folder for your version of Maya, then navigation to your Maya installation folder, and paste it in the plug-ins folder.

    Step_04-1.png

    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 UE4 Editor.

  1. Open Maya, then under Windows and Settings/Preferences, select Plug-in Manager.

    Step_05-1.png

  2. Click the Browse button, and then navigate to the copied MayaLiveLink folder, then add the .mll file.

    Step_06-1.png

  3. Repeat the previous step and add the .py file from the Plug-in Manager.

    Step_07-2.png

    Once added, you will see the plugins inside the Plug-in Manager as Loaded.

  4. In the MEL console in the lower-left of Maya, enter MayaLiveLinkUI then press Enter.

    Step_08-2.png

    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.

    Step_09-1.png

    In the upper-right of the window, the connection status is displayed to indicate if you are connected to a running version of the UE4 Editor. You can use the lower window to name and add/remove Subjects that you wish to stream to UE4, 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 UE4. 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 UE4 for live previewing.

3 - Establishing a Connection to UE4

  1. Inside the UE4 Editor, from the Menu Bar under Window, select Live Link.

    Step_10-1.png

  2. In the Live Link window, click the Source button, then under Message Bus Source, select your Maya Live Link source and click Ok.

    Step_11-2.png

    If you return to Maya, the Maya Live Link Connection Status window will update to reflect the new connection status.

    Step_11b-1.png

    Now that we are connected, we need a Subject to preview and test the connection.

  3. Inside UE4, in the Content/Mannequin/Animations folder, open the ThirdPersonRun asset.

  4. From the Toolbar, click Export Asset and select Preview Mesh.

    Step_12-1.png

  5. Select Yes to export the Skeletal Mesh, enable Export Preview Mesh, choose an export location, then select Export at the FBX Export Options window.

    Step_13-1.png

  6. Inside Maya, under File select Import, and import the FBX asset from the previous step.

    Step_14-1.png

  7. Switch to Animation mode, and then select the Root bone for the character.

    Step_15-1.png

  8. In the Maya Live Link UI window, click the Add Selecton button.

    Step_16-2.png

    This will add the selection (or selections) as the Subject to stream to UE4.

    Step_17-1.png

    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 UE4. 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 UE4 Editor. In the next step, we will set up UE4 to receive the streamed Subject so that we can start to live preview the content from Maya inside UE4.

4 - Live Link Preview Controller

  1. Inside UE4, under the Content/Mannequin/Character/Mesh folder, open the SK_Mannequin asset.

  2. Click the Preview Scene Settings tab, and then under Preview Controller, select Live Link Preview Controller.

    Step_18-1.png

  3. Under Live Link Subject Name, click the drop-down menu, and select root.

    Step_19-1.png

    The viewport will update and the character will enter the pose that the character is using inside Maya.

  4. Enable the Enable Camera Sync option.

    Step_20-1.png

    This will sync UE4’s camera to the last viewport camera used inside Maya. Anytime you move the camera in Maya, UE4’s camera will update to match.

  5. Go to your Editor Preferences, and under Performance, disable the Use Less CPU when in Background option.

    DisableUseLessCPU-1.png

    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. EvalTime.png

  6. 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 UE4 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 UE4, 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 UE4.

You can also make changes to your animations and those will be reflected in real-time inside UE4 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 UE4. 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.

422CameraFix.png

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback