A look at the bindPreMatrix

The other day I looked for a way to control the pivot at a skinClusters influence(s), using a transform. This is what I came up with.

Please to make click! You see my movie file..


14 thoughts on “A look at the bindPreMatrix”

  1. He that’s a great technique my friend..I’ve never knew about that.Awesome..i had a script that would enable me to move joint around if i was not happy about the deformation I got..but this is much better.What aplication are you thinking about for this kindda stuff..just currious i guess, I already see few one myself.:)

  2. Yeah I guess you could use it for a lot of things. I thought of using it to drive some micro ctrls, that ride on top of other deformers.

    I would love to hear your thoughts!?

  3. mmm..actually after trying I see that there is a problem when killing the connection from the joint WIM to the skinclusterBPM that was made the shape of the object doesn’t maintain the position like it does in the video, in that case it’s quite useless, how do you do that, you say that you feed the skinCluster with the new Info in the script but how?


  4. Yes, The connection can’t be disconnected, just like that. What I do for the “reset bind state” mel tool (Run from my menu in the video), is to getAttr the worldInverseMatrix from the influence and the setAttr that in the bindPreMatrix of the skinCluster. Hope that makes sence

  5. Yes definetly..cool..didn’t think you could manually set the matrix of the bindPreMatix.thanks for sharing.

  6. I’m having very hard time refeeding the matrix into the skinCluster using script, always give me errors, even when I feed a matrix variable create with the right numbers already (without converting from float[] to matrix).
    Weird enough it works fine if i connect the 4*4 matrix node made with the same parameters as in the matrix variable..:(..go figure..any thought on that Sune?

  7. Here is the most important lines from the code I wrote. Might not be the smoothest.. first time I tried working with matrix attributes.

    Line 1:
    float $jointMatrix[] = `getAttr ($node + “.worldInverseMatrix[0]”)`;
    Line 2:
    setAttr ($skinCluster + “.bindPreMatrix[” + $skinMatrix[1] + “]”) -type “matrix” $jointMatrix[0] $jointMatrix[1] $jointMatrix[2] $jointMatrix[3] $jointMatrix[4] $jointMatrix[5] $jointMatrix[6] $jointMatrix[7] $jointMatrix[8] $jointMatrix[9] $jointMatrix[10] $jointMatrix[11] $jointMatrix[12] $jointMatrix[13] $jointMatrix[14] $jointMatrix[15];

    Hope this helps

  8. Hey Sune! First – Great blog 😀 just found it. I have just made my site and it has blog too. I hope to write usefull stuff like this topic I see here 🙂 Nice tip for that BindPreMatriX ! Thanks for sharing! Also, can I link your blog in my site? 🙂
    Thanks.Marin Petrov.

  9. Hey Marin! Thank you for your comments. You can for sure link to this blog! Looking forward to having a look at your site.
    Cheers 🙂

  10. Thanks Sune 🙂 You are plugged! http://www.scroll-lock.eu is my site. Btw I was playing with that BindPreMatrix the other day. What I needed some time ago is to have a moving pivot thingy and thought it would be useful for that. I used to do that thing with inverse node , so when you move the parent , the child stays in place. But that was good as long as you don`t key the parent, after that everything moves in strange directions. So you can move the pivot only at the beginning of your animation, after that it must stays there. Now i wanted to try your method. But It seems that it`s the same – you can move the locator /in your film/ only once, after that you can`t animate with it. You and thematt are talking about refeeding the BPM information – is that the point i`m missing? If you refeed it every time you make a key of the locator , is it possible the mesh to stays where it is? I hope I make some sense. Thanks

  11. Hi!

    For the “Reset influence” script, I update the bindMatrix attribute with mel.

    For the test in the video, I connect the parentInverseMatrix of a influence to bindPreMatrix. Two diferent things.. just to be clear 🙂

    Since the connection model is “live”, there is no need to update anything. The one thing you can’t do is to break the connection, after it’s been made. If you do, the bindPreMatrix gets set wrong.

    I tried keying both the parent and and the influence several times with the setup from the test and the deformations/transformations look fine.

Leave a Reply

Your email address will not be published.