Wednesday, March 24, 2021

Importing a Morphed Character Without a DBZ File

The preferred workflow is to design a character in DAZ Studio, save it and export a dbz file, and then import the duf file with the DAZ Importer and Mesh Fitting set to DBZ. However, both DAZ Studio and Blender are evolving software that put increasingly strong demands on your hardware and software, and if you are on an old computer the latest versions may not work on it. 

One solution would be to uninstall the latest version and stick with an old version that works, but I am not sure if that is possible with DAZ Studio. Another solution is to import the scene directly into Blender, without opening DAZ Studio. This will work as long as the DAZ database is intact. However, it means that you must import the character without having access to a dbz file, since you must open DAZ Studio in order to export it.

It is now possible to import a morphed character directly into Blender, without the need of a dbz file. However, the process is somewhat complicated and involves several steps. It works in the latest version of version 1.6.0 of the add-on. Since this feature is something which may be most interesting on old computers that may not be able to run Blender versions later than 2.79, and Blender 2.79 support has been removed from version 1.6.0, the stable version 1.5.1 has also been updated. Stable version 1.5.1c can be downloaded from

https://www.dropbox.com/s/6ec0e1nzuimlwg2/import_daz-v1.5.1c-20210324.zip

The illustrations below were made with Blender 2.79 and DAZ Importer 1.5.1.

Here is a character in DAZ Studio. We save the scene as a duf file but don't export a dbz file. Perhaps it is an old scene and we can not open DAZ Studio to export a dbz file.

In Blender, import the DAZ scene and set Mesh Fitting to the new Morphed (Characters) setting.

The characters has morphs (FBMPearFigure) but the clothes have not.The armatures have also been morphed, although this may not be entirely obvious in this picture. Merge all rigs to the main character rig as usual. If we render the scene we see that the materials have been imported correctly.
The body mesh has a number of shapekeys that we need to transfer to the other meshes. With the mesh active and all other meshes selected, press Transfer Other Morphs (Transfer Shapekeys in version 1.6.0). Make sure to include all meshes, including hair and eyelashes.
In the options dialog, make sure that all shapekeys are selected. The other settings can be left at their default values.

The shapekeys are now transferred to the clothes and hair. With all meshes selected (the order does not matter in this case), press Apply All Shapekeys.

The shapekeys go away and we have successfully imported the morphed character into Blender. We can now continue with the other steps (merge materials, load morphs, merge geografts, ...) that makes the character ready for animation.

The process above assumes that we have saved the DAZ scene but not the corresponding dbz file. But we can also design new characters from scratch, even if DAZ Studio is not working, as long as the DAZ database is intact.

We want to import Aiko 8 into Blender directly from the character file. Press Import DAZ File (just Import DAZ in version 1.6.0) and navigate to the directory

{DAZ root}/People/Genesis 8 Female/Characters/

Select Aiko 8.duf or one of the corresponding png files, and import the DAZ file with Mesh Fitting set to Morphed.

In this case the morphs are not imported, and the imported mesh is a realistic Caucasian woman instead of a cartoonish Asian woman.However, we note that the morph has been imported to the armature, e.g. the brow and eye bones are distinctively below the matching location on the mesh. The difference compared to the previous case is that the FBMPearFigure morph is referenced directly from the duf file, whereas the duf file in this case refers to a control file (CTRLAiko8.dsf) which in turn refers to the two morph files FBMAiko8.dsf (full body morph) and FHMAiko8.dsf (full head morph). The Import DAZ tool does not handle such indirection, so instead we must load the individual morphs manually.

With the Aiko mesh selected, press Import Custom Morph and go to the directory that contains the Aiko morphs, i.e.

{DAZ root}/data/DAZ 3D/Genesis 8/Female/Morphs/DAZ 3D/Aiko 8/

This tool should start in the directory

{DAZ root}/data/DAZ 3D/Genesis 8/Female/Morphs/

by default, so the Aiko 8 directory is only two clicks away. (If several root directories have subdirectories with Genesis 8 Female morphs, the tool may pick something that is far away from the right directory. That is a nuisance.).

Do not pick the CTRLAiko8.duf file. As explained above, it contains pointers to the FBM and FHM files, and the morphs are not loaded, at least not in version 1.5.1.

Pick instead the FBM and FHM files in the same directory directly.

Now the two Aiko morphs are loaded, and we can turn them on in the Custom Morphs panel. Notice that the brows and eyes are now aligned with the armature. Also notice that the shapekeys are driven, i.e. the sliders are purple. This will be important below.

Just importing the nude character is not so interesting, we want to add clothes and hair too. So let us import them with the Import DAZ File button, with Mesh Fitting set to Unmorphed this time.

Clothes and hair are imported, but clearly they do not fit the character. So again we use the Transfer Other Shapekeys tool.
Select all meshes (clothes, hair and eyelashes) and make sure to transfer all morphs.
 
The transfer settings are not so important. What is important is that we turn off the morphs in the Custom Morphs panel before making the transfer. If some shapekeys are left at a non-zero value, the result of the shapekey transfer can be a disaster.

 

This problem did not appear for the previous character, because in that case the shapekeys were not driven. The Transfer Other Shapekeys tool automatically turns all shapekeys off before transfer and turn them on again once the transfer is complete. However, if the shapekey values are driven, this does not work, and we must turn them off manually instead.

Once the morphs have been transferred, we can turn the morphs back on a gain.
And finally we Apply All Shapekeys to get our final character. A fully dressed, rigged and morphed character has been created in Blender, without ever opening DAZ Studio.