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.