WeightMaps
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?
Really interesting question. Never thought of doing that, but glad to know it's possible.
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 askinCluster
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.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.
Ah cool, im glad you found a solution! And yeah, more deformers than needed is never good.