Anim BP for Victoria plus some other stuff [Daz to UE4]
March 14, 2018
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 Comments
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
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.
Thank you for replying.
https://imgur.com/a/6b1ra
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?
You have to add it, click the add button
Have you tried using the PoseDriver node for JCMs? Seems to work ok for me.
I tried once, it didn’t seem to work. But maybe I did something wrong. I was thinking to try it again.
How do you setup it?
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
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.)
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?
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)
Ok, I understand now. We are not talking about the same figure. Mine is Genesis 8, yours is Genesis 3. Keys are different: https://imgur.com/a/jz1mr
Oh yeah sorry, I am using G3F!
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).
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..
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.
Have you created this pose?
https://imgur.com/a/KiAhD
Left Thigh X(Bend): -115 Y(Twist): 0 Z(Side-Side): 85. when i created this pose, skinning was broken. how did you create proper blendshapes for this pose?
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.
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.
Thank you! I will try that!
which software did u use to retarget animations from ue4 skeleton
I used Motion Builder to create the character definition (followed this: https://www.youtube.com/watch?v=j5E5DU8O6ho ) then did the retargeting in MayaLT, just because I know maya better and also my MB demo expired.
is it better or ue4 inbuilt character retargetter
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.
have u seen this:- https://www.daz3d.com/genesis-8-for-maya
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.
Actually, if it creates hik rig correctly (with limits) it’s a very good thing because you can skip MB altogether.
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
you tried what?
the genesis8 for maya plugin
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).
it does have numbers in min and max field but no checkbox is checked
https://imgur.com/p7srRhS
Looks like it’s disabled. Too bad.
but u can enable it by checking the checkbox right
You can try
all the bones have limits defined but all of them are unchecked but once it checked it works correctly
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.
after baking the animation to the skeleton it works
cool!
have u found a solution to drive jcms in ue4