talk.bindpose.com has been shut down on the 6th of March 2021. You can read a bit more about it here.

You are currently reading an archived copy of the latest content, with all the usernames deleted.

WeightMaps

by user7 posted 14-11-2017 | 4 comments

So i m looking at a model and the modeler gave me "cluster weight exports" so that I would skin eye lids exactly how he did it with clusters. Is there a reliable way of transfering deformer weights ".xml" to skinCluster weights? Or do I have to wright some code to export and import weights (not my strong suite right now)? Do you usualy use plugins for that kind of stuff? Or other solutions?

 

by user66 posted 26-11-2017

Really interesting question. Never thought of doing that, but glad to know it's possible.

 

by user3 posted 15-11-2017

I personally have never had to do anything like that. I suppose to do it with code you can go through the elements of cluster1.weightList[0].weights and store that data in a list, then go through the list and assign the value to a joint using the skinPercent command which is slow, but quite easy to use.

Without messing with code, I suppose you could modify the .xml so it matches the structure of an .xml exported from a skin cluster. I think the only difference is the fact that in the cluster you have just one <weights> block, while in a skinCluster you have one for each joint. Sounds like a mission, though.

I am curious, can you not just use clusters if that's what the modeler has passed you? Otherwise, I would be inclined to just use a skinCluster and paint the weights myself.

 

by user7 posted 15-11-2017

Thanks for the answer. Yeah, I know I m complicating my work. But I can't seem to access the weight value per weighted vertex via python (maybe I don t have the right method). So what I did is take the ".xml" file of the cluster weights, put the interesting values in a dictionnary (vert: value) and just remapped it to a skinCluster using "skinPercent" command. But I just had one bone to weight for the skinCluster, so not much work. As for the why, maybe it s just me but I don t like having other deformers do what the character s skincluster could easily do. I think it just adds up deformers uselessly, but maybe I m wrong about that.

 

by user3 posted 15-11-2017

Ah cool, im glad you found a solution! And yeah, more deformers than needed is never good.