Mirror Capture Weights with KineFX

   2576   6   2
User Avatar
Member
18 posts
Joined: Sept. 2020
Offline
Greetings all,

First off, KineFX is amazing. I love it! IMHO this is the biggest leap in rigging for a VERY VERY long time. right now I am using it to augmment my rigging in Maya, as that is what my animators are used to wotking in. I love the weight painting system!

I am haveing trouble mirroring the weights. I am using a biharmonic node with a capturelayerpaint node. Most of the references I have found for moirroring weights are for the object based bone system.

I don't really understand the "ruparm/cregion 0" syntax. Do I have to use regions? Are regions generated with the kinefx system? Dose the mirror capture only work with the old system?

I can mirror the weights in maya but I would like to know if it is possible in Houdini.

Thanks in advance for any help.

Cheers,
B
User Avatar
Member
18 posts
Joined: Sept. 2020
Offline
I couldn't get the traditional mirror sop working so used some wrangles to get done what I needed. It seems to work, but your skeleton and your mesh need to be symetrical.

1. Make a point group for the desitination of your weights
2. Unpack the current weight attrs on the skin. (thank you cg wiki!!)
3. create a point wrangle that finds the corresponding mirrored point on skin
vector mirrorPt = set(-@P.x, @P.y, @P.z);
int mirrorIndex = nearpoint(0, mirrorPt);
i@mirrorPt = mirrorIndex;
4. create a point wrangle that finds corresponding mirrored joint point
vector mirrorPt = set(-@P.x, @P.y, @P.z);
int mirrorIndex = nearpoint(0, mirrorPt);
i@mirrorIndex = mirrorIndex;
5. Replace the weights with the mirrored weights the index list with the mirrored index from previous step
float mirriorCaptData[] = point(0, "boneCapture_data", i@mirrorPt);
int mirriorCaptIndex[] = point(0, "boneCapture_index", i@mirrorPt);
int newCaptIndex[] = {};
int mirrorBone;

foreach(int i; int index; mirriorCaptIndex){
    mirrorBone = point(1, "mirrorIndex", index);
    push(newCaptIndex, mirrorBone);
}

f[]@boneCapture_data = mirriorCaptData;
i[]@boneCapture_index = newCaptIndex;
6. Repack attributes and plug them into the bone deform.

I hope this helps anyone struggling with the same problem. If there is a better way to do this please let me know.

Cheers,
B
User Avatar
Member
7722 posts
Joined: July 2005
Online
Here's a quick test in case this helps.

Attachments:
captMirror.hip (159.6 KB)

User Avatar
Member
18 posts
Joined: Sept. 2020
Offline
ohhh ok! I get it.

I was trying to use wild cards like L* R*. So you have to explicitly do a one to one mapping in the node?

Thank you so much for the help.

Cheers,
B
User Avatar
Member
7722 posts
Joined: July 2005
Online
Ah, I had forgotten about using patterns. Using "L*" and "R*" for From/To (respectively) in my file seems to work.

Attachments:
captMirrorWithPattern.hip (159.6 KB)

User Avatar
Member
7 posts
Joined: Nov. 2016
Offline
edward
Ah, I had forgotten about using patterns. Using "L*" and "R*" for From/To (respectively) in my file seems to work.
Thank you very much! Works like a charm
User Avatar
Member
311 posts
Joined: Oct. 2016
Offline
I’ve proposed an RFE/Bug report linking to this thread. This is primarily motivated to help those users who do not use VEX. However, I'm planning to use that to get around the issue mentioned here.

Here's a video demonstrating that simply destroying the weights in the "to" cregions prior to mirroring actually works fine.






Cheers!
Edited by SWest - Sept. 25, 2023 17:18:58

Attachments:
labrador_10_simplified_mirror_issue.hipnc (594.4 KB)
output3.gif (5.4 MB)

Interested in character concepts, modeling, rigging, and animation. Related tool dev with Py and VEX.
  • Quick Links