Mirror Capture Weights with KineFX

   3335   10   3
User Avatar
Member
19 posts
Joined: 9月 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
19 posts
Joined: 9月 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
7871 posts
Joined: 7月 2005
Offline
Here's a quick test in case this helps.

Attachments:
captMirror.hip (159.6 KB)

User Avatar
Member
19 posts
Joined: 9月 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
7871 posts
Joined: 7月 2005
Offline
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: 11月 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
313 posts
Joined: 10月 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 - 2023年9月25日 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.
User Avatar
Member
100 posts
Joined: 8月 2020
Online
I'm having a hard time mirroring weights. Houdini's workflow when it comes to this issue is a mystery to me. Neither method (copy/leave/average) seems to produce the results I want most of the time, which is, perfectly mirrored weights. Iv'e worked with other 3d s/w and although some were better than others, none was so head scratching inducing as Houdini. For example in Maya, you can select a point and see the values each joint has on it and can manually modify the value. The same in Softimage. Is this possible in Houdini?

In the attached image the circled points just won't budge (I can't share the file) no matter what joint I try to add/remove influence for. Is there any good resource, other than the cryptic docs, from which one can learn tips and good practices when working with this? I hope weight painting and mirroring workflow will get improvements in a future version.

Attachments:
Screenshot 2024-06-30 044123.png (754.5 KB)

User Avatar
Member
373 posts
Joined: 6月 2023
Offline
citizen
I'm having a hard time mirroring weights. Houdini's workflow when it comes to this issue is a mystery to me. Neither method (copy/leave/average) seems to produce the results I want most of the time, which is, perfectly mirrored weights. Iv'e worked with other 3d s/w and although some were better than others, none was so head scratching inducing as Houdini. For example in Maya, you can select a point and see the values each joint has on it and can manually modify the value. The same in Softimage. Is this possible in Houdini?

In the attached image the circled points just won't budge (I can't share the file) no matter what joint I try to add/remove influence for. Is there any good resource, other than the cryptic docs, from which one can learn tips and good practices when working with this? I hope weight painting and mirroring workflow will get improvements in a future version.

Houdini is probably the worst DCC in terms of skinning. My suggestion is to not bother.


That being said, if all the weights are properly mirrored except two points, it's likely just that your model not being perfectly symmetrical. Mirroring capture isn't topology-aware, which means even the smallest imperfections would break it.
User Avatar
Member
100 posts
Joined: 8月 2020
Online
kodra
That being said, if all the weights are properly mirrored except two points, it's likely just that your model not being perfectly symmetrical. Mirroring capture isn't topology-aware, which means even the smallest imperfections would break it.
Hm, it's quite possible it's not perfectly symmetrical. This is not a reasonable requirement since in many cases, this one included, you export the mesh from a sculpting package where small asymmetries at the highest level can result in small shifts at the exported lowest level.
For this model, I've used two paint and two mirror sops as in the 1st pass it was messy and the only solution I found to work (well, not perfectly as one can see) is to add another paint/mirror step. I guess I'll try to see if adding a 3rd will save the day.

Such a weird place to be in, considering how Houdini team's focus the last few versions was to improve character work.

edit: @kodra you were right - the points were a bit off axis, thanks for the suggestion!
Current weight painting is a far cry from kinefx in terms of quality. I hope it gets a serious revamp, very soon.
Edited by citizen - 2024年6月30日 01:31:21
User Avatar
Member
373 posts
Joined: 6月 2023
Offline
SideFX says there will be some topology-aware mirroring tool in H20.5. I don't know the details though.

Hopefully it will at least be a node that symmetrize a mesh while keeping point numbers, topology and UV intact. This way we can easily fix these "slightly off" points painlessly.
  • Quick Links