- changed status to open
IK to FK transfer
Hello,
I am having a problem with Diffeomorphic.
So, I animated using the FK ( MHX rig ), then I used the Transfer IK to FK from the MHC tab. This results in the animation being a bit broken.
Check out the video, before IK to FK transfer, there is no clipping between the Hand and Leg. After, there is some clipping.
Also, If I save that as a Daz pose and load it in Daz, the clipping is even more accentuated.
Plugin version 4.2.1, Blender 4.2.1
Video here: https://drive.google.com/file/d/1--OFUMBTXS7Em6VSYrv6TtEnWFCnitcA/view?usp=sharing
Any ideas on how to fix this, please?
Comments (34)
-
repo owner -
To export back to daz it is mandatory to disable all the fancy ik features mhx provides, as stretchy limbs, spine ik etc, because those can’t transfer to the daz studio fk animation, that is, daz studio only removes limits for rotations, not for translations. The second thing is to remove limits in blender, that’s necessary because ik and fk have different limits, when you load the animation back to daz it will ask you to remove limits as well.
p.s. Another thing is of course to use the exact same figures and jcms, especially for precise contacts as they happen in your video.
-
reporter Thank you for your reply.
I am using the same figures ( created the character in Daz, exported to blender, animated, baked, exported anim to Daz on the same character ).
I have removed limits in Daz, it didn’t help.
I have removed Limits and Locks in Blender ( from the Daz Runtime Tab ) and selected Transfer IK to FK with the Spine option disabled.The result is identical as before.
You can check the blend file here: https://drive.google.com/file/d/19WDlWFJQoECm4X_kYLw6ZMeQ_Y5hJwEq/view?usp=sharing . The file is saved before baking ( IK transfer ) and before removing limits and locks.
Maybe you could help me figure what I am doing wrong?Regards, Alex.
-
You’re using the “keep daz rig“ option, this way you have to use mute/unmute to bake the rig, not transfer ik to fk.
steps:
- select the daz rig
- runtime > posing > mute control rig
possible bug for @Thomas. Unfortunately in your case it doesn’t work because there’s a python error, I’m not sure what “mustard simplify“ is but Thomas may want to give a look.
Luckily, instead of mute/unmute you can also use the blender bake tool, then export to daz as usual. I can’t verify in daz because I don’t have the daz scene but once baked it works fine in blender so there’s no reason it shouldn’t work back in daz.
steps:
- select the daz rig
- pose > animation > bake action
-
reporter Thank you for your reply.
mustard simplify is an addon that simplifies the scene so you can see the actual movement when animating.
https://github.com/Mustard2/MustardSimplifyI have tried the “mute rig” and after disabling the “Simplify “ add-on, it worked to bake. However, In daz, the pose is different.
Recording here:
https://drive.google.com/file/d/1o7MlyTX7eBjUgk62CGRM9G88nsX-7Cdf/view?usp=sharingBake action: I tried this before, but I also did it now with your settings:
I need the Custom Properties for Morphs ( unless I am mistaken ), so I tried with Rotatio+ Custom Properties selected.
After Bake, the hand was distanced from the leg:
https://drive.google.com/file/d/1tV80f3myipWJ7rMgtKWKMsiJ2eF8Dtcw/view?usp=sharing
I haven’t tested in Daz, as I assumed it will be broken there too.Again, I have tried with Location+Rotatio+Custom , in blender it looks good, in Daz it’s broken.
https://drive.google.com/file/d/13DgQMhaC-zECZ3bebpCrkQ85-6MGoaHv/view?usp=sharingIN the recording above, towards the end, you can also see me disabling limits and locks in Daz, the result is the same.
-
reporter Also, if you would want, I can do a call and share my screen ( Teams or Discord ), if it helps figuring this out faster
-
I had a look at mustard and I believe it could interfere with diffeomorphic so don’t use it. That is, mustard is not smart enough to understand what to safely “simplify” in diffeomorphic scenes.
As for bake action, as explained above you have to bake the daz rig, not the mhx rig, it doesn’t work on mhx that’s why mhx has its own bake tools. Same when you save the pose preset you have to save the daz rig not mhx, I mean if you didn’t.
My settings above are for the bone animation and it will work fine in daz studio if you disable limits. For the face animation I’m afraid the only way is to use mute/unmute, which I can’t test because of the mustard error.
If you want me to check the scene then please provide the blend file without mustard. Then I also need the duf file for the daz scene if you want me to check the daz export. Also reference the figures you used providing a link to their product pages. Of course it would be much easier if you can provide a test animation using the standard G8 figures instead of cutom figures.
-
reporter I have done a test with mustard disabled, and the result is the same….
For the back action, could you please guide me on how to bake the Daz rig? I’m not sure how to do that.
The duf file, I cna share it, but there are a lot of assets used on the characters. I’ll try to create a new anim on a standard G8 and share it if I can’t figure out how the bake Daz rig works.
-
Just select the daz rig then bake action with the parameters I provided above, then save the pose preset. But again that will only bake the bones, not the morphs. If you can provide a simple animation with standard G8 figures that would be ideal for testing.
-
reporter The way to Bake the Daz rig that I tried:
https://drive.google.com/file/d/1lSznEhiEaNsmUg0cZ35LhphFp_vYCHkB/view?usp=sharingBoth characters had Rotation and Lock limits OFF in Daz.
Also, in Daz, the female character was offset on the Y axis. She was palced at 0.0, when she should have been at 16.79 .
-
reporter Any chance we could do a screen share, please?
It would be much faster than creating a new anim with base characters .
You can reach me on Discord ( alexs_dbg ) or on email: dbgstd@gmail.com -
reporter @thomas
Any chance you could help me with this during a call? I can pay you for your time.
Sorry to keep pushing like this, but I am in a major rush to do the animations for my next game project update, and I am really running behind… -
repo owner I can confirm that something is wrong with FK snapping of the hands. Will look into that later.
-
repo owner The problem seems to be rotation limits. Certain IK poses correspond to FK poses that are out of bounds. Limit rotation constraints will then prevent perfect snapping. To avoid that you can disable the Limits button in the Properties panel; the limit status is reflected in the checkbox.
-
The female is at zero because you didn’t check the object in bake data, as shown in my settings above. It’s peculiar that you keep complaining for it not working but don’t follow the steps and instructions I give you. This way of course we can’t never reach an end.
Again, I need a blend file without mustard otherwise I get a python error, and the daz scene with references if you want me to check everything. Then personally I never export back to daz so I’m not an expert on this, but I’m confident I can help you find a way or some bug to report to Thomas. To report and fix a bug it is necessary to have test files so screen sharing wouldn’t work.
p.s. I’m not sure why you have to export back to daz for a game project, wouldn’t it be easier to just render in blender ?
-
4.2.1.2303
bug for Thomas. Michael 8.1. I get an error when importing Michael 8.1, doesn’t happen with G81M G81F Victoria 8.1 so this is specific to Michael 8.1. If you can fix this then I can try a test animation for DBG with Victoria 8.1 and Micheal 8.1, so to include custom figures in the test file and see how it goes.
update. Tried with a clean content folder with only G81M Michael 8.1 installed and I get the same error. Just to be sure it wasn’t some corrupted file.
steps:
- easy import Michael 8.1 with genesis 8.1 presets
-
reporter @Allesandro I missed the Object tick in the Bake screen. Not intentional, just a mistake.
It did work as you said it should :) . Thank you!!!!
Also, I have tested with Location+Rotatio+Custom properties on Bake, and it works. Also, in Daz I am getting all the morphs animated too. The Location was necessary as some breast movement was animated both with Location and Rotation ( to get a better movement ).For the Mustard, I have tested after disabling the addon in Blender, and it bakes fine in Blender, but in Daz, there still is a small alignment issue ( not much, maybe 1-2 cm offsets on some bones ). I have uploaded the file here: https://drive.google.com/file/d/18jqWooRT2vVLzIL-QrOZOve8VuPAx3JV/view?usp=sharing
As to why I need to go back to Daz for my project: It’s a VN style game, with renders ( not real time ), and already 1500 renders were done in Daz. I have tried to migrate full scenes and render them in Blender, but I am getting frequent crashes ( Threadripper 3960X, 2X3090, 128 GB Ram, SSD drives ) and having a hard time to get the same image quality ( materials, lights, etc ) as I am getting in Daz. Now, I have used Daz for 7-8 years now, I am familiar with how it works, but I just started using Blender recently.
@Thomas
I have removed limits in the MHX panel, then used IK to FK ( I assumed that is the method you indicated to bake?? ), but the result is really broken in Blender.
I uploaded a recording here: https://drive.google.com/file/d/1yvSh5A5vfA31IecHWOHCGgfbG-197G97/view?usp=sharing
-
I’m glad you got it. Not sure what you mean by the 1-2 cm offset but I need the daz scene if you want me to check it. Be aware that translations are used only for the face and breast bones, while for the body bones daz studio doesn’t allow to translate. Then if it works fine can we close as resolved ?
-
reporter I think I have spoken too early.
While the scene I was working on previously exported fine in the end, the new one doesn’t.Here is what I tried: ( in all cases Limits are Off in DAZ )
Blende Bake - Rotaion Only: https://drive.google.com/file/d/12vumecOhx3Yn-SXghWJM3v_WKc0cSdna/view?usp=drive_link
The result is sliding feet and hands in Blender.Blender Bake: Rot+Loc+Custom : https://drive.google.com/file/d/1AiHR_Gx7njD486JaBcRv89jXHkc1s20M/view?usp=drive_link
No sliding in Blender, but in Daz the legs are not as they should be ( some offset on legs )Blender Bake: Rot+Custom: https://drive.google.com/file/d/1Jrzc3yNFMQK0IvZRQzA7QrNxQLTWlaOy/view?usp=drive_link
Again, sliding in Blender.Daz Runtime: Mute Control Rig: https://drive.google.com/file/d/1IemG41nZN_U-XlZ6H1ZYltODJrzu9X7L/view?usp=drive_link
No Sliding in Blender, but in Daz the legs are offset.I have uploaded the Daz file: https://drive.google.com/file/d/15sAQbkEmDnnbpwKbaIMLEHt484-S7fZw/view?usp=drive_link
You will need:
https://www.daz3d.com/melani-for-genesis-8-female
https://www.daz3d.com/novak-revisited-hd-for-genesis-81-male
https://www.renderotica.com/store/sku/68033_New-Gens-For-Victoria-8
https://www.renderotica.com/store/sku/59565_XYBlender file here: https://drive.google.com/file/d/1pJJodQzrjL7bdo-LpJpzgLbbNJu2Qr2m/view?usp=drive_link
-
repo owner To simplify things, I moved to frame 186 and selected Astrid-mhx. The limits definitely play a role here. If I snap the left hand to FK, and then move the IK Hand Left slider, the hand moves between its FK and IK values. They are different. If I do the same thing with limits off, the left hand doesn’t move.
The weird behaviour at the end, where Astrid rises up, is caused by spine IK. That is a (mis-)feature that I don’t use myself, and I seems like you don’t use it either, so it is better not to enable the “Include Spine” option.
As Alessandro already reported, the mustard plugin does something that prevents baking.
Edit: This was tested with the first file you uploaded.
-
reporter Thomas, are you referring to Transfer IK to FK function?
-
The offset in daz is because you didn’t unlock the figure, that is, blender is using some rotation axes that are locked in daz studio. Once you unlock it works fine.
steps in daz studio:
- melani > select children
- edit > figure > lock > unlock selected nodes
p.s. note. @Thomas, ideally there’s no reason for a IK rig to don’t respect the FK locks. I mean, for daz figures, while IK limits are usually off so can’t cope with FK limits, IK locks are usually a superset for ik chains to work thus compatible, that is, the FK rig locks less channels than IK. Anyway it’s not a big deal to unlock the figure in daz if MHX requires so.
-
@Thomas Please let us know if you can fix the Michael bug so we can close as resolved.
-
repo owner I cannot reproduce the Michael bug, but that may depend on the installed database. I had a look at the code and think that the error shouldn’t appear anymore.
-
reporter I do have one more question, please.
To transfer the XY penis animation, how should I do?
At the moment, I am doing this:
Before I bake the Male model, using the Blender Bake, I select only the XY bones in the MHX rig and do bake on those, with the “Only Selected “ option.
Then, I save the pose ( selecting the Daz rig ).
Then I go in Daz and load that pose only on the XY.This loads some animation, but it’s not always correct ( for some frames is spot on, for some is not ). XY was set as Unlocked and Limits off in Daz.
IS there a better way of doing it?
-
-
@Thomas. Michael bug.
The last commit 939efb5 doesn’t resolve the issue. You have to easy import Michael 8.1 with the full genesis 8.1 preset, otherwise the error doesn’t arise. Looking at the daz studio log I found there’s a warning when loading the figure, so it seems Michael 8.1 has something wrong to start with but daz studio handles it.
Indeed if I look at the FACS expressions for Michael 8.1 there’s no “Pain“ expression in daz studio, so this is probably a leftover file. Let me know if this helps.
2024-09-25 21:17:20.385 [WARNING] :: ..\..\..\..\..\src\sdksource\fileinput\dzassetdaz.cpp(6969): Formula target property not found: Genesis8_1Male:/data/Daz%203D/Genesis%208/Male%208_1/Morphs/Daz%203D/FACSExpressions/facs_ctrl_Pain.dsf#facs_ctrl_Pain?value - in file: /data/Daz%203D/Genesis%208/Male%208_1/Morphs/Daz%203D/Michael%208_1/facs_Michael8_1_ctrl_Pain.dsf
p.s. To be clear, the warning above means “facs_ctrl_Pain.dsf“ is missing and indeed I don’t have it in the Michael 8.1 package. In this case daz studio reacts ignoring the morph, so ideally the addon should do the same instead of crashing python.
-
4.2.1.2310
p.p.s. It is to be said that, though python crashes, the Micheal 8.1 figure seems imported correctly with everything working from jcms to facs expressions, as far as I can tell. I tried verbosity 4 but doesn’t seem there’s anything interesting in the log file which could reveal the cause of the crash, anyway here it is. Let me know if I can help with anything else.
RuntimeError: Error: Python: Traceback (most recent call last): File "C:\Users\Alessandro\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\import_daz\error.py", line 211, in execute self.run(context) File "C:\Users\Alessandro\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\import_daz\morphing.py", line 1886, in run self.getAllMorphs(namepaths, context) File "C:\Users\Alessandro\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\import_daz\morphing.py", line 599, in getAllMorphs self.loadAllMorphs(namepaths) File "C:\Users\Alessandro\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\import_daz\load_morph.py", line 158, in loadAllMorphs self.makeAllMorphs(namepaths, True) File "C:\Users\Alessandro\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\import_daz\load_morph.py", line 224, in makeAllMorphs asset = getAsset(name, assets) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Alessandro\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\import_daz\load_morph.py", line 197, in getAsset for asset in assets: TypeError: 'NoneType' object is not iterable Location: C:\Program Files\blender-4.2.1-windows-x64\4.2\scripts\modules\bpy\ops.py:109
-
- attached daz_importer_errors.txt
log file for Michael 8.1
-
update. possible solution.
By following the error description I edited the code adding a condition check, and now it seems fixed python doesn’t crash and Michael seems imported fine. Let me know if this is good for you so we can close as resolved.
-
repo owner Fixed in last commit, in a slightly different way. The assets variable occurs in two places, and it must be a list in both.
-
Commit 956d7c6 works fine, thank you. If DBG has nothing to add about exporting animations we can close as resolved.
-
reporter So, in order to update the addon, all I need is to remove the old one in Blender ( need to delete it from install location? ) or just Disable it? And then Download from here and install it normaly?
Not very familiar with Blender or BitBucket… -
To avoid conflicts it is better to delete the old folders then install the new ones. Be aware that in blender 4.2.1 the addon now installs as extension if you install from the zip file.
https://bitbucket.org/Diffeomorphic/import_daz/wiki/Install/Installing the Blender add-ons
https://diffeomorphic.blogspot.com/2024/08/blender-extensions-and-gpl.html
- Log in to comment