This is the third part in a series of tutorials about transferring various assets (characters, cloths, animations, morphs etc) from Daz Studio to Unreal Engine.
In this part we'll cover transferring animations from Daz Studio to unreal Engine
Let's get started.
Personally, I probably wouldn't use Daz Studio for character animation. It would probably be better to create a proper control rig for our character in 3d Max and use Max for animating.
However, some people prefer Daz for animation and as this is a tutorial about transferring assets from Daz to UE4, we'll go through the steps that have worked for me in the past when transferring animations from Daz. I'll also point out some of the problems I've run into along the way.
I've run into problem when using some parameter sliders to animate. For example, with the Michael 7 character that we've been using, when you click on the hands it has parameter sliders for things like Left Hand Grasp which transforms all of the fingers at once so that the fingers are in a grasping position.
However, when I have exported animations into UE4 where I had used these sliders to animate, the fingers would often end up deformed. I haven't yet discovered what causes this. It's possible that these sliders are using a combination of bone rotations and morph targets and that the morph targets are messing things up, but I'm not 100% sure.
For that reason, I've had to animate each of the body parts individually, using only the three core parameters of Bend, Twist and Side-Side. For example, if I needed to make the hand into grasping position I'd have to bend each finger individually, which is a bit of a pain.
If you went through Part 1 of this tutorial you'll remember that we create a root null object which forms the root bone of our character. If the animation you are working on is intended for root motion animation inside UE4 you need to ensure that you are moving the root null object in Daz, for x, y, z translations and not the Hip bone, which is what you would generally use.
I'm not going to cover how to animate in Daz Studio as that is not what this tutorial is about. If you're unsure how to do this, I'm positive there will be some other tutorial out there that would cover the process.
Here I've created a very quick (and bad) animation in Daz Studio. Just wanted some fairly extreme bends to see how it looks in Unreal Engine.
Now we're going to export the animation as an FBX using the following settings:
I've never had any success importing animations directly from Daz to Unreal Engine. I've found that I need to go through either 3d Max of Motion Builder first. In this case we're going to use 3d Max.
Inside 3d max, import the animation you just exported. I use the following import settings:
At this point we don't have to do anything else to our animation, other then export it out again. However, I generally delete the mesh, leaving only the animated bones, but it's not strictly necessary.
Now just export the animation. I tend to place animations in my working directory under \Character\UE\Animations.
Press CTRL + A to selected everything in the scene (all of the bones) and then select Export -> Export Selected from the Max menu. Choose the FBX format and use the following settings:
Now, open up your Unreal Engine project so that we can import the animation.
I tend to create a separate folder under my character folder for Animations.
Right-click on the folder and select New Asset -> Import form the pop-up menu.
Select the animation FBX that we just exported. In the dialog box that appears, select the Skeleton of your character and make sure Animation Length is set to Exported Time.
Note: If you included the characters mesh in your FBX export you will also see the option to import the mesh. Make sure that is unchecked, otherwise you will import another copy of your character, which we don't need.
Once the animation has imported, open it up in Persona to preview it. Note: you might want to change the preview mesh to your complete character mesh. You should see the animation playing on your character inside UE4.
Now let's change our animation blueprint to use this animation so that we can see it running on our modular character inside of our test scene.
Open up the anim blueprint in go go to the Anim Graph. Now drag your animation asset from the Asset Browser into the graph.
Now connect the animation node to the Final Animation Pose node.
Compile and save the animation blueprint.
Now play or simulate your scene. You should see your modular character playing your animation loop.