Sidor

Monday, November 23, 2020

More Hair Changes

In the previous post, there were two ways to convert polyline and strand-based hair in DAZ Studio into particle hair in Blender: either 1) convert the hair during import time, or 2) import the meshes and convert them with the Make Hair tool afterwards. This is one method too many. The basic philosophy behind the Daz Importer is to import the content of the duf and dbz files as faithfully as possible, and then provide tools that make the content more useful in Blender. Clearly the second hair method agrees better with this philosophy.

For this reason the global hair settings have been removed completely, and hair is always imported as it is in the duf and dbz files: as polyline meshes for polyline hair, and as meshes with narrow tubes for tesselated strand-based hair. Those meshes can then be converted into particle hair if desired. This change has a number of benefits:

  1. Fewer global settings cause less confusion.
  2. Lots of code could be discarded.
  3. No need to postpone hair creation and restore hair after geografts are merged. Instead, we can simply wait to convert mesh hair to particle hair until after geografts are merged.
  4. Faster import. If the mesh hair contains strands of different sizes, multiple hair systems are created, and that takes a lot more time than a single system.
  5. Better control over hair conversion with the options of the Make Hair tool, like hair resizing to fit all strands into the same particle system.
Even if hairs are now always imported as meshes, their materials are hair materials, using the Hair or Principled Hair shader. There is a global setting which chooses between the two methods for hair material creation, just as there is a global setting for the ordinary material method.

Hair materials are created during import because it is when it can be done. When mesh hair is converted to particle hair with Make Hair, the needed information is no longer accessible.

The Make Hair dialog has been improved. Here is how it looks right now, but there may be changes later on. The main change is to the middle column, where we specify the hair material. If Keep Material is selected (the default), we can choose between the existing materials of the mesh hair. This is useful for polyline and tesselated hair, which are equipped with hair materials.

If Keep Material is disabled, the tool creates a new hair material with the specified color, and using the specified method (BSDF/Principled). This is the preferred way if we convert a mesh hair (with the Sheet setting), but can also be used for polyline and strand-based hair.