|
Post by danimateit on Dec 4, 2013 15:09:24 GMT -5
I have a strange issue where the skin weights are not being correctly transferred from the original rig, when I do a "Send Active Geo to Original agent". At first I thought this may be a problem with weight normalization, but I don't think so now. I have verified that the weights on the set-up geo are normalized and tried it with the skin cluster being in both "interactive" and "post" normalization.
If you still have the mouse simulation file that I sent you a few weeks ago, I can reproduce it in that file. Otherwise, I can send again. Or, I can create a short video demonstrating the problem.
Thanks, Dan
|
|
|
Post by danimateit on Dec 4, 2013 16:41:18 GMT -5
Hey Yeah,
I dug into your scripts and I think I may have found that cause of this problem and found a work-around. I think you will want to make a change to your scripts though.
The problem is a at line 789 of the file McdOriginalAgentFunctions.py. The command is targetSkin = cmds.skinCluster(toSelectedBones = True)[0]
I think you should add a more complete set of attributes to this command, like maximumInfluences, obeyMaxInfluences, dropoffRate and skinMethod. It looks like if you don't specify these, Maya takes them from the Smooth Skin dialog box. You should probably query the original skin cluster node to get the correct values.
In my case, after I created my model and rig, i did some other rigging and had set the dialog box defaults to some crazy value (like max influence = 3 that obey max influences). So these defaults are what was used when I came back to my mouse project.
So the work-around in my case it just to set the defaults to whatever I used on my original rig.
I do think you will want to change your script at some point, because otherwise you can get some really strange results that you may not notice until you get to the render stage.
BTW, your agent match debug tool was essential to finding this problem.
All the best, Dan
|
|
|
Post by Yeah YANG on Dec 5, 2013 3:04:53 GMT -5
Dear Dan, I read you description carefully. Thank you so much for pointing this out and appreciate you spent your time to dig this out!! Thank you very much!! And we'll try to fix it in this week:) Hope this was not brought you too much trouble. Talk you soon!! Best, --Yeah Hey Yeah, I dug into your scripts and I think I may have found that cause of this problem and found a work-around. I think you will want to make a change to your scripts though. The problem is a at line 789 of the file McdOriginalAgentFunctions.py. The command is targetSkin = cmds.skinCluster(toSelectedBones = True)[0] I think you should add a more complete set of attributes to this command, like maximumInfluences, obeyMaxInfluences, dropoffRate and skinMethod. It looks like if you don't specify these, Maya takes them from the Smooth Skin dialog box. You should probably query the original skin cluster node to get the correct values. In my case, after I created my model and rig, i did some other rigging and had set the dialog box defaults to some crazy value (like max influence = 3 that obey max influences). So these defaults are what was used when I came back to my mouse project. So the work-around in my case it just to set the defaults to whatever I used on my original rig. I do think you will want to change your script at some point, because otherwise you can get some really strange results that you may not notice until you get to the render stage. BTW, your agent match debug tool was essential to finding this problem. All the best, Dan
|
|
|
Post by Yeah YANG on Dec 7, 2013 22:01:32 GMT -5
Dear Dan, Thank you for your test and feedback, This issue has been fixed and we changed the code at the line of 1033 like below: mayaVersion = int(mel.eval("getApplicationVersionAsFloat")) skin_bm = 0 if mayaVersion >= 2013: skin_bm = cmds.getAttr(skin0 + ".bindMethod") skin_mi = cmds.getAttr(skin0 + ".maxInfluences") skin_mmi = cmds.getAttr(skin0 + ".maintainMaxInfluences") skin_dr = cmds.getAttr(skin0 + ".dropoffRate") skin_sm = cmds.getAttr(skin0 + ".skinningMethod") if mayaVersion >= 2013: cmds.skinCluster(newJnt, newMesh, ibp=1, bm=skin_bm, dr=skin_dr, tsb=1, mi=skin_mi, nw=1, omi = skin_mmi, sm = skin_sm) else: cmds.skinCluster(newJnt, newMesh, ibp=1, ih=1, dr=skin_dr, tsb=1, mi=skin_mi, nw=1, omi = skin_mmi, sm = skin_sm)We'll upload the latest version in next minor fix upgrade; Thank you very much! --Yeah Hey Yeah, I dug into your scripts and I think I may have found that cause of this problem and found a work-around. I think you will want to make a change to your scripts though. The problem is a at line 789 of the file McdOriginalAgentFunctions.py. The command is targetSkin = cmds.skinCluster(toSelectedBones = True)[0] I think you should add a more complete set of attributes to this command, like maximumInfluences, obeyMaxInfluences, dropoffRate and skinMethod. It looks like if you don't specify these, Maya takes them from the Smooth Skin dialog box. You should probably query the original skin cluster node to get the correct values. In my case, after I created my model and rig, i did some other rigging and had set the dialog box defaults to some crazy value (like max influence = 3 that obey max influences). So these defaults are what was used when I came back to my mouse project. So the work-around in my case it just to set the defaults to whatever I used on my original rig. I do think you will want to change your script at some point, because otherwise you can get some really strange results that you may not notice until you get to the render stage. BTW, your agent match debug tool was essential to finding this problem. All the best, Dan
|
|
|
Post by danimateit on Dec 8, 2013 15:56:45 GMT -5
Pure Awesomeness!
Thank you
|
|
|
Post by danimateit on Dec 12, 2013 9:56:19 GMT -5
Hi Yeah, I just installed the latest version. I doesn't look like this update is in there yet. No problem, just thought I'd remind you. Also, I think you may have missed something in the new code. I think you still want to assign the output of the .skinCluster command to 'targetSkin', since that is used later in the script to transfer the skin weights. Like this: if mayaVersion >= 2013: targetSkin = cmds.skinCluster(newJnt, newMesh, ibp=1, bm=skin_bm, dr=skin_dr, tsb=1, mi=skin_mi, nw=1, omi = skin_mmi, sm = skin_sm) else: targetSkin = cmds.skinCluster(newJnt, newMesh, ibp=1, ih=1, dr=skin_dr, tsb=1, mi=skin_mi, nw=1, omi = skin_mmi, sm = skin_sm) Dan
|
|
|
Post by Yeah YANG on Dec 12, 2013 20:00:16 GMT -5
Hello Dan, Thank you very much!! I'll take a look in detail and add your code:) Also we're going to release a fix version this weekend, and your problem will be solved in it:) Also we'll including the Render LOD inside:) Thank you! --Yeah Hi Yeah, I just installed the latest version. I doesn't look like this update is in there yet. No problem, just thought I'd remind you. Also, I think you may have missed something in the new code. I think you still want to assign the output of the .skinCluster command to 'targetSkin', since that is used later in the script to transfer the skin weights. Like this: if mayaVersion >= 2013: targetSkin = cmds.skinCluster(newJnt, newMesh, ibp=1, bm=skin_bm, dr=skin_dr, tsb=1, mi=skin_mi, nw=1, omi = skin_mmi, sm = skin_sm) else: targetSkin = cmds.skinCluster(newJnt, newMesh, ibp=1, ih=1, dr=skin_dr, tsb=1, mi=skin_mi, nw=1, omi = skin_mmi, sm = skin_sm) Dan
|
|
|
Post by Yeah YANG on Dec 18, 2013 21:55:42 GMT -5
Hello Dan, Actually, currently is using the new code, "CopyGeoFromSetupAndSkinToOA" (current use) "CopyGeoFromSetupAndSkinToOA1" (old use) the current version don't need the target skin, it used the maya native skin copy system. Also, yes you're right, we're not update the version yet because we're upgrading the Entirely PhysX engine from 3.1 to 3.3, and it still need some days to upload. If you need this update, please download the code in attachment, and put it to the: <...>\Basefount\Miarmy\maya\scripts Thank you very much on this!! Merry Christmas! --Yeah Hi Yeah, I just installed the latest version. I doesn't look like this update is in there yet. No problem, just thought I'd remind you. Also, I think you may have missed something in the new code. I think you still want to assign the output of the .skinCluster command to 'targetSkin', since that is used later in the script to transfer the skin weights. Like this: if mayaVersion >= 2013: targetSkin = cmds.skinCluster(newJnt, newMesh, ibp=1, bm=skin_bm, dr=skin_dr, tsb=1, mi=skin_mi, nw=1, omi = skin_mmi, sm = skin_sm) else: targetSkin = cmds.skinCluster(newJnt, newMesh, ibp=1, ih=1, dr=skin_dr, tsb=1, mi=skin_mi, nw=1, omi = skin_mmi, sm = skin_sm) Dan Attachments:
|
|