♪ ♪
Hey everyone. Welcome. My name is Wes Bunn, with Epic Games.
In this session, I'm going to show you how you can connect Maya
to Unreal Engine 4 with our new feature Live Link.
Live Link was just introduced in our 4.19 engine release,
which came out last week.
We are going to show you how you can use Live Link
to supplement your existing animation workflow,
and give you more time to iterate on your content
and spend less time exporting and importing into the engine.
We have quite a bit to cover here, and a short amount of time to do it.
I'm going quickly going to go into PowerPoint
and outline what we are going to talk about today.
First and foremost what is Live Link, and how does it work?
We are then going to talk about the Live Link Client,
which powers sources and subjects. We are going to talk about what those are.
We will then show you how to enable Live Like inside of Unreal Engine 4,
and how to enable the Maya Live Link plugin.
Once we do that, we can establish a connection between Maya and UE4.
We will also talk about setting up real-time Bone Remapping,
and why you may need to do this in your future projects down the road.
At that point, we can preview animation content from Maya in real-time
directly inside of UE4.
I will talk about some of the additional use cases for Live Link
towards the end of this session.
We will close it out with a quick snippet on plugin development.
and how you can extend it to additional applications, if you are interested.
First and foremost before we jump into what the Live Link
feature is, I want to take a second to talk about the existing animation workflow.
Typically you work in your external application like Maya, Motion Builder, etc.
You're working on content, you have a character you are animating,
you decide you're happy with it, and you want to bring it into the engine.
You would export it as an FBX asset,
At which point, you can bring it into the engine and see it there.
Once you see it in the engine, you may have noticed that you want to
tweak some parameters of the animation. Maybe drop the shoulder,
or make a facial expression, etc.
Then you would have to go back to Maya, make those modifications
re-export, re-import,
see it in the engine, and judge it again.
With Live Link, we can alleviate that whole process
because you can preview your content in real-time
while you're working inside of Maya directly inside of UE4.
I'm going to show you a video of the feature before we start working with it.
On the left is Maya, and on the right is UE4.
You can see we are scrubbing the camera inside of Maya
it's updating the camera inside of UE4 in real-time.
We are scrubbing through our animation. It is also being updated.
You may also notice that we have two different Skeletal Meshes.
The one on the right, inside UE4, is a little bit different.
The one on the right is using the same bone and hierarchy information
as our character inside of Maya. We could swap out different meshes
as long as the bone hierarchy information is the same.
But we are not just streaming data, we can actually change data inside of Maya
and see it update inside of UE4 in real-time.
This is where you can go in and keyframe different poses,
try things out inside of Maya before you do that final export,
and bring it in to UE4.
How does this all work?
At the hub of Live Link is the Live Link Client.
This is enabled whenever you enable the plugin
inside UE4, which we will do in a moment.
The Live Link Client has two primary functions.
One is to Manage Sources,
which is where the source of animation data comes from.
This could be Maya, this could be Motion Builder,
or it can also be motion capture servers.
You can stream in data from a motion capture server,
into the engine and see that updated in real-time.
The second thing Live Link Client does is Manage Subjects,
which are the individual streams of data within the client.
This is a character or any animated Skeletal Mesh that you want to stream in.
These are the two things that the Live Link Client is going to do for you.
Now we are going to jump inside the engine and define a source,
and a subject so we can start previewing content.
Right now, we have Maya on the left and Unreal Engine on the right.
I have a character that I'm currently working on from our Paragon assets.
It is the Fang Mao character that has this little attack here.
Inside Unreal Engine, we have just exported just the Skeletal Mesh.
We have no animations over in UE4.
We want to preview our animations from Maya
until we are finally happy with them seeing them in UE4
before we do the final import and export process.
First, we need to enable Live Link inside of Unreal Engine.
To enable Live Link, click Edit and select the Plugins menu.
Select Animation.
At the bottom, select the the Live Link plugin.
Once you enable Live Link, UE4 is going to ask you restart the editor.
I have already enabled Live Link and restarted UE4 to save us some time.
Once you do that you're going to get access to a new window
from the Windows tab called the Live Link Streaming Manager.
When you enable this
you are going to see the ability to define a source, which we talked about,
as well as a subject.
We can now define the source and the subject.
We have a warning at the bottom: The editor setting 'Use less CPU'
when in the background is enabled." Do we want to disable that?
Whenever you work with the Live Link Client,
you probably want to disable this.
Essentially whenever the editor loses focus,
it throttles it so you would have a little bit of lag behind.
Since we are previewing content in real-time,
we want to disable that for this particular instance.
This is why we give you the option to disable it,from this menu.
I am going to click Disable.
Next, we need to enable the Maya Live Link plugin
so we can start to communicate between the two applications.
The Maya Live Link plugin is distributed with the engine.
Whenever you download the engine, you already have access to that plugin.
You can find it in your Engine > Extras folder.
This is covered in our documentation pages as well.
I don't expect you to remember that,
but you will find it in our documentation pages as well.
We have pre-built binaries for 2016, 2017 and 2018.
We will talk about some of the additional applications we support
towards the end of this session.
Once you extract those files and copy them to your Maya plugins folder,
go to Windows > Settings > Plugin Manager.
Once the window pops up, you can browse to those files.
If go to my Plugins folder,
there is the Maya Live Link plugin folder.
There are two files we need to enable, the main module, and the UI module
that allows us to communicate between Maya and UE4.
I will select the main module: MayaLiveLinkPlugin2017.mll.
I will also enable the UI: MayaLiveLinkUI.py.
Click Open.
At the bottom we should see both of those have been loaded and they're ready to go.
At which point, we could close the Plugin Manager.
At the bottom, make sure you are on the MEL console and not the Python console.
Enter the command "MayaLiveLinkUI".
This is case-sensitive.
Again, this is covered in our documentation pages as well.
Once you type the command and press Enter,
the Maya Live Link connection status window should pop up.
This is a little side note that I discovered just this morning.
If you do not see this window pop up and you've entered in the command
correctly and there are no errors,
you may need to go into your Users folder and delete all of your MEL scripts.
I had this happened earlier where the Live Link window did not appear.
That is an interesting tidbit I discovered during a live demo this morning.
Now that we have the Maya Live Link window up,
you can see we have the ability to connect to UE4.
Right now it says there is no connection, so we need to establish one inside UE4.
In UE4, click the Add button.
Click Message Bus Source,
and assign Maya Live Link plugin.
UE4 is using our local machine, but you can use networked PCs.
You can have some other dedicated machine besides your local machine
streaming in content. You could do that as well.
For this demo, we will use the local machine. Click the plugin and click OK.
Once we click OK, we can see the Live Link window shows a Connected status.
We are now connected to UE4. We can see that over here as well.
We also have an EditorActiveCamera as a subject.
This camera will allow us to
control the camera inside of Maya and have it update inside of UE4 in real-time.
The last thing we need to do is add a subject we want to stream over to UE4.
In the lower part of the MayaLiveLinkUI window, we can click Add Subject.
We can also give it a name that is a little bit more descriptive than Maya.
We will just call it the name of our character, which is Feng Mao.
We do need to specify the bone or joint hierarchy we want to start streaming over.
I will select the root bone of our character.
Click Add Subject.
When we do, it is going see it is a character we are attempting to stream over.
It has been added in Live Link as well.
We are ready to stream our data from Maya into UE4.
How can we preview this?
We can open our Skeletal Mesh in UE4 now.
Once we open this up,
go to the Preview Scene Settings tab on the right.
Click the Preview Controller drop down and select Live Link Preview Controller.
UE4 asks for a Subject Name, which is the name of our character
which we called FengMao.
We have the ability to check Enable Camera Sync.
If we enable this option, our camera is going to update
to reflect our camera inside Maya. Now I am controlling the camera inside UE4
by controlling it inside of Maya.
Now we can work directly inside of Maya and see the updates made
on our character in UE4.
One thing you may notice is our character is not taking the same pose
as our character inside of Maya. There is a reason behind this.
If we look at the Skeleton asset inside of UE4,
we can see the bone hierarchy information is a little bit different
than the naming convention inside of Maya.
In UE4 the bones are named root, pelvis, etc.
In Maya, everything is prefixed. ArcBlade:root, ArcBlade:pelvis, etc.
We give you the ability to re-translate those names
into something compatible with the UE4 skeleton.
We need to re-translate the names so we can recognize the hierarchy information
and the joint location from Maya in UE4.
We are going to show you how to do that real quick.
We need to create a new Blueprint; the visual scripting system inside UE4.
Right-click in the Content Browser and select Blueprint Class.
Search for "LiveLinkRemapAsset".
I will select LiveLinkRemapAsset.
I will rename it to something more descriptive, and call it FengMao_Remap.
This opens to the Blueprint Editor.
This may not be what you signed up for.
We are going to quickly make one change, and then we are going to get out.
In the My Blueprint tab next to Functions, click Override.
Select the function called Get Remapped Bone Name.
It is going to take in the source, allow us to rename it,
and translate it to our UE4 skeleton.
Select Get Remapped Bone Name.
All we are going to use is a Split node.
The Split node is going to read a source string,
allow us to enter a character to search and split at, which is the colon,
Everything to the right of the colon is all we care about.
It will convert everything to match our UE4 skeleton.
I will plug Bone Name into the Source String.
UE4 is automatically going to give us a Conversion node.
I am going to set In Str to ":" (colon).
All we care about is everything to the right of the colon.
I will plug Right S into Return Value.
That is all we are going to do. I will click Compile and close this tab.
If you go back to our Skeletal Mesh,
under Retarget Asset we can assign the asset FengMao_Remap we just created.
Our character is now going to update to reflect
our character inside of Maya as we would expect.
The other thing that is interesting to note is
because our character has physical properties assigned to it.
You can see the chains kind of dangling and moving around,
all the bits of his garb are kind of dangling around as well.
We can preview this in real-time as well, which is pretty cool.
We have the ability to preview content from Maya inside of UE4 in real-time.
What else can we do with this feature?
This is all fine and dandy for previewing,
but suppose we want to see this at run-time while our game is running.
We give you the ability to do that with the help of an Animation Blueprint.
Right-click on the Skeletal Mesh,
go to Create, and select Anim Blueprint.
The default name is fine.
This determines the pose our character enters frame-by-frame at run-time.
Whatever is plugged into here is going to be our final pose,
as the name suggests.
I will Right-click and search for "Live Link",
or just "live". We can use the Live Link Pose node to connect this.
It gives us an out pose we will connect to the Result of the Final Animation Pose.
We need to define the Subject Name, which we did earlier in this session.
It is just the name of our character called FengMao.
The last thing we need to do is for the Live Link pose node itself.
In the Details panel, we need to assign the retarget asset we created.
Click the Retarget Asset drop down and assign the FangMao_Remap.
Once we compile, you can see that our character updates to take our pose.
We can still control it.
If I zoom in a little bit on his face,
we could even change parameters.
For example, I can go to the face and open that up.
We could see that reflected on our character.
Or we could keyframe different parts of the animation,
and test to see what it looks like before we go through the import/export process.
Because we have this as an Animation Blueprint,
we can assign this to any character we have in the level
if we want to see those animations running while our game is running.
Or we could take the Animation Blueprint and just drop it directly in the level.
I will center him up on this platform a little bit.
I will click Play in the editor.
We are now running our game.
We could still control it from Maya while our game is running.
What is even more interesting is we can interact with objects in the world.
For some reason, guys are falling from the sky.
We can interact with them, which is kind of cool.
What else can we do with this?
Suppose we had a cinematic
and we had a motion capture actor
that we wanted to provide the actual data streamed into the engine.
We mentioned that you can use a motion capture as a source for Live Link.
I have a quick cinematic here. It isn't the fanciest, but I will enable it
and click Play.
We have a cinematic that is being
played out, but we can still control it from an external source.
We are controlling it through Maya, but we could control it from
any other valid source that Live Link responds to.
It is pretty neat.
One of the other things you can do
since this is an Actor, is also use our Sequence Recorder
to record all of the actions we are doing.
We have this Actor selected. Go to Window and select Sequence Recorder.
With the Actor selected, I could add that as a valid source to record.
If I start recording and I click Play...
I will turn off the cinematic first, because that would probably help.
I will uncheck Auto Play.
There we go.
Let's try that again.
Click Stop.
Click Record.
UE4 is now recording everything we are doing.
It is recording the animation I'm playing back here.
If I were to click Stop and stop the session,
you can see it has recorded a new sequence for us right here.
If we hide our existing Skeletal Mesh,
this is the one that was actually recorded. If I just play it,
it recorded everything that we just did as well, which is pretty interesting.
In fact, we can browse to this asset
by Right-clicking, select Properties, and click the magnifying glass.
It is an actual animation sequence now that is inside the engine.
There are some caveats to this.
It will largely depend on your Live Link connection status.
If there is any disruption in the Live Link connection, you would see that
reflected inside of the animation we recorded.
Use the Sequence Recorder sparingly.
It is a quick way to get content into the engine, but use it sparingly.
I wanted to close really quickly by talking about some
of the other things that you could do like plugin development.
Right now we support the Maya Live Link plugin, obviously.
The Motion Builder plugin will be available via the Launcher soon.
You can also extend this to other applications in two different ways.
The first would be building an Unreal Engine plugin
that exposes a new source to the Live Link Client.
This is the recommended approach if you have your own streaming protocol
such as motion capture servers.
The second method would be integrating a Message Bus endpoint
in a third-party application
similar to what we did with Maya and Motion Builder.
You can kind of see the overview and flow of how things are working here.
All of this is covered and more on our official documentation pages
regarding the Live Link feature, including everything we went through today
to give you a refresher.
I will recap really quickly before we get out of here.
What is Live Link? We talked about the future and how it could be used
to give you more time to iterate on your content,
and spend less time importing and exporting that content.
We talked about the Live Link Client, which is sources and subjects
that are managed by the Live Link Client.
We showed you how to enable Live Link in UE4 as well as in Maya.
We established a connection between Maya and UE4,
and set up some real-time Bone Remapping
in the event that you're naming conventions are different
from Maya and UE4.
We were able to preview our content from Maya inside UE4 in real-time.
We made changes to our content in Maya and saw the updates in real-time as well.
We talked about some of the additional use cases for Live Link
and a little bit about plugin development.
Again, feel free to check out our documentation for more information.
That's all the time I have. Thank you so much for sticking around for this talk.
If you have any questions, feel free to grab me. I will be over by the side.
Thank you again. [Applause]
♪ ♪