Jump to content

partition geo based on largest boneCapture weight


Recommended Posts

hey all,

is there a way to partition points based on the 'boneCapture w' attribute with the highest value?

I have a skinned character and for rigging purposes I'd like to slice the geo into parts.
Pretty much what the maya SuOP node 'skinchop' does.

much obliged! 

 

Link to comment
Share on other sites

here is one way

you can get bone weights as array using Capture Attribute Unpack SOP and then use VEX to create name attribute for bone with maximum influence

float maxweight = -1;
int boneidx = -1;
foreach(int i; float weight;f[]@boneCapture_data)
{
    if(weight > maxweight)
    {
        maxweight = weight;
        boneidx = i[]@boneCapture_index[i];        
    }
}
s@name = boneidx != -1 ? string[](detail(0, "boneCapture_pCaptPath"))[boneidx] : ""; 

then promote it to prim and split your mesh using Primitive Split SOP

ts_split_by_maxweighted_bone.hip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...