Sunday, September 28, 2025

Instances Revisited

The DAZ Importer imports most scenes correctly, but it has long struggled with instances. Simple cases have worked fine, but the DAZ and Blender scenes differed when the instance target is itself an instance, or if there are formulas that affect the locations. In the last few days I have revisited those issues and now all scenes seem to import correctly. Two long-standing issues in the bug tracker have been resolved.

Issue 479 deals with the Shipping yard construction set. It is imported correctly when the "Mesh Fitting" option is set to "Unmorphed Unique", "Morphed" and "DBZ File". With "Unmorphed Shared" all containers have the same color, which is expected since all container objects share the same mesh and hence the same materials.

Issue 2181 deals with the Medieval City Block. This is now imported correctly with "Morphed" and "DBZ File". It can not be imported with one of the "Unmorphed" settings because there are formulas that affect the locations of the instances. With the "Morphed" setting the formulas are taken into account, and with "DBZ File" the final locations are baked into the dbz file.



Friday, September 19, 2025

DAZ RESOURCES

This article assumes the reader is confident with linking and appending files to manage large projects in blender. The purpose is to show how we can eventually optimize resources with assets imported from daz studio. This is entirely optional as things work fine as they are.

https://docs.blender.org/manual/en/latest/files/linked_libraries/link_append.html

https://docs.blender.org/manual/en/latest/files/linked_libraries/library_overrides.html

The way we usually go is to create blend files with all the resources localized. That is, we import a daz asset then create all the materials and the rig. This works fine for small projects or unique scenes, where we want all the assets in the same scene. This also does work for large projects where we rather link or append data from multiple files, but of course all the local resources are also duplicated this way.

example use case:

  1. in a new scene import a figure and save the blend file
  2. in a new scene import another figure and save the blend file
  3. in a new scene link the two figures above and make overrides

If we look at the local database in the outliner we see all the daz groups are duplicated, as well as the custom shapes and the local resources in general, because they reference the source files so "daz diffuse" in figure 1 is different from "daz diffuse" in figure 2.


A better approach would be to use a blend file to collect all the daz resources, as material groups or custom shapes for example, then we link the daz resources from there so when we import a daz asset it will use the daz resources. This way when we link assets in the scene the daz resources will not be duplicated.

To create material groups: setup > materials > debug > make shader groups

example use case:

  1. in a new scene create all the material groups and save as daz_resources.blend
  2. in a new scene link the daz resources and save as startup file
  3. in a new scene import a figure and save, this will use the linked daz resources
  4. in a new scene import another figure and save, this will also use the linked daz resources
  5. in a new scene link the two figures above and make overrides

Now there's no duplicates.


Note that daz resources can also be used to replace the standard diffeomorphic resources with custom ones. For example if we want to create a custom "daz diffuse" group we can edit it leaving the same name and channels, this way diffeomorphic will reference the custom group when importing daz assets.

This also has some drawbacks though, for example the daz groups could change among different diffeomorphic versions. This means, as a rule of thumb, never import daz assets when a old scene is already loaded, otherwise the old groups are used. While we can always link assets from different versions of diffeomorphic and they will work fine.

Saturday, August 2, 2025

Diffeomorphic Add-ons Version 4.5.0 Released

Version 4.5.0 of the DAZ Importer, MHX Runtime System and BVH and FBX Retargeter have been released. They can be downloaded from

DAZ Importer: https://www.dropbox.com/scl/fi/hp422s4cibjtofs0w41v0/import_daz-4.5.0.zip?rlkey=48iudwd2yea9y1vw51hixzxpw

MHX Runtime System
: https://www.dropbox.com/scl/fi/y4foq3hjg8i23qozdcuyo/mhx_rts-4.5.0.zip?rlkey=n15uyij9ouoclmaqqmpe5tq92

BVH and FBX Retargeter: https://www.dropbox.com/scl/fi/z140z8ai58zw89zv1cl2e/retarget_bvh-4.5.0.zip?rlkey=1cs5th0jau8tm12dc1a6ofhb3

The add-ons have been tested on Blender 4.5 and 3.0, and should run on intermediate Blender versions as well.

This is mainly a bugfix release in order to keep in sync with Blender versions. However, there are some new features:

  • Better support for UTF-16 (Chinese and Japanese characters)
  • The Retarger editing functions have been replaced by animation layers.

Tuesday, July 1, 2025

Animation Layers

After we have imported a mocap animation we usually have to edit it. There are many reasons for this: the mocap data is faulty, it doesn't fit the target character, it doesn't quite do what we want, etc. The BVH and FBX retargeter had some tools for this, but they were quite clumsy and incomplete. The natural way to edit animations in a non-destructive way would be to use animation layers, but I didn't think Blender had those. However, Alessandro pointed out that Blender always have had animation layers, but they are hidden inside the NLA editor and a bit inconvenient to use. So I decided to replace the old edit tools with animation layers, taking inspiration from this video.

Here we have imported a walk animation from ACCAD. A common problem with retargeting such files is that the collar bones tend to slope. To fix this, we add a new animation layer by pressing the plus button in the Animation Layers panel.
This creates two animation layers: the base layer which is the original animation, and a second layer where we can modify the animation.
Behind the scenes we have converted the original animation to an NLA track, and added a new empy animation on top of that. The NLA tracks can be disabled, but the last layer is always the current action.
If we now add keyframes to the collar and shoulder bones at one frame, the animation is modified at all frames.
The total animation now consists of an action and a number of NLA tracks. If we need it to be a single action, e.g. in order to export it to games, we can use the Bake Animation Layers button.
After baking animation layers, the layers list is cleared, but the animation remains the same.
The tracks are gone from the NLA editor, and only a single action remains.

Wednesday, June 25, 2025

Scanning the DAZ database is now obsolete

 I'm a Windows user myself, but the DAZ Importer still runs on Linux. The problem with Linux is that its file system is case sensitive, so e.g. Runtime/Textures and runtime/textures are different directories on Linux, whereas they are the same on Windows. To deal with these problem we previously had to scan the entire DAZ database, cf the post on Linux Revisited. Alas, this led to several problems. Scanning the database could take considerable time if many DAZ assets have been installed. Moreover, scanning is error prone because if you add new assets, they will not be found unless the database is rescanned.

Fortunately, these are now problems of the past. In the last commit, the relevant paths are scanned on the fly, meaning that a separate scanning step is obsolete. Having to look at several locations for an asset does have a price, but it seems to be a modest one. My initial tests indicate that importing files with "Case-Sensitive File Paths" enabled increases the load time with about 10%.

And please note that this is only an issue under Linux. Under Windows, and I believe Mac as well, file paths are case insensitive so the issue never arises.

Tuesday, May 20, 2025

Importing DBZ Files Directly

Getting the DAZ Importer up and running is a bit more complicated then using a normal importer. We must Copy Scripts folder to DAZ Studio, Save Scene in DAZ Studio, and Export To Blender. Those are the steps that any export script would need to do. But the DAZ Importer also required two extra steps, Save the DAZ root paths in DAZ Studio, and also Setting up the DAZ root paths in Blender. Those steps are necessary because the DAZ assets are not stored in the duf file. Instead the duf file contains pointers to the actual assets relative to the root paths. So knowing the root paths is necessary to find the assets.

However, the extra steps have been automated in the development version, which means that the DAZ Importer behaves more like a normal importer: export the dbz file from DAZ Studio and import it into Blender. The root paths are stored inside the dbz file, provided that you copy the latest version of the Export To Blender script a the DAZ Studio scripts folder. Older dbz files can also be imported, but in that case the root paths must be set up correctly first.

When we now press Easy Import DAZ or Import DAZ Manually, we notice two differences:

  • The file list contains dbz files instead of duf files and pictures.
  • The Mesh Fitting option is gone. 
The default root paths are probably not correct. Previously we had to set up the root paths manually, or export the root paths from DAZ Studio and load them into Blender. This is no longer necessary if we use the latest version of the Export To Blender script, because the root paths are now stored inside the dbz file. If we import an older dbz file it is still necessary to set up the correct root paths.

After the dbz file has been imported, the root paths are updated.

There are two new global settings that control the behaviour.

  • Only DBZ Files. If disabled the file selector looks like it used to, showing duf and dsf files and images. The Mesh Fitting option is also shown.
  • Root Paths From DBZ. If enabled the plugin uses the root paths in the dbz file, otherwise the root paths in the global settings are used.

Here is the file selector if DBZ Files Only is disabled. The file selector contains duf files and pictures. The Mesh Fitting options are shown.