Need HELP Exporting/Rigging my DAZ Characters into UE4 4.19

I’m at work so can’t show the setup right now, but I’ll try to do it later tonight.

The basic idea is the same as setting up an FK/IK system (at least in Maya). You have a chain of bones for IK that’s separate from the main deformation skeleton. The mesh is not skinned to them, they’re just there to provide location/transform data to the main bones.

E.g. if your leg is Hip -> HipTwist -> Knee -> Ankle, then you have a chain IKHip -> IKKnee ->IKAnkle (with both Hip and IKHip parented under Pelvis). You also need an IKPoleVector joint (probably best to parent it to the root of the skeleton).

You apply the Two-Bone IK to the IKHip -> IKKnee -> IKAnkle chain. The IKPoleVector is the target.

Then in UE4 I used a LookAt node to have the Hip aim at IKKnee, making sure to provide an appropriate up vector to minimize twisting. Then HipTwist aims at IKAnkle, with twist disabled to make sure it doesn’t “bend.” The tricky part was choosing the correct aim and up vectors for each LookAt node.

But the general idea is that the upper Hip points at the IKKnee location with minimal twisting, then the lower HipTwist applies the remaining required rotation to align the Ankle with the IKAnkle.

That’s off the top of my head - I may not be 100% remembering correctly.

@DsyD We tried something similar in the past, but using virtual bones. But with 4.20 it looks it’s not working anymore. Real bones are better :slight_smile:

I was also thinking to use physical animation constraints, but didn’t really investigate that.

edit: there is a video of virtual bone approach here

The thing to keep in mind once again is Genesis (aka Daz Studio) is a framework solution and not an end user product. Think of it as like having a high performance engine that provides all of the necessary features to make the car go and as the end user you can decide the kind of chassis you want to stick the engine in and make it work with the design as you wish.

In this example Genesis will work in both Unity, depending on hard coded limitations, or Unreal 4, with no limitations, but of course there is no expectations that the default features that works with the Epic rig will also work with the default Genesis rig out of the box. In the case of Unity though Daz3d has a spin off called Morph3d which does provides a Genesis based solution as to ready to use characters made just for that engine. So it can be assumed that Daz3d is making an end user product similar to Morph3d.

So if you want Genesis to work with Unreal 4 then change the base configuration in Daz Studio. It has the tools to do it.

For example the IK thing Genesis uses parent>child?parent>child while Unreal 4 by default wants parent>parent>child>child so the easy solution is to just relink the twist joints so they match the Unreal 4 rig.

The skin weight issue takes a quick export to 3ds Max and a few strokes with the blend brush to fix which any competent content artist should be able to do. Better still install live update.when made available.

What I’m not saying is Make Human, or any other solution, is either better or worst by comparison but rather you can not really compare the two solutions as being the same option. It’s like comparing apples to banana boats and our reasons as to why we went with Genesis had nothing to do with usability as compared to having access to a ready to use framework.

I looked into virtual bones in 4.18 (following your advice on your blog!) but couldn’t get things to work properly for some reason I forget.

Anyway, here’s what I did:

  1. Added IK bones to be used with Two-Bone IK. My skeleton is basically a duplicate of G8, just with the names changed. The reference locations and orientations for the IK bones are the same as for the base skeleton, i.e. IK_Shoulder_R has the same transformation as Shoulder_R, IK_Elbow_R has the same transformation as Elbow_R, and IK_Wrist_R has the same transformation as Wrist_R. There’s also a pole vector bone that can be animated (IKCTRL_PoleArm_R) that’s directly under the DeformationSystem “root” bone.

  1. Here is what the bones look like when IK is turned off and the shoulder is rotated so that the IK bones are different from the deformation bones. When in reference pose, they overlap exactly. (The PoleArm bone is behind the character’s elbow.)

  1. I created a Two-Bone IK with IK_Wrist_R as the IKBone, with Twist disabled. The Joint Target Location is set to the location of the PoleArm_R bone, which I grab in the event graph.

  2. Then I add a LookAt node for the Shoulder_R. If you look at picture 2, the x-axis (red line) for the IK_Shoulder_R points at the IK_Elbow_R. We want Shoulder_R to also point at IK_Elbow, and it has identical axes to IK_Shoulder_R, so set the Look at Axis to (1, 0, 0) and the Look at Target to IK_Elbow_R. So the Shoulder_R will point at the IK Elbow with minimal twist.

  1. Next step is to rotate the twist joint, ShoulderPart1_R, so that the forearm aligns with the IK forearm. To do that, we want ShoulderPart1_R to “face” the IK_Wrist_R, but with the x-axis (red line) always pointing in its original direction. If you look at picture 2, the y-axis (green line) for ShoulderPart1_R is pointing away from the direction we want it to face, so set the Look at Axis to (0, -1, 0) and the target to IK_Wrist_R. To keep the x-axis from bending, I turned on “Use Look Up Axis” and set it to (1, 0, 0).

  1. Last step is to just make the Elbow_R point at IK_Wrist_R, which is just another LookAt node with similar settings to the one for Shoulder_R, but with IK_Wrist_R as the target.

You can see (hopefully) from the result that the Shoulder_R bone is obviously following the IK, but it has very little twist. The ShoulderPart1_R bone has much more twist, which you can see because the y-axis (green line) and z-axis (blue line) are pointing in very different directions from the axes for Shoulder_R. And they are aligned with Elbow_R (or rather, the projection of the y- and z-axes of Elbow_R onto the yz-plane of ShoulderPart1_R).

Sounds more complicated than it is but hope this helps!

@DsyD Pretty nice!

This is cool, i didn’t think about look up axis. I will give it a try to see if it works for me too. I will probably have the occasion to look at daz2ue stuff again next week or so.

Hey guys, did anyone managed to use apex clothing with daz/dq models? I only used it for hair a little bit, but now I was thinking is it possible to use for a bigger thing, like a skirt. I tried a little bit but no success so far.

For example, here I did the tie with physics (because it already had bones) but I also want to have dynamic cloth for the skirt:

I couldn’t try the IK yet, but I found a “FABRIK with constraints” plugin for UE4 on github: rtik There is some recent activity too. Didn’t tested it yet.

For the clothing, it seems there is a problem. UE4 cannot use clothing simulation and morph targets at the same time: Unreal Engine Issues and Bug Tracker (UE-38256) :(( It could in the past.

Btw, I made a new character, what do you think? Fitting eyes always difficult for me.