Monday, June 28, 2021

Voluminosity and Material Editor

The Daz Importer creates somewhat non-standard skin materials in order to make them as faithful to Daz Studio as possible. In particular, the BSDF method uses translucency and voluminosity nodes the match the translucency in Iray

This setup is quite non-standard for Blender skins, and may lead to longer render times, but in some cases it is necessary. The picture below shows Victoria 8, rendered in Blender with and without the voluminosity node.

However, it is quite easy to modify the skin to the right to something good-looking, using the material editor. Before importing the character, we need to turn off the Volume option in the global settings dialog, so the voluminosity nodes are not generated.
Modifying the node trees manually is quite cumbersome, because Daz skin consists of many materials, and we need to make changes consistently over all skin materials. Instead we can use the material editor, which has been improved recently. Start it by pressing Launch Material Editor in the Setup > Materials section. Before doing so, select the material that the editor uses as a blueprint. In this case we choose the Face-1 material.
At the top of the editor window we select the materials that will be affected by the changes. Clearly we only want to tweak the skin, lip and nail materials, and leave the eye and mouth materials unchanged. We can select the individual materials, but it is more convenient to use the Skin-Lips-Nails button to do this. The active material Face-1 is shown below the list of affected materials.
We then open the Translucency group, and change the Cycles Mix Factor to 1.0 and the SSS color to a light grey.
The mix factors determine whether the DAZ Translucent group uses translucency or sub-surface scattering, or a mixture of both. 0.0 means pure translucency, which works well together with the volume nodes, and 1.0 means pure SSS. Since we didn't generate any volume nodes, the Cycles Mix Factor is set to 1.0, i.e. pure SSS.
Finally we hit the Update Materials button. The result is not bad for a first attempt, considering that we only changed two parameters.
If we go back into the shader editor, we can see how the updates affect the node trees.
The Update Materials button does not close the material editor, so if we are not happy with the result we can continue to tweak the parameters. Here we changed the SSS color to a slightly reddish tone.

Saturday, June 19, 2021

Winders Update

A winder is a control bone that bends multiple parallel bones by the same amount. It is used in the MHX rig for fingers (a single finger bone bends all three finger links) and for the spine (the back bone bends three or four spine bones). It can also be useful in other contexts, e.g. for male genitals or for ponytails, as was discussed in a previous blog post

Winders are also useful for rigged hair, but here we often need to create several winders, one for each chain of links. Previously that was rather cumbersome, because the Add Winder tool had to be run for each chain, with the root of the chain active. With the latest update, several  bones can be selected at once, and the tool automatically figures out which bones are the chain roots.

Select the bones that we want to make winders for. This is usually quite easy, because the Merge Rigs tool puts non-standard bones on a separate layer. Press the Add Winders button.
The option box lets us select the bone layer where the winders live.
We can now quickly pose the hair with the winders.
The winder pose results in a quite complex pose for the original deform bones, which would be tedious to create by hand. However, the individual bones can still be posed on top of the winder pose, if we want to refine the pose.

Monday, June 7, 2021

Add-On Updater Removed

 For some time the Daz Importer has used the Blender add-on updater from CGCookie to let users automatically update the add-on to new versions. However, there are some problems with this.

  1. The add-on updater is not my code and I don't feel comfortable to include code which I don't understand.
  2. The Daz Importer consists of python files (.py), JSON files (.json) and Daz Studio scripts (.dsa). Python and Daz Studio files are updated correctly, but JSON files are not. This could be because I didn't configure the add-on updater correctly, or because the updater uses JSON files internally and therefore treats them differently from other files. In any event some files were not updated correctly.
  3. Including the add-on updater is not strictly legal, since it is licensed under GPL and Daz Importer uses a more liberal BSD-type license. It would not be a big deal for me to change the Daz Importer License to GPL, but since the add-on is intended to work as a bridge between commercial and open-source software, I prefer a license that works nicely with both.
  4. It does not work with Blender 2.93.

The last problem was reported some time ago. Exactly what goes wrong is not clear to me, since my main computer cannot start Blender 2.93 due to some missing dll. But in view of the other problems with the add-on updater, I have decided to remove it completely now when Blender 2.93 is officially released. It has also been removed from the stable version 1.5.1.