[RFC] DAZ Studio Genesis3 Rig

DAZ Studio Genesis3 Rig import for Blender
Request For Comments

DAZ Studio 4.9
Blender 2.77a

First and foremost;
Importing and generating the rig, as I’ve implemented it, is not a one click process. I will try my best to give usable instructions below. There are several steps that need to be taken before the rig can be generated, without error. Yet the rig generated is well on it’s way to being a competant, mid-level, rig for animation.

What it does… and why…
The exporters in DAZ Studio work differently. The .fbx exporter properly exports a scaled mesh with shapekeys, but it messes up the armature vertex weights and the armature isn’t really coherent. The .dae exporter gets the vertex weights correct and the armature is easier to fixup. So, two exports are done from DS, an .fbx and a .dae. Those are both imported into Blender. The vertex weights are transfered from the .dae to the .fbx. The .fbx meshes are reparented to the .dae armature. Bones are renamed so Blender mirrors the .L and .R bones properly. Unused bones are deleted. Then the actual rig is generated using the .dae armature.

Strengths…

  1. The rig is a pivot slide, IK/FK switching rig with properties and layer controls in the N-Panel(coming soon).
  2. The rig imports and sets drivers on the Genesis3 corrective shapekeys(morphs).

Weakness’…

  1. The script (probably) does not work with geografts. Geografts are mesh geometry add-ons that swap portions of the base mesh for another mesh. The reason it doesn’t work is differences in the .dae and .fbx exporters in DS. As far as I’ve found, the .fbx exporter combines the meshes, where as the .dae exporter exports the portions of the mesh as seperate meshes. This trips up the process of transfering the vertex weights.
  2. The character rig generated is not lightweight. The base mesh, and all clothing items have many corrective shapekeys and realtime animation feedback is very difficult on lower end computers(such as mine). This is not a failure of the script. It is just a reality of the comlexity of the Genesis3 model. I hope to add a switch to toggle off the corrective shapekey drivers. For best speed use Solid viewport mode, and don’t have any subdivision surface modifiers active.
  3. The script doesn’t yet properly rig high heel shoes. I’ve got to study this.
  4. The script does not yet rig the neck and head. This is on the TODO shortlist.

Basic instructions…

  1. Export the .fbx mesh from DS.
    These settings work for me.



    Need to set 4 morph export rules. Match ‘CTRLMD’, ‘pJCM’ and ‘head.eCTRL’ for Export and ‘Anything’ for Bake. CTRLMD and pJCM are the corrective shapes, head.eCTRL is the face pose morphs and ‘Anything’ is everything else.

  2. Export the .dae mesh from DS.



    Uncheck ‘Collect Maps’. The .dae mesh is only used for the vertex weights, so it doesn’t make sense to waste disk space on unused textures.

  3. Open the Gen3_BoneShapes.blend and save as YourFileName.blend. As an alternative you can append the bone shapes into another file. Import them all at once, and uncheck the ‘Select’ and ‘Current Layer’ options.

  4. Import the .fbx file.
    Uncheck all options in the panel on the left. If you want to use the cycles renderer turn it on before you import the .fbx.

  5. Import the .dae file.
    Use the defaults.

  6. Open a text window. Load the Gen3_Rig.py file. And click the ‘Run Script’ button. That will put a ‘Gen3 Rig’ pane in the ‘Tools’ tab of the tools panel.


  7. Generate the rig.

Simple enough!

OOF!!! Three attachment rule…


This is a work in progress, and the things I’ve learned will help complete the Gen2 rig I’ve been working on.

Script update Sept. 17, 2016

Attachments

Gen3_Rig_17-9-2016.zip (136 KB)

I’ll definitely try this out. Thanks.

Thanks for the reply Safetyman.There are still a lot of things that need ironed out. For the moment IK/FK and FK isolate switches are just on properties on the Shoulder and Hip socket bones(layer 15)

I have a question:

Before I hit the “Generate Rig” button, do I need to select both meshes/armatures/all of the above?

Nope, it assumes you haven’t renamed anything and just picks up the armatures based on their default names. In fact, if the two default armatures don’t exist it exits gracefully. It’s the only graceful thing it does. :)Just make sure the two armatures and all their children are visible. Hidden or on an off layer will trip it up. Ctrl-Z will undo back to where it started. Might have to tab out of edit mode, then Ctrl-Z if it fails mid stream.

It was a discussion in the messager that spurred me to get this script uploaded. Also uploaded the rig that I’m working toward with this script. Thought it might be of interest to anyone watch this thread…

http://pasteall.org/blend/index.php?id=43603

Success! Your script works really well, thank you.

One thing that is kinda quirky (and it could be user error on my part) is the feet are slightly pointed down. It could be some pose I had embedded in the Daz figure. Need to experiment more.

Did the script point the feet down or were they exported that way? The feet are a weakness, shoes especially. One of the final touches I hope to add is a separate routine that will apply a pose to the model specifically for getting the feet flat. Also at this point with the script I suggest moving the RootNode armature on the Z axis so the feet are at ground level, and applying the location before generating the rig.

EDIT: also about the feet… The rigging of the feet isn’t finished yet, and even when it is the MCH-RockBack, MCH-RollIn/RollOut and IK_TipToe bones will have to be positioned manually in edit mode to properly fit the rig to the feet/shoes.

UPDATE
This finishes adding the bone shapes to the IK foot controls and adds the layer and property controls to the N-Panel. As was mentioned before, after generating the rig, it needs to be fit to the feet in edit mode. Adjust the MCH-RockBack, MCH-RollIn and MCH-RollOut bones on layer 13, and the IK_TipToe bones on the IK_Leg layers, to fit your characters foot.

Attachments

Gen3_Rig_17-9-2016.zip (136 KB)

thank you !

Hi Carlosan, You’re Welcome!

Here’s a DS specific thing. Many morphs in DS seem to rely purely on scaling bones and those don’t seem to export well. Like the Arm and Leg length, or any of the “propagating scale” morphs, will leave the hands and feet of the mesh not fitting the bones. This can be overcome by exporting the mesh from DS and then importing it back in as a custom morph. It’s a fairly quick process, but not really simple. There are tutorials on the web. I’ll put it on my to-do list to track down the best of them and I’ll provide a link soon.

I don’t think the feet thing I experienced was a problem with the rig. When I switch to object mode the feet go back flat, so I have to refresh myself on Blender rigging as it’s been a while since I played around with a good rig like yours.

About fbx exporting morphs: If I set a rule to export morphs like for the breasts or hips, will that mess up your script? I seem to get an error if I export the fbx with any rules other than the ones you specify. Not important, but I’d like to experiment with getting other morphs sent out.

You can export any morphs you wish. But they will not be applied to the base model. Let’s say you give you model 50% wide hips and set the hips to export; The model will be exported with 0% wide hips and the hip morph will show up in blender under the mesh’s shapekeys, where you’ll have to dial it back up to 50%. Also keep in mind that blender deals with shapekeys differently than DS deals with morphs. In blender shapekeys can’t deform the armature. So if you export the height morph it will change the height of the character in blender, but the character will then be to tall or short for the armature.

I just found that the 2.8 release candidates break the script. It’s because Blender’s .dae import changed. I know how to fix it, but it’s going to take a bit of a rewrite.

This script is working great for me, so take your time. Thanks for putting this together.

addon doesnt show up when I install it in blender 2.77

@JustWandering, at this point it isn’t an add-on. Did you follow the steps in the first post?

alright yeah i see, unfortunately when I click generate nothing happens

Nothing happens? Safetyman and I had this discussion in posts number 5 and 6…

The only time the script fails, without popping an error, is when it doesn’t see the two imported armatures.