Advanced Setup Panel version 1.1


Paths to DAZ library

The first section defines the DAZ library paths.


  • Paths to DAZ library: Search paths that the DAZ Importer uses to find DAZ assets.
  • Path to output errors: If there are any import errors, the DAZ Importer creates a log file at this location, provided that Verbosity is high enough.
  • Save DAZ Paths: Save the settings in this section, so they are reloaded automatically the next time the importer is started. The DAZ paths are saved in the file "~/import-daz-settings.txt", where "~" is your home directory. You should have both read and write access to this file under all operating systems.
  • Verbosity: A number between 1 - 5 which controls the amount of trace information printed in the terminal window. If Verbosity is lower than 3 missing assets are ignored, otherwise an error is raised.
  • Strict Error Handling: Also controls if some problems result in errors or are ignored.
A .duf file saved in DAZ Studio does not contain the actual data in the way that Wavefront object or Collada files do. Instead it contains links to various asset files in the DAZ libraries, and these assets can link to other asset files as well. In order to find the assets, the DAZ importer needs to know where the DAZ libraries are located. Up to three different library locations are supported, but a default installation of DAZ Studio only uses two.

The DAZ importer makes a guess which works on my computers, but they all run on Windows 7 and the paths may need to be changed on other operating systems. However, the changes only need to be made once. When you have changed the DAZ paths, press the Save DAZ Paths button to make the importer remember your settings. The next time Blender starts, the new library paths are used.

Utilities

This section contains some debugging tools.


Decode File
DAZ files (.duf, .dsf) are really the JSON files, optionally gzipped to reduce disk space.  JSON is a ASCII format that can be viewed in a text editor, but gzipped files are binary. Select a DAZ file in the file selector, and an uncompressed text file is created in the same directory. If the original file is called foo.duf or foo.dsf, the text file is called foo.txt.

Find Seams
Creates seams at the boundaries of the UV islands.

The correct UV map must be chosen when the Find Seams button is pressed. Normally an imported character only comes with a single UV map, but there are multiple maps if other meshes have been merged to the selected one, e.g. with the Merge Anatomy button, The image above shows seams found for the night-time version of Ana - the genitals has strange seams because the body UV map was active.

List Bones
Prints a list of the active armature's bones in the terminal window.


Get Fingerprint
The fingerprint of a mesh is the string "Number of vertices - Number of edges - Number of faces". It provides a reasonable unique way to recognize a mesh. The DAZ importer knows about the fingerprints of the characters Genesis, Genesis 2 and Genesis 3. This button prints the fingerprint of the active mesh in the terminal window.

 Above we selected in turn the Ana armature, the Ana mesh, the low-poly version of Ana, and the Corset, and pressed Get Fingerprint. When a rig is selected, the child mesh with a known fingerprint

Rigging

 The armatures imported from DAZ Studio are straightforward forward-kinematics rigs, and are not so convenient for manual animation. The DAZ importer allows you to automatically convert the imported rigs to two more animator-friendly rigs: MHX and Rigify.



Convert To MHX
The MHX (MakeHuman eXchange) rigs was developed by myself when I was working on the MakeHuman project. Documentation about the MHX rig. Eventually the documentation should be moved here, for an MHX-converted DAZ character behave slightly differently from a MakeHuman one, but for the time being the MakeHuman documentation will have to do.

 After pressing Convert To MHX, Ana's rig is replaced by an MHX rig, recognizable by the bones' custom shapes.

Face bones carry over to the new rig, so it is still possible to do facial posing in the Face Units, Expressions and Visemes panels. Expressions can be tweaked with the face bones on the Face layer (armature layer 9). Three new panels appear when an MHX rig is selected: MHX Layers, MHX FKIK Switch, and MHX Properties. They are described in the MHX documentation.


Convert To Rigify
DAZ characters can also be rerigged with the popular Rigify add-on by Nathan Vegdahl. Links to documentation about Rigify in general:

Official Rigify documentation
Blenderartist thread

First we must make sure that the Rigify add-on is enabled. It is bundled with Blender and is found in the Rigging category.

Here is the rigified version of Ana. Runtime controls for Rigify are found at the bottom of the "N-panel" to the right of the viewport. Facial bones and rig properties are copied to the Rigify rig, so face units,  expressions and visemes continue to work, including the extra layer of tweak bones. The face bones can be found on armature layer 2 in the rigified armature.

There were some problems with Rigify conversion in version 1.0 of the DAZ Importer, but they have been ironed out in version 1.1.

Hair


  • Hair Color:
  • Resize Hair: Change the number of hair vertices so all strands have the same number, and hence belong to the same particle system.
  • Hair Length: The number of hair vertices, if hair is resized.
  • Resize In Blocks:  Change the number of hair vertices to a multiple of ten. This results in a moderate number of particle systems and fairly uniform vertex density.
  • Sparsity: Ignore some hairs if this number exceeds one.
  • Skull Group: Create a vertex group on the human called Skull. The hair is attached to it when the head moves.
    • All: Add all vertices to the Skull group.
    • Top: Only add the top-most vertex (maximal z-coordinate) to the Skull group.
    • None: Don't create a Skull group.
  • Make Hair: Convert the selected, hair mesh to particle hair of the active, human mesh. To avoid confusion, the meshes are listed right below.
    • Hair: The hair mesh.
    • Human: The human mesh.
  • Update Hair:
  • Color Hair: Assign the Hair Color to the hair particles to give the hair a new color.
  • Connect Hair:
  • Add Pinning Group: This button is useful for simulation of mesh hair. Add a vertex group which can be used as a pinning group in a cloth simulation. The four parameters below control the vertex weights.
    • Pin X0:
    • Pin X1:
    • Pin W0:
    • Pin W1:
The DAZ importer can convert certain types of mesh hair to particles. It only works if the hair solely consists of stripes, whose UV coordinates are arranged vertically. Fortunately, most hair meshes in DAZ Studio are made in this way.

Here we have moved Ana's hair to a separate layer. The hair mesh consists of many disconnected pieces, which are of two types. The actual hairs are narrow bands with UVs arranged vertically, and a skull with a different type of UV coordinates.

We need to separate the skull from the rest of the mesh. In edit mode, select a skull vertex and hit ctrl-L to select all connected vertices. Then hit P and separate the selection to a new mesh.

There are now two meshes. Hair consists solely of bands with vertical UVs. This is the mesh that we will convert to particle hair.

We renamed the other mesh to Skull and changed the color to brown to distinguish it from the hair.The color is not important because it will not be visible in renders.

Select the character mesh, and then shift-select the Hair to make it active. Use the default settings and press Make Hair. After a slight delay Ana has particle hair, and the character mesh hair can be hidden or deleted.

Since it can be difficult to remember which mesh to select first, the hair and human meshes are listed below the button, so we can easily detect if the meshes have been selected in the wrong order.

The character mesh now has particle systems. In fact, it has many of them, called Hair-32, Hair-33 etc. Due to limitations in Blender's hair system, all hairs in a certain particle system must have the same number of vertices. Since the number of vertices is the same as the length of the stripe in the original mesh hair, a different particle systems are created for each stripe length. The number of segments is one less.

The Skull Group option was set to Top when we pressed Make Hair. The particle density is controlled by the Skull group, which consists of a single vertex located at the top of the head.

The reason for this choice is that the hair should follow the head bone when posed, and it is very likely that the uppermost vertex is only influenced by the head bone. We can verify that the hair moves correctly by bending the neck.

In Particle Edit mode we can highlight the vertices belonging to the Hair-32 particle system.

Because the character mesh has so many particle systems, it is quite tedious to edit parameters, because the changes must be repeated for each particle system. The DAZ importer has a tool that makes it possible to make the changes only once. Make the changes in one particle system and then hit the Update Hair button to transfer the changes to the others.

Unfortunately, Blender's particle system is quite brittle, and sometimes (most of the times, actually), all updated particle systems disappear from the viewport, although they can still be selected in the properties window. Work is underway to solve this problem.

The options of the Hair-33 system now reflects the changes made in the Hair-32 system.

The hair color was determined by the Hair Color selector at the top of the Hair section, but we can change it afterwards. Change the same Hair Color selector and press the Color Hair button. Ana now has blue hair.

Alternatively, we can grow hair on the Skull mesh instead of the character mesh. We have also changed some options:
  • Hair Color. It is set to some light yellow, to mimic the color of the original mesh hair.
  • Resize Hair. A single particle system will be created, and the hairs will be rescaled to fit.
  • Hair Length. The number of hair vertices in the single particle system.
  • Sparsity. It is usually not necessary to create hairs for each stripe in the mesh hair, because we can add children to the particle hair afterwards. If Sparsity = n, only every n:th hair will be added to the particle system.
  • Skull Group. Because the entire skull mesh moves rigidly with the head, we can add all vertices to the Skull group.
With Skull selected and Hair active, now press Make Hair.

A single particle system is created, and all hairs belong to it. The particle system name is Hair-20 (from the Hair Length variable) and it has nineteen segments. We don't want the skull to be visible in renders, so turn the Emitter option off. It is on by default because if we had grown hair on the character mesh we would want it to be visible.

The vertex density varies depending on whether the original stripe was short (short distance between vertices) or long (long distance). This is a consequence of rescaling the hairs. An advantage is that we only have a single particle system to vary the parameters in, so there is no need to use the Update Hair button.

Here is Ana after the number of children has been cranked up, in the viewport and rendered.

All vertices in the Skull mesh belongs to the Skull vertex group with weight one. This works fine because the entire skull moves rigidly with the head.

Finally we explore some addition settings in the Hair section.
  • Hair Color. Set to almost black.
  • Resize in Blocks. If Resize Hair is turned off many particle systems are created, and if it is turned on the hairs are heavily resized. As a compromize with can resize the hairs in blocks of ten. All hairs with between 75 and 84 vertices will resized to belong to the system Hair-80 with eighty vertices. This keeps the number of particle systems down while not affecting the hair density very much.
  • Sparsity. Only every fourth hair is kept.
  • Skull Group. Set to None, so density is not controlled by any vertex group.
Hit Make Hair again.
There are now only a few particle systems (six of them, in fact), and they contain many hairs each.

Hair density is not controlled by any vertex group, but posing still works since the skull moves rigidly.

The last part of the Hair section is a utility for mesh hair. When doing cloth simulations we often want part of the mesh not to move, whereas other parts should move more or less. The extent to which a certain vertex is pinned down is controlled by a vertex group.

Select the hair mesh (the scalp should already be separated as another object) with the default settings, and press Add Pinning Group. A new vertex group called HairPinning is created. The weight assignments can be seen in Weight Paint mode.

The parameters Pin X0, Pin X1, Pin W0 and Pin W1 affect the weight assignment according to the graph above.

If the default weight assignment was not satisfactory, we simply change the parameters and press Add Pinning Group again. The HairPin group is now updated with new weights.