I just tried it out, works perfectly, thank you!
Hello everyone … Just wanted to update anyone dealing with importing poses from DAZ to Blender. Like the user @zipo. I spent a bit of days figuring out what was my problem , but exactly like him/her I was experiencing issues converting the Daz timeline to the Blender one. I’ve encountered several problems and here are solutions to them.
When exporting not all the formats are exporting the general transform ( XYZ-Location & rotation ) of the character. Not talking about the hip coordinates , but the main transform for all teh character ( export to scene doesn’t do that ). SOLUTION: Best way to do it is to export as Pose preset or Props preset.
DAZ has implemented ( not sure how to call it ) a combinatory controls for all the bones . For example the Arms front-back are controlling two other dependent controls Arms front-back left & right which in turn control the bending of specific bones. On OSX all the NON-DIRECT manipulative controls ( each one that control other controls , like LEGS SPREAD which controls legs spread left & right ) are not imported. The result is that if you try to import a pose and most likely you used the combinatory controls you would see your pose completely different ( what @zipo is experiencing ). Several problems on this one …
SOLUTION: … This one is tricky.
First copy all the driven poses ( Located in /Users/Shared/Documents/My Daz3d library/Morphs/… ) to a completely different folder. This is because when you open daz the next time it will tell you there’s a conflict with the controllers ( you’ll see what I mean in point 2,3 ). This is needed because each property is not exported as it is expected … for example by right clicking on any of the controllers ( settings gear - top right on each row > parametter settings), you will see the name of the expected custom property in blender( for example pCTRLArmsUpDwn ) . However because of some weird additional files , the controllers in blender are named instead of pCTRLArmsUpDwn , just CTRLArmsUpDown… which ignores the exported values … To fix that …
When copying the Male/Morphs/Base Pose/ folder to another location. Open that folder. delete all the files that start with alias_****. Then open/install a more advanced text editor that has “search&replace in all files from a directory” feature like Notepad++(windows) or Atom(all operating systems). Basically you need to open each file ( hence why the feature for search&replace in a directory ) and fix all the names/id of each controller. Some of them have weird id like instead of #pCTRLArmsUpLeft the default ones are #CTRLArmsUpLeft-1 which is ignoring the actual pCTRLArmsUpLeft prop for the controller. Also you need to change the paths to all the other dependent controllers ( remember you are modifying a copy of these controllers in a separate folder )… So keep the id and url the same as following pCTRLArmsUpLeft ( the same one found when right clicking on the controller gear > parameter settings ), and change the paths to the depending controllers from ( /data/DAZ%203D/Genesis%208/Male/Morphs/DAZ%203D/Base%20Pose/pCTRLlHandFist.dsf to wherever you put it )
Add that folder in the settings of the importer ( the path inside the dsf files is relative to the ones in the settings )… so if you put your copy of the dsf files in c:/some folder/data/Morphs/ … you should add c:/some folder in the settings and have the paths in the .dsf files like /data/Morphs/ …
Add the driven poses controllers again for each character, but this time use them from the copied folder. Btw for the FEMALE there are 4 controllers that are actually morphs controlling the breast parts of the body.
To make it funky all the combinatory controls are not imported so you have to manually create each non-direct control property like pCTRLArmsUpDown which controls pCTRLArmsUpDownLeft which controls pCTRLArmsUpLeft & pCTRLArmsDownLeft. After creating it with their limit values ( important ) , then don’t forget to add them to the keying set so on every new value they’ll get a keyframe. To spice up things these values are not applied to the subcontrollers so I wrote a very dumb script to execute after importing the animation ( at the end of the post ). it’s basically updating all the dependent props from the parent prop.
Forgot to mention that before import you need to make all bones posable ( described in the docs ), first tab corrections-> general
Unfortunately we are ALMOST DONE. Now import one more character without adding driven poses controls. If you enable the visibility of the bones of the armature from layer 2 on the character with the CONTROLS you’ll see that for example the rThighTwist doesn’t have a BONE custom property DazRotMode which will trick the importer of the value the bone is twisted . You need to add DazRotMode custom properties for all the bones on the character with controls looking at the custom properties from the character without controls . Some bones have ZYX , some XYZ , some differently. The facial expressions bones are fine so don’t check these. only the body ones. And btw you can select multiple bones and right click on the BONE custom property and click copy to selected and will create and copy the values from the active bone saving you a lot of copy-paste.
Finally when all of this is done. you are ready to import … when imported you need to run the script to update the children props from the parent and you’ll get a perfect copy of the pose from Daz to Blender. Run it just once and set the FRAME_START & FRAME_END. Sorry I’m not a python developer so this was my first python script so no checks and it’s really dumb from programing point of view, but at least is working. ( FIND it at the end of the post )
Hope that this can be fixed in the importer itself. AND btw … even with such errors … I can’t thank enough Thomas for the wonderful work he has done so far with this plugin. Thank you so much. I’ve tried all the possible options for exporting from DAZ , but all of the original ones were not working at all. Was complete bananas. Thanks to his plug-in I’m able to continue with my project.
SCRIPT TO UPDATE PROPERTIES:
import bpy from collections import OrderedDict ############ SETUP FRAME_START = 1 FRAME_END = 107 # # # # # # # # # # # # PROPERTIES DEFINITIONS # # pCTRLArmsFrntBck min= -1 max= 1 # pCTRLHipBend min= -1 max= 1 # pCTRLKneesUp min= 0 max= 1 # pCTRLLegsSpread min= -0.12 max= 1 # # pCTRLArmsUpDwnLeft min= -1 max= 1 # pCTRLArmsUpDwnRight min= -1 max= 1 # pCTRLArmsUpDwn min= -1 max= 1 # # pCTRLBreastsHangForward min= 0 max= 1 # pCTRLBreastsFlatten min= 0 max= 1 # pCTRLBreastsIn-Out min= -1 max= 1 # pCTRLBreastsSide-Side min= -1 max= 1 # pCTRLBreastsUp-Down min= -1 max= 1 # # pCTRLlHandSpread min= -1 max= 1 # pCTRLlHandGrasp min= -1 max= 1.2 # # pCTRLrHandSpread min= -1 max= 1 # pCTRLrHandGrasp min= -1 max= 1.2 # # # # # # # # # # # # # # # # # # # # # # # # # def console_get(): for area in bpy.context.screen.areas: if area.type == 'CONSOLE': for space in area.spaces: if space.type == 'CONSOLE': return area, space return None, None def log(text): area, space = console_get() if space is None: return context = bpy.context.copy() context.update(dict( space=space, area=area, )) for line in text.split("\n"): bpy.ops.console.scrollback_append(context, text=line, type='OUTPUT') frame = 0 # DEPENDING PROPERTIES MAP dep = OrderedDict() dep['pCTRLArmsFrntBck'] = ['pCTRLArmsFrntBckLeft','pCTRLArmsFrntBckRight'] dep['pCTRLHipBend'] = ['pCTRLHipBendFwd','-pCTRLHipBendBck'] dep['pCTRLKneesUp'] = ['pCTRLKneesUpRight','pCTRLKneesUpLeft'] dep['pCTRLLegsSpread'] = ['pCTRLLegsSpreadRight','pCTRLLegsSpreadLeft'] dep['pCTRLArmsUpDwnLeft'] = ['pCTRLArmsUpLeft','-pCTRLArmsDownLeft'] dep['pCTRLArmsUpDwnRight'] = ['pCTRLArmsUpRight','-pCTRLArmsDownRight'] dep['pCTRLArmsUpDwn'] = ['pCTRLArmsUpDwnLeft','pCTRLArmsUpDwnRight'] dep['pCTRLBreastsHangForward'] = ['pPBMrBreastsHangForward','pPBMlBreastsHangForward'] dep['pCTRLBreastsFlatten'] = ['pPBMrBreastsFlatten','pPBMlBreastsFlatten'] dep['pCTRLBreastsIn-Out'] = ['pCTRLrBreastSide-Side','-pCTRLlBreastSide-Side'] dep['pCTRLBreastsSide-Side'] = ['pCTRLrBreastSide-Side','pCTRLlBreastSide-Side'] dep['pCTRLBreastsUp-Down'] = ['pCTRLrBreastUp-Down','pCTRLlBreastUp-Down'] dep['pCTRLlHandSpread'] = ['pCTRLlThumbInOut','-pCTRLlFingersInOut'] dep['pCTRLlHandGrasp'] = ['pCTRLlThumbGrasp','pCTRLlFingersGrasp'] dep['pCTRLrHandSpread'] = ['pCTRLrThumbInOut','-pCTRLrFingersInOut'] dep['pCTRLrHandGrasp'] = ['pCTRLrThumbGrasp','pCTRLrFingersGrasp'] dep['pCTRLlFingersInOut'] = ['pCTRLlFingersIn','-pCTRLlFingersOut'] dep['pCTRLrFingersInOut'] = ['pCTRLrFingersIn','-pCTRLrFingersOut'] # dep['pCTRLlHandFist'] = ['pCTRLlThumbFist','pCTRLlFingersFist'] more complex formula # dep['pCTRLrHandFist'] = ['pCTRLrThumbFist','pCTRLrFingersFist'] same formula # define property in object # UPDATE DEPENDING PROPERTIES def updateDependency(prop,deps,obj): for dep in deps: if dep[:1]=="-": dep = dep[1:] factor = -1 else: factor = 1 log("updating " + dep + " from " + prop) obj[dep]+=obj[prop]*factor data_path = '["' + dep + '"]' obj.keyframe_insert(data_path) ob = bpy.context.active_object while(frame<=FRAME_END): bpy.context.scene.frame_set(frame) for prop in dep: updateDependency(prop,dep[prop],ob) frame+=1 log("ALL DONE")
To get rid of the error message, you must delete the second DAZ path; obviously it does not exist.
The final DAZ path should end with Content/. Remove Runtime/Libraries/ from it.
Then I notice that you have Russian characters in your file system. This may or may not work. I have tested with files that contain some non-ascii characters (ÅÄÖ), but not with completely different alphabets. Is Russian covered by UTF-8?
The entry in the import menu was gone for a while but is back in the current development version, so if you use that it should be there. You can also import files by using the top-most button in the DAZ Runtime tab. Since you almost always have to tweak the character after import, I usually invoke the importer from there.
thank you for reply!
i have only this archive
still can’t import
can you try?
In DAZ Studio, you need to export a json file with the final world-space coordinates of vertices and bones, cf http://diffeomorphic.blogspot.com/p/export-from-daz-studio.html. The file must have the same name and be located in the same directory as the scene file.
Oh., thank you
Looks like this is not possible for me without windows os (
So that’s why your screenshot looked unfamiliar. People have used the add-on on a Mac, but since I don’t have access to one myself, something may have broken down since then. Make sure that Case-Sensitive Paths is checked in the Settings > General section. Although it should be set by default if you don’t use Windows. Apart from that I don’t know.
Thank you, anyway,
Blender intergation must be!
Go into your shader panel for the transparent material (cornea?) and in the settings section change the Blend Mode to one of the alpha settings (Alpha Blend works for me).
Or you could enable refraction in the material in the same place, and also enable it together with the screen space reflection. Then you can still keep the blending mode to opaque as long as transmission is set to 1 in the material…
Blend mode to Alpha blend does not refract anything and doesn’t look as good as the refracted cornea.
I know this post is old, but how did you get that skin to pop? Looks great. Is this EEVEE?
Yes, eevee. Import settings - Opaque BSDF, Refractive Eevee (for fix eyes). And all materials are IRAY.
Hi ThomasL. Thank you for sharing this great addon!
I’d like to report that I met error with import model at newest version 2.80 (date:2019-05-14 later) & DAZ importer (4d877d8353f1).
I guess that this error caused by the change added to shader nodes recently. (https://developer.blender.org/D4807)
I would really appreciate any help.
well, I tried to quick fix…
at main.py, comment out line 92.
at node.py, comment out line 577 and 578.
(by scene.update() removed)
at cycles.py, comment out line 970 and rewrite to “if texnode == colorSpace:” from “if texnode.color_space == colorSpace:” line 985.
(for ShaderNodeTexImage.color_space removed. in this way, colorspace of image texture node requires setup by hand. )
I know this is perfectly not correct, but I’d like to report that I could import model again at least. I hope somebody find it useful.
Should work with latest commit.
I still have this problem with latest commit:
Loading DAZ DAZ loaded Load settings from /home/alcarinque/import-daz-settings-28x.json Cannot set DazMorphCatsContent to Cannot set DazPoseCatsContent to Settings loaded /run/user/1000/gvfs/ non-existent directory Scale 0.009999999776482582 Loading /tmp/1.duf Parsing data RIGIDITY NYJacketC2 Fitting objects with .json file... Preprocessing... Building objects... EEVE Cornea-1 1 None Traceback (most recent call last): File "/home/alcarinque/.config/blender/2.80/scripts/addons/Diffeomorphic-import-daz-10a2ffe9133f/daz.py", line 51, in execute getMainAsset(self.filepath, context, self) File "/home/alcarinque/.config/blender/2.80/scripts/addons/Diffeomorphic-import-daz-10a2ffe9133f/main.py", line 84, in getMainAsset asset.build(context) File "/home/alcarinque/.config/blender/2.80/scripts/addons/Diffeomorphic-import-daz-10a2ffe9133f/cycles.py", line 80, in build self.tree.build(context) File "/home/alcarinque/.config/blender/2.80/scripts/addons/Diffeomorphic-import-daz-10a2ffe9133f/pbr.py", line 64, in build self.buildPBRNode(scn) File "/home/alcarinque/.config/blender/2.80/scripts/addons/Diffeomorphic-import-daz-10a2ffe9133f/pbr.py", line 144, in buildPBRNode strength,strtex = self.getShellsTex("getChannelSpecularStrength", "NONE", 1.0, False) File "/home/alcarinque/.config/blender/2.80/scripts/addons/Diffeomorphic-import-daz-10a2ffe9133f/cycles.py", line 470, in getShellsTex return self.getColorTex(channel, colorSpace, self.texco, default, useFactor, useTex, maxval) File "/home/alcarinque/.config/blender/2.80/scripts/addons/Diffeomorphic-import-daz-10a2ffe9133f/cycles.py", line 414, in getColorTex tex = self.addTexImageNode(channel, colorSpace, texco) File "/home/alcarinque/.config/blender/2.80/scripts/addons/Diffeomorphic-import-daz-10a2ffe9133f/cycles.py", line 1030, in addTexImageNode group.addTextureNodes(assets, maps, colorSpace) File "/home/alcarinque/.config/blender/2.80/scripts/addons/Diffeomorphic-import-daz-10a2ffe9133f/cgroup.py", line 411, in addTextureNodes texnode,isnew = self.addSingleTexture(3, asset, maps[idx], colorSpace) File "/home/alcarinque/.config/blender/2.80/scripts/addons/Diffeomorphic-import-daz-10a2ffe9133f/cycles.py", line 965, in addSingleTexture texnode = self.getTexNode(key, colorSpace) File "/home/alcarinque/.config/blender/2.80/scripts/addons/Diffeomorphic-import-daz-10a2ffe9133f/cycles.py", line 984, in getTexNode for texnode in self.texnodes[key]: TypeError: 'ShaderNodeTexImage' object is not iterable location: <unknown location>:-1 location: <unknown location>:-1
I see. This was a separate bug, now fixed I think.