Friday, July 26, 2024

Diffeomorphic Add-Ons version 4.2.0 Released

 DAZ Importer version 4.1.0 did not work at all with Blender 4.2. The reason is that Blender 4.2 has a strong (or less weak) typing system, which causes almost every button in the DAZ Importer to crash. Therefore it is time for a new stable release of the DAZ Importer and the other Diffemorphic add-ons. The add-ons have been tested with Blender 4.1.0 and 4.2.0 and also briefly with Blender 2.83, and there is a good chance that they will work with intermediate Blender versions too.

Apart from making it possible to use the DAZ Importer in Blender 4.2 at all, there are also some other improvements:


The DAZ Studio export scripts (export_to_blender.dsa and export_highdef_to_blender.dsa) have also been updated and should be copied to the Scripts folder in a DAZ Studio directory. Old versions of the scripts still work in most situations, but the new versions are needed for the improvements of rigid followers and HD import.


DAZ Importer
The DAZ Importer is a Blender add-on for importing native DAZ Studio files (.duf, .dsf) into Blender. It also contains some tools to make the assets more animation friendly.
Download:
https://www.dropbox.com/scl/fi/5xh2xun51kn3c851y85ju/import_daz_v4_2_0.zip?rlkey=uapugueahv4otj7q07aliocyc
Documentation:
https://bitbucket.org/Diffeomorphic/import_daz/wiki/Home


MHX Runtime System

The MHX Runtime System is a Blender add-on for posing the MHX rig, that can be generated by the DAZ Importer.
Download:
https://www.dropbox.com/scl/fi/wi5x9m7phck8yxjme42tz/mhx_rts_v4_2_0.zip?rlkey=fy6dkyj04ueloygbvvemjb3ft
Documentation:
https://bitbucket.org/Diffeomorphic/mhx_rts/wiki/Home


BVH and FBX Retargeter
The purpose of the BVH and FBX Retargeter is loading animations from BVH or FBX files to a given armature, and editing these animations in various useful ways.
Download:
https://www.dropbox.com/scl/fi/5qvty2bnvp3x6bs6ido67/retarget_bvh_v4_2_0.zip?rlkey=lmk28nweryfkdzic0cnn54c82
Documentation:
https://bitbucket.org/Diffeomorphic/retarget_bvh/wiki/Home


The next three add-ons were recently spawned from the DAZ Importer in order to keep down its size somewhat. They contain rather specialized tools that are probably not of interest to most users. They are also poorly documented.

Important: The DAZ Importer must be enabled first, before any of these three add-ons can be used.

DAZ Preset Exporter
This add-on contains some tools for creating pose presets and other assets that can be used in DAZ Studio. It has not been updated for Blender 4.2.0.
Download:
https://www.dropbox.com/scl/fi/nfqjioymya3sofq71pcv4/export_daz_v4_1_0.zip?rlkey=4nujmfmir99dqf6sm7y0weyzi
Documentation:
https://bitbucket.org/Diffeomorphic/export_daz/wiki/Home


DAZ Rigging
Some specialized tools for rigging certain types of figures, link chains and tails.
Download:
https://www.dropbox.com/scl/fi/dbrvarajfb7173u7q0hfa/rig_daz_v4_2_0.zip?rlkey=ep0vif4h6pdxktvwm9n6sfras
Documentation:
https://bitbucket.org/Diffeomorphic/rig_daz/wiki/Home


Shell Editor
Contains some tools for manipulating shells imported from DAZ Studio.
Download:
https://www.dropbox.com/scl/fi/v08r48o9z2nswb57fpv0y/shell_edit_v4_2_0.zip?rlkey=boo9zmie3jei1rztsktefnj65
Documentation:
https://bitbucket.org/Diffeomorphic/shell_edit/wiki/Home



Tuesday, July 16, 2024

Hair Simulation

It is well known that it is not straightforward to simulate hair curves in Blender. Recently Alessandro pointed me to an interesting video where this problem is addressed:
The main idea is to create a proxy mesh which exactly matches the hair curve's vertex order and vertex locations. We can then add a cloth simulation to the proxy mesh, and a geometry node modifier to the hair curve that makes if follow the proxy. This is implemented in the development version 4.2.0.

Hair simulation does not work with the well-known Toulouse hair, because it contains connected sheets with two tips at the end and the root in the middle, and the Make Hair tool does not handle this case well.

Monica hair is better behaved, and only consists of sheets where the root and tip are at the ends. We imported a G8F character with Monica hair.

Monica hair consists of several parts with different materials. First we enter edit mode and separate the mesh by material.
We only keep the hair meshes which make a substantial contribution to the hair. The four meshes that consist of scattered small parts can be deleted. Also, the mesh with the cap material is renamed to "Scalp".
Next we convert each of the four remaining hair meshes to hair curves. With the hair mesh active and the scalp selected, press Make Hair.
The simulation options are found in the new Posing/Simulation box to the right of the Make Hair options. To make the video above I used something like the options above.
After converting all four hair meshes to hair curves, we end up with four hair curves and four proxy meshes, which have a red material in the viewport and are hidden during rendering. I like to put them in separate collections for clarity.

After that it is just a matter of animating the character.

The simulation will probably not be perfect at once. We can tweak the simulation parameters in the physics context as usual.

We can also easily modify the pinning group with Add Pinning Group.



Sunday, July 14, 2024

Improvements to HD Import

We can import HD (high-definition) characters if we first export the dbz file with the Export HD To Blender script, instead of using the plain Export To Blender script, cf High resolution meshesHD meshes and geografts, and HD meshes and geografts revisited. The imported character has usually a very high poly-count which slows down the viewport. We can usually convert a HD mesh into a low-poly mesh with a multires modifier, using the Rebuild Subdivisions tool in the modifier. If the multires mesh has the same topology as the base mesh, which is often the case, the import script can then copy UV layers and vertex groups from the base mesh, so the multires mesh is as responsive as the base mesh in the viewport, while rendering like the full HD mesh.

Unfortunately, there are some situations where this strategy doesn't work.

  1. Rebuilding subdivisions may fail. We are then left with the full HD mesh, which can not be posed. It can still be rendered if UV coordinates are included in the exported dbz file.
  2. Rebuilding subdivisions may succeed, but the topology of the multires mesh may differ from that of the base mesh. Then we still cannot copy vertex groups and UV layers from the base mesh. An example is the persian top for Genesis 2 females that is bundled with DAZ Studio. In that case the culprit are triangular faces in the beads.
  3. The character may have geografts. Then the suggestion in HD meshes and geografts revisited was to enter the geometry editor in DAZ Studio before exporting the dbz file. However, if we do so all shells and shell UV layers are lost, which are often quite significant for geografts.

Recently these problems have been overcome. First, the Export HD To Blender script has to be updated, because information about shell UV layers are now included among the exported data. This means that you must use the Dazscript version rather than the C version by Donald Dade, which is not updated. Second, scenes should be exported from DAZ Studio without going into the geometry editor. This means that all geografts are automatically merged with their base characters already in the dbz file. When the file is imported into Blender, materials from both the base character and base geografts are added to the HD mesh, and UV layers from any shells are added too.

Information about the HD vertex groups is still missing. That could in principle have been added too, but exporting a HD dbz file is already very slow, and making it many times slower by adding 200 vertex groups is not feasible. Instead the plugin uses Blender's data transfer tool to transfer the vertex groups from the nearest base mesh vertex, instead of doing a vertex-by-vertex copy.