Anim BP for Victoria plus some other stuff [Daz to UE4]

Various stuff done: anim bp for player and NPC, clothing, posing, trying Motionbuilder, custom “look at” and fighting with jcms.

  • Root motion based anim blueprint for Daz character using retargeted animations from this pack. Same anim blueprint works for both player controlled character and AI, like shown in the video.
  • Changing clothes using Unreal’s asset system (dynamic loading).
  • Menu for “posing”, poses exported from Daz and stored as ehh…. poses in UE!
  • Creating HIK character in Motionbuilder demo then retargeting in Maya LT. This solves the problem of in-line bones. Seems that Maya’s HIK cannot create a character with in-line roll bones, but can work with such character imported from MB. Hmm…
  • A custom anim graph node similar to “look at” but in local space, so the character can “look at” even when lying on the ground. (Original one is in the mesh space, character is supposed to be in vertical position)
  • (Not really done yet) Fighting to find a way to drive joint corrective morphs dynamically in UE, instead of importing baked values. UE cannot import correct rotation axis for Daz character. Problem lies in how Daz creates the fbx file. Created a custom anim graph node similar to the Bone Driven Controller but with an offset rotation, but it still has problems.

40 thoughts on “Anim BP for Victoria plus some other stuff [Daz to UE4]

  1. Great Job Stan. it looks natural. btw I have a question about blendshape. Did you create blendshape drives for twist bone? or did you create it for bend bone? ex) Thigh, Shoulder, Forearm

    Like

    1. Hi Nick

      I only know Genesis 8 female character, With Gensis 8 there are mostly bend blendshapes. There is no blendshape for arm twist for example. I suppose DQ skinning is enough for twist bones to look realistic. Only twist blendshapes I found are for collar and neck.

      There are 128 jcms for Victoia 8. You can see them when you export fbx from daz and add “pJCM – export” in morph export rules.

      Like

      1. Thank you for replying.

        I couldn’t find “pJCM – export” in morph export rules. I found ‘pJCM’ in Parameters – Hidden –
        Corrective’. Do i need something settings for pJCM and could you share pic for export rules?

        Like

    1. So I just tried it again for forearm bend and after changing couple of things* it seems to work. At least it recognizes the pose correctly. Now the problem is that: there are 2 morphs, one for 75° and one for 135°. At 135° the pose driver will output 1 for 135° and 0 for 75° jcm, which is correct from it’s point of view, but daz wants them both at 1 at 135°.

      * function: linear, scale: 2.0

      Like

  2. I don’t have it in front of me at the moment, but there should be a “Use Curve” checkbox that lets you specify the strength of the morph as a function of the driver.

    The default would be 0 at “time 0” and 1 at “time 1”, meaning that when the driver is at zero, the morph has a strength of 0, and when the driver is at 1, it has a strength of 1.

    So for example, the “middle” forearm JCM should be 0 at 0° rotation, 1 at 70-110° rotation, then 0 again at 135°. So for that morph, you would set the curve to be 0 at Time 0, 1 at Time 70/135 = 0.5185, 1 at Time 110/135 = 0.8148, and then 0 at Time 1. That’s assuming you use the same pose driver node, the one that’s set to the pose target of 135° elbow rotation and has a Radius of 135. (And interpolation set to Linear.)

    Like

    1. I checked in Daz right now.

      pJCMForeArmFwd_75_L should be like that:
      0° : 0
      75°: 1
      135: 1

      and pJCMForeArmFwd_135_L should be:
      0° : 0
      75° : 0
      135° : 1

      So they should be both at 1 at 135°. Do you have the same numbers?

      Like

      1. I see:

        pJCMForeArmFwd_135_L:
        0° : 0
        135: 1

        pJCMForeArmFwd_75_L:
        0° : 0
        75°: 1
        135: 0

        See this image here: https://imgur.com/a/CmVFb – the top part is for 135 and the bottom is for the 75.

        (The first one is -1/135 = -0.00740741 meaning it starts at 0 when bend is 0 and ends up at 1 when bend is 135, i.e. YRotate is -135)

        Like

  3. Another thing: I couldn’t figure out how to get the Pose Driver to evaluate poses “independently” within the same Pose Driver node. If I have two different pose targets, it seems to want to interpolate between them no matter what. (In Maya, you can turn off this behavior by setting a pose target as “Independent,” but UE4 doesn’t seem to have this option.)

    So I ended up having to use separate Pose Driver nodes for every distinct pose target. For example, the Thigh has a JCM for Back 115° and Side 85°, and since these are different pose targets, I had to create a separate Pose Driver node for each of them. But I think it works fine if you want to drive two morphs with the same pose target, like the example for the Elbow above (135° bend is the only pose target).

    Like

    1. Ok, so they are like bone driven controllers without axis problems and no gimbal lock (i hope). Should be fine unless they are too slow.
      Do you tried some profiling? I don’t even know how to profile such things..

      Like

      1. Actually I was wrong, I’m looking at my setup now and I have a separate pose driver for every JCM. Even if the pose targets are the same, the morphs are not evaluated independently. It’s a pain.

        No, I don’t know how to profile these, either.

        Like

  4. Thanks for the great information! How do you export the clothes in DAZ Studio? When I export the clothes separately and try to import them in unreal, unreal is unable to import them, because the bones are missing. But I don’t know why this is the case.

    Like

    1. It’s probably the root bone. Daz will name it differently corresponding to the model you export. Try to import the clothes separately and look for the name of the root. We alsways rename in in maya but i think you can rename it directly in daz.

      Like

    1. It’s better because it will handle rotation limits correctly, there is no such thing in UE. For example, in Daz the elbow can only rotate around Y and only between certain angles, other 2 axis are locked. When you retarget in UE there is no way to enforce this kind of stuff.

      Like

    1. I didn’t use this, but I suppose it can simplify the export, maybe. I would verify how hik skeleton is defined. Main reason i used MB is that it’s difficult to combine limits and hik in maya, when you have skeleton with limits and you try to create a hik rig in maya it all goes wrong. Maybe I just don’t know the correct way to do it.
      But in MB it works allright.

      Like

  5. i tried it and it worked fine but now the problem is u have to import animations one by one and if u have a lot of them it will take a lot of time

    Like

        1. So, does it support limits? If you click on an elbow joint in the genesis skeleton, does it have limits enabled? (Attribute editor -> Limit information -> Rotate should have some checkbox checked and some numbers in Rot Limit fields).

          Like

            1. Retargeting works too? Try to retarget some arm animation and look if it respects the limits (like, lForearmBend rotate X and Z should stay 0 no mater what.

              Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s