Search Unity

DAZ3D To Unity with Genesis 3 and Full Body Morphs

Discussion in 'Formats & External Tools' started by Lempereur, Feb 6, 2018.

  1. Lempereur

    Lempereur

    Joined:
    Dec 18, 2015
    Posts:
    7
    Okay, So a bit of a tricky situation here. Or I'm just not doing something right, which is equally possible.

    So here's the problem. I'm using the Genesis 3 model available from DAZ as a universal character model. My goal is to be able to use full body morphs in DAZ as blendshapes in Unity to modify the same model into different races.

    What I've accomplished so far is to bring the models into Unity from DAZ (both G3M and clothing rigged FOR G3M). Along with these models I exported the relevant full body morph files. The clothing confirms via a Linq script that copies the clothing bones to the target SkinnedMeshRenderer bones. The blendshapes also conform to the associated values on the target SkinnedMeshRenderer. In this case the target for clothing bones and blendshapes is the G3M model.

    If I put the [ExecuteInEditorMode] directive in the script I can adjust the blendshape value on the G3M model and the 'attached' clothing will conform and change also. This is what HAS been accomplished.

    The problem lies in the animation data. Several of the FBM's from DAZ make the character mesh considerably larger, but the bone structure does not adjust to reflect this change in physiology. So come animation time, I get graphic issues that I can only liken to a "Salad Fingers" effect with the character hands and the deformations of the mesh from the animations. Now, I know the reason for this is because the animation mesh deformation and animations are running on the BASE G3M skeleton structure, however it's applying it to a morphed mesh.

    The Animation data works just fine. I've used MotionBuilder to retarget the source animations to the G3M skeleton model and have tried with both humanoid and generic animation rigs with the same issue.

    What I'm wondering here is if there is some step I'm missing in DAZ that will cause the character skeleton to adjust itself to a morphed mesh. Similar to the "Adjust Rigging to Shape" functionality of DAZ, only done in Unity, and done at runtime.

    The only thing I've thought of so far (and am about to test) is to export "TargetBones" from DAZ where I use the Adjust rigging to shape feature to bake the rigging plus full body morph at 100% into the model, and do a Vector3Lerp between the base skeleton and the 'TargetSkeleton' bone transforms in LateUpdate(). I feel like this could theoretically work, however I was hoping for something that would probably be a bit less taxing resource wise.

    Is the changed skeleton supposed to be exported as part of the morph data? or is there something I'm missing in DAZ to make this possible in Unity without excessive customization?

    *Disclaimer* Yes we have the necessary licensing from DAZ to use these in a game.

    *Additional Disclaimer* If you know what or who "Salad Fingers" is... I am sorry... If you don't know... You've been warned...

    Thanks!
    Lempereur