[Addon] DAZ Importer


(ThomasL) #1

Version 1.2 released.

The DAZ importer is a tool for importing files for DAZ Studio (DAZ User File *.duf, DAZ System File *.dsf) into Blender. It also contains some tools to make the assets more animation friendly.

Documentation: http://diffeomorphic.blogspot.se/p/daz-importer-version-12.html

Repository: https://bitbucket.org/Diffeomorphic/import-daz
Development version as a zip file: https://bitbucket.org/Diffeomorphic/import-daz/downloads/
Version 1.2 release: https://www.dropbox.com/s/jx15t3inlvtd98x/import-daz-v1.2-20170913.zip

Instructions:

  • Save the zip file somewhere on your computer.
  • In Blender, go to File > User Preferences > Add-ons
  • Press Install From File… and select the zip file.
  • Enable the DAZ importer.
  • In Daz Studio, install the export basic data plug-in, included in the zip file.
  • Save Daz character as a .duf file.
  • Export basic data with the provided add-on to a .json file with the same name as the .duf file.
  • In Blender, import the .duf file with Mesh Fitting set to Json file.



Attachments



(Safetyman) #2

Cool, thanks… I’ll have to try this out when I get home this evening.


(Safetyman) #3

I’ve followed your instructions but I can’t seem to get this to work. Here is the errors from the console:

Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\import-daz_init_.py”, line 275, in execute
getMainAsset(self.filepath, context, self)
File “C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\import-daz\main.py”, line 57, in getMainAsset
main = parseAssetFile(struct, toplevel=True)
File “C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\import-daz\file.py”, line 250, in parseAssetFile
return asset.parse(struct)
File “C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\import-daz\file.py”, line 122, in parse
asset = self.parseUrlAsset(mstruct)
File “C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\import-daz\asset.py”, line 144, in parseUrlAsset
asset.update(struct)
File “C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\import-daz\modifier.py”, line 351, in update
ref = list(parent.instances.keys())[0]
IndexError: list index out of range

location: <unknown location>:-1


(ThomasL) #4

Clearly there are differences in our DS setups, because I haven’t run across this problem. Should be fixed in the development version, with the caveat that I could not really test since I could not provoke the error. The updated file can be downloaded from

https://bitbucket.org/Diffeomorphic/mhx2-makehuman-exchange/downloads/

The panels are arranged a little differently in the development version, but the docs are still more or less valid. If you still encounter problems, perhaps you could start with something simple, like a nude genesis/genesis 3 character. For more debug info, you could also change the Verbosity slider in the Advanced setup panel. Verbosity = 3 is a good value (I Think I will change the default to that).


(Safetyman) #5

Thanks for the reply… I’ll try again this weekend and let you know what I discover.


(ThomasL) #6

Stable version 1.2 released.

Release candidate: https://www.dropbox.com/s/pynejt6h9cj4pt2/import-daz-v1.2-20170806.zip
Main documentation page: http://diffeomorphic.blogspot.se/p/daz-importer-version-12.html

Since the previous stable version was released half a year ago there has been several improvements and additions.

  • A DAZ Studio plug-in for exporting the final world space coordinates for vertices and bones.
  • Limits on the number of facial expressions overcome, using handlers for bone drivers.
  • Material improvements, in particular for Cycles.
  • Posing improvements.
  • Many small bugfixes and additional features.

The most signicant improvement is the DAZ Studio plug-in. In previous versions Wavefront or Collada files could be used to find the final meshes with all morphs included, but this did not always work correctly. In version 1.1 I also attempted to deduce the final locations directly from the DAZ Studio files. While this in theory must be possible (after all, DAZ Studio does it), I never got it to work right, especially not fitting clothes to arbitrary morphed meshes. After I started to use the DAZ Studio plug-in to export the final world-space coordinates, meshes have always looked the same in Blender as in DAZ Studio.

The script has mainly been tested with DAZ Studio 4.9 and Blender 2.78c on Windows 7.


(Blenderer) #7

crushing dissapointment… video looks amazing but when I try to use the addon it just spews errors like mount vesuvius :confused:


(Blenderer) #8

Ok, works fine with genesis 3 from daz library.

Am trying to import V4 from an old poser runtime directory… I guess that’s where it’s falling down


(ThomasL) #9

??? Poser and DAZ Studio are two different things. But you should not even be able to select Poser (.pz2, …) files in the file selector.


(Philmister978) #10

Okay, so I tried following the instructions, but for some reason the .zip file won’t show when I press the “Install add-ons” button and look in the directory.

EDIT: Never mind, found out I didn’t move it to the folder in question like a fool.


(Blenderer) #11

You can actually link to poser runtimes in daz and use content from them.

It works fine in Daz, but the addon seems to only work with native daz content :frowning:


(ThomasL) #12

OK, I didn’t know that.

EDIT: Now I have learnt something new. I have some old Poser files that I could import into DS and then save as DAZ files. When I tried to import the .duf files into Blender, there were indeed some errors, but they were straightforward to fix. So at least the Poser files that I tried can now be imported into Blender.

However, there are some problems with rigging. Poser does mesh deformation with envelopes, but the importer only handles vertex groups. So you need to skin the model in Blender.

The updated script can be downloaded from https://bitbucket.org/Diffeomorphic/import-daz/downloads/

That was correct, but hopefully fixed now.


(Philmister978) #13

Question- is it possible to export any previous Genesis versions using this program, or is it Gen3 and up?

For that matter, can I also export other models that aren’t in the Genesis line?


(ThomasL) #14

It is an importer for general Daz scenes, so it can import props, environments and figures, e.g. Genesis 1, 2, 3, 8, or the Daz horse. There might be problems if it encounters something that has not been tried before, like the converted Poser files that I learned about a few days ago, but it is usually not diffifult to fix such bugs.

Whereas the importer can import scenes with multiple characters, it is not something that I would recommend. Better to import each character into separate blend files and link or append them to the scene file.


(Philmister978) #15

That’s all I needed to know, thanks.


(ThomasL) #16

A new release candidate for version 1.2 of the DAZ importer can be downloaded from https://www.dropbox.com/s/x1tkb0khjycq251/import-daz-v1.2-20170818.zip. There are two improvements compared to the previous RC:

  • I learned that you can import Poser files into DAZ studio and save them as DAZ files, which can then be imported into Blender. However, these files are slightly different from the native DAZ files, and they caused some errors in the import scripts. These bugs should now be ironed out.
  • The Rigify add-on was changed in Blender 2.79, which caused Rigify conversion of DAZ armatures to stop working. The new RC should work with both old and new Rigify.

More info about this release can be found at http://diffeomorphic.blogspot.se/2017/08/new-release-candidate.html.


(vida_vida) #17

Hi ThomasL,
I get the following error whenever i try to import a duf file into Blender and the Blender viewport obviously remains blank. I also tried loading the file from the DAZ library directly and still get the same error. I have followed your instructions from your blog to a T and followed every possible error handling and i still get the following error.

I am also attaching the DAZ imported error log file for your reference.



Please help. what am i doing wrong here? I really want to import and animate a DAZ file in Blender.

I would be eternally grateful if you could help me resolve this error.

Thanks.


(ThomasL) #18

OK, clearly there is something strange going on in the file /data/meipex/headlights/headlights_geometry shell/headlights geometry shell.dsf in your DAZ directory. It is difficult to tell exactly what caused the problem without seeing this file, so maybe you could send it to me. Zippyshare worked fine. In the meantime, try to remove the head-lights in Daz Studio and export the model again.


(Philmister978) #19

I can’t seem to get the file I want to import to import.


The thing is, I already have these assets on my external, and it’s saying that they don’t exist.

Is there a way to correct this issue? Because I’ve tried changing my directories and it somehow made it worse and now I’m stumped.

EDIT: I managed to get that error fixed, but now this is showing up whenever I try importing a .duf into Blender.



(Had to censor the owner, ie: me, so apologies)

What could be the issue this time?


(ThomasL) #20

Your problem is almost certainly the same that vida_vida has - your assets are located on F:, his on D: . I have tried to reproduce the problem, but I think I’m doing it in the wrong way. I put some assets on an external hard drive and then added the location as a new base directory (cf figure), but in that case I don’t get the full absolute path to the asset file.


EDIT: Saw your edit. What did you change to proceed?