Investigations on Genesis 3 joints in Daz Studio Chapter 1-8 (including PDF documentation)

Singular3DSingular3D Posts: 499
edited June 2017 in Daz Studio Discussion

Characters in Daz Studio are based on a hierarchy of joints. These joints can have one or no parent (in case of the root joint) and zero to multiple children. These joint chains or hierarchies are bound to a mesh with a weight map and thus drive the body mesh by rotation, translation or scaling of the joint. Thus, joints are a major tool to pose a character and deform the body mesh in the correct way. Additionally, it may be supported by joint controlled body mesh morphs, which enhance the deformation based on the quaternion weighting in Genesis 3.

To transfer a Genesis 3 character from Daz Studio to another program and to be able to pose this character there in a similar way like in Daz Studio, you need to be able to transfer the joint skeleton, the weighting and the joint controlled morphs, which should work in the same way, as in Daz Studio.

While investigating these things, I had to understand how Genesis 3 works in Daz Studio and compiled this in a document, which I would like share with this nice community. Hopefully this is valuable for some of you. If you have questions, let me know.

pdf
pdf
G3-Joints-Explained008.pdf
2M
Post edited by Singular3D on
«1

Comments

  • algovincianalgovincian Posts: 2,576

    Dropping a quick note to say that I've DLed your document and skimmed through it quickly. It's obvious how much work you've put into this, and I just wanted to say thank you - it's much appreciated. I'll certainly be going through it in more detail when I've got the time.

    - Greg

  • JimbowJimbow Posts: 557

    Same here. Thanks.

  • Singular3DSingular3D Posts: 499
    edited April 2017

    Glad you like it. I'll post the Chapter 6 as well, when it is finished.

    Chapter 6 may take a while though...

    Post edited by Singular3D on
  • AlienRendersAlienRenders Posts: 790
    edited April 2017

    The skinning is actually dual quaternion, but maybe you can achieve the same effect with quaternion rotations, not sure. You also have to apply scaling separately beforehand.

    In any case, some good info in there. I liked the part about the spline. I wasn't aware of that.

    In case anyone's interested, here's a link to a thread I made a while back about the difference between linear matrix blending and dual quaternion blending for joint deformations:

    http://www.daz3d.com/forums/discussion/134926/adding-dual-quaternion-support-to-unrealengine4-images-inside

    The reason for showing this is that morphs will not look right if you don't use the proper skinning algorithm.

    Note that the dual quarternion skinning looks even better now as I did not have antipodal corrections back when I created that thread.

    Post edited by AlienRenders on
  • Singular3DSingular3D Posts: 499
    edited April 2017

    The skinning is actually dual quaternion, but maybe you can achieve the same effect with quaternion rotations, not sure. You also have to apply scaling separately beforehand.

    In any case, some good info in there. I liked the part about the spline. I wasn't aware of that.

    In case anyone's interested, here's a link to a thread I made a while back about the difference between linear matrix blending and dual quaternion blending for joint deformations:

    http://www.daz3d.com/forums/discussion/134926/adding-dual-quaternion-support-to-unrealengine4-images-inside

    The reason for showing this is that morphs will not look right if you don't use the proper skinning algorithm.

    Note that the dual quarternion skinning looks even better now as I did not have antipodal corrections back when I created that thread.

    Thanks. The dual quaternion skinning is exactly the same as the spherical skinning in Cinema 4D. So when I get Genesis 3 via FBX to Cinema 4D, she is deformed in the same way. Unfortunately the JCMs are not automatically transferred and that was the start for my investigations. I can attach them manually, but I'd like to do it automatically. So I try to write a script to export this additional information.

    Thanks for the link and info.

    Post edited by Singular3D on
  • I'm doing something similar with UE4 to load JCM's. I'm very interested in your section about the bones.

  • AlienRendersAlienRenders Posts: 790
    edited May 2017

    Started to go into more details. UE4 uses a left handed ZYX system. DAZ Studio uses a right handed XYZ system. The letters mentioned are Right,Up,Forward. So I could swap the X and Z coordinates, but the Bend, Twist and Side-to-side angles have me nervous. It looks like the Y angle can stay the same because the X and Z coordinates are swapped and the left-right handedness difference will cancel that out. I think that swapping the X and Z angles should do the trick. The angle directions will be swapped which is what I want because of the handedness difference.

    1. Swap X/Z coordinates.

    2. Swap X/Z rotations.

    Gonna start by seeing if I can load a static mesh. Then I'll try adding bones and weights. Should be interesting.

    BTW: Anyone know how Catmark subdivision is different from Catmull-Clark? I'm familiar with Catmull-Clark and actually implemented it once. But what's Catmark? Is it even related?

    Post edited by AlienRenders on
  • Singular3DSingular3D Posts: 499

    Started to go into more details. UE4 uses a left handed ZYX system. DAZ Studio uses a right handed XYZ system. The letters mentioned are Right,Up,Forward. So I could swap the X and Z coordinates, but the Bend, Twist and Side-to-side angles have me nervous. It looks like the Y angle can stay the same because the X and Z coordinates are swapped and the left-right handedness difference will cancel that out. I think that swapping the X and Z angles should do the trick. The angle directions will be swapped which is what I want because of the handedness difference.

    1. Swap X/Z coordinates.

    2. Swap X/Z rotations.

    Gonna start by seeing if I can load a static mesh. Then I'll try adding bones and weights. Should be interesting.

    BTW: Anyone know how Catmark subdivision is different from Catmull-Clark? I'm familiar with Catmull-Clark and actually implemented it once. But what's Catmark? Is it even related?

    I have a asimilar issue with Cinema 4D. Y and X-Axis are the same, but the Z-Axis goes backward in Cinema 4D. It works, when I do an FBX import and use negative values for rotations around and translations along the Z-axis. Try FBX, as you get the weighting, bones and UV maps.

  • a-sennova-sennov Posts: 331

    Glad you like it. I'll post the Chapter 6 as well, when it is finished.

    Chapter 6 may take a while though...

    Your work is simply great.

    About morphs location (in Ch. 5.1): morphs in /Morphs directory may not be directly linked from figure's .duf/.dsf as this directory is recursively scanned for morphs by Studio (the same is true for UV maps, clones etc.). Also, morphs may be embedded into any DSON file, this is useful when you want self-contained figure that is easy to copy.

  • a-sennova-sennov Posts: 331
    edited May 2017
     

    BTW: Anyone know how Catmark subdivision is different from Catmull-Clark? I'm familiar with Catmull-Clark and actually implemented it once. But what's Catmark? Is it even related?

    Catmark is Pixar's augmented/enhanced Catm[ull-Cl]ark. I didn't see any paper with detailed description of what was changed so OpenSubdiv source code is the best reference.

    Edit: For DS figures Catmark has to be equal to Catmull-Clark because they do not use per-edge sharpness feature.

    What is the purpose of your UE4 work?

     

    Post edited by a-sennov on
  • Singular3DSingular3D Posts: 499
    a-sennov said:

    Glad you like it. I'll post the Chapter 6 as well, when it is finished.

    Chapter 6 may take a while though...

    Your work is simply great.

    About morphs location (in Ch. 5.1): morphs in /Morphs directory may not be directly linked from figure's .duf/.dsf as this directory is recursively scanned for morphs by Studio (the same is true for UV maps, clones etc.). Also, morphs may be embedded into any DSON file, this is useful when you want self-contained figure that is easy to copy.

    Thanks for the information. At the moment I'm primarily interested in the JCMs (and MCMs), as they can be exported via FBX as alternate shape, but the connection (ERCLink) is lost. I have to rebuild these in Cinema 4D as well as the joints, that control other joints (e.g. foot and heel). If I create a new character in Daz, the morphs will be baked into the mesh, if they are not dependent on joints. My final goal is to be able to pose the character in Cinema 4D like in Daz Studio. The clothes will be dynamically as well as the hair.

    So I try to get the information out of Daz via Script...

  • a-sennova-sennov Posts: 331
    My final goal is to be able to pose the character in Cinema 4D like in Daz Studio. The clothes will be dynamically as well as the hair.

    So I try to get the information out of Daz via Script...

    Maybe it's better to add support for .dsf/.duf to Cinema as first class objects, i.e. directly load .duf without intermediate FBX?

    I myself found more convenient to directly process DSON files for my purposes (clean or mirror weight maps, bake shaping morphs, switch texture sets) without touching DS scripting or plugin SDK.

  • Singular3DSingular3D Posts: 499

    I added a 6th chapter to the PDF

  • Singular3DSingular3D Posts: 499

    I added Chapter 7 to the PDF

  • Jack238Jack238 Posts: 117
    I added Chapter 7 to the PDF

    Thanks, just getting to chapter 6!

  • AlienRendersAlienRenders Posts: 790
    edited May 2017
    a-sennov said:
     

    BTW: Anyone know how Catmark subdivision is different from Catmull-Clark? I'm familiar with Catmull-Clark and actually implemented it once. But what's Catmark? Is it even related?

    Catmark is Pixar's augmented/enhanced Catm[ull-Cl]ark. I didn't see any paper with detailed description of what was changed so OpenSubdiv source code is the best reference.

    Edit: For DS figures Catmark has to be equal to Catmull-Clark because they do not use per-edge sharpness feature.

    What is the purpose of your UE4 work?

     

    Thanks. I looked at pixar's library. Even recommended it at work. We may not use it, but there may be some interesting ideas there. In UE4, I'm trying to create a game. I just want proper JCM's. I have dual quaternion with scaling support added. I also added support for TIFF import. But I have no idea how to even begin adding a new geometry importer in UE4. I might try looking at the Alembic importer again, but it's quite massive. I'm just trying to see if there's an interface to implement or what.

     

    Post edited by AlienRenders on
  • a-sennova-sennov Posts: 331
     

    I'm just trying to see if there's an interface to implement or what.

     

    Importers are currently tightly coupled into UnrealEd and there is no such thing as say plugin interface for new importers to implement. Epic once said that such thing may happen in the future but it will be some distant future I think :)

    Also I've found that using JCMs in UE4 is coming with too much performance penalty (if you're planning to have more than a dozen characters on screen). So I'm currently making new base figures based on Genesis3 that:

    1. Use linear skinning
    2. Has no JCMs at all
    3. Has more conventional driving skeleton, like V4 or standard Epic mannequin.
      • there will be a set of skeletons for different LODs actually
    4. Still has all good Genesis abilities like wearing all clothes, compatible with shaping/character presets etc.

    I've made a prototype, brought it into UE4, learned a lot and now deep in making Mk.2 which will be a production version I hope :)

  • AlienRendersAlienRenders Posts: 790

    Thanks! That's good to know. It will save me from fumbling around the code for nothing. I want JCM's mostly for the main character and possibly bosses. I already have dual quartenion skinning and I'm not seeing any performance issues there. So I can reuse the same bends and JCM's as G3F. I may dispense with trying to change the rotation order. I'm still not sure it matters with dual quaternions.

     

  • ebergerlyebergerly Posts: 3,255

    Wow, I just noticed your PDF.

    Incredible !!!!

    Especially for someone like me who is new to Studio and trying to figure out the basics. Thanks much !!!

  • Singular3DSingular3D Posts: 499
    ebergerly said:

    Wow, I just noticed your PDF.

    Incredible !!!!

    Especially for someone like me who is new to Studio and trying to figure out the basics. Thanks much !!!

    At the moment I'm working on Chapter 8 and I got 61 pages so far. In order to finish the chapter, I have to investigate some more things.
    If you are interested in a pre-version let me know.

  • nonesuch00nonesuch00 Posts: 17,929

    thank you

  • Outstanding work. Thank you !

  • ttnnttnn Posts: 99
    Champollion deciphers the Rosetta stone!! THANK you for making this publicly available!
  • takezo_3001takezo_3001 Posts: 1,928
    edited June 2017

    Characters in Daz Studio are based on a hierarchy of joints. These joints can have one or no parent (in case of the root joint) and zero to multiple children. These joint chains or hierarchies are bound to a mesh with a weight map and thus drive the body mesh by rotation, translation or scaling of the joint. Thus, joints are a major tool to pose a character and deform the body mesh in the correct way. Additionally, it may be supported by joint controlled body mesh morphs, which enhance the deformation based on the quaternion weighting in Genesis 3.

    To transfer a Genesis 3 character from Daz Studio to another program and to be able to pose this character there in a similar way like in Daz Studio, you need to be able to transfer the joint skeleton, the weighting and the joint controlled morphs, which should work in the same way, as in Daz Studio.

    While investigating these things, I had to understand how Genesis 3 works in Daz Studio and compiled this in a document, which I would like share with this nice community. Hopefully this is valuable for some of you. If you have questions, let me know.

    Valuable? No, not in the least; I consider it invaluable! Particulary a text-based tutorial, which is much too rare nowadays, thanks a LOT you magnificent bastaird!

    Post edited by takezo_3001 on
  • DiomedeDiomede Posts: 15,079

    This pdf is great.  You are very generous for making this available.  Thank you.

  • Singular3DSingular3D Posts: 499
    edited June 2017

    Here is Chapter 8. Unfortunately it is not finished so far, but I wanted to share it anyway.

    Here is also a little script as well, which will work from version 4.8 on.

    dsa
    dsa
    FBXCompanion0001.dsa
    6K
    Post edited by Singular3D on
  • nonesuch00nonesuch00 Posts: 17,929

    You've attached a script of yours (dsa):

    This script exports Genesis 3 joint values, dependencies between joints and to morphs // 2015-05-27 copyright Singular3D

    instead of a chapter 8 PDF document

  • Singular3DSingular3D Posts: 499

    You've attached a script of yours (dsa):

    This script exports Genesis 3 joint values, dependencies between joints and to morphs // 2015-05-27 copyright Singular3D

    instead of a chapter 8 PDF document

    The PDF with the chapter 8 is at the beginning of the thread :)

  • nonesuch00nonesuch00 Posts: 17,929
    edited June 2017

    You've attached a script of yours (dsa):

    This script exports Genesis 3 joint values, dependencies between joints and to morphs // 2015-05-27 copyright Singular3D

    instead of a chapter 8 PDF document

    The PDF with the chapter 8 is at the beginning of the thread :)

    oh, thanks. Sorry

     

    ...hmmmm...your 1st post has no PDF attached to it whatsoever anymore

    Post edited by nonesuch00 on
  • ChoholeChohole Posts: 33,604

    You've attached a script of yours (dsa):

    This script exports Genesis 3 joint values, dependencies between joints and to morphs // 2015-05-27 copyright Singular3D

    instead of a chapter 8 PDF document

    The PDF with the chapter 8 is at the beginning of the thread :)

    oh, thanks. Sorry

     

    ...hmmmm...your 1st post has no PDF attached to it whatsoever anymore

    I can still see the PDF. 

Sign In or Register to comment.