Home Website Youtube GitHub

More flexibility / adaptability when importing weights

It would be great if the skin import would be a little more adaptable. It’s pretty easy to get errors unless things are just right.

  • If a joint specified in the skin file doesn’t exist in the scene, but it doesn’t contain any values in the skin file, then just set the weights without it.

  • Be able to handle namespaces more gracefully, or have an argument to specify namespace. (This is already an open issue. https://github.com/mgear-dev/mgear4/issues/172)

  • Import (ie. UPDATE) weights on an existing skinCluster. If there are additional joints in the skin file, add them to the skinCluster, and then update. Right now it just gives an error. But the creation of the skinCluster and the setting of weights are separate functions in the skin.py script.

Any others? That first one would be a big improvement, especially when you’re removing unused joints, but you forget to re-export the skin.

It’s a bigger ask but another request would just be to handle missing joints that were weighted. If influence is not 1, remove the influence and normalize the weight on the remaining. If it is 1 then apply influence from the next closest or root of the hierarchy.

I feel with the iterative process of rigging, with joints changing names or being added/removed, it’s usually easier to work with poorly transferred weights than starting from scratch because it was skipped entirely.

1 Like

You don’t always necessarily have to start from scratch. You just have to sometimes repair the names temporarily. Or add a temporary holder joint with the old name. Fix the weights, then remove it and re-export.

Well that could be pretty bad. But yeah, “closest joint” taking the weight might be slightly better. Algorithms like this could be interesting, as long as they are explicit overrides that you have to choose, rather than something that could accidentally quietly mangle your weights.

DoYourBest=True.

But yes I agree. Even if the weights were wrong, but mGear did its best to import, it would be nice to have all the joints possible loaded and the skinCluster created. And then you can - for example - import some backup ngSkin layers to repair things. Otherwise if it doesn’t create the skinCluster, you have to choose which joints to skin to again. (Though in production builds, I would turn that off. I’d rather have total failure, and 100% confidence that the weights are either correct or failed.)


Edit to the top post. Another idea for flexibility. Update the weights.

1 Like