DAZ Importer

I would need the daz file (pose preset), so I can see what happens both in DS and Blender.

I’ve send the file on your dm :slightly_smiling_face:

Is the Save Pose Preset option (for exporting animation back to Daz) intended to be compatible with all the Diffeomorphic rig types (Simple IK, MHX, and Rigify)? I can only seem to get accurate animation export with the raw Daz rig. Baking & exporting Simple IK animation seems to result in inaccuracies, possibly due to Blender’s glitchy action baking feature, and I can’t seem get MHX or Rigify animations to export at all (the duf file gets saved, but doesn’t seem to contain any animation data when applied inside Daz).

It should work reasonably well with MHX, but only since the day before yesterday, cf https://bitbucket.org/Diffeomorphic/import_daz/issues/545/save-pose-preset-doesnt-work. There was a problem with the limbs, where the full rotation was assigned to the corresponding bend bones. Now the bend part of the rotation is assigned to the bend bone and the twist part to the twist bone, which is much better. There are still small differences, because all mhx bones are not located exactly where the genesis bones are, e.g. the spine is connected, but the poses looks reasonable anyway.

Rigify also works better than before, but here the discepancy is bigger.

2 Likes

I never liked how you guys set-up the UVs.

It should always be Texture Coordinate > Mapping > Image Texture with image interpolation set to SMART OR CUBIC.

The current set-up makes me rework all the materials in a G8.1 character because you used “UV instancer”. It sucks if I want to fix the Iris material sometimes - it makes me delete delete and then the process becomes boring and repetitive.

And also, this week, I can no longer Merge Materials in Easy-Import Daz. I don’t know why. I’m anew user, I cant upload files text. It says : Daz Importer Error Dialog Box below the status and I will click okay.

The Head and the Body Material in Genesis 8.1 should be combined but I can’t do that anymore in the new update.

Daz Importer version: 1.6.0.0379

Hi Thomas,

Thanks very much for this tool. I was wondering if you could point in the right direction as I have a specific use case and I’ve found a lot of inspiration in your import_daz code.

Background: I script import rigging and apply bone constraints from a custom rig to a natively imported Daz model (with adjustments) for a large number of animations. All is perfect and displays as I want in blender. I want to export the animations using local rotations to create .duf animations for each frame (non-action), much in the same way you do in your save-pose-preset blog post.

Objective: I’m currently stuck with local rotations in blender not matching those in Daz. Eg, in a number of cases a multiplier of -1 or +1 on the y and z axis are enough. But there some bones in particular (lShoulderBend, lCollar, rCollar, abdomenUpper) that I can’t programmatically map.

Looking at bone.py, I think the answer may be to correct roll or euler order for these selective bones.

Examples with local rotations:

pelvis: 
- Blender - x: -7.5, y: -12.5, z:  27
- Daz -     x: -7.5, y:  12.5, z: -27 (eg, x, y*-1, z*-1) - SUCCESS

abdomenLower:
- Blender - x:  7.5, y:  12.5, z: -27
- Daz -     x:  7.5, y:  12.5, z: -27 (eg, x, y, z) - SUCCESS

abdomenUpper:
- Blender - x: -12.8, y: -14, z: 18.3
- Daz -     x: -12.8, y: -14, z: 34.3 (eg, x, y, z ???) - FAIL on Z

lCollar:
- Blender - x:  2.9, y: -92.4, z: -34.8
- Daz -     x: -47.4, y: -2.9, z:  34.3 (eg, x ???, y=x*-1, z*-1) - FAIL on X

lShoulderBend (& Twist):
- Blender - x:  7.9,   y: 88.4, z:  14.5
- Daz -     x: -25.38, y: 36.7, z: -53.1 (eg, x ???, y ???, z ???) - FAIL on X,Y,Z

lForearmBend (& Twist):
- Blender - x:  -15.3, y:  0, z:  96.9
- Daz -     x:  -15.3, y: -0, z: -96.9 (eg, x, y*-1, z*-1) - SUCCESS

If you would be so kind as to share your approach on how you may solve this, I would incredibly grateful.

Apologies if this is a distraction on this thread.

Thanks,
Nate

Well, it is not really me who was setting up the UVs, it was Blender. I hadn’t noticed the interpolation field and left it at the default setting. Now there is a global setting that lets you choose the image interpolation, so all textures are interpolated with this setting.

I have no problems with material merging and easy import. The head and body materials should not be combined because they are distinct - different textures. But I agree that the error handling of easy import is not good. The tool invokes a large numbers of subtools, each of which catch the errors themselves, which leads to this strange behaviour.

1 Like

thank you for the feedback and just for clarification: Face and Head are different materials in genesis 8.1. The “Head” material is from the neck to the upper breasts while the “Body” Material is from the upper breasts to the genitalia. in Genesis 8, there’s no Head Material (which I liked) because I don’t need to copy and paste again when I want to fix the materials.

And also, I haven’t noticed the Global Settings for the image interpolation. I might check that later. Thanks!

Daz error.txt (4.5 KB)
Got another error while using EasyImportDaz.

"AttributeError: ‘LoadMorph’ object has no attribute ‘addToMorphSet’

Loading DAZ
File paths cleared
DAZ loaded
Load settings from C:/Users/Come to daddy/import-daz-settings-28x.json
default ‘Scripting’ workspace needed for POV centric Workspace
default ‘Scripting’ workspace needed for POV centric Workspace

Loading C:\Users\COme to daddy\Documents\DAZ 3D\Studio\My Library\Scenes\Chloe.duf
Parsing data
Preprocessing…
Fitting objects with dbz file…
Building objects…
TIFFFetchNormalTag: Warning, Incompatible type for “RichTIFFIPTC”; tag ignored.
TIFFFetchNormalTag: Warning, Incompatible type for “RichTIFFIPTC”; tag ignored.
Ignore <Instance Environment Options 0 N: Environment Options P: None R: None>
Ignore <Instance Tonemapper Options 0 N: Tonemapper Options P: None R: None>
Dependency loop: lToe lMetatarsals
Dependency loop: rToe rMetatarsals
Python: Traceback (most recent call last):
File “C:\Users\Come to daddy\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Diffeomorphic-import_daz-cdf2fe7e3bf7\error.py”, line 247, in execute
self.run(context)
File “C:\Users\Come to daddy\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Diffeomorphic-import_daz-cdf2fe7e3bf7\main.py”, line 122, in run
self.loadDazFile(filepath, context)
File “C:\Users\Come to daddy\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Diffeomorphic-import_daz-cdf2fe7e3bf7\main.py”, line 221, in loadDazFile
inst.poseRig(context)
File “C:\Users\Come to daddy\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Diffeomorphic-import_daz-cdf2fe7e3bf7\figure.py”, line 145, in poseRig
child.buildFormulas(rig, False)
File “C:\Users\Come to daddy\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Diffeomorphic-import_daz-cdf2fe7e3bf7\bone.py”, line 633, in buildFormulas
child.buildFormulas(rig, hide)
File “C:\Users\Come to daddy\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Diffeomorphic-import_daz-cdf2fe7e3bf7\bone.py”, line 633, in buildFormulas
child.buildFormulas(rig, hide)
File “C:\Users\Come to daddy\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Diffeomorphic-import_daz-cdf2fe7e3bf7\bone.py”, line 626, in buildFormulas
buildBoneFormula(self.node, rig, errors)
File “C:\Users\Come to daddy\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Diffeomorphic-import_daz-cdf2fe7e3bf7\load_morph.py”, line 1284, in buildBoneFormula
buildValueDriver(expr[“value”], driven)
File “C:\Users\Come to daddy\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Diffeomorphic-import_daz-cdf2fe7e3bf7\load_morph.py”, line 1275, in buildValueDriver
lm.buildBoneDriver(raw, bname, expr, True)
File “C:\Users\Come to daddy\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Diffeomorphic-import_daz-cdf2fe7e3bf7\load_morph.py”, line 891, in buildBoneDriver
self.makeSimpleBoneDriver(path, uvec, rna, channel, -1, bname, keep)
File “C:\Users\Come to daddy\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Diffeomorphic-import_daz-cdf2fe7e3bf7\load_morph.py”, line 911, in makeSimpleBoneDriver
self.makeBoneDriver(string, vars, channel, rna, path, idx, keep)
File “C:\Users\Come to daddy\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Diffeomorphic-import_daz-cdf2fe7e3bf7\load_morph.py”, line 976, in makeBoneDriver
self.addToMorphSet(raw, None, True)
AttributeError: ‘LoadMorph’ object has no attribute ‘addToMorphSet’

location: C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\modules\bpy\ops.py:132
Error: Python: Traceback (most recent call last):
File “C:\Users\Come to daddy\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Diffeomorphic-import_daz-cdf2fe7e3bf7\error.py”, line 247, in execute
self.run(context)
File “C:\Users\Come to daddy\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Diffeomorphic-import_daz-cdf2fe7e3bf7\main.py”, line 122, in run
self.loadDazFile(filepath, context)
File “C:\Users\Come to daddy\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Diffeomorphic-import_daz-cdf2fe7e3bf7\main.py”, line 221, in loadDazFile
inst.poseRig(context)
File “C:\Users\Come to daddy\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Diffeomorphic-import_daz-cdf2fe7e3bf7\figure.py”, line 145, in poseRig
child.buildFormulas(rig, False)
File “C:\Users\Come to daddy\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Diffeomorphic-import_daz-cdf2fe7e3bf7\bone.py”, line 633, in buildFormul

I don’t seem to have any asset which triggers this bug, but it should be fixed in latest commit.

Yes, it only gets triggered when I have a character that wear many layers of clothes. But thanks for the Image interpolation update, life became 70% easier!